From 430717e35e95f7c87589ce4590ea0d0c383b9be8 Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Mon, 28 Jun 2021 15:31:06 -0300 Subject: [PATCH 1/8] chore: update links to .com --- README.md | 18 ++++++++------- SECURITY.md | 4 ++-- .../Settings/Sections/CompanySection.tsx | 22 +++++++++---------- src/screens/SideMenu/MainSideMenu.tsx | 2 +- src/screens/SideMenu/NoteSideMenu.tsx | 2 +- 5 files changed, 25 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 716e4cd0..8f3a7da7 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,14 @@ [![Latest release version](https://img.shields.io/github/v/release/standardnotes/mobile)](https://github.com/standardnotes/mobile/releases) [![License](https://img.shields.io/github/license/standardnotes/mobile?color=blue)](https://github.com/standardnotes/mobile/blob/master/LICENSE) -[![Slack](https://img.shields.io/badge/slack-standardnotes-CC2B5E.svg?style=flat&logo=slack)](https://standardnotes.org/slack) +[![Slack](https://img.shields.io/badge/slack-standardnotes-CC2B5E.svg?style=flat&logo=slack)](https://standardnotes.com/slack) [![Twitter Follow](https://img.shields.io/badge/follow-%40standardnotes-blue.svg?style=flat&logo=twitter)](https://twitter.com/standardnotes) ## iOS & Android App -[Standard Notes](https://standardnotes.org) is a safe place for your notes, thoughts, and life's work. It focuses on being simple, so you don't have to fight with endless features that slow you down. It encrypts your notes to protect your privacy. And, it's extensible, so you can backup your notes to Dropbox, Google Drive, and other services, as well as install themes, editors, and more. +[Standard Notes](https://standardnotes.com) is a safe place for your notes, thoughts, and life's work. It focuses on being simple, so you don't have to fight with endless features that slow you down. It encrypts your notes to protect your privacy. And, it's extensible, so you can backup your notes to Dropbox, Google Drive, and other services, as well as install themes, editors, and more. ### Download Options: @@ -30,15 +30,17 @@ This is a React Native implementation of Standard Notes. React Native allows us 3. Install [yarn](https://yarnpkg.com/) if you haven't already. 4. Install project dependencies via: - ```shell - yarn run init - ``` +```shell +yarn run init +``` We have two flavors of the app: -* `dev` which runs connects to development syncing server. To run locally use `yarn ios-dev` or `yarn android-dev` for Android. -* `prod` which is the equivalent of our production application. To run local use `yarn ios-prod` or `yarn android-prod` for Android. + +- `dev` which runs connects to development syncing server. To run locally use `yarn ios-dev` or `yarn android-dev` for Android. +- `prod` which is the equivalent of our production application. To run local use `yarn ios-prod` or `yarn android-prod` for Android. If you would like to run the application on your iOS device, you'll need to do so using Xcode. ## Contributing -Before contributing, please read our [Longevity Statement](https://standardnotes.org/longevity) to better understand how we approach adding new features. Unlike other projects, adding new features is something we prefer *not* to do, so if you have a feature which you think is absolutely essential, please create a discussion issue first before coding. + +Before contributing, please read our [Longevity Statement](https://standardnotes.com/longevity) to better understand how we approach adding new features. Unlike other projects, adding new features is something we prefer _not_ to do, so if you have a feature which you think is absolutely essential, please create a discussion issue first before coding. diff --git a/SECURITY.md b/SECURITY.md index 6561eba2..576b616e 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -5,14 +5,14 @@ Thank you for your work in helping keep Standard Notes safe and secure. If you b - Let us know as soon as possible upon discovery of a potential security issue, and we'll make every effort to quickly resolve the issue. Please email [security@standardnotes.org](mailto:security@standardnotes.org) for a direct response. - Provide us a reasonable amount of time to resolve the issue before any disclosure to the public or a - third-party. We may publicly disclose the issue before resolving it, if appropriate. + third-party. We may publicly disclose the issue before resolving it, if appropriate. - Make a good faith effort to avoid privacy violations, destruction of data, and interruption or degradation of our service. Only interact with accounts you own or with explicit permission of the account holder. # In-scope -- Security issues in any current release of Standard Notes. Our product downloads are available on our homepage at https://standardnotes.org, and our source code is available at https://github.com/standardnotes. +- Security issues in any current release of Standard Notes. Our product downloads are available on our homepage at https://standardnotes.com, and our source code is available at https://github.com/standardnotes. # Exclusions diff --git a/src/screens/Settings/Sections/CompanySection.tsx b/src/screens/Settings/Sections/CompanySection.tsx index 8ea01e67..b3039c52 100644 --- a/src/screens/Settings/Sections/CompanySection.tsx +++ b/src/screens/Settings/Sections/CompanySection.tsx @@ -12,9 +12,9 @@ const URLS = { feedback: `mailto:help@standardnotes.org?subject=${ Platform.OS === 'android' ? 'Android' : 'iOS' } app feedback (v${ApplicationState.version})`, - learn_more: 'https://standardnotes.org', - privacy: 'https://standardnotes.org/privacy', - help: 'https://standardnotes.org/help', + learn_more: 'https://standardnotes.com', + privacy: 'https://standardnotes.com/privacy', + help: 'https://standardnotes.com/help', rate: Platform.select({ ios: 'https://itunes.apple.com/us/app/standard-notes/id1285392450?ls=1&mt=8', @@ -63,10 +63,10 @@ export const CompanySection = (props: Props) => { const shareEncryption = () => { const title = 'The Unexpected Benefits of Encrypted Writing'; let message = Platform.OS === 'ios' ? title : ''; - const url = 'https://standardnotes.org/why-encrypted'; + const url = 'https://standardnotes.com/why-encrypted'; // Android ignores url. iOS ignores title. if (Platform.OS === 'android') { - message += '\n\nhttps://standardnotes.org/why-encrypted'; + message += '\n\nhttps://standardnotes.com/why-encrypted'; } application?.getAppState().performActionWithoutStateChangeImpact(() => { Share.share({ title: title, message: message, url: url }); @@ -77,10 +77,10 @@ export const CompanySection = (props: Props) => { const title = 'Standard Notes'; let message = 'Check out Standard Notes, a free, open-source, and completely encrypted notes app.'; - const url = 'https://standardnotes.org'; + const url = 'https://standardnotes.com'; // Android ignores url. iOS ignores title. if (Platform.OS === 'android') { - message += '\n\nhttps://standardnotes.org'; + message += '\n\nhttps://standardnotes.com'; } application?.getAppState().performActionWithoutStateChangeImpact(() => { Share.share({ title: title, message: message, url: url }); @@ -97,7 +97,7 @@ export const CompanySection = (props: Props) => { title="Help" onPress={() => openUrl('help')} > - + { onPress={() => openUrl('feedback')} > - + @@ -130,7 +130,7 @@ export const CompanySection = (props: Props) => { title="Learn About Standard Notes" onPress={() => openUrl('learn_more')} > - + { title="Our Privacy Manifesto" onPress={() => openUrl('privacy')} > - + { }, onSelect: () => { application?.deviceInterface?.openUrl( - 'https://standardnotes.org/extensions' + 'https://standardnotes.com/extensions' ); }, }); diff --git a/src/screens/SideMenu/NoteSideMenu.tsx b/src/screens/SideMenu/NoteSideMenu.tsx index 498f09b6..298f8055 100644 --- a/src/screens/SideMenu/NoteSideMenu.tsx +++ b/src/screens/SideMenu/NoteSideMenu.tsx @@ -394,7 +394,7 @@ export const NoteSideMenu = React.memo((props: Props) => { }, onSelect: () => { application?.deviceInterface?.openUrl( - 'https://standardnotes.org/extensions' + 'https://standardnotes.com/extensions' ); }, }); From 69403d88f7e56cfccebf130d194e66733a4af277 Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Mon, 28 Jun 2021 16:08:34 -0300 Subject: [PATCH 2/8] fix: fix type --- src/screens/ManageSessions/ManageSessions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/ManageSessions/ManageSessions.tsx b/src/screens/ManageSessions/ManageSessions.tsx index 4cb71740..4939094d 100644 --- a/src/screens/ManageSessions/ManageSessions.tsx +++ b/src/screens/ManageSessions/ManageSessions.tsx @@ -44,7 +44,7 @@ const useSessions = (): [ setErrorMessage('An unknown error occured while loading sessions.'); } } else { - const newSessions = response.data; + const newSessions = response.data as RemoteSession[]; setSessions(newSessions); setErrorMessage(''); } From b48b3d3524e8bad53e2d48fc0f2070700b7ab2a2 Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Tue, 29 Jun 2021 16:07:34 -0300 Subject: [PATCH 3/8] chore(deps): update react-native-mail --- package.json | 2 +- yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7ec23b0e..193b5a30 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "react-native-fs": "^2.16.6", "react-native-gesture-handler": "^1.9.0", "react-native-keychain": "^4.0.5", - "react-native-mail": "standardnotes/react-native-mail#f7f74be", + "react-native-mail": "standardnotes/react-native-mail#bde234de3691982096392824d39cb948053acd1a", "react-native-privacy-snapshot": "standardnotes/react-native-privacy-snapshot#653e904", "react-native-reanimated": "^1.13.2", "react-native-safe-area-context": "^3.1.9", diff --git a/yarn.lock b/yarn.lock index 85416a7a..01744dff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6847,9 +6847,9 @@ react-native-keychain@^4.0.5: resolved "https://registry.yarnpkg.com/react-native-keychain/-/react-native-keychain-4.0.5.tgz#6d3aef8f2789fc0dfa8149b8400d82ff77be361a" integrity sha512-TbiO8AO055EPjaxIuKxrCEOB4r81uQCVDFbtcs+e4pEOHxf6z3JgDC0UU0poJElKfCh37b+TFRxQhg6DbsYJBA== -react-native-mail@standardnotes/react-native-mail#f7f74be: +react-native-mail@standardnotes/react-native-mail#bde234de3691982096392824d39cb948053acd1a: version "4.1.0" - resolved "https://codeload.github.com/standardnotes/react-native-mail/tar.gz/f7f74be22edef77bef6901ca2e2cd4eddc15bbc0" + resolved "https://codeload.github.com/standardnotes/react-native-mail/tar.gz/bde234de3691982096392824d39cb948053acd1a" react-native-privacy-snapshot@standardnotes/react-native-privacy-snapshot#653e904: version "1.0.0" From 33cc8a0fb8ea0676d5c75c3859f56f194be16939 Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Tue, 29 Jun 2021 16:57:41 -0300 Subject: [PATCH 4/8] chore(deps): update react-native-mail --- package.json | 2 +- yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 193b5a30..3f65766e 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "react-native-fs": "^2.16.6", "react-native-gesture-handler": "^1.9.0", "react-native-keychain": "^4.0.5", - "react-native-mail": "standardnotes/react-native-mail#bde234de3691982096392824d39cb948053acd1a", + "react-native-mail": "standardnotes/react-native-mail#fd26119e67a2ffc5eaa95a9c17049743e39ce2d3", "react-native-privacy-snapshot": "standardnotes/react-native-privacy-snapshot#653e904", "react-native-reanimated": "^1.13.2", "react-native-safe-area-context": "^3.1.9", diff --git a/yarn.lock b/yarn.lock index 01744dff..f4a64f12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6847,9 +6847,9 @@ react-native-keychain@^4.0.5: resolved "https://registry.yarnpkg.com/react-native-keychain/-/react-native-keychain-4.0.5.tgz#6d3aef8f2789fc0dfa8149b8400d82ff77be361a" integrity sha512-TbiO8AO055EPjaxIuKxrCEOB4r81uQCVDFbtcs+e4pEOHxf6z3JgDC0UU0poJElKfCh37b+TFRxQhg6DbsYJBA== -react-native-mail@standardnotes/react-native-mail#bde234de3691982096392824d39cb948053acd1a: +react-native-mail@standardnotes/react-native-mail#fd26119e67a2ffc5eaa95a9c17049743e39ce2d3: version "4.1.0" - resolved "https://codeload.github.com/standardnotes/react-native-mail/tar.gz/bde234de3691982096392824d39cb948053acd1a" + resolved "https://codeload.github.com/standardnotes/react-native-mail/tar.gz/fd26119e67a2ffc5eaa95a9c17049743e39ce2d3" react-native-privacy-snapshot@standardnotes/react-native-privacy-snapshot#653e904: version "1.0.0" From e471f8a7f98056d2d611bfdea46010cdffa4705b Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Tue, 29 Jun 2021 19:31:47 -0300 Subject: [PATCH 5/8] chore(version-snjs): 2.7.9 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3f65766e..d558fd0e 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@react-navigation/native": "^5.9.3", "@react-navigation/stack": "^5.14.3", "@standardnotes/sncrypto-common": "1.2.9", - "@standardnotes/snjs": "2.7.8", + "@standardnotes/snjs": "2.7.9", "js-base64": "^3.5.2", "moment": "^2.29.1", "react": "17.0.1", diff --git a/yarn.lock b/yarn.lock index f4a64f12..edff42d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1630,10 +1630,10 @@ resolved "https://registry.yarnpkg.com/@standardnotes/sncrypto-common/-/sncrypto-common-1.2.9.tgz#5212a959e4ec563584e42480bfd39ef129c3cbdf" integrity sha512-xJ5IUGOZztjSgNP/6XL+Ut5+q9UgSTv6xMtKkcQC5aJxCOkJy9u6RamPLdF00WQgwibxx2tu0e43bKUjTgzMig== -"@standardnotes/snjs@2.7.8": - version "2.7.8" - resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.7.8.tgz#5437e9945e6cde0f774de33de85c955a6a0294b7" - integrity sha512-4RRJvkTNYUzOLqpeEG43o6uI6yTtqDW1RYAlks9S4iwhwh9fkdZRUARsEsCyfYy9fKSecSK0RS4kflzo/SraeA== +"@standardnotes/snjs@2.7.9": + version "2.7.9" + resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.7.9.tgz#8b2a5d0f6248e1872b2fe68a73307f754528b4c3" + integrity sha512-FNiLXdaUb2+WpCteTbfg/iiv4k0UXFzz57RnY1O8X40vEVFVY8VjrJuJxxwDuZqidUZeLIdTMlmfdKWoD+NRDA== dependencies: "@standardnotes/auth" "^2.0.0" "@standardnotes/sncrypto-common" "^1.2.9" From c1c7ca81031e4efcdc5fc971aa373b7c58fd7c14 Mon Sep 17 00:00:00 2001 From: Johnny A <5891646+johnny243@users.noreply.github.com> Date: Thu, 1 Jul 2021 15:42:44 -0400 Subject: [PATCH 6/8] feat: show deprecation notice (#459) * feat: show deprecation notice * chore(deps): update snjs * fix: show deprecation message from extension Co-authored-by: Johnny Almonte --- package.json | 2 +- src/screens/Compose/ComponentView.styled.ts | 25 ++++++++++++++++++++- src/screens/Compose/ComponentView.tsx | 16 +++++++++++++ yarn.lock | 8 +++---- 4 files changed, 45 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index b048c6f3..3ca594b2 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@react-navigation/native": "^5.9.3", "@react-navigation/stack": "^5.14.3", "@standardnotes/sncrypto-common": "1.2.9", - "@standardnotes/snjs": "2.7.9", + "@standardnotes/snjs": "2.7.10", "js-base64": "^3.5.2", "moment": "^2.29.1", "react": "17.0.1", diff --git a/src/screens/Compose/ComponentView.styled.ts b/src/screens/Compose/ComponentView.styled.ts index 36606743..93d7987d 100644 --- a/src/screens/Compose/ComponentView.styled.ts +++ b/src/screens/Compose/ComponentView.styled.ts @@ -1,4 +1,4 @@ -import { ICON_LOCK } from '@Style/icons'; +import { ICON_LOCK, ICON_ALERT } from '@Style/icons'; import { ThemeService } from '@Style/theme_service'; import { SafeAreaView } from 'react-native-safe-area-context'; import Icon from 'react-native-vector-icons/Ionicons'; @@ -45,3 +45,26 @@ export const StyledIcon = styled(Icon).attrs(({ theme }) => ({ size: 16, name: ThemeService.nameForIcon(ICON_LOCK), }))``; + +export const DeprecatedContainer = styled.View` + justify-content: flex-start; + flex-direction: row; + align-items: center; + padding: 10px; + background-color: ${({ theme }) => theme.stylekitWarningColor}; + border-bottom-color: ${({ theme }) => theme.stylekitBorderColor}; + border-bottom-width: 1px; +`; + +export const DeprecatedText = styled.Text` + font-weight: bold; + font-size: 12px; + color: ${({ theme }) => theme.stylekitBackgroundColor}; + padding-left: 10px; +`; + +export const DeprecatedIcon = styled(Icon).attrs(({ theme }) => ({ + color: theme.stylekitBackgroundColor, + size: 16, + name: ThemeService.nameForIcon(ICON_ALERT), +}))``; diff --git a/src/screens/Compose/ComponentView.tsx b/src/screens/Compose/ComponentView.tsx index e98adf41..ed1cec34 100644 --- a/src/screens/Compose/ComponentView.tsx +++ b/src/screens/Compose/ComponentView.tsx @@ -24,6 +24,9 @@ import { WebViewMessageEvent, } from 'react-native-webview/lib/WebViewTypes'; import { + DeprecatedContainer, + DeprecatedIcon, + DeprecatedText, FlexContainer, LockedContainer, LockedText, @@ -221,6 +224,9 @@ export const ComponentView = ({ })()`; }; + const deprecationMessage = + liveComponent?.item.package_info.deprecation_message; + return ( {liveComponent?.item.valid_until && @@ -233,6 +239,16 @@ export const ComponentView = ({ )} + + {liveComponent?.item.isDeprecated && ( + + + + {deprecationMessage || 'This extension is deprecated.'} + + + )} + {Boolean(url) && ( Date: Thu, 1 Jul 2021 19:28:25 -0300 Subject: [PATCH 7/8] fix: save backup to external storage if write permission is denied --- src/lib/backups_service.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/lib/backups_service.ts b/src/lib/backups_service.ts index d5c44894..d1dee56a 100644 --- a/src/lib/backups_service.ts +++ b/src/lib/backups_service.ts @@ -91,19 +91,16 @@ export class BackupsService extends ApplicationService { } private async _exportAndroid(filename: string, data: string) { - const filepath = `${RNFS.DownloadDirectoryPath}/${filename}`; try { + let filepath = `${RNFS.ExternalDirectoryPath}/${filename}`; const granted = await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE ); if (granted === PermissionsAndroid.RESULTS.GRANTED) { - await RNFS.writeFile(filepath, data); - this._showFileSavePromptAndroid(filepath); - } else { - this.application.alertService.alert( - 'We need permission to write to the external storage in order to save your backup file.' - ); + filepath = `${RNFS.DownloadDirectoryPath}/${filename}`; } + await RNFS.writeFile(filepath, data); + this._showFileSavePromptAndroid(filepath); } catch (err) { console.log('Error exporting backup', err); this.application.alertService.alert( From 3f0d6bd606fef3037c920832390f90cabb99457c Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Mon, 5 Jul 2021 18:45:57 -0300 Subject: [PATCH 8/8] chore(version): 3.6.18 --- package.json | 6 +++--- yarn.lock | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 3ca594b2..3357a3d8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "StandardNotes", - "version": "3.6.17", - "user-version": "3.6.17", + "version": "3.6.18", + "user-version": "3.6.18", "private": true, "license": "AGPL-3.0-or-later", "scripts": { @@ -26,7 +26,7 @@ "@react-navigation/native": "^5.9.3", "@react-navigation/stack": "^5.14.3", "@standardnotes/sncrypto-common": "1.2.9", - "@standardnotes/snjs": "2.7.10", + "@standardnotes/snjs": "2.7.14", "js-base64": "^3.5.2", "moment": "^2.29.1", "react": "17.0.1", diff --git a/yarn.lock b/yarn.lock index ded9ebad..f7851be5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1630,10 +1630,10 @@ resolved "https://registry.yarnpkg.com/@standardnotes/sncrypto-common/-/sncrypto-common-1.2.9.tgz#5212a959e4ec563584e42480bfd39ef129c3cbdf" integrity sha512-xJ5IUGOZztjSgNP/6XL+Ut5+q9UgSTv6xMtKkcQC5aJxCOkJy9u6RamPLdF00WQgwibxx2tu0e43bKUjTgzMig== -"@standardnotes/snjs@2.7.10": - version "2.7.10" - resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.7.10.tgz#da92ed0ab8aca74ed885d2e1bec14c21ad03f4d2" - integrity sha512-aG0EOWOoybLXg3D9szoXsETNtYoaPSWzQBgrj14TwmENsJ70nLUW7TtzKwOny2hP6PegEFF3VdIE3tp7t5VGUg== +"@standardnotes/snjs@2.7.14": + version "2.7.14" + resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.7.14.tgz#3c1e57a53cfe61957bbcb253281c5c43611c9acf" + integrity sha512-xh71KLOCjodmVdrnNT0zfChB4fy3FaWMvWoh/5iso+myI6tQ8X59+gUM+VuNk9N9rwyItiBvq88BD82RUia8uQ== dependencies: "@standardnotes/auth" "^2.0.0" "@standardnotes/sncrypto-common" "^1.2.9"