mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
mobile: add version info (#930)
This commit is contained in:
parent
764e63d869
commit
7cd3e6b1f7
@ -153,6 +153,7 @@ dependencies {
|
||||
compile project(':react-native-document-picker')
|
||||
compile project(':react-native-image-resizer')
|
||||
compile project(':react-native-share-extension')
|
||||
compile project(':react-native-version-info')
|
||||
compile "com.facebook.react:react-native:+"
|
||||
|
||||
// To fix the error below, which happened after adding react-native-camera.
|
||||
|
@ -22,6 +22,8 @@ import org.pgsqlite.SQLitePluginPackage;
|
||||
|
||||
import com.alinz.parkerdan.shareextension.SharePackage;
|
||||
|
||||
import cx.evermeet.versioninfo.RNVersionInfoPackage;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@ -48,7 +50,8 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
new RNFSPackage(),
|
||||
new SQLitePluginPackage(),
|
||||
new VectorIconsPackage(),
|
||||
new SharePackage()
|
||||
new SharePackage(),
|
||||
new RNVersionInfoPackage()
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -31,3 +31,5 @@ project(':react-native-document-picker').projectDir = new File(rootProject.proje
|
||||
include ':app', ':react-native-share-extension'
|
||||
|
||||
project(':react-native-share-extension').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share-extension/android')
|
||||
include ':react-native-version-info'
|
||||
project(':react-native-version-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-version-info/android')
|
||||
|
@ -12,6 +12,7 @@
|
||||
00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
|
||||
00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
|
||||
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
|
||||
065B3D792187B61200002863 /* libRNVersionInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 065B3D772187B5E300002863 /* libRNVersionInfo.a */; };
|
||||
0DAD2E67F6A14BDC8250B927 /* libRNDocumentPicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 82214D3345D846709A314868 /* libRNDocumentPicker.a */; };
|
||||
12AE298E1C0E445682922DAB /* libRNCamera.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E132B594F4FB4C96A2E2B0FF /* libRNCamera.a */; };
|
||||
133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
|
||||
@ -84,6 +85,13 @@
|
||||
remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
|
||||
remoteInfo = RCTVibration;
|
||||
};
|
||||
065B3D762187B5E300002863 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 065B3D412187B5E300002863 /* RNVersionInfo.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||
remoteInfo = RNVersionInfo;
|
||||
};
|
||||
139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
|
||||
@ -409,6 +417,7 @@
|
||||
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; };
|
||||
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; };
|
||||
02C42EA98156482DB00BF86D /* RNDocumentPicker.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNDocumentPicker.xcodeproj; path = "../node_modules/react-native-document-picker/ios/RNDocumentPicker.xcodeproj"; sourceTree = "<group>"; };
|
||||
065B3D412187B5E300002863 /* RNVersionInfo.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNVersionInfo.xcodeproj; path = "../node_modules/react-native-version-info/ios/RNVersionInfo.xcodeproj"; sourceTree = "<group>"; };
|
||||
0EB8BCAEA9AA41CAAE460443 /* libsqlite3.0.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = usr/lib/libsqlite3.0.tbd; sourceTree = SDKROOT; };
|
||||
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
|
||||
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
|
||||
@ -463,6 +472,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
065B3D792187B61200002863 /* libRNVersionInfo.a in Frameworks */,
|
||||
4DDA31241FC88F2400B5A80D /* libRCTPushNotification.a in Frameworks */,
|
||||
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
|
||||
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
|
||||
@ -544,6 +554,14 @@
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
065B3D422187B5E300002863 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
065B3D772187B5E300002863 /* libRNVersionInfo.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
139105B71AF99BAD00B5F7CC /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -748,6 +766,7 @@
|
||||
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
065B3D412187B5E300002863 /* RNVersionInfo.xcodeproj */,
|
||||
4DDA31011FC88EEA00B5A80D /* RCTPushNotification.xcodeproj */,
|
||||
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
|
||||
146833FF1AC3E56700842450 /* React.xcodeproj */,
|
||||
@ -960,6 +979,10 @@
|
||||
ProductGroup = 4D2A85B71FBCE3AC0028537D /* Products */;
|
||||
ProjectRef = 711CBD21F0894B83A2D8E234 /* RNVectorIcons.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 065B3D422187B5E300002863 /* Products */;
|
||||
ProjectRef = 065B3D412187B5E300002863 /* RNVersionInfo.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 4D2A85B51FBCE3AC0028537D /* Products */;
|
||||
ProjectRef = CCDE9E9AF09B45F391B1C2AF /* SQLite.xcodeproj */;
|
||||
@ -1008,6 +1031,13 @@
|
||||
remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
065B3D772187B5E300002863 /* libRNVersionInfo.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNVersionInfo.a;
|
||||
remoteRef = 065B3D762187B5E300002863 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
|
@ -9,9 +9,10 @@ const { themeStyle } = require('lib/components/global-style.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const shared = require('lib/components/shared/config-shared.js');
|
||||
const SyncTargetRegistry = require('lib/SyncTargetRegistry');
|
||||
import VersionInfo from 'react-native-version-info';
|
||||
|
||||
class ConfigScreenComponent extends BaseScreenComponent {
|
||||
|
||||
|
||||
static navigationOptions(options) {
|
||||
return { header: null };
|
||||
}
|
||||
@ -229,7 +230,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
);
|
||||
|
||||
|
||||
settingComps.push(
|
||||
<View key="website_link" style={this.styles().settingContainer}>
|
||||
<TouchableOpacity onPress={() => { Linking.openURL('https://joplin.cozic.net/') }}>
|
||||
@ -246,6 +247,12 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
</View>
|
||||
);
|
||||
|
||||
settingComps.push(
|
||||
<View key="version_info" style={this.styles().settingContainer}>
|
||||
<Text key="version" style={this.styles().settingText}>Version {VersionInfo.appVersion}</Text>
|
||||
</View>
|
||||
);
|
||||
|
||||
return (
|
||||
<View style={this.rootStyle(this.props.theme).root}>
|
||||
<ScreenHeader
|
||||
@ -272,4 +279,4 @@ const ConfigScreen = connect(
|
||||
}
|
||||
)(ConfigScreenComponent)
|
||||
|
||||
module.exports = { ConfigScreen };
|
||||
module.exports = { ConfigScreen };
|
||||
|
29
ReactNativeClient/package-lock.json
generated
29
ReactNativeClient/package-lock.json
generated
@ -929,7 +929,7 @@
|
||||
},
|
||||
"ansi-colors": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
|
||||
"integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
|
||||
"requires": {
|
||||
"ansi-wrap": "^0.1.0"
|
||||
@ -2723,14 +2723,14 @@
|
||||
"dependencies": {
|
||||
"kind-of": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
|
||||
"integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ="
|
||||
}
|
||||
}
|
||||
},
|
||||
"external-editor": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz",
|
||||
"integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==",
|
||||
"requires": {
|
||||
"chardet": "^0.4.0",
|
||||
@ -3684,7 +3684,7 @@
|
||||
},
|
||||
"http-errors": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
|
||||
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
|
||||
"requires": {
|
||||
"depd": "~1.1.2",
|
||||
@ -4788,7 +4788,7 @@
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
||||
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
@ -5824,7 +5824,7 @@
|
||||
},
|
||||
"opn": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "http://registry.npmjs.org/opn/-/opn-3.0.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/opn/-/opn-3.0.3.tgz",
|
||||
"integrity": "sha1-ttmec5n3jWXDuq/+8fsojpuFJDo=",
|
||||
"requires": {
|
||||
"object-assign": "^4.0.1"
|
||||
@ -5994,7 +5994,7 @@
|
||||
},
|
||||
"pegjs": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "http://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz",
|
||||
"integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0="
|
||||
},
|
||||
"performance-now": {
|
||||
@ -6108,7 +6108,7 @@
|
||||
},
|
||||
"pretty-format": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "http://registry.npmjs.org/pretty-format/-/pretty-format-4.3.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-4.3.1.tgz",
|
||||
"integrity": "sha1-UwvlxCs8BbNkFKeipDN6qArNDo0="
|
||||
},
|
||||
"private": {
|
||||
@ -6932,6 +6932,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"react-native-version-info": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-version-info/-/react-native-version-info-0.5.1.tgz",
|
||||
"integrity": "sha512-DFnjbp+EsN/fADwNo4uFryM1KsRmRQOLns2njArAfFOM9faW77BX0wtRgBrtlpm3DKU97W9eI89WP8FGPBgKtA=="
|
||||
},
|
||||
"react-navigation": {
|
||||
"version": "1.0.0-beta.21",
|
||||
"resolved": "https://registry.npmjs.org/react-navigation/-/react-navigation-1.0.0-beta.21.tgz",
|
||||
@ -7034,7 +7039,7 @@
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.6",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
@ -8173,7 +8178,7 @@
|
||||
"dependencies": {
|
||||
"rimraf": {
|
||||
"version": "2.2.8",
|
||||
"resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
|
||||
"integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI="
|
||||
}
|
||||
}
|
||||
@ -8199,7 +8204,7 @@
|
||||
},
|
||||
"through": {
|
||||
"version": "2.3.8",
|
||||
"resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
||||
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
||||
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
|
||||
},
|
||||
"through2": {
|
||||
@ -8810,7 +8815,7 @@
|
||||
"dependencies": {
|
||||
"sax": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "http://registry.npmjs.org/sax/-/sax-1.1.6.tgz",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.1.6.tgz",
|
||||
"integrity": "sha1-XWFr6KXmB9VOEUr65Vt+ry/MMkA="
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,7 @@
|
||||
"react-native-side-menu": "^1.1.3",
|
||||
"react-native-sqlite-storage": "3.3.*",
|
||||
"react-native-vector-icons": "^4.4.2",
|
||||
"react-native-version-info": "^0.5.1",
|
||||
"react-navigation": "^1.0.0-beta.21",
|
||||
"react-redux": "5.0.7",
|
||||
"redux": "4.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user