Quellcode durchsuchen

Add no mobile app component

master
Ilya Daynatovich vor 8 Jahren
Ursprung
Commit
05b7df26e6

+ 1
- 2
css/main.scss Datei anzeigen

68
 @import '404';
68
 @import '404';
69
 @import 'policy';
69
 @import 'policy';
70
 @import 'filmstrip';
70
 @import 'filmstrip';
71
-@import 'unsupported-browser/unsupported-desktop-browser';
72
-@import 'unsupported-browser/unsupported-mobile-browser';
71
+@import 'unsupported-browser/main';
73
 
72
 
74
 /* Modules END */
73
 /* Modules END */

+ 3
- 0
css/unsupported-browser/_main.scss Datei anzeigen

1
+@import 'no-mobile-app';
2
+@import 'unsupported-desktop-browser';
3
+@import 'unsupported-mobile-browser';

+ 21
- 0
css/unsupported-browser/_no-mobile-app.scss Datei anzeigen

1
+.no-mobile-app {
2
+    margin: 30% auto 0;
3
+    width: auto;
4
+    max-width: 25em;
5
+    text-align: center;
6
+
7
+    &__title {
8
+        padding-bottom: em(17, 24);
9
+        border-bottom: 1px solid $auiBorderColor;
10
+        font-weight: 400;
11
+        letter-spacing: 0.5px;
12
+        color: #fff;
13
+    }
14
+
15
+    &__description {
16
+        margin-top: 1em;
17
+        font-size: 17px;
18
+        font-weight: 300;
19
+        letter-spacing: 1px;
20
+    }
21
+}

+ 3
- 1
interface_config.js Datei anzeigen

72
     LOCAL_THUMBNAIL_RATIO: 16/9, //16:9
72
     LOCAL_THUMBNAIL_RATIO: 16/9, //16:9
73
     REMOTE_THUMBNAIL_RATIO: 1, //1:1
73
     REMOTE_THUMBNAIL_RATIO: 1, //1:1
74
     // Documentation reference for the live streaming feature.
74
     // Documentation reference for the live streaming feature.
75
-    LIVE_STREAMING_HELP_LINK: "https://jitsi.org/live"
75
+    LIVE_STREAMING_HELP_LINK: "https://jitsi.org/live",
76
+    // Enabling mobile landing page with the link to mobile app.
77
+    MOBILE_APP_ENABLED: true
76
 };
78
 };

+ 7
- 3
react/features/base/util/interceptComponent.js Datei anzeigen

1
-/* global APP */
1
+/* global APP, interfaceConfig */
2
 
2
 
3
 import { Platform } from '../react';
3
 import { Platform } from '../react';
4
 import {
4
 import {
5
-    UnsupportedDesktopBrowser,
5
+    NoMobileApp,
6
     PluginRequiredBrowser,
6
     PluginRequiredBrowser,
7
+    UnsupportedDesktopBrowser,
7
     UnsupportedMobileBrowser
8
     UnsupportedMobileBrowser
8
 } from '../../unsupported-browser';
9
 } from '../../unsupported-browser';
9
 
10
 
30
         const OS = Platform.OS;
31
         const OS = Platform.OS;
31
 
32
 
32
         if (OS === 'android' || OS === 'ios') {
33
         if (OS === 'android' || OS === 'ios') {
33
-            return UnsupportedMobileBrowser;
34
+            return (
35
+                interfaceConfig.MOBILE_APP_ENABLED
36
+                    ? UnsupportedMobileBrowser
37
+                    : NoMobileApp);
34
         }
38
         }
35
     },
39
     },
36
     () => {
40
     () => {

+ 31
- 0
react/features/unsupported-browser/components/NoMobileApp.js Datei anzeigen

1
+/* global interfaceConfig */
2
+import React, { Component } from 'react';
3
+
4
+/**
5
+ * React component representing no mobile page.
6
+ *
7
+ * @class NoMobileApp
8
+ */
9
+export default class NoMobileApp extends Component {
10
+
11
+    /**
12
+     * Renders the component.
13
+     *
14
+     * @returns {ReactElement}
15
+     */
16
+    render() {
17
+        const ns = 'no-mobile-app';
18
+
19
+        return (
20
+            <div className = { ns }>
21
+                <h2 className = { `${ns}__title` }>
22
+                    Video chat isn't available in the mobile apps
23
+                </h2>
24
+                <p className = { `${ns}__description` }>
25
+                    Please use { interfaceConfig.APP_NAME } on <br />
26
+                    Desktop top join calls.
27
+                </p>
28
+            </div>
29
+        );
30
+    }
31
+}

+ 1
- 0
react/features/unsupported-browser/components/index.js Datei anzeigen

1
+export { default as NoMobileApp } from './NoMobileApp';
1
 export { default as PluginRequiredBrowser } from './PluginRequiredBrowser';
2
 export { default as PluginRequiredBrowser } from './PluginRequiredBrowser';
2
 export { default as UnsupportedDesktopBrowser }
3
 export { default as UnsupportedDesktopBrowser }
3
     from './UnsupportedDesktopBrowser';
4
     from './UnsupportedDesktopBrowser';

Laden…
Abbrechen
Speichern