Explorar el Código

feat(deeplinking): offer electron app for download, configurable (#14261)

Offer the default app, but make it configurable for own branded
desktop clients

Signed-off-by: Christoph Settgast <csett86_git@quicksands.de>
factor2
Christoph Settgast hace 1 año
padre
commit
8afdebca08
No account linked to committer's email address

+ 6
- 0
config.js Ver fichero

1201
     //     desktop: {
1201
     //     desktop: {
1202
     //         appName: 'Jitsi Meet',
1202
     //         appName: 'Jitsi Meet',
1203
     //         appScheme: 'jitsi-meet,
1203
     //         appScheme: 'jitsi-meet,
1204
+    //         download: {
1205
+    //             linux:
1206
+    //               'https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet-x86_64.AppImage',
1207
+    //             macos: 'https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.dmg',
1208
+    //             windows: 'https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.exe'
1209
+    //         },
1204
     //         enabled: false
1210
     //         enabled: false
1205
     //     },
1211
     //     },
1206
     //     // If true, any checks to handoff to another application will be prevented
1212
     //     // If true, any checks to handoff to another application will be prevented

+ 2
- 1
lang/main-de.json Ver fichero

219
         "joinInBrowser": "Im Browser",
219
         "joinInBrowser": "Im Browser",
220
         "launchMeetingLabel": "Wie möchten Sie an der Konferenz teilnehmen?",
220
         "launchMeetingLabel": "Wie möchten Sie an der Konferenz teilnehmen?",
221
         "launchWebButton": "Im Web öffnen",
221
         "launchWebButton": "Im Web öffnen",
222
+        "noDesktopApp": "Sie haben die App noch nicht installiert?",
222
         "noMobileApp": "Sie haben die App noch nicht installiert?",
223
         "noMobileApp": "Sie haben die App noch nicht installiert?",
223
         "termsAndConditions": "Indem Sie fortfahren, stimmen Sie unseren <a href='{{termsAndConditionsLink}}' rel='noopener noreferrer' target='_blank'>Nutzungsbedingungen</a> zu.",
224
         "termsAndConditions": "Indem Sie fortfahren, stimmen Sie unseren <a href='{{termsAndConditionsLink}}' rel='noopener noreferrer' target='_blank'>Nutzungsbedingungen</a> zu.",
224
         "title": "Die Konferenz wird in {{app}} geöffnet …",
225
         "title": "Die Konferenz wird in {{app}} geöffnet …",
225
         "titleNew": "Konferenz starten ...",
226
         "titleNew": "Konferenz starten ...",
226
-        "tryAgainButton": "Erneut mit der nativen Applikation versuchen",
227
+        "tryAgainButton": "Erneut versuchen",
227
         "unsupportedBrowser": "Sie verwenden einen Browser, der noch nicht unterstützt wird."
228
         "unsupportedBrowser": "Sie verwenden einen Browser, der noch nicht unterstützt wird."
228
     },
229
     },
229
     "defaultLink": "Bsp.: {{url}}",
230
     "defaultLink": "Bsp.: {{url}}",

+ 1
- 0
lang/main.json Ver fichero

219
         "joinInBrowser": "Join in browser",
219
         "joinInBrowser": "Join in browser",
220
         "launchMeetingLabel": "How do you want to join this meeting?",
220
         "launchMeetingLabel": "How do you want to join this meeting?",
221
         "launchWebButton": "Launch in web",
221
         "launchWebButton": "Launch in web",
222
+        "noDesktopApp": "You don’t have the app?",
222
         "noMobileApp": "You don’t have the app?",
223
         "noMobileApp": "You don’t have the app?",
223
         "termsAndConditions": "By continuing you agree to our <a href='{{termsAndConditionsLink}}' rel='noopener noreferrer' target='_blank'>terms & conditions.</a>",
224
         "termsAndConditions": "By continuing you agree to our <a href='{{termsAndConditionsLink}}' rel='noopener noreferrer' target='_blank'>terms & conditions.</a>",
224
         "title": "Launching your meeting in {{app}}...",
225
         "title": "Launching your meeting in {{app}}...",

+ 7
- 0
react/features/base/config/configType.ts Ver fichero

141
     fDroidUrl?: string;
141
     fDroidUrl?: string;
142
 }
142
 }
143
 
143
 
144
+export interface IDesktopDownloadConfig {
145
+    linux?: string;
146
+    macos?: string;
147
+    windows?: string;
148
+}
149
+
144
 export interface IDeeplinkingDesktopConfig extends IDeeplinkingPlatformConfig {
150
 export interface IDeeplinkingDesktopConfig extends IDeeplinkingPlatformConfig {
151
+    download?: IDesktopDownloadConfig;
145
     enabled: boolean;
152
     enabled: boolean;
146
 }
153
 }
147
 
154
 

+ 7
- 0
react/features/base/config/functions.web.ts Ver fichero

102
 
102
 
103
     desktop.appName = desktop.appName || 'Jitsi Meet';
103
     desktop.appName = desktop.appName || 'Jitsi Meet';
104
     desktop.appScheme = desktop.appScheme || 'jitsi-meet';
104
     desktop.appScheme = desktop.appScheme || 'jitsi-meet';
105
+    desktop.download = desktop.download || {};
106
+    desktop.download.windows = desktop.download.windows
107
+        || 'https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.exe';
108
+    desktop.download.macos = desktop.download.macos
109
+        || 'https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.dmg';
110
+    desktop.download.linux = desktop.download.linux
111
+        || 'https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet-x86_64.AppImage';
105
 
112
 
106
     ios.appName = ios.appName || 'Jitsi Meet';
113
     ios.appName = ios.appName || 'Jitsi Meet';
107
     ios.appScheme = ios.appScheme || 'org.jitsi.meet';
114
     ios.appScheme = ios.appScheme || 'org.jitsi.meet';

+ 2
- 0
react/features/base/react/Platform.web.ts Ver fichero

10
     OS = 'macos';
10
     OS = 'macos';
11
 } else if (userAgent.match(/Windows/i)) {
11
 } else if (userAgent.match(/Windows/i)) {
12
     OS = 'windows';
12
     OS = 'windows';
13
+} else if (userAgent.match(/Linux/i)) {
14
+    OS = 'linux';
13
 }
15
 }
14
 
16
 
15
 /**
17
 /**

+ 19
- 0
react/features/deep-linking/components/DeepLinkingDesktopPage.web.tsx Ver fichero

11
 import { getLegalUrls } from '../../base/config/functions.any';
11
 import { getLegalUrls } from '../../base/config/functions.any';
12
 import { isSupportedBrowser } from '../../base/environment/environment';
12
 import { isSupportedBrowser } from '../../base/environment/environment';
13
 import { translate, translateToHTML } from '../../base/i18n/functions';
13
 import { translate, translateToHTML } from '../../base/i18n/functions';
14
+import Platform from '../../base/react/Platform.web';
14
 import { withPixelLineHeight } from '../../base/styles/functions.web';
15
 import { withPixelLineHeight } from '../../base/styles/functions.web';
15
 import Button from '../../base/ui/components/web/Button';
16
 import Button from '../../base/ui/components/web/Button';
16
 import { BUTTON_TYPES } from '../../base/ui/constants.any';
17
 import { BUTTON_TYPES } from '../../base/ui/constants.any';
85
     const deeplinkingCfg = useSelector((state: IReduxState) =>
86
     const deeplinkingCfg = useSelector((state: IReduxState) =>
86
         state['features/base/config']?.deeplinking || {} as IDeeplinkingConfig);
87
         state['features/base/config']?.deeplinking || {} as IDeeplinkingConfig);
87
 
88
 
89
+    const generateDownloadURL = useCallback(() => {
90
+        const downloadCfg = deeplinkingCfg.desktop?.download;
91
+
92
+        if (downloadCfg) {
93
+            return downloadCfg[Platform.OS as keyof typeof downloadCfg];
94
+        }
95
+    }, [ deeplinkingCfg ]);
96
+
88
     const legalUrls = useSelector(getLegalUrls);
97
     const legalUrls = useSelector(getLegalUrls);
89
 
98
 
90
     const { hideLogo, desktop } = deeplinkingCfg;
99
     const { hideLogo, desktop } = deeplinkingCfg;
134
                             : t(`${_TNS}.descriptionWithoutWeb`, { app: desktop?.appName })
143
                             : t(`${_TNS}.descriptionWithoutWeb`, { app: desktop?.appName })
135
                     }
144
                     }
136
                 </div>
145
                 </div>
146
+                <div className = { styles.descriptionLabel }>
147
+                    {
148
+                        t(`${_TNS}.noDesktopApp`)
149
+                    } &nbsp;
150
+                    <a href = { generateDownloadURL() }>
151
+                        {
152
+                            t(`${_TNS}.downloadApp`)
153
+                        }
154
+                    </a>
155
+                </div>
137
                 <div className = { styles.buttonsContainer }>
156
                 <div className = { styles.buttonsContainer }>
138
                     <Button
157
                     <Button
139
                         label = { t(`${_TNS}.tryAgainButton`) }
158
                         label = { t(`${_TNS}.tryAgainButton`) }

Loading…
Cancelar
Guardar