From f0ba37e605bf7d4352e447d721c0de936e33b194 Mon Sep 17 00:00:00 2001 From: Calin-Teodor Date: Tue, 2 Aug 2022 17:58:26 +0300 Subject: [PATCH] feat(recording/native): added new Button component --- react/features/base/ui/components/_.native.ts | 1 + react/features/base/ui/components/_.web.ts | 1 + react/features/base/ui/components/index.ts | 2 ++ .../base/ui/components/native/index.ts | 1 + .../features/base/ui/components/web/index.ts | 1 + react/features/base/ui/index.ts | 1 + .../Recording/StartRecordingDialogContent.js | 19 ++++++++----------- .../components/Recording/styles.native.js | 8 -------- 8 files changed, 15 insertions(+), 19 deletions(-) create mode 100644 react/features/base/ui/components/_.native.ts create mode 100644 react/features/base/ui/components/_.web.ts create mode 100644 react/features/base/ui/components/index.ts create mode 100644 react/features/base/ui/components/native/index.ts create mode 100644 react/features/base/ui/components/web/index.ts create mode 100644 react/features/base/ui/index.ts diff --git a/react/features/base/ui/components/_.native.ts b/react/features/base/ui/components/_.native.ts new file mode 100644 index 000000000..738c4d2b8 --- /dev/null +++ b/react/features/base/ui/components/_.native.ts @@ -0,0 +1 @@ +export * from './native'; diff --git a/react/features/base/ui/components/_.web.ts b/react/features/base/ui/components/_.web.ts new file mode 100644 index 000000000..b80c83af3 --- /dev/null +++ b/react/features/base/ui/components/_.web.ts @@ -0,0 +1 @@ +export * from './web'; diff --git a/react/features/base/ui/components/index.ts b/react/features/base/ui/components/index.ts new file mode 100644 index 000000000..796480f8e --- /dev/null +++ b/react/features/base/ui/components/index.ts @@ -0,0 +1,2 @@ +// @ts-ignore +export * from './_'; diff --git a/react/features/base/ui/components/native/index.ts b/react/features/base/ui/components/native/index.ts new file mode 100644 index 000000000..eae9c8e3b --- /dev/null +++ b/react/features/base/ui/components/native/index.ts @@ -0,0 +1 @@ +export { default as Button } from './Button'; diff --git a/react/features/base/ui/components/web/index.ts b/react/features/base/ui/components/web/index.ts new file mode 100644 index 000000000..eae9c8e3b --- /dev/null +++ b/react/features/base/ui/components/web/index.ts @@ -0,0 +1 @@ +export { default as Button } from './Button'; diff --git a/react/features/base/ui/index.ts b/react/features/base/ui/index.ts new file mode 100644 index 000000000..07635cbbc --- /dev/null +++ b/react/features/base/ui/index.ts @@ -0,0 +1 @@ +export * from './components'; diff --git a/react/features/recording/components/Recording/StartRecordingDialogContent.js b/react/features/recording/components/Recording/StartRecordingDialogContent.js index 93a98e5c7..db0d2f024 100644 --- a/react/features/recording/components/Recording/StartRecordingDialogContent.js +++ b/react/features/recording/components/Recording/StartRecordingDialogContent.js @@ -1,5 +1,3 @@ -// @flow - import React, { Component } from 'react'; import { @@ -12,7 +10,6 @@ import { } from '../../../base/dialog'; import { translate } from '../../../base/i18n'; import { - Button, Container, Image, LoadingIndicator, @@ -21,6 +18,8 @@ import { } from '../../../base/react'; import { connect } from '../../../base/redux'; import { StyleType } from '../../../base/styles'; +import { Button } from '../../../base/ui'; +import { BUTTON_TYPES } from '../../../base/ui/constants'; import { authorizeDropbox, updateDropboxToken } from '../../../dropbox'; import { isVpaasMeeting } from '../../../jaas/functions'; import { RECORDING_TYPES } from '../../constants'; @@ -435,10 +434,9 @@ class StartRecordingDialogContent extends Component { switchContent = ( + label = { 'recording.signOut' } + onPress = { this._onSignOut } + type = { BUTTON_TYPES.SECONDARY } /> ); @@ -446,10 +444,9 @@ class StartRecordingDialogContent extends Component { switchContent = ( + label = { 'recording.signIn' } + onPress = { this._onSignIn } + type = { BUTTON_TYPES.PRIMARY } /> ); } diff --git a/react/features/recording/components/Recording/styles.native.js b/react/features/recording/components/Recording/styles.native.js index 7d6255796..4ff29c889 100644 --- a/react/features/recording/components/Recording/styles.native.js +++ b/react/features/recording/components/Recording/styles.native.js @@ -146,14 +146,6 @@ ColorSchemeRegistry.register('StartRecordingDialogContent', { color: BaseTheme.palette.text01 }, - signButton: { - backgroundColor: BaseTheme.palette.screen01Header, - color: BaseTheme.palette.ui12, - fontSize: 16, - borderRadius: BaseTheme.shape.borderRadius, - padding: BoxModel.padding * 0.5 - }, - switch: { color: BaseTheme.palette.ui12 },