diff --git a/package.json b/package.json index eb09bcdb..b1e1d8be 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "standardnotes-mobile", - "version": "3.10.1", - "user-version": "3.10.1", + "version": "3.10.2", + "user-version": "3.10.2", "private": true, "license": "AGPL-3.0-or-later", "scripts": { @@ -25,8 +25,8 @@ "@react-native-community/segmented-control": "^2.2.2", "@react-navigation/native": "^5.9.3", "@react-navigation/stack": "^5.14.3", - "@standardnotes/sncrypto-common": "1.5.2", - "@standardnotes/snjs": "2.45.0", + "@standardnotes/sncrypto-common": "1.6.0", + "@standardnotes/snjs": "2.53.0", "js-base64": "^3.5.2", "moment": "^2.29.1", "react": "17.0.2", @@ -68,8 +68,8 @@ "@babel/core": "^7.11.6", "@babel/runtime": "^7.11.2", "@react-native-community/eslint-config": "^2.0.0", - "@standardnotes/components": "^1.2.3", - "@standardnotes/features": "^1.20.3", + "@standardnotes/components": "^1.7.0", + "@standardnotes/features": "^1.29.0", "@types/detox": "^16.4.1", "@types/faker": "^5.1.3", "@types/jest": "^26.0.14", diff --git a/src/lib/application.ts b/src/lib/application.ts index 12405718..cba32305 100644 --- a/src/lib/application.ts +++ b/src/lib/application.ts @@ -64,7 +64,6 @@ export class MobileApplication extends SNApplication { ? 'https://api-dev.standardnotes.com' : 'https://api.standardnotes.com', version, - true, IsDev ? 'wss://sockets-dev.standardnotes.com' : 'wss://sockets.standardnotes.com' diff --git a/src/lib/component_manager.ts b/src/lib/component_manager.ts index a058b276..87b498a7 100644 --- a/src/lib/component_manager.ts +++ b/src/lib/component_manager.ts @@ -1,7 +1,7 @@ import { FeatureDescription, FeatureIdentifier, - Features, + GetFeatures, } from '@standardnotes/features'; import { ComponentMutator, @@ -156,7 +156,7 @@ export class ComponentManager extends SNComponentManager { } public nativeFeatureForIdentifier(identifier: FeatureIdentifier) { - return Features.find( + return GetFeatures().find( (feature: FeatureDescription) => feature.identifier === identifier ); } diff --git a/src/lib/snjs_helper_hooks.ts b/src/lib/snjs_helper_hooks.ts index 5119af00..a4954a30 100644 --- a/src/lib/snjs_helper_hooks.ts +++ b/src/lib/snjs_helper_hooks.ts @@ -304,7 +304,7 @@ export const useDeleteNoteWithPrivileges = ( }, [application?.alertService, onTrashCallback]); const deleteNotePermanently = useCallback(async () => { - const title = `Delete ${note!.safeTitle()}`; + const title = `Delete ${note!.title}`; const message = 'Are you sure you want to permanently delete this note?'; if (editor?.isTemplateNote) { application?.alertService!.alert( diff --git a/src/screens/Compose/Compose.tsx b/src/screens/Compose/Compose.tsx index 5041916d..6ebbbee2 100644 --- a/src/screens/Compose/Compose.tsx +++ b/src/screens/Compose/Compose.tsx @@ -561,13 +561,13 @@ export class Compose extends React.Component<{}, State> { {(this.state.downloadingEditor || (this.state.loadingWebview && themeService?.isLikelyUsingDarkColorTheme())) && ( - - - {'Loading '} - {this.state.componentViewer?.component.name}... - - - )} + + + {'Loading '} + {this.state.componentViewer?.component.name}... + + + )} {/* setting webViewError to false on onLoadEnd will cause an infinite loop on Android upon webview error, so, don't do that. */} {shouldDisplayEditor && ( ` font-size: 15px; - margin-top: 4px; color: ${({ theme, selected }) => selected ? theme.stylekitInfoContrastColor : theme.stylekitForegroundColor}; opacity: 0.8; - line-height: 21px; + line-height: 19px; `; export const TitleText = styled.Text<{ selected: boolean }>` font-weight: bold; @@ -40,6 +39,7 @@ export const TitleText = styled.Text<{ selected: boolean }>` selected ? theme.stylekitInfoContrastColor : theme.stylekitForegroundColor}; flex-grow: 1; flex-shrink: 1; + margin-bottom: 4px; `; export const TagsContainter = styled.View` flex: 1; @@ -61,11 +61,15 @@ export const DetailsText = styled(TagText)<{ first: boolean }>` margin-top: 5px; `} `; -export const NoteTitleContainer = styled.View` +export const FlexContainer = styled.View` display: flex; flex-direction: row; justify-content: space-between; `; +export const NoteContentsContainer = styled.View` + display: flex; + flex-shrink: 1; +`; export const styles = StyleSheet.create({ editorIcon: { marginTop: 2, diff --git a/src/screens/Notes/NoteCell.tsx b/src/screens/Notes/NoteCell.tsx index 395a7d9d..48aea0f5 100644 --- a/src/screens/Notes/NoteCell.tsx +++ b/src/screens/Notes/NoteCell.tsx @@ -19,9 +19,10 @@ import { Container, DeletedText, DetailsText, + FlexContainer, + NoteContentsContainer, NoteDataContainer, NoteText, - NoteTitleContainer, styles, TitleText, TouchableContainer, @@ -101,7 +102,7 @@ export const NoteCell = ({ if (note.protected) { showActionSheet( - note.safeTitle(), + note.title, [ { text: 'Note Protected', @@ -183,7 +184,7 @@ export const NoteCell = ({ ]); } showActionSheet( - note.safeTitle(), + note.title, options, undefined, elementRef.current ?? undefined @@ -233,26 +234,27 @@ export const NoteCell = ({ )} - - {note.safeTitle().length > 0 ? ( - {note.title} - ) : ( - - )} - - - - {hasPlainPreview && showPreview && ( - - {note.preview_plain} - - )} + + + {note.title.length > 0 ? ( + {note.title} + ) : ( + + )} + {hasPlainPreview && showPreview && ( + + {note.preview_plain} + + )} - {!hasPlainPreview && showPreview && note.safeText().length > 0 && ( - - {note.text} - - )} + {!hasPlainPreview && showPreview && note.text.length > 0 && ( + + {note.text} + + )} + + + {showDetails && ( { const outOfSyncPressed = async () => { const confirmed = await application!.alertService!.confirm( "We've detected that the data in the current application session may " + - 'not match the data on the server. This can happen due to poor' + - 'network conditions, or if a large note fails to download on your ' + - 'device. To resolve this issue, we recommend first creating a backup ' + - 'of your data in the Settings screen, then signing out of your account ' + - 'and signing back in.', + 'not match the data on the server. This can happen due to poor ' + + 'network conditions, or if a large note fails to download on your ' + + 'device. To resolve this issue, we recommend first creating a backup ' + + 'of your data in the Settings screen, then signing out of your account ' + + 'and signing back in.', 'Potentially Out of Sync', 'Open Settings', undefined diff --git a/yarn.lock b/yarn.lock index 6dc29163..80f71395 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1757,90 +1757,60 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@standardnotes/auth@3.8.3": - version "3.8.3" - resolved "https://registry.yarnpkg.com/@standardnotes/auth/-/auth-3.8.3.tgz#6e627c1a1a9ebf91d97f52950d099bf7704382e3" - integrity sha512-wz056b3pv8IIX74lYaqjCUvnw3NSow+ex5pn/VlGxg8r7gq19WsmgyXP2BoE7nqKddO1JMlFok+4gdnutYF0Cw== +"@standardnotes/auth@^3.15.4": + version "3.15.4" + resolved "https://registry.yarnpkg.com/@standardnotes/auth/-/auth-3.15.4.tgz#acb2e9497724e1ba290664f199f3cc165c0fce3e" + integrity sha512-QhOnM8yPL63RrS+0qQjT4PIlHT3a+Ht17BmTEoNeNw3hc0QSXb3wqkwHoqyMfxWZKcAVjOSPhl+aOO9O2JUC3w== dependencies: - "@standardnotes/common" "^1.2.1" - -"@standardnotes/auth@^3.15.3": - version "3.15.3" - resolved "https://registry.yarnpkg.com/@standardnotes/auth/-/auth-3.15.3.tgz#bf77332e0ac3d846acc45f25083459e42f4a4374" - integrity sha512-16wgMl0qmq8w+HUktfQ7ODoprkngSs0vsSF5G9aHM1L+lFMwlGeVOztHH2zwG91pFkl7BaK6LcEimoYiml6VAw== - dependencies: - "@standardnotes/common" "^1.8.0" + "@standardnotes/common" "^1.9.0" jsonwebtoken "^8.5.1" -"@standardnotes/common@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@standardnotes/common/-/common-1.2.1.tgz#9db212db86ccbf08b347da02549b3dbe4bedbb02" - integrity sha512-HilBxS50CBlC6TJvy1mrnhGVDzOH63M/Jf+hyMxQ0Vt1nYzpd0iyxVEUrgMh7ZiyO1b9CLnCDED99Jy9rnZWVQ== - -"@standardnotes/common@^1.2.1": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@standardnotes/common/-/common-1.3.0.tgz#d3376ebe146cbe43577a0980fc09ea01fd18eb3a" - integrity sha512-ePyxHHG+AswmDSemh4AEGtDL8hvlW1KOnUSweGBtLbgSuh2CrhexuoYp7Juf9Bzli7s+Zl+2EZI0EEBqoE8iyg== - -"@standardnotes/common@^1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@standardnotes/common/-/common-1.8.0.tgz#af72ad85f0d410ae31c0c110137911e2595634de" - integrity sha512-R3nfAvhaXp5ufMB0M0fmV9yizE/Of2PGNJKnxtdxwowAq/ZakHu8Rh/v485PXrCaCFREVOZQO8kg0RQM8YngSw== - -"@standardnotes/components@^1.2.3": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@standardnotes/components/-/components-1.2.3.tgz#6d2d439b435b935e283e09a57614f9769a299d40" - integrity sha512-s02YBEL8L7qkBELVOcxPTfKbOqmKMnY/GBHhBtNpX1YTXGMGCPB3QYaKQr7x2JStclX/iQf072N75NQY2wxf7g== +"@standardnotes/common@^1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@standardnotes/common/-/common-1.9.0.tgz#45c0a8da16cb6e3c56ee53e8abde73934c5cf91e" + integrity sha512-4c/7f/sFBykmiu/SqYn3OfmMSdJ6dNVsl6yDm4aPB37EAyNPhOfhOeY8kQ12606EZArtUJ8FYo5sKPbLV0PCug== -"@standardnotes/domain-events@^2.20.1": - version "2.20.1" - resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.20.1.tgz#3d6af041d20029b791877dc4d99a815ffa149474" - integrity sha512-UmkeF2nS2mFnR5OntT3d8My8CYaVth631B3hSGh7C8wVa3MSs2A9y+Ko2/JL92QxQa7/V5vt/rvPQKnLjT3YBg== - dependencies: - "@standardnotes/auth" "^3.15.3" - "@standardnotes/features" "^1.26.1" +"@standardnotes/components@^1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@standardnotes/components/-/components-1.7.0.tgz#192f358ddffe275a9ab3709ef31b7b8bf3b58ec1" + integrity sha512-4J9iuos5WZvl+/Z7dNvhgEY9SRTdSm6JiUHbo6rRtryjvlJB4EkvnARxexJvw17MBmTWjvHY8c3aLm/w1dzv0A== -"@standardnotes/features@^1.20.3": - version "1.20.3" - resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.20.3.tgz#f1c1e37185fe193bdf75df699c9fbeefa01ec9ea" - integrity sha512-Q5wfU0rmSLpwv05UoPXd1UrE1rIhywyGxisr/hP19aQgwdY4JEfFXVmZ+QTsypcL1jkZvCPZwJLVuqugllHMiw== +"@standardnotes/domain-events@^2.21.4": + version "2.21.4" + resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.21.4.tgz#d6a78e5e9ff700208e7ed407edf492bd289137a4" + integrity sha512-1odojLlirCNB8h8O3PKPgaSmbjRtkg1MYTovg4uvcDPRbPecw+2F70dA9gMS33224JlorBhjBi4qcn+ehraP8w== dependencies: - "@standardnotes/auth" "3.8.3" - "@standardnotes/common" "1.2.1" + "@standardnotes/auth" "^3.15.4" + "@standardnotes/features" "^1.29.0" -"@standardnotes/features@^1.26.1": - version "1.26.1" - resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.26.1.tgz#d4e4aed2ba91e40c407484e569a96c339477bba2" - integrity sha512-zxoeH9fjQtcTUbc5qaYD7AZETKDniM+tIvmLrWqwSC9B6/IL0R39G51BEkOzen+KhR/WgH3itHDVM+zrSMg53Q== +"@standardnotes/features@^1.29.0": + version "1.29.0" + resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.29.0.tgz#f7c4c2cb9fdf5c7cc08bae177a40ec09eb73be95" + integrity sha512-OTxAtj1nA5yj6yEh3m2AsMnpd+JU6xQ8MBd6Vn3nxx3WKux5d+hTJkkskkbERc+0MZhIFLCiBUrkSolJc8Yo+g== dependencies: - "@standardnotes/auth" "^3.15.3" - "@standardnotes/common" "^1.8.0" + "@standardnotes/auth" "^3.15.4" + "@standardnotes/common" "^1.9.0" -"@standardnotes/settings@^1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@standardnotes/settings/-/settings-1.11.1.tgz#62e0df52820534c67041c99ed7f2c3a277158f39" - integrity sha512-uZChaTlIV63fYn7ODzVd/IB0nvrgyo/DwVaNgkjjHd3doGYqBMzzdfhs0RT0Ffpy0LOQhLpLBYqyJAryl1c4EA== - -"@standardnotes/sncrypto-common@1.5.2": - version "1.5.2" - resolved "https://registry.yarnpkg.com/@standardnotes/sncrypto-common/-/sncrypto-common-1.5.2.tgz#be9404689d94f953c68302609a4f76751eaa82cd" - integrity sha512-+OQ6gajTcVSHruw33T52MHyBDKL1vRCfQBXQn4tt4+bCfBAe+PFLkEQMHp35bg5twCfg9+wUf2KhmNNSNyBBZw== +"@standardnotes/settings@^1.11.3": + version "1.11.3" + resolved "https://registry.yarnpkg.com/@standardnotes/settings/-/settings-1.11.3.tgz#f7735da40807dab6eaf81cc82d8d30f5461d26d5" + integrity sha512-95nqPYIZt57HMrymf4FTMDHOibM13AmV/8JEj7mPbIqcNKvVD486BURsaqpoBgkqB4Q43LbT8dfTrBPDgmIdxg== -"@standardnotes/sncrypto-common@^1.6.0": +"@standardnotes/sncrypto-common@1.6.0", "@standardnotes/sncrypto-common@^1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@standardnotes/sncrypto-common/-/sncrypto-common-1.6.0.tgz#c6174adf65c778c8d53e45ea4c68087786f86b67" integrity sha512-3gTTokb+DWxtBH72auVtoB76V9pCZWyQ7hmClgBuQF3i5j6HvuuBZGiicHmwAv1zJxMi/op3haE8lwzQc8NJ9g== -"@standardnotes/snjs@2.45.0": - version "2.45.0" - resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.45.0.tgz#d123434b959d279af2ffe00acf2e9e6784cf497c" - integrity sha512-gTlOG3wd4zYaBeReypQiz+ASEnVCKaB8kWtKF61nkV9j3vFgYh3krsvdhOi6lMXBk+CijEefeLhrmooOtv08Xg== +"@standardnotes/snjs@2.53.0": + version "2.53.0" + resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.53.0.tgz#151ff71dbc05d1d650fb8d6907d92af9122f5c91" + integrity sha512-xJLB1W4OP2ApbLZTuO/kVnuq4IS0LHR3aM5WsSmk3g84PiAjvOTYAf/hsUp2/YWq5msxx9wOUi3fB8YFieDqxg== dependencies: - "@standardnotes/auth" "^3.15.3" - "@standardnotes/common" "^1.8.0" - "@standardnotes/domain-events" "^2.20.1" - "@standardnotes/features" "^1.26.1" - "@standardnotes/settings" "^1.11.1" + "@standardnotes/auth" "^3.15.4" + "@standardnotes/common" "^1.9.0" + "@standardnotes/domain-events" "^2.21.4" + "@standardnotes/features" "^1.29.0" + "@standardnotes/settings" "^1.11.3" "@standardnotes/sncrypto-common" "^1.6.0" "@svgr/babel-plugin-add-jsx-attribute@^6.0.0":