fix(welcome-page): modify styling for narrow screens (#2724)
* fix(welcome-page): modify styling for narrow screens * squash: fix autoscrolling on mobile safari
This commit is contained in:
parent
16c2bc2d15
commit
d8ad39ed3f
|
@ -1,7 +1,11 @@
|
||||||
|
body.welcome-page {
|
||||||
|
background: inherit;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.welcome {
|
.welcome {
|
||||||
font-family: $welcomePageFontFamily;
|
font-family: $welcomePageFontFamily;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: auto;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
|
@ -19,6 +23,7 @@
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
margin-top: 120px;
|
margin-top: 120px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
max-width: calc(100% - 40px);
|
||||||
min-height: 286px;
|
min-height: 286px;
|
||||||
width: 645px;
|
width: 645px;
|
||||||
}
|
}
|
||||||
|
@ -50,6 +55,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
max-width: calc(100% - 40px);
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,9 @@ const _INTERCEPT_COMPONENT_RULES = [
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This rule describes case when user opens application using mobile
|
* This rule describes case when user opens application using mobile
|
||||||
* browser. In order to promote the app, we choose to suggest the mobile
|
* browser and is attempting to join a conference. In order to promote the
|
||||||
* app even if the browser supports the app (e.g. Google Chrome with
|
* app, we choose to suggest the mobile app even if the browser supports the
|
||||||
* WebRTC support on Android).
|
* app (e.g. Google Chrome with WebRTC support on Android).
|
||||||
*
|
*
|
||||||
* @param {Object} state - The redux state of the app.
|
* @param {Object} state - The redux state of the app.
|
||||||
* @returns {UnsupportedMobileBrowser|void} If the rule is satisfied then
|
* @returns {UnsupportedMobileBrowser|void} If the rule is satisfied then
|
||||||
|
@ -42,8 +42,15 @@ const _INTERCEPT_COMPONENT_RULES = [
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
state => {
|
state => {
|
||||||
const OS = Platform.OS;
|
const OS = Platform.OS;
|
||||||
|
const { room } = state['features/base/conference'];
|
||||||
|
const isUsingMobileBrowser = OS === 'android' || OS === 'ios';
|
||||||
|
|
||||||
if (OS === 'android' || OS === 'ios') {
|
/**
|
||||||
|
* Checking for presence of a room is done so that interception only
|
||||||
|
* occurs when trying to enter a meeting but pages outside of meeting,
|
||||||
|
* like WelcomePage, can still display.
|
||||||
|
*/
|
||||||
|
if (room && isUsingMobileBrowser) {
|
||||||
const mobileAppPromo
|
const mobileAppPromo
|
||||||
= typeof interfaceConfig === 'object'
|
= typeof interfaceConfig === 'object'
|
||||||
&& interfaceConfig.MOBILE_APP_PROMO;
|
&& interfaceConfig.MOBILE_APP_PROMO;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { initAnalytics } from '../../analytics';
|
||||||
import { translate } from '../../base/i18n';
|
import { translate } from '../../base/i18n';
|
||||||
import { isAnalyticsEnabled } from '../../base/lib-jitsi-meet';
|
import { isAnalyticsEnabled } from '../../base/lib-jitsi-meet';
|
||||||
import { Watermarks } from '../../base/react';
|
import { Watermarks } from '../../base/react';
|
||||||
|
import { HideNotificationBarStyle } from '../../unsupported-browser';
|
||||||
|
|
||||||
import { AbstractWelcomePage, _mapStateToProps } from './AbstractWelcomePage';
|
import { AbstractWelcomePage, _mapStateToProps } from './AbstractWelcomePage';
|
||||||
|
|
||||||
|
@ -69,6 +70,8 @@ class WelcomePage extends AbstractWelcomePage {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
document.body.classList.add('welcome-page');
|
||||||
|
|
||||||
// FIXME: This is not the best place for this logic. Ideally we should
|
// FIXME: This is not the best place for this logic. Ideally we should
|
||||||
// use features/base/lib-jitsi-meet#initLib() action for this use case.
|
// use features/base/lib-jitsi-meet#initLib() action for this use case.
|
||||||
// But currently lib-jitsi-meet#initLib()'s logic works for mobile only
|
// But currently lib-jitsi-meet#initLib()'s logic works for mobile only
|
||||||
|
@ -90,6 +93,16 @@ class WelcomePage extends AbstractWelcomePage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the classname used for custom styling of the welcome page.
|
||||||
|
*
|
||||||
|
* @inheritdoc
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
componentWillUnmount() {
|
||||||
|
document.body.classList.remove('welcome-page');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements React's {@link Component#render()}.
|
* Implements React's {@link Component#render()}.
|
||||||
*
|
*
|
||||||
|
@ -150,6 +163,7 @@ class WelcomePage extends AbstractWelcomePage {
|
||||||
ref = { this._setAdditionalContentRef } />
|
ref = { this._setAdditionalContentRef } />
|
||||||
: null }
|
: null }
|
||||||
</div>
|
</div>
|
||||||
|
<HideNotificationBarStyle />
|
||||||
</AtlasKitThemeProvider>
|
</AtlasKitThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue