Kaynağa Gözat

rn: add build information to SettingsView

master
Saúl Ibarra Corretgé 6 yıl önce
ebeveyn
işleme
36eb27e233

+ 3
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/AppInfoModule.java Dosyayı Görüntüle

@@ -64,6 +64,9 @@ class AppInfoModule
64 64
 
65 65
         Map<String, Object> constants = new HashMap<>();
66 66
 
67
+        constants.put(
68
+            "buildNumber",
69
+            packageInfo == null ? "" : String.valueOf(packageInfo.versionCode));
67 70
         constants.put(
68 71
             "name",
69 72
             applicationInfo == null

+ 7
- 0
ios/sdk/src/AppInfo.m Dosyayı Görüntüle

@@ -61,8 +61,15 @@ RCT_EXPORT_MODULE();
61 61
         }
62 62
     }
63 63
 
64
+    // build number
65
+    NSString *buildNumber = infoDictionary[@"CFBundleVersion"];
66
+    if (buildNumber == nil) {
67
+        buildNumber = @"";
68
+    }
69
+
64 70
     return @{
65 71
         @"calendarEnabled": [NSNumber numberWithBool:calendarEnabled],
72
+        @"buildNumber": buildNumber,
66 73
         @"name": name,
67 74
         @"sdkBundlePath": sdkBundlePath,
68 75
         @"version": version

+ 3
- 1
lang/main.json Dosyayı Görüntüle

@@ -560,6 +560,7 @@
560 560
         "alertOk": "OK",
561 561
         "alertTitle": "Warning",
562 562
         "alertURLText": "The entered server URL is invalid",
563
+        "buildInfoSection": "Build Information",
563 564
         "conferenceSection": "Conference",
564 565
         "displayName": "Display name",
565 566
         "email": "Email",
@@ -567,7 +568,8 @@
567 568
         "profileSection": "Profile",
568 569
         "serverURL": "Server URL",
569 570
         "startWithAudioMuted": "Start with audio muted",
570
-        "startWithVideoMuted": "Start with video muted"
571
+        "startWithVideoMuted": "Start with video muted",
572
+        "version": "Version"
571 573
     },
572 574
     "share": {
573 575
         "dialInfoText": "\n\n=====\n\nJust want to dial in on your phone?\n\n__defaultDialInNumber__Click this link to see the dial in phone numbers for this meeting\n__dialInfoPageUrl__",

+ 15
- 8
react/features/settings/components/native/SettingsView.js Dosyayı Görüntüle

@@ -1,14 +1,7 @@
1 1
 // @flow
2 2
 
3 3
 import React from 'react';
4
-import {
5
-    Alert,
6
-    SafeAreaView,
7
-    ScrollView,
8
-    Switch,
9
-    TextInput,
10
-    View
11
-} from 'react-native';
4
+import { Alert, NativeModules, SafeAreaView, ScrollView, Switch, Text, TextInput, View } from 'react-native';
12 5
 
13 6
 import { ColorSchemeRegistry } from '../../../base/color-scheme';
14 7
 import { translate } from '../../../base/i18n';
@@ -27,6 +20,11 @@ import { normalizeUserInputURL } from '../../functions';
27 20
 import styles from './styles';
28 21
 import { HeaderLabel } from '../../../base/react/components/native';
29 22
 
23
+/**
24
+ * Application information module.
25
+ */
26
+const { AppInfo } = NativeModules;
27
+
30 28
 type Props = AbstractProps & {
31 29
 
32 30
     /**
@@ -193,6 +191,15 @@ class SettingsView extends AbstractSettingsView<Props> {
193 191
                             onValueChange = { this._onStartVideoMutedChange }
194 192
                             value = { _settings.startWithVideoMuted } />
195 193
                     </FormRow>
194
+                    <FormSectionHeader
195
+                        label = 'settingsView.buildInfoSection' />
196
+                    <FormRow
197
+                        fieldSeparator = { true }
198
+                        label = 'settingsView.version'>
199
+                        <Text>
200
+                            { `${AppInfo.version} build ${AppInfo.buildNumber}` }
201
+                        </Text>
202
+                    </FormRow>
196 203
                 </ScrollView>
197 204
             </SafeAreaView>
198 205
         );

Loading…
İptal
Kaydet