diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 7e27ec7b..c3c24217 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -244,7 +244,7 @@ PODS:
- React
- react-native-mail (4.1.0):
- React
- - react-native-safe-area-context (3.0.2):
+ - react-native-safe-area-context (3.0.5):
- React
- react-native-sodium (0.4.0):
- React
@@ -321,7 +321,7 @@ PODS:
- React
- RNGestureHandler (1.6.1):
- React
- - RNKeychain (6.1.0):
+ - RNKeychain (6.1.1):
- React
- RNReanimated (1.9.0):
- React
@@ -534,7 +534,7 @@ SPEC CHECKSUMS:
react-native-aes: ff31f0dd4c791eb423a631ee04570fcf3c618924
react-native-fingerprint-scanner: f0d8190ceaf0b9e1893e3379d78724375b8f6ea7
react-native-mail: a864fb211feaa5845c6c478a3266de725afdce89
- react-native-safe-area-context: b11a34881faac509cad5578726c98161ad4d275c
+ react-native-safe-area-context: e768fca90207ee68924b3d0877633f2ce9cc9d68
react-native-sodium: ef43e28fdf8d866e68ed06890c32f8d86a570cc7
react-native-webview: 0bacc79175bc44869e4c1a015b9bc21df8cf4feb
React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c
@@ -553,7 +553,7 @@ SPEC CHECKSUMS:
RNFileViewer: db62d60dd19007c54b2c959b5e675a46d59f8a43
RNFS: 2bd9eb49dc82fa9676382f0585b992c424cd59df
RNGestureHandler: 8f09cd560f8d533eb36da5a6c5a843af9f056b38
- RNKeychain: 7cab1c45629f265ebccd8d737cd4cb5b23a865df
+ RNKeychain: db956c02a018f7dd3a0ea8a6cf3087bc1894bf2b
RNReanimated: b5ccb50650ba06f6e749c7c329a1bc3ae0c88b43
RNScreens: 62211832af51e0aebcf6e8c36bcf7dd65592f244
RNStoreReview: 62d6afd7c37db711a594bbffca6b0ea3a812b7a8
diff --git a/package.json b/package.json
index 08670e9f..0655bd59 100644
--- a/package.json
+++ b/package.json
@@ -41,10 +41,10 @@
"react-native-flag-secure-android": "standardnotes/react-native-flag-secure-android#3d59055",
"react-native-fs": "^2.16.6",
"react-native-gesture-handler": "^1.6.1",
- "react-native-keychain": "^6.1.0",
+ "react-native-keychain": "^6.1.1",
"react-native-mail": "standardnotes/react-native-mail#9862c76",
"react-native-reanimated": "^1.9.0",
- "react-native-safe-area-context": "^3.0.2",
+ "react-native-safe-area-context": "^3.0.5",
"react-native-screens": "^2.8.0",
"react-native-search-box": "standardnotes/react-native-search-box#f61a2b5",
"react-native-sodium": "standardnotes/react-native-sodium#c548383",
@@ -54,7 +54,7 @@
"react-navigation-header-buttons": "^4.0.2",
"regenerator": "^0.14.2",
"sn-textview": "standardnotes/sn-textview#f42f0bf",
- "snjs": "standardnotes/snjs#345a318",
+ "snjs": "standardnotes/snjs#a7ed420",
"standard-notes-rn": "standardnotes/standard-notes-rn",
"styled-components": "^5.1.1"
},
@@ -70,8 +70,8 @@
"@types/react-native": "^0.62.13",
"@types/react-native-vector-icons": "^6.4.5",
"@types/styled-components": "^5.1.0",
- "@typescript-eslint/eslint-plugin": "^3.2.0",
- "@typescript-eslint/parser": "^3.2.0",
+ "@typescript-eslint/eslint-plugin": "^3.3.0",
+ "@typescript-eslint/parser": "^3.3.0",
"babel-jest": "^26.0.1",
"concurrently": "^5.2.0",
"detox": "^16.5.0",
@@ -85,7 +85,7 @@
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.0.5",
"react-test-renderer": "16.11.0",
- "replace-in-file": "^6.0.0",
+ "replace-in-file": "^6.1.0",
"sncrypto": "standardnotes/sncrypto#7e76ab9",
"typescript": "^3.9.2"
},
diff --git a/src/App.tsx b/src/App.tsx
index 73071062..f535cc2b 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -2,7 +2,6 @@ import { Client } from 'bugsnag-react-native';
import React, { useState, useEffect, useCallback } from 'react';
import { NavigationContainer } from '@react-navigation/native';
import styled, { ThemeProvider } from 'styled-components/native';
-import { Text } from 'react-native';
// import { createDrawerNavigator, DrawerActions } from 'react-navigation-drawer';
// import Authenticate from '@Screens/Authentication/Authenticate';
// import Compose from '@Screens/Compose';
@@ -25,7 +24,8 @@ import { Text } from 'react-native';
// import Settings from '@Screens/Settings/Settings';
// import SideMenuManager from '@Screens/SideMenu/SideMenuManager';
// import { MobileApplication } from '@Lib/application';
-import { CurrentApplication } from './ApplicationContext';
+import { CurrentApplication, ContextProvider } from './ApplicationContext';
+import { Notes } from '@Screens/Notes/Notes';
// import { ApplicationGroup } from '@Lib/applicationGroup';
// import ThemedComponent from '@Components/ThemedComponent';
// import Notes from '@Screens/Notes/Notes';
@@ -193,13 +193,15 @@ export const App: React.FC<{}> = () => {
loadApplication();
}, [loadApplication]);
- if (!ready) {
+ if (!ready || !CurrentApplication!.getThemeService().theme) {
return null;
}
return (
-
- ssssss
+
+
+
+
);
diff --git a/src/screens/Notes/OfflineBanner.styled.ts b/src/screens/Notes/OfflineBanner.styled.ts
new file mode 100644
index 00000000..2c2f774f
--- /dev/null
+++ b/src/screens/Notes/OfflineBanner.styled.ts
@@ -0,0 +1,51 @@
+import styled from 'styled-components/native';
+import Icon from 'react-native-vector-icons/Ionicons';
+
+const MARGIN = 4;
+const PADDING = 12;
+
+const Touchable = styled.TouchableWithoutFeedback``;
+const Container = styled.View`
+ flex: 1;
+ flex-direction: 'row';
+ margin: ${MARGIN}px;
+ padding: ${PADDING}px;
+ border-width: 1;
+ border-radius: 4;
+ border-color: ${props => props.theme.stylekitBorderColor};
+`;
+const CenterContainer = styled.View`
+ justify-content: center;
+`;
+const UserIcon = styled(Icon)`
+ font-size: 24;
+ color: ${props => props.theme.stylekitInfoColor};
+`;
+const ForwardIcon = styled(UserIcon)`
+ color: ${props => props.theme.stylekitNeutralColor};
+`;
+const TextContainer = styled.View`
+ flex: 1;
+ padding-left: ${PADDING};
+`;
+const BoldText = styled.Text`
+ font-size: 15px;
+ font-weight: '600';
+ color: ${props => props.theme.stylekitForegroundColor};
+`;
+const SubText = styled.Text`
+ margin-top: 2;
+ font-size: 11;
+ color: ${props => props.theme.stylekitNeutralColor};
+`;
+
+export {
+ Touchable,
+ Container,
+ CenterContainer,
+ UserIcon,
+ ForwardIcon,
+ TextContainer,
+ BoldText,
+ SubText,
+};
diff --git a/src/screens/Notes/OfflineBanner.tsx b/src/screens/Notes/OfflineBanner.tsx
new file mode 100644
index 00000000..f5d1b816
--- /dev/null
+++ b/src/screens/Notes/OfflineBanner.tsx
@@ -0,0 +1,42 @@
+import React from 'react';
+import { SCREEN_SETTINGS } from '@Root/screens2/screens';
+import { ICON_USER, ICON_FORWARD } from '@Style/icons';
+import { StyleKit } from '@Style/StyleKit';
+import { useNavigation } from '@react-navigation/native';
+import {
+ Touchable,
+ Container,
+ CenterContainer,
+ UserIcon,
+ TextContainer,
+ BoldText,
+ SubText,
+ ForwardIcon,
+} from './OfflineBanner.styled';
+
+const NOT_BACKED_UP_TEXT = 'Data not backed up';
+const SIGN_IN_TEXT = 'Sign in or register to backup your notes';
+
+export const OfflineBanner: React.FC = () => {
+ const navigation = useNavigation();
+ const onPress = () => {
+ navigation.navigate(SCREEN_SETTINGS);
+ };
+
+ return (
+
+
+
+
+
+
+ {NOT_BACKED_UP_TEXT}
+ {SIGN_IN_TEXT}
+
+
+
+
+
+
+ );
+};
diff --git a/src/screens2/package.json b/src/screens/package.json
similarity index 100%
rename from src/screens2/package.json
rename to src/screens/package.json
diff --git a/yarn.lock b/yarn.lock
index 48ab4983..167803b4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1411,7 +1411,7 @@
dependencies:
"@types/yargs-parser" "*"
-"@typescript-eslint/eslint-plugin@^3.1.0", "@typescript-eslint/eslint-plugin@^3.2.0":
+"@typescript-eslint/eslint-plugin@^3.1.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.2.0.tgz#7fb997f391af32ae6ca1dbe56bcefe4dd30bda14"
integrity sha512-t9RTk/GyYilIXt6BmZurhBzuMT9kLKw3fQoJtK9ayv0tXTlznXEAnx07sCLXdkN3/tZDep1s1CEV95CWuARYWA==
@@ -1422,6 +1422,17 @@
semver "^7.3.2"
tsutils "^3.17.1"
+"@typescript-eslint/eslint-plugin@^3.3.0":
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.3.0.tgz#89518e5c5209a349bde161c3489b0ec187ae5d37"
+ integrity sha512-Ybx/wU75Tazz6nU2d7nN6ll0B98odoiYLXwcuwS5WSttGzK46t0n7TPRQ4ozwcTv82UY6TQoIvI+sJfTzqK9dQ==
+ dependencies:
+ "@typescript-eslint/experimental-utils" "3.3.0"
+ functional-red-black-tree "^1.0.1"
+ regexpp "^3.0.0"
+ semver "^7.3.2"
+ tsutils "^3.17.1"
+
"@typescript-eslint/experimental-utils@3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.2.0.tgz#4dab8fc9f44f059ec073470a81bb4d7d7d51e6c5"
@@ -1432,7 +1443,17 @@
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"
-"@typescript-eslint/parser@^3.1.0", "@typescript-eslint/parser@^3.2.0":
+"@typescript-eslint/experimental-utils@3.3.0":
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.3.0.tgz#d72a946e056a83d4edf97f3411cceb639b0b8c87"
+ integrity sha512-d4pGIAbu/tYsrPrdHCQ5xfadJGvlkUxbeBB56nO/VGmEDi/sKmfa5fGty5t5veL1OyJBrUmSiRn1R1qfVDydrg==
+ dependencies:
+ "@types/json-schema" "^7.0.3"
+ "@typescript-eslint/typescript-estree" "3.3.0"
+ eslint-scope "^5.0.0"
+ eslint-utils "^2.0.0"
+
+"@typescript-eslint/parser@^3.1.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.2.0.tgz#d9d7867456b1b8ecae9e724269b0bc932f06cbca"
integrity sha512-Vhu+wwdevDLVDjK1lIcoD6ZbuOa93fzqszkaO3iCnmrScmKwyW/AGkzc2UvfE5TCoCXqq7Jyt6SOXjsIlpqF4A==
@@ -1442,6 +1463,16 @@
"@typescript-eslint/typescript-estree" "3.2.0"
eslint-visitor-keys "^1.1.0"
+"@typescript-eslint/parser@^3.3.0":
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.3.0.tgz#fcae40012ded822aa8b2739a1a03a4e3c5bbb7bb"
+ integrity sha512-a7S0Sqn/+RpOOWTcaLw6RD4obsharzxmgMfdK24l364VxuBODXjuJM7ImCkSXEN7oz52aiZbXSbc76+2EsE91w==
+ dependencies:
+ "@types/eslint-visitor-keys" "^1.0.0"
+ "@typescript-eslint/experimental-utils" "3.3.0"
+ "@typescript-eslint/typescript-estree" "3.3.0"
+ eslint-visitor-keys "^1.1.0"
+
"@typescript-eslint/typescript-estree@3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.2.0.tgz#c735f1ca6b4d3cd671f30de8c9bde30843e7ead8"
@@ -1455,6 +1486,19 @@
semver "^7.3.2"
tsutils "^3.17.1"
+"@typescript-eslint/typescript-estree@3.3.0":
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.3.0.tgz#841ffed25c29b0049ebffb4c2071268a34558a2a"
+ integrity sha512-3SqxylENltEvJsjjMSDCUx/edZNSC7wAqifUU1Ywp//0OWEZwMZJfecJud9XxJ/40rAKEbJMKBOQzeOjrLJFzQ==
+ dependencies:
+ debug "^4.1.1"
+ eslint-visitor-keys "^1.1.0"
+ glob "^7.1.6"
+ is-glob "^4.0.1"
+ lodash "^4.17.15"
+ semver "^7.3.2"
+ tsutils "^3.17.1"
+
"@yarnpkg/lockfile@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
@@ -6168,10 +6212,10 @@ react-native-gesture-handler@^1.6.1:
invariant "^2.2.4"
prop-types "^15.7.2"
-react-native-keychain@^6.1.0:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/react-native-keychain/-/react-native-keychain-6.1.0.tgz#bf41d9b93ec1557ca614ebbbd8a11413b39bf834"
- integrity sha512-fVHcwlTkgEeGqDCSeXZmSZ63UBWyxC0REHLZ6H9WRrUJlBsdee1u2OhfDdUz6Tkrb/JEuj7YzLbFxjuqXKSBXQ==
+react-native-keychain@^6.1.1:
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/react-native-keychain/-/react-native-keychain-6.1.1.tgz#3c14e4df9e5599f8d5a708da75d27f9d2424d7c1"
+ integrity sha512-WYvAg7FbYPyX8jJ1rY/IQGS+6zK5LtNMRa3E8x1n0M5Lmsm/9CHtakzbmqT+rLvFE7DpPBg7qFawMuUoDjjtYA==
react-native-mail@standardnotes/react-native-mail#9862c76:
version "4.1.0"
@@ -6189,10 +6233,10 @@ react-native-reanimated@^1.9.0:
dependencies:
fbjs "^1.0.0"
-react-native-safe-area-context@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-3.0.2.tgz#95dd7e56bc89bcc4f3f7bb5fada30c98420328b2"
- integrity sha512-x3yVMsxwe9GyvIkv0Q5jy2CWYN7VO0/CJTFGG5kSiMo8FFTQJbWtuWGANFqxDzEH5NEV7/SfK+qTgAh931KyUw==
+react-native-safe-area-context@^3.0.5:
+ version "3.0.5"
+ resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-3.0.5.tgz#3dd9bf2fea3b51f894b9849f11108ac303bbefe5"
+ integrity sha512-cLZtHvzm/tdCTCOCgNRUsnl9ma8MozE9vtxHQVftuY6hRt+esCBdXA5jXcuCaCj+yUe4Akw+c5BPFNUF5vOTjQ==
react-native-screens@^2.8.0:
version "2.8.0"
@@ -6484,10 +6528,10 @@ repeat-string@^1.6.1:
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
-replace-in-file@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/replace-in-file/-/replace-in-file-6.0.0.tgz#a583be911c4af3ecbf709ca97c48f3f9e7f2b626"
- integrity sha512-vMmJekpRgju0GA0UvRxauDbQ645wGXxasVZfw5l5HKk58OlAI1tMmXNcV+YAUKrS/XFdBPla5qgvjI5Tqvshvg==
+replace-in-file@^6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/replace-in-file/-/replace-in-file-6.1.0.tgz#9f9ddd7bb70d6ad231d2ad692e1b646e73d06647"
+ integrity sha512-URzjyF3nucvejuY13HFd7O+Q6tFJRLKGHLYVvSh+LiZj3gFXzSYGnIkQflnJJulCAI2/RTZaZkpOtdVdW0EhQA==
dependencies:
chalk "^4.0.0"
glob "^7.1.6"
@@ -6964,9 +7008,9 @@ sncrypto@standardnotes/sncrypto#7e76ab9:
version "1.1.3"
resolved "https://codeload.github.com/standardnotes/sncrypto/tar.gz/7e76ab9977f85039d9399b935aecfe495a951edb"
-snjs@standardnotes/snjs#345a318:
+snjs@standardnotes/snjs#a7ed420:
version "1.0.5"
- resolved "https://codeload.github.com/standardnotes/snjs/tar.gz/345a3188c533bfb4b94dac8b45866515c1dbfe1a"
+ resolved "https://codeload.github.com/standardnotes/snjs/tar.gz/a7ed42030a5d141e5ff6850e69b7e1cf8dbbb1c5"
source-map-resolve@^0.5.0:
version "0.5.3"