mirror of
https://github.com/standardnotes/mobile.git
synced 2026-04-23 15:46:59 -04:00
ComponentView handle offline editors + snjs updates, 3.0.7
This commit is contained in:
@@ -102,8 +102,8 @@ android {
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
|
||||
versionCode 3000060
|
||||
versionName "3.0.6"
|
||||
versionCode 3000070
|
||||
versionName "3.0.7"
|
||||
|
||||
multiDexEnabled true
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
|
||||
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
|
||||
@@ -41,6 +42,7 @@
|
||||
5A8928DC2824482A99763067 /* FontAwesome5_Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EF2E9E34ADA441EDB4CE8370 /* FontAwesome5_Regular.ttf */; };
|
||||
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
|
||||
6C1915C4DE9040A9BB17CFBB /* libRNStoreReview.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADB6F6B9BC7144FCB2C08D40 /* libRNStoreReview.a */; };
|
||||
7A0B269BD1714EA79E486BAE /* libRNCAsyncStorage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1009A2994551440E819E2CE6 /* libRNCAsyncStorage.a */; };
|
||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
||||
840E2D03A7CE4291AA2D3383 /* AntDesign.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 131C577CAE5F4B7D8CFF1197 /* AntDesign.ttf */; };
|
||||
965031D980094619B7DBA0FD /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1F569402A90047A59845394A /* Ionicons.ttf */; };
|
||||
@@ -58,7 +60,6 @@
|
||||
CDB58A211F6C51A4009EF868 /* libReactNativeFingerprintScanner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CDB58A0F1F6C5174009EF868 /* libReactNativeFingerprintScanner.a */; };
|
||||
CDB58A221F6C5235009EF868 /* libRCTAes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CDB58A091F6C516B009EF868 /* libRCTAes.a */; };
|
||||
F0D84FDB75374348BC0017C2 /* libBugsnagReactNative.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EFD3F9197A5F41C0904D7E60 /* libBugsnagReactNative.a */; };
|
||||
7A0B269BD1714EA79E486BAE /* libRNCAsyncStorage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1009A2994551440E819E2CE6 /* libRNCAsyncStorage.a */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -258,6 +259,13 @@
|
||||
remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
|
||||
remoteInfo = RCTBlob;
|
||||
};
|
||||
B81C74CF22904ACA001CFD6C /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FF655164AD874250A8F6E20E /* RNCAsyncStorage.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||
remoteInfo = RNCAsyncStorage;
|
||||
};
|
||||
CD1766771F795AE500165C83 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = CD17664C1F795AE500165C83 /* SNTextView.xcodeproj */;
|
||||
@@ -471,6 +479,7 @@
|
||||
074A7613CE8C41BAB3C4193E /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Solid.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf"; sourceTree = "<group>"; };
|
||||
0752A2CAF82B4C9198CAC803 /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = SimpleLineIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf"; sourceTree = "<group>"; };
|
||||
0BA1C89777414706A3F02AC6 /* RNKeychain.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNKeychain.xcodeproj; path = "../node_modules/react-native-keychain/RNKeychain.xcodeproj"; sourceTree = "<group>"; };
|
||||
1009A2994551440E819E2CE6 /* libRNCAsyncStorage.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNCAsyncStorage.a; sourceTree = "<group>"; };
|
||||
12E89137A7104D91898C2734 /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = "<group>"; };
|
||||
131C577CAE5F4B7D8CFF1197 /* AntDesign.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = AntDesign.ttf; path = "../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf"; sourceTree = "<group>"; };
|
||||
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
|
||||
@@ -523,8 +532,7 @@
|
||||
EC178A0479CE4154896293C3 /* RNCWebView.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNCWebView.xcodeproj; path = "../node_modules/react-native-webview/ios/RNCWebView.xcodeproj"; sourceTree = "<group>"; };
|
||||
EF2E9E34ADA441EDB4CE8370 /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Regular.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf"; sourceTree = "<group>"; };
|
||||
EFD3F9197A5F41C0904D7E60 /* libBugsnagReactNative.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libBugsnagReactNative.a; sourceTree = "<group>"; };
|
||||
FF655164AD874250A8F6E20E /* RNCAsyncStorage.xcodeproj */ = {isa = PBXFileReference; name = "RNCAsyncStorage.xcodeproj"; path = "../node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
1009A2994551440E819E2CE6 /* libRNCAsyncStorage.a */ = {isa = PBXFileReference; name = "libRNCAsyncStorage.a"; path = "libRNCAsyncStorage.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
FF655164AD874250A8F6E20E /* RNCAsyncStorage.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNCAsyncStorage.xcodeproj; path = "../node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.xcodeproj"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -834,6 +842,14 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
B81C74CC22904ACA001CFD6C /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B81C74D022904ACA001CFD6C /* libRNCAsyncStorage.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CD17664D1F795AE500165C83 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -927,6 +943,7 @@
|
||||
CEB6B877AE784055A8E294A8 /* libRNFS.a */,
|
||||
37A42F4068AE42DD8D2DF182 /* libRNFileViewer.a */,
|
||||
4449457EB3FC4387810027F1 /* libRNCWebView.a */,
|
||||
1009A2994551440E819E2CE6 /* libRNCAsyncStorage.a */,
|
||||
);
|
||||
name = "Recovered References";
|
||||
sourceTree = "<group>";
|
||||
@@ -1081,6 +1098,7 @@
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
@@ -1152,6 +1170,10 @@
|
||||
ProductGroup = CDB58A0B1F6C5174009EF868 /* Products */;
|
||||
ProjectRef = CDB58A0A1F6C5174009EF868 /* ReactNativeFingerprintScanner.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = B81C74CC22904ACA001CFD6C /* Products */;
|
||||
ProjectRef = FF655164AD874250A8F6E20E /* RNCAsyncStorage.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = CD5AEDE022825CB8002439FB /* Products */;
|
||||
ProjectRef = EC178A0479CE4154896293C3 /* RNCWebView.xcodeproj */;
|
||||
@@ -1382,6 +1404,13 @@
|
||||
remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
B81C74D022904ACA001CFD6C /* libRNCAsyncStorage.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNCAsyncStorage.a;
|
||||
remoteRef = B81C74CF22904ACA001CFD6C /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
CD1766781F795AE500165C83 /* libSNTextView.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.6</string>
|
||||
<string>3.0.7</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
5282
package-lock.json
generated
5282
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "StandardNotes",
|
||||
"version": "3.0.6",
|
||||
"versionIOS": "3.0.6",
|
||||
"versionAndroid": "3.0.6",
|
||||
"version": "3.0.7",
|
||||
"versionIOS": "3.0.7",
|
||||
"versionAndroid": "3.0.7",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -30,7 +30,7 @@
|
||||
"react-navigation": "^3.0.9",
|
||||
"react-navigation-header-buttons": "^2.1.1",
|
||||
"regenerator": "^0.13.3",
|
||||
"snjs": "0.2.0",
|
||||
"snjs": "0.2.2",
|
||||
"standard-file-js": "0.3.58"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -35,9 +35,10 @@ export default class ComponentView extends Component {
|
||||
let url = ComponentManager.get().urlForComponent(this.editor);
|
||||
console.log("Loading editor", url);
|
||||
|
||||
if(!url) {
|
||||
if(this.editor.offlineOnly) {
|
||||
Alert.alert('Offline Only', `You've marked ${this.editor.name} as 'offline only', which means it can only be accessed via the desktop app. To use this editor on mobile, please use the web or desktop app and check 'Use hosted when local is unavailable' in the editor's extension settings. Otherwise, please change to another editor to edit this note.`, [{text: 'OK'}])
|
||||
} else if(!url) {
|
||||
Alert.alert('Re-install Extension', `This extension is not installed correctly. Please use the web or desktop application to reinstall ${this.editor.name}, then try again.`, [{text: 'OK'}])
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,6 +142,15 @@ export default class ComponentView extends Component {
|
||||
return true;
|
||||
}
|
||||
|
||||
defaultInjectedJavaScript = () => {
|
||||
return `(function() {
|
||||
window.parent.postMessage = function(data) {
|
||||
window.parent.ReactNativeWebView.postMessage(data);
|
||||
};
|
||||
return true;
|
||||
})()`
|
||||
}
|
||||
|
||||
render() {
|
||||
var editor = this.editor;
|
||||
var url = ComponentManager.get().urlForComponent(editor);
|
||||
@@ -153,31 +163,25 @@ export default class ComponentView extends Component {
|
||||
<Text style={this.styles.lockedText}>Extended expired. Editors are in a read-only state. To edit immediately, please switch to the Plain Editor.</Text>
|
||||
</View>
|
||||
}
|
||||
<WebView
|
||||
style={StyleKit.styles.flexContainer, {backgroundColor: "transparent"}}
|
||||
source={{uri: url}}
|
||||
key={this.editor.uuid}
|
||||
ref={(webView) => this.webView = webView}
|
||||
/* onLoad and onLoadEnd seem to be the same exact thing, except that when an error occurs, onLoadEnd is called twice, whereas onLoad is called once (what we want) */
|
||||
onLoad={this.onFrameLoad}
|
||||
onLoadStart={this.onLoadStart}
|
||||
onError={this.onLoadError}
|
||||
onMessage={this.onMessage}
|
||||
useWebKit={true}
|
||||
hideKeyboardAccessoryView={true}
|
||||
onShouldStartLoadWithRequest={this.onShouldStartLoadWithRequest}
|
||||
cacheEnabled={true}
|
||||
scalesPageToFit={true /* Android only, not available with WKWebView */}
|
||||
injectedJavaScript = {
|
||||
`(function() {
|
||||
window.parent.postMessage = function(data) {
|
||||
window.parent.ReactNativeWebView.postMessage(data);
|
||||
};
|
||||
|
||||
return true;
|
||||
})()`
|
||||
}
|
||||
/>
|
||||
{url &&
|
||||
<WebView
|
||||
style={StyleKit.styles.flexContainer, {backgroundColor: "transparent"}}
|
||||
source={{uri: url}}
|
||||
key={this.editor.uuid}
|
||||
ref={(webView) => this.webView = webView}
|
||||
/* onLoad and onLoadEnd seem to be the same exact thing, except that when an error occurs, onLoadEnd is called twice, whereas onLoad is called once (what we want) */
|
||||
onLoad={this.onFrameLoad}
|
||||
onLoadStart={this.onLoadStart}
|
||||
onError={this.onLoadError}
|
||||
onMessage={this.onMessage}
|
||||
useWebKit={true}
|
||||
hideKeyboardAccessoryView={true}
|
||||
onShouldStartLoadWithRequest={this.onShouldStartLoadWithRequest}
|
||||
cacheEnabled={true}
|
||||
scalesPageToFit={true /* Android only, not available with WKWebView */}
|
||||
injectedJavaScript={this.defaultInjectedJavaScript()}
|
||||
/>
|
||||
}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user