From f3f9cd3d05f3a201063851099717c0e33741c8a4 Mon Sep 17 00:00:00 2001 From: Calinteodor Date: Mon, 23 May 2022 18:02:14 +0300 Subject: [PATCH] feat(dynamic-branding) add initial mobile SDK customization * feat(dynamic-branding) sdk customization * feat(dynamic-branding) unsetDynamicBranding when we disconnect * feat(dynamic-branding) added branding colors to conference * feat(dynamic-branding) extracted logger to its own file * feat(dynamic-branding) reverted style change * feat(dynamic-branding) unset branding if connection failed * feat(dynamic-branding) removed index.js, updated imports, added ImageBackground component * feat(dynamic-branding) created logger feature object * feat(dynamic-branding) moved brandingStyles to mapStateToProps, used SvGUri * feat(dynamic-branding) created BrandingImageBackground component, fixed styles * feat(dynamic-branding) moved BrandingImageBackground to dynamic-branding feature * feat(dynamic-branding) fixed linter * feat(dynamic-branding) added style comment --- react/features/app/middlewares.native.js | 1 + .../components/native/Conference.js | 31 ++++++++++- .../features/dynamic-branding/actionTypes.ts | 5 ++ .../{actions.js => actions.any.js} | 13 ++--- .../dynamic-branding/actions.native.js | 54 +++++++++++++++++++ .../components/index.native.ts | 1 + .../native/BrandingImageBackground.tsx | 45 ++++++++++++++++ .../components/native/index.ts | 1 + .../components/native/styles.ts | 15 ++++++ react/features/dynamic-branding/index.js | 2 - react/features/dynamic-branding/index.ts | 1 + react/features/dynamic-branding/logger.js | 5 ++ .../dynamic-branding/middleware.native.js | 36 +++++++++++++ .../dynamic-branding/middleware.web.js | 5 +- react/features/dynamic-branding/reducer.js | 7 ++- react/features/face-landmarks/functions.js | 2 +- react/features/feedback/actions.js | 2 +- .../add-people-dialog/web/AddPeopleDialog.js | 2 +- .../components/LargeVideo.native.js | 11 +--- .../features/large-video/components/styles.js | 21 -------- react/features/reactions/functions.any.js | 2 +- react/features/recording/functions.js | 2 +- .../ScreenshotCaptureSummary.js | 2 +- 23 files changed, 212 insertions(+), 54 deletions(-) rename react/features/dynamic-branding/{actions.js => actions.any.js} (89%) create mode 100644 react/features/dynamic-branding/actions.native.js create mode 100644 react/features/dynamic-branding/components/index.native.ts create mode 100644 react/features/dynamic-branding/components/native/BrandingImageBackground.tsx create mode 100644 react/features/dynamic-branding/components/native/index.ts create mode 100644 react/features/dynamic-branding/components/native/styles.ts delete mode 100644 react/features/dynamic-branding/index.js create mode 100644 react/features/dynamic-branding/index.ts create mode 100644 react/features/dynamic-branding/logger.js create mode 100644 react/features/dynamic-branding/middleware.native.js diff --git a/react/features/app/middlewares.native.js b/react/features/app/middlewares.native.js index 1cdf30ff23..bf237c8e94 100644 --- a/react/features/app/middlewares.native.js +++ b/react/features/app/middlewares.native.js @@ -1,6 +1,7 @@ // @flow import '../authentication/middleware'; +import '../dynamic-branding/middleware'; import '../gifs/middleware'; import '../mobile/audio-mode/middleware'; import '../mobile/background/middleware'; diff --git a/react/features/conference/components/native/Conference.js b/react/features/conference/components/native/Conference.js index 369108a125..9bab0a711c 100644 --- a/react/features/conference/components/native/Conference.js +++ b/react/features/conference/components/native/Conference.js @@ -13,6 +13,7 @@ import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants'; import { TestConnectionInfo } from '../../../base/testing'; import { ConferenceNotification, isCalendarEnabled } from '../../../calendar-sync'; import { DisplayNameLabel } from '../../../display-name'; +import { BrandingImageBackground } from '../../../dynamic-branding'; import { FILMSTRIP_SIZE, Filmstrip, @@ -55,6 +56,16 @@ type Props = AbstractProps & { */ _aspectRatio: Symbol, + /** + * Branding styles for conference. + */ + _brandingStyles: Object, + + /** + * Branding image background. + */ + _brandingImageBackgroundUrl: string, + /** * Wherther the calendar feature is enabled or not. */ @@ -214,10 +225,20 @@ class Conference extends AbstractConference { * @returns {ReactElement} */ render() { - const { _fullscreenEnabled } = this.props; + const { + _brandingImageBackgroundUrl, + _brandingStyles, + _fullscreenEnabled + } = this.props; return ( - + +