Sfoglia il codice sorgente

Add no mobile app component

j8
Ilya Daynatovich 8 anni fa
parent
commit
05b7df26e6

+ 1
- 2
css/main.scss Vedi File

@@ -68,7 +68,6 @@
68 68
 @import '404';
69 69
 @import 'policy';
70 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 73
 /* Modules END */

+ 3
- 0
css/unsupported-browser/_main.scss Vedi File

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

+ 21
- 0
css/unsupported-browser/_no-mobile-app.scss Vedi File

@@ -0,0 +1,21 @@
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 Vedi File

@@ -72,5 +72,7 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars
72 72
     LOCAL_THUMBNAIL_RATIO: 16/9, //16:9
73 73
     REMOTE_THUMBNAIL_RATIO: 1, //1:1
74 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 Vedi File

@@ -1,9 +1,10 @@
1
-/* global APP */
1
+/* global APP, interfaceConfig */
2 2
 
3 3
 import { Platform } from '../react';
4 4
 import {
5
-    UnsupportedDesktopBrowser,
5
+    NoMobileApp,
6 6
     PluginRequiredBrowser,
7
+    UnsupportedDesktopBrowser,
7 8
     UnsupportedMobileBrowser
8 9
 } from '../../unsupported-browser';
9 10
 
@@ -30,7 +31,10 @@ const _RULES = [
30 31
         const OS = Platform.OS;
31 32
 
32 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 Vedi File

@@ -0,0 +1,31 @@
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 Vedi File

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

Loading…
Annulla
Salva