rn: add build information to SettingsView

pull/4057/head jitsi-meet_3639
Saúl Ibarra Corretgé 6 years ago committed by Saúl Ibarra Corretgé
parent b791fc32fd
commit 36eb27e233
  1. 3
      android/sdk/src/main/java/org/jitsi/meet/sdk/AppInfoModule.java
  2. 7
      ios/sdk/src/AppInfo.m
  3. 4
      lang/main.json
  4. 23
      react/features/settings/components/native/SettingsView.js

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

@ -61,8 +61,15 @@ RCT_EXPORT_MODULE();
}
}
// build number
NSString *buildNumber = infoDictionary[@"CFBundleVersion"];
if (buildNumber == nil) {
buildNumber = @"";
}
return @{
@"calendarEnabled": [NSNumber numberWithBool:calendarEnabled],
@"buildNumber": buildNumber,
@"name": name,
@"sdkBundlePath": sdkBundlePath,
@"version": version

@ -560,6 +560,7 @@
"alertOk": "OK",
"alertTitle": "Warning",
"alertURLText": "The entered server URL is invalid",
"buildInfoSection": "Build Information",
"conferenceSection": "Conference",
"displayName": "Display name",
"email": "Email",
@ -567,7 +568,8 @@
"profileSection": "Profile",
"serverURL": "Server URL",
"startWithAudioMuted": "Start with audio muted",
"startWithVideoMuted": "Start with video muted"
"startWithVideoMuted": "Start with video muted",
"version": "Version"
},
"share": {
"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__",

@ -1,14 +1,7 @@
// @flow
import React from 'react';
import {
Alert,
SafeAreaView,
ScrollView,
Switch,
TextInput,
View
} from 'react-native';
import { Alert, NativeModules, SafeAreaView, ScrollView, Switch, Text, TextInput, View } from 'react-native';
import { ColorSchemeRegistry } from '../../../base/color-scheme';
import { translate } from '../../../base/i18n';
@ -27,6 +20,11 @@ import { normalizeUserInputURL } from '../../functions';
import styles from './styles';
import { HeaderLabel } from '../../../base/react/components/native';
/**
* Application information module.
*/
const { AppInfo } = NativeModules;
type Props = AbstractProps & {
/**
@ -193,6 +191,15 @@ class SettingsView extends AbstractSettingsView<Props> {
onValueChange = { this._onStartVideoMutedChange }
value = { _settings.startWithVideoMuted } />
</FormRow>
<FormSectionHeader
label = 'settingsView.buildInfoSection' />
<FormRow
fieldSeparator = { true }
label = 'settingsView.version'>
<Text>
{ `${AppInfo.version} build ${AppInfo.buildNumber}` }
</Text>
</FormRow>
</ScrollView>
</SafeAreaView>
);

Loading…
Cancel
Save