Compare commits

...
Author SHA1 Message Date
StandardNotes CI 25c0d655ab chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-09-08 10:40:54 +00:00
Aman Harwara bf3f6cec43 chore: catch error when fetching changelog 2023-09-08 13:49:32 +05:30
StandardNotes CI 4385315dae chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected]
2023-09-07 19:44:14 +00:00
Aman Harwara ec69e8041f chore: enable vaults if dev mode or if user has role (#2483) 2023-09-08 00:15:21 +05:30
StandardNotes CI 6724e1d79c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
2023-09-07 08:12:42 +00:00
Karol Sójko 60c9afad95 chore: fix e2e timeout on quota tests 2023-09-07 09:12:57 +02:00
Karol Sójko d4c8ee51f1 chore(features): remove unused permission name 2023-09-07 08:11:14 +02:00
Aman Harwara 8d42e8bde3 chore: super conversion wrap nodes in paragraph if requires parent 2023-09-06 15:54:25 +05:30
Aman Harwara 59130e8d85 chore: only show file storage used section if used more than 0 2023-09-06 15:34:21 +05:30
Aman Harwara 422506da0b chore: fix spacing 2023-09-06 15:29:05 +05:30
Aman Harwara 9ad779c89a chore: fix and add test for role change event 2023-09-06 15:06:02 +05:30
StandardNotes CI 3290f76e97 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected].9
2023-09-06 06:33:03 +00:00
Karol Sójko 5d551e1463 chore: add excessive revision creation delay buffer in e2e 2023-09-06 07:42:16 +02:00
Karol Sójko b73402850d chore: add shared vaults permission name 2023-09-06 07:02:15 +02:00
StandardNotes CI dcc69b3e52 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
2023-09-05 19:38:22 +00:00
Aman Harwara fcd853a311 chore: improve tag vault info styles 2023-09-06 00:20:02 +05:30
Aman Harwara 2d5e98bb21 chore: remove unused component 2023-09-06 00:20:02 +05:30
Aman Harwara 9430bf4507 chore: improve list item vault info spacing 2023-09-06 00:20:02 +05:30
62 changed files with 406 additions and 221 deletions
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.26.55](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/api
## [1.26.54](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/api
## [1.26.53](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/api
## [1.26.52](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
**Note:** Version bump only for package @standardnotes/api
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api",
"version": "1.26.52",
"version": "1.26.55",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -36,7 +36,7 @@
},
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.25.0",
"@standardnotes/domain-core": "^1.28.0",
"@standardnotes/models": "workspace:*",
"@standardnotes/responses": "workspace:*",
"@standardnotes/utils": "workspace:*",
+20
View File
@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.209](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.208](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.207](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.206](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.205](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.204](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/clipper
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/clipper",
"description": "Web clipper browser extension for Standard Notes",
"version": "1.1.204",
"version": "1.1.209",
"private": true,
"scripts": {
"build-mv2": "yarn clean && webpack --config ./webpack.config.prod.js",
+20
View File
@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.108.141](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.140](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.139](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.138](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.137](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.136](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/desktop
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/desktop",
"main": "./app/dist/index.js",
"version": "3.108.136",
"version": "3.108.141",
"license": "CC BY-NC-SA 4.0",
"author": "Standard Notes.",
"private": true,
@@ -35,7 +35,7 @@
},
"dependencies": {
"@electron/remote": "^2.0.9",
"@standardnotes/domain-core": "^1.25.0",
"@standardnotes/domain-core": "^1.28.0",
"@standardnotes/electron-clear-data": "1.1.1",
"@standardnotes/web": "workspace:*",
"axios": "^1.1.3",
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.21.76](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/encryption
## [1.21.75](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/encryption
## [1.21.74](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/encryption
## [1.21.73](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
**Note:** Version bump only for package @standardnotes/encryption
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/encryption",
"version": "1.21.73",
"version": "1.21.76",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -29,7 +29,7 @@
},
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.25.0",
"@standardnotes/domain-core": "^1.28.0",
"@standardnotes/models": "workspace:*",
"@standardnotes/responses": "workspace:*",
"@standardnotes/sncrypto-common": "workspace:*",
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.59.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/features
## [1.59.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/features
## [1.59.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/features
## [1.59.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-08-11)
**Note:** Version bump only for package @standardnotes/features
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/features",
"version": "1.59.15",
"version": "1.59.18",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -26,7 +26,7 @@
},
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.25.0",
"@standardnotes/domain-core": "^1.28.0",
"reflect-metadata": "^0.1.13"
},
"devDependencies": {
@@ -41,6 +41,8 @@ export class NativeFeatureIdentifier extends ValueObject<NativeFeatureIdentifier
Clipper: 'org.standardnotes.clipper',
SharedVaults: 'org.standardnotes.shared-vaults',
DeprecatedMarkdownVisualEditor: 'org.standardnotes.markdown-visual-editor',
DeprecatedBoldEditor: 'org.standardnotes.bold-editor',
DeprecatedMarkdownBasicEditor: 'org.standardnotes.simple-markdown-editor',
@@ -65,5 +65,11 @@ export function serverFeatures(): ServerFeatureDescription[] {
permission_name: PermissionName.ListedCustomDomain,
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
},
{
name: 'Shared Vaults',
identifier: NativeFeatureIdentifier.TYPES.SharedVaults,
permission_name: PermissionName.SharedVaults,
availableInRoles: [RoleName.NAMES.VaultsUser],
},
]
}
@@ -38,4 +38,5 @@ export enum PermissionName {
SubscriptionSharing = 'server:subscription-sharing',
SuperEditor = 'editor:super-editor',
Clipper = 'app:clipper',
SharedVaults = 'server:shared-vaults',
}
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.87](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.28.86](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.28.85](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.28.84](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
**Note:** Version bump only for package @standardnotes/filepicker
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/filepicker",
"version": "1.28.84",
"version": "1.28.87",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.17.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/files
## [1.17.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/files
## [1.17.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/files
## [1.17.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
**Note:** Version bump only for package @standardnotes/files
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files",
"version": "1.17.3",
"version": "1.17.6",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+20
View File
@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.56.120](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.119](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.118](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.117](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.116](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.115](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/mobile
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.56.115",
"version": "3.56.120",
"author": "Standard Notes.",
"private": true,
"license": "CC BY-NC-SA 4.0",
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.47.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/models
## [1.47.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/models
## [1.47.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/models
## [1.47.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
**Note:** Version bump only for package @standardnotes/models
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/models",
"version": "1.47.10",
"version": "1.47.13",
"publishConfig": {
"access": "public"
},
@@ -20,7 +20,7 @@
},
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.25.0",
"@standardnotes/domain-core": "^1.28.0",
"@standardnotes/features": "workspace:*",
"@standardnotes/responses": "workspace:*",
"@standardnotes/sncrypto-common": "workspace:^",
+20
View File
@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.493](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.492](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.491](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.490](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.489](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.488](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/releases
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/releases",
"version": "1.4.488",
"version": "1.4.493",
"license": "CC BY-NC-SA 4.0",
"main": "dist/releases.json",
"types": "dist/index.d.ts",
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.13.42](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/responses
## [1.13.41](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/responses
## [1.13.40](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/responses
## [1.13.39](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
**Note:** Version bump only for package @standardnotes/responses
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/responses",
"version": "1.13.39",
"version": "1.13.42",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.64.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/services
## [1.64.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/services
## [1.64.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/services
## [1.64.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/services
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/services",
"version": "1.64.10",
"version": "1.64.13",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -18,7 +18,7 @@
"dependencies": {
"@standardnotes/api": "workspace:^",
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.25.0",
"@standardnotes/domain-core": "^1.28.0",
"@standardnotes/encryption": "workspace:^",
"@standardnotes/features": "workspace:^",
"@standardnotes/files": "workspace:^",
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.202.68](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/snjs
## [2.202.67](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/snjs
## [2.202.66](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/snjs
## [2.202.65](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/snjs
@@ -259,6 +259,20 @@ describe('FeaturesService', () => {
expect(triggeredEvents).not.toContain(FeaturesEvent.DidPurchaseSubscription)
})
it('should not notify of subscription purchase if new roles are not paid', async () => {
storageService.getValue = jest.fn().mockReturnValue(roles)
featureService.initializeFromDisk()
const spy = jest.spyOn(featureService, 'notifyEvent' as never)
const newRoles = [...roles, 'TRANSITION_USER']
await featureService.updateOnlineRolesWithNewValues(newRoles)
const triggeredEvents = spy.mock.calls.map((call) => call[0])
expect(triggeredEvents).not.toContain(FeaturesEvent.DidPurchaseSubscription)
})
it('saves new roles to storage if a role has been added', async () => {
storageService.getValue = jest.fn().mockReturnValue(roles)
@@ -360,8 +360,10 @@ export class FeaturesService
const isInitialLoadRolesChange = previousRoles.length === 0
if (!isInitialLoadRolesChange) {
const newRolesIncludePaidSubscription = this.rolesIncludePaidSubscription(roles)
if (newRolesIncludePaidSubscription) {
const changedRoles = roles.filter((role) => !previousRoles.includes(role))
const changedRolesIncludePaidSubscription = this.rolesIncludePaidSubscription(changedRoles)
if (changedRolesIncludePaidSubscription) {
await this.notifyEvent(FeaturesEvent.DidPurchaseSubscription)
}
}
@@ -397,11 +399,9 @@ export class FeaturesService
}
private rolesIncludePaidSubscription(roles: string[]) {
{
const unpaidRoles = [RoleName.NAMES.CoreUser]
const paidRoles = [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser]
return roles.some((role) => !unpaidRoles.includes(role))
}
return roles.some((role) => paidRoles.includes(role))
}
onlineRolesIncludePaidSubscription(): boolean {
+2 -2
View File
@@ -269,7 +269,7 @@ describe('history manager', () => {
const item = await Factory.createSyncedNote(application)
expect(item).to.be.ok
await Factory.sleep(Factory.ServerRevisionCreationDelay)
await Factory.sleep(2 * Factory.ServerRevisionCreationDelay)
const itemHistoryOrError = await application.listRevisions.execute({ itemUuid: item.uuid })
expect(itemHistoryOrError.isFailed()).to.equal(false)
@@ -291,7 +291,7 @@ describe('history manager', () => {
syncOptions,
)
await Factory.sleep(Factory.ServerRevisionCreationDelay)
await Factory.sleep(2 * Factory.ServerRevisionCreationDelay)
const itemHistoryOrError = await application.listRevisions.execute({ itemUuid: item.uuid })
expect(itemHistoryOrError.isFailed()).to.equal(false)
+1 -1
View File
@@ -6,7 +6,7 @@ chai.use(chaiAsPromised)
const expect = chai.expect
describe('shared vault quota', function () {
this.timeout(Factory.TwentySecondTimeout)
this.timeout(Factory.ThirtySecondTimeout)
let context
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/snjs",
"version": "2.202.65",
"version": "2.202.68",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -37,7 +37,7 @@
"@babel/preset-env": "*",
"@standardnotes/api": "workspace:*",
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.25.0",
"@standardnotes/domain-core": "^1.28.0",
"@standardnotes/domain-events": "^2.122.0",
"@standardnotes/encryption": "workspace:*",
"@standardnotes/features": "workspace:*",
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.31.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/ui-services
## [1.31.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/ui-services
## [1.31.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/ui-services
## [1.31.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/ui-services
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/ui-services",
"version": "1.31.4",
"version": "1.31.7",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -16,7 +16,7 @@
},
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.25.0",
"@standardnotes/domain-core": "^1.28.0",
"@standardnotes/features": "workspace:^",
"@standardnotes/filepicker": "workspace:^",
"@standardnotes/models": "workspace:^",
+20
View File
@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.172.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
**Note:** Version bump only for package @standardnotes/web
## [3.172.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/web
## [3.172.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
**Note:** Version bump only for package @standardnotes/web
## [3.172.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
**Note:** Version bump only for package @standardnotes/web
## [3.172.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/web
## [3.172.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
**Note:** Version bump only for package @standardnotes/web
+55
View File
@@ -1,5 +1,60 @@
{
"versions": [
{
"version": "3.172.12",
"title": "[3.172.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.172.11",
"title": "[3.172.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.172.10",
"title": "[3.172.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.172.9",
"title": "[3.172.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.172.8",
"title": "[3.172.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.172.7",
"title": "[3.172.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/web",
"version": "3.172.7",
"version": "3.172.12",
"license": "CC BY-NC-SA 4.0",
"main": "dist/app.js",
"author": "Standard Notes",
@@ -262,6 +262,7 @@ export class WebDependencies extends DependencyContainer {
this.get<FilesController>(Web_TYPES.FilesController),
this.get<SubscriptionController>(Web_TYPES.SubscriptionController),
this.get<NavigationController>(Web_TYPES.NavigationController),
this.get<FeaturesController>(Web_TYPES.FeaturesController),
this.get<ItemGroupController>(Web_TYPES.ItemGroupController),
this.get<VaultDisplayService>(Web_TYPES.VaultDisplayService),
application.preferences,
@@ -104,7 +104,7 @@ const FileListItemCard: FunctionComponent<DisplayableListItemProps<FileItem>> =
<ListItemMetadata item={file} hideDate={hideDate} sortBy={sortBy} />
<ListItemTags hideTags={hideTags} tags={tags} />
<ListItemConflictIndicator item={file} />
<ListItemVaultInfo item={file} />
<ListItemVaultInfo item={file} className="mt-1.5" />
</div>
<ListItemFlagIcons className="p-4" item={file} isFileBackedUp={!!backupInfo} />
</div>
@@ -1,133 +0,0 @@
import { FileItem, FileBackupRecord } from '@standardnotes/snjs'
import { observer } from 'mobx-react-lite'
import { FunctionComponent, useCallback, useEffect, useRef, useState } from 'react'
import { getFileIconComponent } from '../FilePreview/getFileIconComponent'
import ListItemConflictIndicator from './ListItemConflictIndicator'
import ListItemTags from './ListItemTags'
import ListItemMetadata from './ListItemMetadata'
import { DisplayableListItemProps } from './Types/DisplayableListItemProps'
import { useResponsiveAppPane } from '../Panes/ResponsivePaneProvider'
import { useContextMenuEvent } from '@/Hooks/useContextMenuEvent'
import { classNames } from '@standardnotes/utils'
import { formatSizeToReadableString } from '@standardnotes/filepicker'
import { getIconForFileType } from '@/Utils/Items/Icons/getIconForFileType'
import { useApplication } from '../ApplicationProvider'
import Icon from '../Icon/Icon'
import { PaneLayout } from '@/Controllers/PaneController/PaneLayout'
import ListItemVaultInfo from './ListItemVaultInfo'
const FileListItemCard: FunctionComponent<DisplayableListItemProps<FileItem>> = ({
filesController,
hideDate,
hideIcon,
hideTags,
item: file,
onSelect,
selected,
sortBy,
tags,
}) => {
const { setPaneLayout } = useResponsiveAppPane()
const application = useApplication()
const [backupInfo, setBackupInfo] = useState<FileBackupRecord | undefined>(undefined)
useEffect(() => {
void application.fileBackups?.getFileBackupInfo(file).then(setBackupInfo)
}, [application, file])
const listItemRef = useRef<HTMLDivElement>(null)
const openFileContextMenu = useCallback(
(posX: number, posY: number) => {
filesController.setShowFileContextMenu(false)
filesController.setFileContextMenuLocation({
x: posX,
y: posY,
})
filesController.setShowFileContextMenu(true)
},
[filesController],
)
const openContextMenu = useCallback(
async (posX: number, posY: number) => {
let shouldOpenContextMenu = selected
if (!selected) {
const { didSelect } = await onSelect(file)
if (didSelect) {
shouldOpenContextMenu = true
}
}
if (shouldOpenContextMenu) {
openFileContextMenu(posX, posY)
}
},
[selected, onSelect, file, openFileContextMenu],
)
const onClick = useCallback(async () => {
const { didSelect } = await onSelect(file, true)
if (didSelect) {
setPaneLayout(PaneLayout.Editing)
}
}, [file, onSelect, setPaneLayout])
const IconComponent = () =>
getFileIconComponent(getIconForFileType((file as FileItem).mimeType), 'w-10 h-10 flex-shrink-0')
useContextMenuEvent(listItemRef, openContextMenu)
return (
<div
ref={listItemRef}
className={classNames('flex max-h-[300px] w-[190px] cursor-pointer px-1 pt-2 text-text md:w-[200px]')}
id={file.uuid}
onClick={onClick}
>
<div
className={`flex flex-col justify-between overflow-hidden rounded bg-passive-5 pt-5 transition-all hover:bg-passive-4 ${
selected ? 'border-[1px] border-solid border-info' : 'border-[1px] border-solid border-border'
}`}
>
<div className={'px-5'}>
{!hideIcon ? (
<div className="mr-0">
<IconComponent />
</div>
) : (
<div className="pr-4" />
)}
<div className="min-w-0 flex-grow px-0 py-4">
<div className="line-clamp-2 overflow-hidden text-editor font-semibold">
<div className="break-word mr-2 line-clamp-2 overflow-hidden">{file.title}</div>
</div>
<ListItemMetadata item={file} hideDate={hideDate} sortBy={sortBy} />
<ListItemTags hideTags={hideTags} tags={tags} />
<ListItemConflictIndicator item={file} />
<ListItemVaultInfo item={file} />
</div>
</div>
<div
className={classNames(
'border-t-[1px] border-solid border-border p-3 text-xs font-bold',
selected ? 'bg-info text-info-contrast' : 'bg-passive-4 text-neutral',
)}
>
<div className="flex justify-between">
{formatSizeToReadableString(file.decryptedSize)}
{backupInfo && (
<div title="File is backed up locally">
<Icon type="check-circle" />
</div>
)}
</div>
</div>
</div>
</div>
)
}
export default observer(FileListItemCard)
@@ -159,17 +159,14 @@ const ContentListHeader = ({
return (
<div className="flex min-w-0 flex-grow flex-col break-words pt-1 lg:pt-0">
<div
className={classNames(
'flex min-w-0 flex-grow flex-row',
!optionsSubtitle && !showSyncSubtitle ? 'items-center' : '',
)}
className={classNames('flex min-w-0 flex-grow', !optionsSubtitle && !showSyncSubtitle ? 'items-center' : '')}
>
{icon && (
<Icon
type={icon}
size="custom"
className={classNames(
'ml-0.5 mr-1.5 h-7 w-7 flex-shrink-0 text-2xl text-neutral lg:h-6 lg:w-6 lg:text-lg',
'ml-0.5 mr-2 h-7 w-7 flex-shrink-0 text-2xl text-neutral lg:h-6 lg:w-6 lg:text-lg',
optionsSubtitle && 'md:mt-0.5',
)}
/>
@@ -182,8 +179,8 @@ const ContentListHeader = ({
</div>
)}
{optionsSubtitle && <div className="text-xs text-passive-0">{optionsSubtitle}</div>}
<ListItemVaultInfo className="mt-1" item={selectedTag} />
</div>
<ListItemVaultInfo item={selectedTag} />
</div>
</div>
)
@@ -1,18 +1,18 @@
import { FunctionComponent } from 'react'
import { useApplication } from '../ApplicationProvider'
import Icon from '../Icon/Icon'
import { DecryptedItemInterface } from '@standardnotes/snjs'
import { DecryptedItemInterface, classNames } from '@standardnotes/snjs'
import VaultNameBadge from '../Vaults/VaultNameBadge'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
type Props = {
item: DecryptedItemInterface
className?: string
}
const ListItemVaultInfo: FunctionComponent<Props> = ({ item }) => {
const ListItemVaultInfo: FunctionComponent<Props> = ({ item, className }) => {
const application = useApplication()
if (!featureTrunkVaultsEnabled()) {
if (!application.featuresController.isEntitledToVaults()) {
return null
}
@@ -28,7 +28,7 @@ const ListItemVaultInfo: FunctionComponent<Props> = ({ item }) => {
const sharedByContact = application.sharedVaults.getItemSharedBy(item)
return (
<div className="flex flex-wrap items-center gap-2">
<div className={classNames('flex flex-wrap items-center gap-2', className)}>
<VaultNameBadge vault={vault} />
{sharedByContact && (
@@ -146,7 +146,7 @@ const NoteListItem: FunctionComponent<DisplayableListItemProps<SNNote>> = ({
<ListItemMetadata item={item} hideDate={hideDate} sortBy={sortBy} />
<ListItemTags hideTags={hideTags} tags={tags} />
<ListItemConflictIndicator item={item} />
<ListItemVaultInfo item={item} />
<ListItemVaultInfo item={item} className="mt-1.5" />
</div>
<ListItemFlagIcons className="p-4" item={item} hasFiles={hasFiles} hasBorder={hasOffsetBorder} />
</div>
@@ -14,7 +14,6 @@ import AddTagOption from '../NotesOptions/AddTagOption'
import { MenuItemIconSize } from '@/Constants/TailwindClassNames'
import AddToVaultMenuOption from '../Vaults/AddToVaultMenuOption'
import { iconClass } from '../NotesOptions/ClassNames'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
import { useApplication } from '../ApplicationProvider'
type Props = {
@@ -87,7 +86,9 @@ const FileMenuOptions: FunctionComponent<Props> = ({
) : null}
</>
)}
{featureTrunkVaultsEnabled() && <AddToVaultMenuOption iconClassName={iconClass} items={selectedFiles} />}
{application.featuresController.isEntitledToVaults() && (
<AddToVaultMenuOption iconClassName={iconClass} items={selectedFiles} />
)}
<AddTagOption
navigationController={application.navigationController}
linkingController={application.linkingController}
@@ -5,7 +5,6 @@ import Popover from '../Popover/Popover'
import StyledTooltip from '../StyledTooltip/StyledTooltip'
import VaultSelectionMenu from '../VaultSelectionMenu/VaultSelectionMenu'
import { useApplication } from '../ApplicationProvider'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
import RoundIconButton from '../Button/RoundIconButton'
const VaultSelectionButton = ({ isMobileNavigation = false }: { isMobileNavigation?: boolean }) => {
@@ -16,7 +15,7 @@ const VaultSelectionButton = ({ isMobileNavigation = false }: { isMobileNavigati
const [isOpen, setIsOpen] = useState(false)
const toggleMenu = () => setIsOpen(!isOpen)
if (!featureTrunkVaultsEnabled()) {
if (!application.featuresController.isEntitledToVaults()) {
return null
}
@@ -2,7 +2,6 @@ import { FunctionComponent } from 'react'
import Icon from '../Icon/Icon'
import { useApplication } from '../ApplicationProvider'
import { DecryptedItemInterface } from '@standardnotes/snjs'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
import VaultNameBadge from '../Vaults/VaultNameBadge'
type Props = {
@@ -12,7 +11,7 @@ type Props = {
const CollaborationInfoHUD: FunctionComponent<Props> = ({ item }) => {
const application = useApplication()
if (!featureTrunkVaultsEnabled()) {
if (!application.featuresController.isEntitledToVaults()) {
return null
}
@@ -32,7 +31,7 @@ const CollaborationInfoHUD: FunctionComponent<Props> = ({ item }) => {
<VaultNameBadge vault={vault} />
{lastEditedBy && (
<div title="Last edited by" className="flex rounded bg-info px-1.5 py-1 text-info-contrast select-none">
<div title="Last edited by" className="flex select-none rounded bg-info px-1.5 py-1 text-info-contrast">
<Icon ariaLabel="Shared by" type="pencil" className="mr-1 text-info-contrast" size="medium" />
<span className="mr-auto overflow-hidden text-ellipsis text-xs">{lastEditedBy?.name}</span>
</div>
@@ -41,7 +41,6 @@ import SuperExportModal from './SuperExportModal'
import { useApplication } from '../ApplicationProvider'
import { MutuallyExclusiveMediaQueryBreakpoints } from '@/Hooks/useMediaQuery'
import AddToVaultMenuOption from '../Vaults/AddToVaultMenuOption'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
import Menu from '../Menu/Menu'
import Popover from '../Popover/Popover'
@@ -267,7 +266,9 @@ const NotesOptions = ({ notes, closeMenu }: NotesOptionsProps) => {
)}
<HorizontalSeparator classes="my-2" />
{featureTrunkVaultsEnabled() && <AddToVaultMenuOption iconClassName={iconClass} items={notes} />}
{application.featuresController.isEntitledToVaults() && (
<AddToVaultMenuOption iconClassName={iconClass} items={notes} />
)}
{application.navigationController.tagsCount > 0 && (
<AddTagOption
@@ -6,7 +6,6 @@ import Spinner from '../Spinner/Spinner'
import { PasswordStep } from './PasswordStep'
import { FinishStep } from './FinishStep'
import { PreprocessingStep } from './PreprocessingStep'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
interface Props {
application: WebApplication
@@ -50,7 +49,7 @@ class PasswordWizard extends AbstractComponent<Props, State> {
continueTitle: DEFAULT_CONTINUE_TITLE,
}
if (featureTrunkVaultsEnabled()) {
if (props.application.featuresController.isEntitledToVaults()) {
this.state = {
...baseState,
lockContinue: true,
@@ -4,7 +4,7 @@ import { PackageProvider } from '../Panes/General/Advanced/Packages/Provider/Pac
import { securityPrefsHasBubble } from '../Panes/Security/securityPrefsHasBubble'
import { PreferencePaneId, StatusServiceEvent } from '@standardnotes/services'
import { isDesktopApplication } from '@/Utils'
import { featureTrunkHomeServerEnabled, featureTrunkVaultsEnabled } from '@/FeatureTrunk'
import { featureTrunkHomeServerEnabled } from '@/FeatureTrunk'
import { PreferencesMenuItem } from './PreferencesMenuItem'
import { SelectableMenuItem } from './SelectableMenuItem'
import { PREFERENCES_MENU_ITEMS, READY_PREFERENCES_MENU_ITEMS } from './MenuItems'
@@ -26,7 +26,7 @@ export class PreferencesSessionController {
? PREFERENCES_MENU_ITEMS.slice()
: READY_PREFERENCES_MENU_ITEMS.slice()
if (featureTrunkVaultsEnabled()) {
if (application.featuresController.isEntitledToVaults()) {
menuItems.push({ id: 'vaults', label: 'Vaults', icon: 'safe-square', order: 5 })
}
@@ -143,11 +143,13 @@ const Vaults = () => {
<PreferencesGroup>
<PreferencesSegment>
<Title>Contacts</Title>
<div className="my-2 flex flex-col gap-3.5">
{contacts.map((contact) => {
return <ContactItem contact={contact} key={contact.uuid} />
})}
</div>
{contacts.length > 0 && (
<div className="my-2 flex flex-col gap-3.5">
{contacts.map((contact) => {
return <ContactItem contact={contact} key={contact.uuid} />
})}
</div>
)}
<div className="mt-2.5 flex flex-row">
<Button label="Add New Contact" className={'mr-3 text-xs'} onClick={createNewContact} />
</div>
@@ -147,9 +147,11 @@ const VaultItem = ({ vault }: Props) => {
)}
<span className="mr-auto overflow-hidden text-ellipsis text-sm">Vault ID: {vault.systemIdentifier}</span>
<span className="mr-auto overflow-hidden text-ellipsis text-sm">
File storage used: {formatSizeToReadableString(vault.sharing?.fileBytesUsed ?? 0)}
</span>
{!!vault.sharing?.fileBytesUsed && (
<span className="mr-auto overflow-hidden text-ellipsis text-sm">
File storage used: {formatSizeToReadableString(vault.sharing?.fileBytesUsed ?? 0)}
</span>
)}
<div className="mt-2 flex w-full flex-wrap gap-3">
<Button label="Edit" className="text-xs" onClick={openEditModal} />
@@ -32,7 +32,7 @@ const WhatsNew = ({ application }: { application: WebApplication }) => {
const lastReadVersion = useMemo(() => application.changelogService.getLastReadVersion(), [application])
useEffect(() => {
void application.changelogService.getChangelog().then(setChangelog)
application.changelogService.getChangelog().then(setChangelog).catch(console.error)
}, [application])
useEffect(() => {
@@ -111,7 +111,13 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
// Wrap text & link nodes with paragraph since they can't
// be top-level nodes in Super
if (type === 'text' || type === 'link' || type === 'unencrypted-image' || type === 'inline-file') {
if (
type === 'text' ||
type === 'link' ||
type === 'unencrypted-image' ||
type === 'inline-file' ||
node.isParentRequired()
) {
const paragraphNode = $createParagraphNode()
paragraphNode.append(node)
nodesToInsert.push(paragraphNode)
@@ -14,7 +14,6 @@ import { PaneLayout } from '@/Controllers/PaneController/PaneLayout'
import { usePaneSwipeGesture } from '../Panes/usePaneGesture'
import { mergeRefs } from '@/Hooks/mergeRefs'
import { useAvailableSafeAreaPadding } from '@/Hooks/useSafeAreaPadding'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
import QuickSettingsButton from '../Footer/QuickSettingsButton'
import VaultSelectionButton from '../Footer/VaultSelectionButton'
@@ -131,7 +130,7 @@ const Navigation = forwardRef<HTMLDivElement, Props>(({ application, className,
icon="tune"
/>
<QuickSettingsButton application={application} isMobileNavigation />
{featureTrunkVaultsEnabled() && <VaultSelectionButton isMobileNavigation />}
{application.featuresController.isEntitledToVaults() && <VaultSelectionButton isMobileNavigation />}
</div>
{children}
</div>
@@ -12,7 +12,6 @@ import { PremiumFeatureIconClass, PremiumFeatureIconName } from '../Icon/Premium
import Popover from '../Popover/Popover'
import IconPicker from '../Icon/IconPicker'
import AddToVaultMenuOption from '../Vaults/AddToVaultMenuOption'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
import { useApplication } from '../ApplicationProvider'
type ContextMenuProps = {
@@ -82,7 +81,7 @@ const TagContextMenu = ({ navigationController, isEntitledToFolders, selectedTag
iconGridClassName="max-h-30"
/>
<HorizontalSeparator classes="my-2" />
{featureTrunkVaultsEnabled() && (
{application.featuresController.isEntitledToVaults() && (
<AddToVaultMenuOption iconClassName="mr-2 text-neutral" items={[selectedTag]} />
)}
<MenuItem className={'justify-between py-1.5'} onClick={onClickStar}>
@@ -7,7 +7,6 @@ import { classNames, DecryptedItemInterface, VaultListingInterface } from '@stan
import { useApplication } from '../ApplicationProvider'
import MenuItem from '../Menu/MenuItem'
import Menu from '../Menu/Menu'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
const VaultMenu = observer(({ items }: { items: DecryptedItemInterface[] }) => {
const application = useApplication()
@@ -107,6 +106,7 @@ const VaultMenu = observer(({ items }: { items: DecryptedItemInterface[] }) => {
})
const AddToVaultMenuOption = ({ iconClassName, items }: { iconClassName: string; items: DecryptedItemInterface[] }) => {
const application = useApplication()
const buttonRef = useRef<HTMLButtonElement>(null)
const [isSubMenuOpen, setIsSubMenuOpen] = useState(false)
@@ -115,7 +115,7 @@ const AddToVaultMenuOption = ({ iconClassName, items }: { iconClassName: string;
setIsSubMenuOpen((isOpen) => !isOpen)
}, [])
if (!featureTrunkVaultsEnabled()) {
if (!application.featuresController.isEntitledToVaults()) {
return null
}
@@ -12,6 +12,7 @@ import {
import { action, makeObservable, observable, runInAction, when } from 'mobx'
import { AbstractViewController } from './Abstract/AbstractViewController'
import { CrossControllerEvent } from './CrossControllerEvent'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
export class FeaturesController extends AbstractViewController implements InternalEventHandlerInterface {
hasFolders: boolean
@@ -128,4 +129,13 @@ export class FeaturesController extends AbstractViewController implements Intern
return status === FeatureStatus.Entitled
}
isEntitledToVaults(): boolean {
const status = this.features.getFeatureStatus(
NativeFeatureIdentifier.create(NativeFeatureIdentifier.TYPES.SharedVaults).getValue(),
)
const isEntitledToFeature = status === FeatureStatus.Entitled
return featureTrunkVaultsEnabled() || isEntitledToFeature
}
}
@@ -22,6 +22,7 @@ import { LinkingController } from './LinkingController'
import { NavigationController } from './Navigation/NavigationController'
import { SubscriptionController } from './Subscription/SubscriptionController'
import { getLinkingSearchResults } from '@/Utils/Items/Search/getSearchResults'
import { FeaturesController } from './FeaturesController'
const createNote = (name: string, options?: Partial<SNNote>) => {
return {
@@ -63,11 +64,13 @@ describe('LinkingController', () => {
itemListController: {} as jest.Mocked<ItemListController>,
filesController: {} as jest.Mocked<FilesController>,
subscriptionController: {} as jest.Mocked<SubscriptionController>,
featuresController: {} as jest.Mocked<FeaturesController>,
} as unknown as jest.Mocked<WebApplication>
application.getPreference = jest.fn()
application.addSingleEventObserver = jest.fn()
application.sync.sync = jest.fn()
application.featuresController.isEntitledToVaults = jest.fn().mockReturnValue(true)
Object.defineProperty(application, 'items', { value: {} as jest.Mocked<ItemManagerInterface> })
@@ -81,6 +84,7 @@ describe('LinkingController', () => {
application.filesController,
application.subscriptionController,
application.navigationController,
application.featuresController,
application.itemControllerGroup,
application.vaultDisplayService,
application.preferences,
@@ -32,9 +32,9 @@ import { FilesController } from './FilesController'
import { ItemListController } from './ItemList/ItemListController'
import { NavigationController } from './Navigation/NavigationController'
import { SubscriptionController } from './Subscription/SubscriptionController'
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
import { ItemGroupController } from '@/Components/NoteView/Controller/ItemGroupController'
import { VaultDisplayServiceInterface } from '@standardnotes/ui-services'
import { FeaturesController } from './FeaturesController'
export class LinkingController extends AbstractViewController implements InternalEventHandlerInterface {
shouldLinkToParentFolders: boolean
@@ -45,6 +45,7 @@ export class LinkingController extends AbstractViewController implements Interna
private filesController: FilesController,
private subscriptionController: SubscriptionController,
private navigationController: NavigationController,
private featuresController: FeaturesController,
private itemControllerGroup: ItemGroupController,
private vaultDisplayService: VaultDisplayServiceInterface,
private preferences: PreferenceServiceInterface,
@@ -207,7 +208,7 @@ export class LinkingController extends AbstractViewController implements Interna
const linkNoteAndFile = async (note: SNNote, file: FileItem) => {
const updatedFile = await this.mutator.associateFileWithNote(file, note)
if (featureTrunkVaultsEnabled()) {
if (this.featuresController.isEntitledToVaults()) {
if (updatedFile) {
const noteVault = this.vaults.getItemVault(note)
const fileVault = this.vaults.getItemVault(updatedFile)
+12 -12
View File
@@ -4138,7 +4138,7 @@ __metadata:
resolution: "@standardnotes/api@workspace:packages/api"
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.25.0
"@standardnotes/domain-core": ^1.28.0
"@standardnotes/models": "workspace:*"
"@standardnotes/responses": "workspace:*"
"@standardnotes/utils": "workspace:*"
@@ -4288,7 +4288,7 @@ __metadata:
"@babel/core": "*"
"@babel/preset-env": "*"
"@electron/remote": ^2.0.9
"@standardnotes/domain-core": ^1.25.0
"@standardnotes/domain-core": ^1.28.0
"@standardnotes/electron-clear-data": 1.1.1
"@standardnotes/web": "workspace:*"
"@types/fs-extra": ^11.0.1
@@ -4340,12 +4340,12 @@ __metadata:
languageName: node
linkType: hard
"@standardnotes/domain-core@npm:^1.25.0":
version: 1.25.0
resolution: "@standardnotes/domain-core@npm:1.25.0"
"@standardnotes/domain-core@npm:^1.28.0":
version: 1.28.0
resolution: "@standardnotes/domain-core@npm:1.28.0"
dependencies:
uuid: ^9.0.0
checksum: f99196f6209a05a50e84371d3a59cf870937a5589f4ba4caab0f2eb17c2cfa733142b18ca8788016c81ca609d1f5a0461e51bcf159a67d631e249a04a5568244
checksum: 9ee58eea35ed5d988513c5a24f751b9c3a2be2a324c30684db54ecbd16f0c8e19a80b8e464bde46e86905590085923c7e1abbe1b792a4ef0a19c1171e8f3b6c2
languageName: node
linkType: hard
@@ -4392,7 +4392,7 @@ __metadata:
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/config": 2.4.3
"@standardnotes/domain-core": ^1.25.0
"@standardnotes/domain-core": ^1.28.0
"@standardnotes/models": "workspace:*"
"@standardnotes/responses": "workspace:*"
"@standardnotes/sncrypto-common": "workspace:*"
@@ -4427,7 +4427,7 @@ __metadata:
resolution: "@standardnotes/features@workspace:packages/features"
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.25.0
"@standardnotes/domain-core": ^1.28.0
"@types/jest": ^29.2.3
"@typescript-eslint/eslint-plugin": "*"
eslint: "*"
@@ -4633,7 +4633,7 @@ __metadata:
resolution: "@standardnotes/models@workspace:packages/models"
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.25.0
"@standardnotes/domain-core": ^1.28.0
"@standardnotes/features": "workspace:*"
"@standardnotes/responses": "workspace:*"
"@standardnotes/sncrypto-common": "workspace:^"
@@ -4729,7 +4729,7 @@ __metadata:
dependencies:
"@standardnotes/api": "workspace:^"
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.25.0
"@standardnotes/domain-core": ^1.28.0
"@standardnotes/encryption": "workspace:^"
"@standardnotes/features": "workspace:^"
"@standardnotes/files": "workspace:^"
@@ -4828,7 +4828,7 @@ __metadata:
"@babel/preset-env": "*"
"@standardnotes/api": "workspace:*"
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.25.0
"@standardnotes/domain-core": ^1.28.0
"@standardnotes/domain-events": ^2.122.0
"@standardnotes/encryption": "workspace:*"
"@standardnotes/features": "workspace:*"
@@ -4953,7 +4953,7 @@ __metadata:
resolution: "@standardnotes/ui-services@workspace:packages/ui-services"
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.25.0
"@standardnotes/domain-core": ^1.28.0
"@standardnotes/features": "workspace:^"
"@standardnotes/filepicker": "workspace:^"
"@standardnotes/models": "workspace:^"