Compare commits

..
Author SHA1 Message Date
StandardNotes CI e46f1b3c39 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2024-02-18 10:28:20 +00:00
Aman Harwara 84ee718330 Merge branch 'main' of github.com:standardnotes/app 2024-02-18 15:29:40 +05:30
Aman Harwara 015660a2b3 chore: update ios dependencies [skip e2e] 2024-02-18 15:29:11 +05:30
StandardNotes CI 9a7c947038 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2024-02-18 09:18:53 +00:00
Aman Harwara 7c0bf5a9a7 chore: fix ios deploy [skip e2e] 2024-02-18 14:35:19 +05:30
StandardNotes CI d13b51697e chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2024-02-17 14:19:16 +00:00
Aman Harwara 47745cb79c feat: Added "Find in note" option to note options/context menu for Super notes 2024-02-17 19:20:16 +05:30
StandardNotes CI 85c401fa6e chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
2024-02-17 09:13:16 +00:00
Aman Harwara 79374f017b chore: fix Open button in duplicate toast not working correctly on mobile [skip e2e] 2024-02-17 14:34:29 +05:30
Aman Harwara bfbf9ab8ce feat: Themes and appeareance settings are now local to your device and not synced (#2847) 2024-02-17 14:23:37 +05:30
Aman Harwara 3d1a038393 chore: fix issue on macOS where close button on preferences header is not fully clickable 2024-02-17 14:23:00 +05:30
56 changed files with 522 additions and 219 deletions
Binary file not shown.
Binary file not shown.
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.26.80](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/api
## [1.26.79](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-02)
**Note:** Version bump only for package @standardnotes/api
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api",
"version": "1.26.79",
"version": "1.26.80",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.414](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.413](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.412](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.411](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.410](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-15)
**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.410",
"version": "1.1.414",
"private": true,
"scripts": {
"build-mv2": "yarn clean && webpack --config ./webpack.config.prod.js",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.110.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)
**Note:** Version bump only for package @standardnotes/desktop
## [3.110.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)
**Note:** Version bump only for package @standardnotes/desktop
## [3.110.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/desktop
## [3.110.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/desktop
## [3.110.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-15)
**Note:** Version bump only for package @standardnotes/desktop
@@ -87,6 +87,10 @@
-webkit-app-region: drag;
}
.mac-desktop [data-dialog-portal]:has([data-preferences-header])::after {
height: 0;
}
button,
input,
#navigation #navigation-content,
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/desktop",
"main": "./app/dist/index.js",
"version": "3.110.12",
"version": "3.110.16",
"license": "AGPL-3.0",
"author": "Standard Notes.",
"private": true,
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.21.102](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/encryption
## [1.21.101](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-02)
**Note:** Version bump only for package @standardnotes/encryption
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/encryption",
"version": "1.21.101",
"version": "1.21.102",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.117](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.28.116](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-02)
**Note:** Version bump only for package @standardnotes/filepicker
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/filepicker",
"version": "1.28.116",
"version": "1.28.117",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/files
## [1.20.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-02)
**Note:** Version bump only for package @standardnotes/files
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files",
"version": "1.20.1",
"version": "1.20.2",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.58.73](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)
**Note:** Version bump only for package @standardnotes/mobile
## [3.58.72](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)
**Note:** Version bump only for package @standardnotes/mobile
## [3.58.71](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/mobile
## [3.58.70](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/mobile
## [3.58.69](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-15)
**Note:** Version bump only for package @standardnotes/mobile
+1 -1
View File
@@ -7,7 +7,7 @@ source "https://rubygems.org"
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby "2.7.6"
gem 'cocoapods', '~> 1.12'
gem 'cocoapods', '~> 1.15.2'
gem 'fastlane'
gem 'fastlane-plugin-bundletool'
gem 'xcode-install'
+10 -10
View File
@@ -3,7 +3,7 @@ GEM
specs:
CFPropertyList (3.0.6)
rexml
activesupport (7.1.1)
activesupport (7.1.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -37,15 +37,15 @@ GEM
aws-sigv4 (1.6.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.1.1)
bigdecimal (3.1.4)
base64 (0.2.0)
bigdecimal (3.1.6)
claide (1.1.0)
cocoapods (1.14.2)
cocoapods (1.15.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.14.2)
cocoapods-core (= 1.15.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
@@ -58,7 +58,7 @@ GEM
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.14.2)
cocoapods-core (1.15.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
@@ -69,7 +69,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (2.0)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
@@ -81,7 +81,7 @@ GEM
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
declarative (0.0.20)
digest-crc (0.6.5)
@@ -290,7 +290,7 @@ PLATFORMS
ruby
DEPENDENCIES
cocoapods (~> 1.12)
cocoapods (~> 1.15.2)
fastlane
fastlane-plugin-bundletool
xcode-install
+10 -10
View File
@@ -70,13 +70,13 @@ PODS:
- FlipperKit/FlipperKitNetworkPlugin
- fmt (6.2.1)
- glog (0.3.5)
- hermes-engine (0.72.4):
- hermes-engine/Pre-built (= 0.72.4)
- hermes-engine/Pre-built (0.72.4)
- hermes-engine (0.72.5):
- hermes-engine/Pre-built (= 0.72.5)
- hermes-engine/Pre-built (0.72.5)
- libevent (2.1.12)
- MMKV (1.2.14):
- MMKVCore (~> 1.2.14)
- MMKVCore (1.2.14)
- MMKV (1.3.0):
- MMKVCore (~> 1.3.0)
- MMKVCore (1.3.0)
- OpenSSL-Universal (1.1.1100)
- RCT-Folly (2021.07.22.00):
- boost
@@ -751,10 +751,10 @@ SPEC CHECKSUMS:
FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
hermes-engine: 81191603c4eaa01f5e4ae5737a9efcf64756c7b2
hermes-engine: f6cf92a471053245614d9d8097736f6337d5b86c
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
MMKV: 9c4663aa7ca255d478ff10f2f5cb7d17c1651ccd
MMKVCore: 89f5c8a66bba2dcd551779dea4d412eeec8ff5bb
MMKV: 9c6c3fa4ddd849f28c7b9a5c9d23aab84f14ee35
MMKVCore: 9bb7440b170181ac5b81f542ac258103542e693d
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: df81ab637d35fac9e6eb94611cfd20f0feb05455
@@ -809,4 +809,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: c3b827e3c92cdf3199eddc52083480826e717b88
COCOAPODS: 1.14.2
COCOAPODS: 1.15.2
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.58.69",
"version": "3.58.73",
"author": "Standard Notes.",
"private": true,
"license": "AGPL-3.0",
@@ -50,7 +50,7 @@
"get-yarn-workspaces": "^1.0.2",
"metro-react-native-babel-preset": "^0.77.0",
"npm-check-updates": "*",
"pod-install": "^0.1.38",
"pod-install": "^0.2.0",
"prettier": "*",
"prettier-plugin-organize-imports": "^3.2.0",
"react": "18.2.0",
+6
View File
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.55.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
### Features
* Themes and appeareance settings are now local to your device and not synced ([#2847](https://github.com/standardnotes/app/issues/2847)) ([bfbf9ab](https://github.com/standardnotes/app/commit/bfbf9ab8ceb6f1ecd3a0690bce3b5d1c5c52e84c))
# [1.54.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-02)
### Features
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/models",
"version": "1.54.0",
"version": "1.55.0",
"publishConfig": {
"access": "public"
},
@@ -27,10 +27,10 @@ export const PrefDefaults = {
[PrefKey.NotesHideDate]: false,
[PrefKey.NotesHideTags]: false,
[PrefKey.NotesHideEditorIcon]: false,
[PrefKey.UseSystemColorScheme]: false,
[PrefKey.UseTranslucentUI]: true,
[PrefKey.AutoLightThemeIdentifier]: 'Default',
[PrefKey.AutoDarkThemeIdentifier]: NativeFeatureIdentifier.TYPES.DarkTheme,
[PrefKey.DEPRECATED_UseSystemColorScheme]: false,
[PrefKey.DEPRECATED_UseTranslucentUI]: true,
[PrefKey.DEPRECATED_AutoLightThemeIdentifier]: 'Default',
[PrefKey.DEPRECATED_AutoDarkThemeIdentifier]: NativeFeatureIdentifier.TYPES.DarkTheme,
[PrefKey.NoteAddToParentFolders]: true,
[PrefKey.NewNoteTitleFormat]: NewNoteTitleFormat.CurrentDateAndTime,
[PrefKey.CustomNoteTitleFormat]: 'YYYY-MM-DD [at] hh:mm A',
@@ -46,7 +46,7 @@ export const PrefDefaults = {
[PrefKey.SystemViewPreferences]: {},
[PrefKey.AuthenticatorNames]: '',
[PrefKey.ComponentPreferences]: {},
[PrefKey.ActiveThemes]: [],
[PrefKey.DEPRECATED_ActiveThemes]: [],
[PrefKey.ActiveComponents]: [],
[PrefKey.AlwaysShowSuperToolbar]: true,
[PrefKey.AddImportsToTag]: true,
@@ -28,10 +28,6 @@ export enum PrefKey {
NotesHideDate = 'hideDate',
NotesHideTags = 'hideTags',
NotesHideEditorIcon = 'hideEditorIcon',
UseSystemColorScheme = 'useSystemColorScheme',
UseTranslucentUI = 'useTranslucentUI',
AutoLightThemeIdentifier = 'autoLightThemeIdentifier',
AutoDarkThemeIdentifier = 'autoDarkThemeIdentifier',
NoteAddToParentFolders = 'noteAddToParentFolders',
NewNoteTitleFormat = 'newNoteTitleFormat',
CustomNoteTitleFormat = 'customNoteTitleFormat',
@@ -47,12 +43,16 @@ export enum PrefKey {
AuthenticatorNames = 'authenticatorNames',
PaneGesturesEnabled = 'paneGesturesEnabled',
ComponentPreferences = 'componentPreferences',
ActiveThemes = 'activeThemes',
ActiveComponents = 'activeComponents',
AlwaysShowSuperToolbar = 'alwaysShowSuperToolbar',
AddImportsToTag = 'addImportsToTag',
AlwaysCreateNewTagForImports = 'alwaysCreateNewTagForImports',
ExistingTagForImports = 'existingTagForImports',
DEPRECATED_ActiveThemes = 'activeThemes',
DEPRECATED_UseSystemColorScheme = 'useSystemColorScheme',
DEPRECATED_UseTranslucentUI = 'useTranslucentUI',
DEPRECATED_AutoLightThemeIdentifier = 'autoLightThemeIdentifier',
DEPRECATED_AutoDarkThemeIdentifier = 'autoDarkThemeIdentifier',
}
export type PrefValue = {
@@ -73,10 +73,11 @@ export type PrefValue = {
[PrefKey.NotesHideDate]: boolean
[PrefKey.NotesHideTags]: boolean
[PrefKey.NotesHideEditorIcon]: boolean
[PrefKey.UseSystemColorScheme]: boolean
[PrefKey.UseTranslucentUI]: boolean
[PrefKey.AutoLightThemeIdentifier]: string
[PrefKey.AutoDarkThemeIdentifier]: string
[PrefKey.DEPRECATED_ActiveThemes]: string[]
[PrefKey.DEPRECATED_UseSystemColorScheme]: boolean
[PrefKey.DEPRECATED_UseTranslucentUI]: boolean
[PrefKey.DEPRECATED_AutoLightThemeIdentifier]: string
[PrefKey.DEPRECATED_AutoDarkThemeIdentifier]: string
[PrefKey.NoteAddToParentFolders]: boolean
[PrefKey.NewNoteTitleFormat]: NewNoteTitleFormat
[PrefKey.CustomNoteTitleFormat]: string
@@ -95,7 +96,6 @@ export type PrefValue = {
[PrefKey.AuthenticatorNames]: string
[PrefKey.PaneGesturesEnabled]: boolean
[PrefKey.ComponentPreferences]: AllComponentPreferences
[PrefKey.ActiveThemes]: string[]
[PrefKey.ActiveComponents]: string[]
[PrefKey.AlwaysShowSuperToolbar]: boolean
[PrefKey.AddImportsToTag]: boolean
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.709](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.708](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.707](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.706](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.705](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-15)
**Note:** Version bump only for package @standardnotes/releases
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/releases",
"version": "1.4.705",
"version": "1.4.709",
"license": "AGPL-3.0",
"main": "dist/releases.json",
"types": "dist/index.d.ts",
+6
View File
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.70.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
### Features
* Themes and appeareance settings are now local to your device and not synced ([#2847](https://github.com/standardnotes/app/issues/2847)) ([bfbf9ab](https://github.com/standardnotes/app/commit/bfbf9ab8ceb6f1ecd3a0690bce3b5d1c5c52e84c))
# [1.69.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-02)
### Features
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/services",
"version": "1.69.0",
"version": "1.70.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -49,6 +49,7 @@ export enum ApplicationEvent {
/** When StorageService is ready (but NOT yet decrypted) to start servicing read/write requests */
StorageReady = 'Application:StorageReady',
PreferencesChanged = 'Application:PreferencesChanged',
LocalPreferencesChanged = 'Application:LocalPreferencesChanged',
UnprotectedSessionBegan = 'Application:UnprotectedSessionBegan',
UserRolesChanged = 'Application:UserRolesChanged',
FeaturesAvailabilityChanged = 'Application:FeaturesAvailabilityChanged',
@@ -0,0 +1,15 @@
export enum LocalPrefKey {
ActiveThemes = 'activeThemes',
UseSystemColorScheme = 'useSystemColorScheme',
UseTranslucentUI = 'useTranslucentUI',
AutoLightThemeIdentifier = 'autoLightThemeIdentifier',
AutoDarkThemeIdentifier = 'autoDarkThemeIdentifier',
}
export type LocalPrefValue = {
[LocalPrefKey.ActiveThemes]: string[]
[LocalPrefKey.UseSystemColorScheme]: boolean
[LocalPrefKey.UseTranslucentUI]: boolean
[LocalPrefKey.AutoLightThemeIdentifier]: string
[LocalPrefKey.AutoDarkThemeIdentifier]: string
}
@@ -1,7 +1,9 @@
import { PrefKey, PrefValue } from '@standardnotes/models'
import { AbstractService } from '../Service/AbstractService'
import { LocalPrefKey, LocalPrefValue } from './LocalPrefKey'
export enum PreferencesServiceEvent {
LocalPreferencesChanged = 'LocalPreferencesChanged',
PreferencesChanged = 'PreferencesChanged',
}
@@ -10,7 +12,15 @@ export interface PreferenceServiceInterface extends AbstractService<PreferencesS
getValue<K extends PrefKey>(key: K, defaultValue?: PrefValue[K]): PrefValue[K] | undefined
getValue<K extends PrefKey>(key: K, defaultValue: PrefValue[K] | undefined): PrefValue[K] | undefined
getLocalValue<K extends LocalPrefKey>(key: K, defaultValue: LocalPrefValue[K]): LocalPrefValue[K]
getLocalValue<K extends LocalPrefKey>(key: K, defaultValue?: LocalPrefValue[K]): LocalPrefValue[K] | undefined
getLocalValue<K extends LocalPrefKey>(
key: K,
defaultValue: LocalPrefValue[K] | undefined,
): LocalPrefValue[K] | undefined
setValue<K extends PrefKey>(key: K, value: PrefValue[K]): Promise<void>
/** Set value without triggering sync or event notifications */
setValueDetached<K extends PrefKey>(key: K, value: PrefValue[K]): Promise<void>
setLocalValue<K extends LocalPrefKey>(key: K, value: LocalPrefValue[K]): void
}
@@ -50,6 +50,7 @@ export enum StorageKey {
FileBackupsLocation = 'file_backups_location',
VaultSelectionOptions = 'vault_selection_options',
Subscription = 'subscription',
LocalPreferences = 'local_preferences',
}
export enum NonwrappedStorageKey {
+1
View File
@@ -134,6 +134,7 @@ export * from './KeySystem/KeySystemKeyManager'
export * from './Mfa/MfaServiceInterface'
export * from './Mutator/MutatorClientInterface'
export * from './Payloads/PayloadManagerInterface'
export * from './Preferences/LocalPrefKey'
export * from './Preferences/PreferenceId'
export * from './Preferences/PreferenceServiceInterface'
export * from './Protection/MobileUnlockTiming'
+6
View File
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.208.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
### Features
* Themes and appeareance settings are now local to your device and not synced ([#2847](https://github.com/standardnotes/app/issues/2847)) ([bfbf9ab](https://github.com/standardnotes/app/commit/bfbf9ab8ceb6f1ecd3a0690bce3b5d1c5c52e84c))
## [2.207.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-08)
### Bug Fixes
+7 -2
View File
@@ -81,6 +81,7 @@ import {
CreateDecryptedBackupFile,
CreateEncryptedBackupFile,
WebSocketsService,
PreferencesServiceEvent,
} from '@standardnotes/services'
import {
SNNote,
@@ -326,8 +327,12 @@ export class SNApplication implements ApplicationInterface, AppGroupManagedAppli
const preferencesService = this.dependencies.get<PreferencesService>(TYPES.PreferencesService)
this.serviceObservers.push(
preferencesService.addEventObserver(() => {
void this.notifyEvent(ApplicationEvent.PreferencesChanged)
preferencesService.addEventObserver((event) => {
if (event === PreferencesServiceEvent.PreferencesChanged) {
void this.notifyEvent(ApplicationEvent.PreferencesChanged)
} else if (event === PreferencesServiceEvent.LocalPreferencesChanged) {
void this.notifyEvent(ApplicationEvent.LocalPreferencesChanged)
}
}),
)
@@ -147,6 +147,7 @@ import {
DesignateSurvivor,
SyncBackoffService,
SyncBackoffServiceInterface,
StorageServiceInterface,
} from '@standardnotes/services'
import { ItemManager } from '../../Services/Items/ItemManager'
import { PayloadManager } from '../../Services/Payloads/PayloadManager'
@@ -1282,6 +1283,7 @@ export class Dependencies {
this.get<ItemManager>(TYPES.ItemManager),
this.get<MutatorService>(TYPES.MutatorService),
this.get<SyncService>(TYPES.SyncService),
this.get<StorageServiceInterface>(TYPES.DiskStorageService),
this.get<InternalEventBus>(TYPES.InternalEventBus),
)
})
@@ -66,7 +66,7 @@ export class Migration2_202_1 extends Migration {
const activeThemes = allActiveitems.filter((component) => component.isTheme())
const activeComponents = allActiveitems.filter((component) => !component.isTheme())
await this.services.preferences.setValueDetached(PrefKey.ActiveThemes, Uuids(activeThemes))
await this.services.preferences.setValueDetached(PrefKey.DEPRECATED_ActiveThemes, Uuids(activeThemes))
await this.services.preferences.setValueDetached(PrefKey.ActiveComponents, Uuids(activeComponents))
}
}
@@ -0,0 +1,55 @@
import { LocalPrefKey, ApplicationStage } from '@standardnotes/services'
import { Migration } from '@Lib/Migrations/Migration'
import { PrefDefaults, PrefKey } from '@standardnotes/models'
export class Migration2_208_0 extends Migration {
static override version(): string {
return '2.208.0'
}
protected registerStageHandlers(): void {
this.registerStageHandler(ApplicationStage.FullSyncCompleted_13, async () => {
await this.migrateSyncedPreferencesToLocal()
this.markDone()
})
}
private async migrateSyncedPreferencesToLocal(): Promise<void> {
this.services.preferences.setLocalValue(
LocalPrefKey.ActiveThemes,
this.services.preferences.getValue(
PrefKey.DEPRECATED_ActiveThemes,
PrefDefaults[PrefKey.DEPRECATED_ActiveThemes],
),
)
this.services.preferences.setLocalValue(
LocalPrefKey.UseSystemColorScheme,
this.services.preferences.getValue(
PrefKey.DEPRECATED_UseSystemColorScheme,
PrefDefaults[PrefKey.DEPRECATED_UseSystemColorScheme],
),
)
this.services.preferences.setLocalValue(
LocalPrefKey.AutoLightThemeIdentifier,
this.services.preferences.getValue(
PrefKey.DEPRECATED_AutoLightThemeIdentifier,
PrefDefaults[PrefKey.DEPRECATED_AutoLightThemeIdentifier],
),
)
this.services.preferences.setLocalValue(
LocalPrefKey.AutoDarkThemeIdentifier,
this.services.preferences.getValue(
PrefKey.DEPRECATED_AutoDarkThemeIdentifier,
PrefDefaults[PrefKey.DEPRECATED_AutoDarkThemeIdentifier],
),
)
this.services.preferences.setLocalValue(
LocalPrefKey.UseTranslucentUI,
this.services.preferences.getValue(
PrefKey.DEPRECATED_UseTranslucentUI,
PrefDefaults[PrefKey.DEPRECATED_UseTranslucentUI],
),
)
}
}
@@ -6,6 +6,7 @@ import { Migration2_42_0 } from './2_42_0'
import { Migration2_167_6 } from './2_167_6'
import { Migration2_168_6 } from './2_168_6'
import { Migration2_202_1 } from './2_202_1'
import { Migration2_208_0 } from './2_208_0'
export const MigrationClasses = [
Migration2_0_15,
@@ -16,6 +17,7 @@ export const MigrationClasses = [
Migration2_167_6,
Migration2_168_6,
Migration2_202_1,
Migration2_208_0,
]
export {
@@ -27,4 +29,5 @@ export {
Migration2_167_6,
Migration2_168_6,
Migration2_202_1,
Migration2_208_0,
}
@@ -48,6 +48,7 @@ import {
ItemManagerInterface,
SyncServiceInterface,
FeatureStatus,
LocalPrefKey,
} from '@standardnotes/services'
import { GetFeatureUrl } from './UseCase/GetFeatureUrl'
import { ComponentManagerEventData } from './ComponentManagerEventData'
@@ -393,7 +394,7 @@ export class ComponentManager
this.logger.info('Toggling theme', uiFeature.uniqueIdentifier)
if (this.isThemeActive(uiFeature)) {
await this.removeActiveTheme(uiFeature)
this.removeActiveTheme(uiFeature)
return
}
@@ -403,7 +404,7 @@ export class ComponentManager
}
/* Activate current before deactivating others, so as not to flicker */
await this.addActiveTheme(uiFeature)
this.addActiveTheme(uiFeature)
/* Deactive currently active theme(s) if new theme is not layerable */
if (!uiFeature.layerable) {
@@ -416,7 +417,7 @@ export class ComponentManager
}
if (!candidate.layerable) {
await this.removeActiveTheme(candidate)
this.removeActiveTheme(candidate)
}
}
}
@@ -453,7 +454,7 @@ export class ComponentManager
const features: NativeFeatureIdentifier[] = []
const uuids: Uuid[] = []
const strings = this.preferences.getValue(PrefKey.ActiveThemes, undefined) ?? []
const strings = this.preferences.getLocalValue(LocalPrefKey.ActiveThemes, [])
for (const string of strings) {
const nativeIdentifier = NativeFeatureIdentifier.create(string)
if (!nativeIdentifier.isFailed()) {
@@ -534,24 +535,24 @@ export class ComponentManager
return preferences[preferencesLookupKey]
}
async addActiveTheme(theme: UIFeature<ThemeFeatureDescription>): Promise<void> {
const activeThemes = (this.preferences.getValue(PrefKey.ActiveThemes, undefined) ?? []).slice()
addActiveTheme(theme: UIFeature<ThemeFeatureDescription>) {
const activeThemes = this.preferences.getLocalValue(LocalPrefKey.ActiveThemes, []).slice()
activeThemes.push(theme.uniqueIdentifier.value)
await this.preferences.setValue(PrefKey.ActiveThemes, activeThemes)
this.preferences.setLocalValue(LocalPrefKey.ActiveThemes, activeThemes)
}
async replaceActiveTheme(theme: UIFeature<ThemeFeatureDescription>): Promise<void> {
await this.preferences.setValue(PrefKey.ActiveThemes, [theme.uniqueIdentifier.value])
replaceActiveTheme(theme: UIFeature<ThemeFeatureDescription>) {
this.preferences.setLocalValue(LocalPrefKey.ActiveThemes, [theme.uniqueIdentifier.value])
}
async removeActiveTheme(theme: UIFeature<ThemeFeatureDescription>): Promise<void> {
const activeThemes = this.preferences.getValue(PrefKey.ActiveThemes, undefined) ?? []
removeActiveTheme(theme: UIFeature<ThemeFeatureDescription>) {
const activeThemes = this.preferences.getLocalValue(LocalPrefKey.ActiveThemes, [])
const filteredThemes = activeThemes.filter((activeTheme) => activeTheme !== theme.uniqueIdentifier.value)
await this.preferences.setValue(PrefKey.ActiveThemes, filteredThemes)
this.preferences.setLocalValue(LocalPrefKey.ActiveThemes, filteredThemes)
}
isThemeActive(theme: UIFeature<ThemeFeatureDescription>): boolean {
@@ -559,13 +560,13 @@ export class ComponentManager
return false
}
const activeThemes = this.preferences.getValue(PrefKey.ActiveThemes, undefined) ?? []
const activeThemes = this.preferences.getLocalValue(LocalPrefKey.ActiveThemes, [])
return activeThemes.includes(theme.uniqueIdentifier.value)
}
async addActiveComponent(component: ComponentInterface): Promise<void> {
const activeComponents = (this.preferences.getValue(PrefKey.ActiveComponents, undefined) ?? []).slice()
const activeComponents = this.preferences.getValue(PrefKey.ActiveComponents, []).slice()
activeComponents.push(component.uuid)
@@ -14,6 +14,10 @@ import {
InternalEventInterface,
ApplicationEvent,
ApplicationStageChangedEventPayload,
StorageServiceInterface,
StorageKey,
LocalPrefKey,
LocalPrefValue,
} from '@standardnotes/services'
import { ContentType } from '@standardnotes/domain-core'
@@ -24,6 +28,7 @@ export class PreferencesService
private shouldReload = true
private reloading = false
private preferences?: SNUserPrefs
private localPreferences: { [key in LocalPrefKey]?: LocalPrefValue[key] } = {}
private removeItemObserver?: () => void
private removeSyncObserver?: () => void
@@ -32,6 +37,7 @@ export class PreferencesService
items: ItemManager,
private mutator: MutatorClientInterface,
private sync: SyncService,
private storage: StorageServiceInterface,
protected override internalEventBus: InternalEventBusInterface,
) {
super(internalEventBus)
@@ -69,16 +75,36 @@ export class PreferencesService
if (this.preferences) {
void this.notifyEvent(PreferencesServiceEvent.PreferencesChanged)
}
} else if (stage === ApplicationStage.StorageDecrypted_09) {
this.localPreferences = this.storage.getValue(StorageKey.LocalPreferences) ?? {}
void this.notifyEvent(PreferencesServiceEvent.LocalPreferencesChanged)
}
}
}
getLocalValue<K extends LocalPrefKey>(
key: K,
defaultValue: LocalPrefValue[K] | undefined,
): LocalPrefValue[K] | undefined
getLocalValue<K extends LocalPrefKey>(key: K, defaultValue: LocalPrefValue[K]): LocalPrefValue[K]
getLocalValue<K extends LocalPrefKey>(key: K, defaultValue?: LocalPrefValue[K]): LocalPrefValue[K] | undefined {
return this.localPreferences[key] ?? defaultValue
}
getValue<K extends PrefKey>(key: K, defaultValue: PrefValue[K] | undefined): PrefValue[K] | undefined
getValue<K extends PrefKey>(key: K, defaultValue: PrefValue[K]): PrefValue[K]
getValue<K extends PrefKey>(key: K, defaultValue?: PrefValue[K]): PrefValue[K] | undefined {
return this.preferences?.getPref(key) ?? defaultValue
}
setLocalValue<K extends LocalPrefKey>(key: K, value: LocalPrefValue[K]): void {
this.localPreferences[key] = value
this.storage.setValue(StorageKey.LocalPreferences, this.localPreferences)
void this.notifyEvent(PreferencesServiceEvent.LocalPreferencesChanged)
}
async setValue<K extends PrefKey>(key: K, value: PrefValue[K]): Promise<void> {
await this.setValueDetached(key, value)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/snjs",
"version": "2.207.1",
"version": "2.208.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+6
View File
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.37.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
### Features
* Themes and appeareance settings are now local to your device and not synced ([#2847](https://github.com/standardnotes/app/issues/2847)) ([bfbf9ab](https://github.com/standardnotes/app/commit/bfbf9ab8ceb6f1ecd3a0690bce3b5d1c5c52e84c))
## [1.36.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-02)
**Note:** Version bump only for package @standardnotes/ui-services
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/ui-services",
"version": "1.36.3",
"version": "1.37.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+59 -62
View File
@@ -2,7 +2,6 @@ import {
UIFeature,
CreateDecryptedLocalStorageContextPayload,
LocalStorageDecryptedContextualPayload,
PrefKey,
PrefDefaults,
ComponentInterface,
} from '@standardnotes/models'
@@ -12,8 +11,8 @@ import {
StorageValueModes,
FeatureStatus,
PreferenceServiceInterface,
PreferencesServiceEvent,
ComponentManagerInterface,
LocalPrefKey,
} from '@standardnotes/services'
import { NativeFeatureIdentifier, FindNativeTheme, ThemeFeatureDescription } from '@standardnotes/features'
import { WebApplicationInterface } from '../WebApplication/WebApplicationInterface'
@@ -75,56 +74,6 @@ export class ThemeManager extends AbstractUIService {
}),
)
}
this.eventDisposers.push(
this.preferences.addEventObserver(async (event) => {
if (event !== PreferencesServiceEvent.PreferencesChanged) {
return
}
this.toggleTranslucentUIColors()
let hasChange = false
const { features, uuids } = this.components.getActiveThemesIdentifiers()
const featuresList = new ActiveThemeList(this.application.items, features)
const uuidsList = new ActiveThemeList(this.application.items, uuids)
for (const active of this.themesActiveInTheUI.getList()) {
if (!featuresList.has(active) && !uuidsList.has(active)) {
this.deactivateThemeInTheUI(active)
hasChange = true
}
}
for (const feature of features) {
if (!this.themesActiveInTheUI.has(feature)) {
const theme = FindNativeTheme(feature.value)
if (theme) {
const uiFeature = new UIFeature<ThemeFeatureDescription>(theme)
this.activateTheme(uiFeature)
hasChange = true
}
}
}
for (const uuid of uuids) {
if (!this.themesActiveInTheUI.has(uuid)) {
const theme = this.application.items.findItem<ComponentInterface>(uuid.value)
if (theme) {
const uiFeature = new UIFeature<ThemeFeatureDescription>(theme)
this.activateTheme(uiFeature)
hasChange = true
}
}
}
if (hasChange) {
this.cacheThemeState().catch(console.error)
}
}),
)
}
override async onAppEvent(event: ApplicationEvent) {
@@ -154,15 +103,15 @@ export class ThemeManager extends AbstractUIService {
}
break
}
case ApplicationEvent.PreferencesChanged: {
void this.handlePreferencesChangeEvent()
case ApplicationEvent.LocalPreferencesChanged: {
void this.handleLocalPreferencesChangeEvent()
break
}
}
}
async handleMobileColorSchemeChangeEvent() {
const useDeviceThemeSettings = this.application.getPreference(PrefKey.UseSystemColorScheme, false)
const useDeviceThemeSettings = this.preferences.getLocalValue(LocalPrefKey.UseSystemColorScheme, false)
if (useDeviceThemeSettings) {
const prefersDarkColorScheme = (await this.application.mobileDevice.getColorScheme()) === 'dark'
@@ -170,10 +119,54 @@ export class ThemeManager extends AbstractUIService {
}
}
private async handlePreferencesChangeEvent() {
private handleThemeStateChange() {
let hasChange = false
const { features, uuids } = this.components.getActiveThemesIdentifiers()
const featuresList = new ActiveThemeList(this.application.items, features)
const uuidsList = new ActiveThemeList(this.application.items, uuids)
for (const active of this.themesActiveInTheUI.getList()) {
if (!featuresList.has(active) && !uuidsList.has(active)) {
this.deactivateThemeInTheUI(active)
hasChange = true
}
}
for (const feature of features) {
if (!this.themesActiveInTheUI.has(feature)) {
const theme = FindNativeTheme(feature.value)
if (theme) {
const uiFeature = new UIFeature<ThemeFeatureDescription>(theme)
this.activateTheme(uiFeature)
hasChange = true
}
}
}
for (const uuid of uuids) {
if (!this.themesActiveInTheUI.has(uuid)) {
const theme = this.application.items.findItem<ComponentInterface>(uuid.value)
if (theme) {
const uiFeature = new UIFeature<ThemeFeatureDescription>(theme)
this.activateTheme(uiFeature)
hasChange = true
}
}
}
if (hasChange) {
this.cacheThemeState().catch(console.error)
}
}
private async handleLocalPreferencesChangeEvent() {
this.handleThemeStateChange()
this.toggleTranslucentUIColors()
const useDeviceThemeSettings = this.application.getPreference(PrefKey.UseSystemColorScheme, false)
const useDeviceThemeSettings = this.preferences.getLocalValue(LocalPrefKey.UseSystemColorScheme, false)
const hasPreferenceChanged = useDeviceThemeSettings !== this.lastUseDeviceThemeSettings
@@ -218,7 +211,7 @@ export class ThemeManager extends AbstractUIService {
}
private colorSchemeEventHandler(event: MediaQueryListEvent) {
const shouldChangeTheme = this.application.getPreference(PrefKey.UseSystemColorScheme, false)
const shouldChangeTheme = this.preferences.getLocalValue(LocalPrefKey.UseSystemColorScheme, false)
if (shouldChangeTheme) {
this.setThemeAsPerColorScheme(event.matches)
@@ -226,10 +219,14 @@ export class ThemeManager extends AbstractUIService {
}
private setThemeAsPerColorScheme(prefersDarkColorScheme: boolean) {
const preference = prefersDarkColorScheme ? PrefKey.AutoDarkThemeIdentifier : PrefKey.AutoLightThemeIdentifier
const preference = prefersDarkColorScheme
? LocalPrefKey.AutoDarkThemeIdentifier
: LocalPrefKey.AutoLightThemeIdentifier
const preferenceDefault =
preference === PrefKey.AutoDarkThemeIdentifier ? NativeFeatureIdentifier.TYPES.DarkTheme : DefaultThemeIdentifier
preference === LocalPrefKey.AutoDarkThemeIdentifier
? NativeFeatureIdentifier.TYPES.DarkTheme
: DefaultThemeIdentifier
const usecase = new GetAllThemesUseCase(this.application.items)
const { thirdParty, native } = usecase.execute({ excludeLayerable: false })
@@ -237,7 +234,7 @@ export class ThemeManager extends AbstractUIService {
const activeTheme = themes.find((theme) => this.components.isThemeActive(theme) && !theme.layerable)
const themeIdentifier = this.preferences.getValue(preference, preferenceDefault)
const themeIdentifier = this.preferences.getLocalValue(preference, preferenceDefault)
const toggleActiveTheme = () => {
if (activeTheme) {
@@ -337,7 +334,7 @@ export class ThemeManager extends AbstractUIService {
}
private shouldUseTranslucentUI() {
return this.application.getPreference(PrefKey.UseTranslucentUI, PrefDefaults[PrefKey.UseTranslucentUI])
return this.preferences.getLocalValue(LocalPrefKey.UseTranslucentUI, PrefDefaults[LocalPrefKey.UseTranslucentUI])
}
private toggleTranslucentUIColors() {
+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.191.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)
**Note:** Version bump only for package @standardnotes/web
## [3.191.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)
**Note:** Version bump only for package @standardnotes/web
# [3.191.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
### Features
* Added "Find in note" option to note options/context menu for Super notes ([47745cb](https://github.com/standardnotes/app/commit/47745cb79c34239b58df61083e1af2c0d2ba1d16))
# [3.190.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)
### Features
* Themes and appeareance settings are now local to your device and not synced ([#2847](https://github.com/standardnotes/app/issues/2847)) ([bfbf9ab](https://github.com/standardnotes/app/commit/bfbf9ab8ceb6f1ecd3a0690bce3b5d1c5c52e84c))
## [3.189.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-15)
**Note:** Version bump only for package @standardnotes/web
+50
View File
@@ -1,5 +1,55 @@
{
"versions": [
{
"version": "3.191.2",
"title": "[3.191.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.191.1",
"title": "[3.191.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-18)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.191.0",
"title": "[3.191.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)",
"date": null,
"body": "### Features\n\n* Added \"Find in note\" option to note options/context menu for Super notes ([47745cb](https://github.com/standardnotes/app/commit/47745cb79c34239b58df61083e1af2c0d2ba1d16))",
"parsed": {
"_": [
"Added \"Find in note\" option to note options/context menu for Super notes (47745cb)"
],
"Features": [
"Added \"Find in note\" option to note options/context menu for Super notes (47745cb)"
]
}
},
{
"version": "3.190.0",
"title": "[3.190.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-17)",
"date": null,
"body": "### Features\n\n* Themes and appeareance settings are now local to your device and not synced ([#2847](https://github.com/standardnotes/app/issues/2847)) ([bfbf9ab](https://github.com/standardnotes/app/commit/bfbf9ab8ceb6f1ecd3a0690bce3b5d1c5c52e84c))",
"parsed": {
"_": [
"Themes and appeareance settings are now local to your device and not synced (#2847) (bfbf9ab)"
],
"Features": [
"Themes and appeareance settings are now local to your device and not synced (#2847) (bfbf9ab)"
]
}
},
{
"version": "3.189.5",
"title": "[3.189.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2024-02-15)",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/web",
"version": "3.189.5",
"version": "3.191.2",
"license": "AGPL-3.0",
"main": "dist/app.js",
"author": "Standard Notes.",
@@ -8,7 +8,6 @@ import {
PIN_NOTE_COMMAND,
SHOW_HIDDEN_OPTIONS_KEYBOARD_COMMAND,
STAR_NOTE_COMMAND,
SUPER_SHOW_MARKDOWN_PREVIEW,
} from '@standardnotes/ui-services'
import ChangeEditorOption from './ChangeEditorOption'
import ListedActionsOption from './Listed/ListedActionsOption'
@@ -24,7 +23,6 @@ import { KeyboardShortcutIndicator } from '../KeyboardShortcutIndicator/Keyboard
import { NoteAttributes } from './NoteAttributes'
import { SpellcheckOptions } from './SpellcheckOptions'
import { NoteSizeWarning } from './NoteSizeWarning'
import { useCommandService } from '../CommandProvider'
import { iconClass } from './ClassNames'
import SuperNoteOptions from './SuperNoteOptions'
import MenuSwitchButtonItem from '../Menu/MenuSwitchButtonItem'
@@ -48,12 +46,6 @@ const NotesOptions = ({ notes, closeMenu }: NotesOptionsProps) => {
const [altKeyDown, setAltKeyDown] = useState(false)
const { toggleAppPane } = useResponsiveAppPane()
const commandService = useCommandService()
const markdownShortcut = useMemo(
() => commandService.keyboardShortcutForCommand(SUPER_SHOW_MARKDOWN_PREVIEW),
[commandService],
)
const toggleOn = (condition: (note: SNNote) => boolean) => {
const notesMatchingAttribute = notes.filter(condition)
@@ -179,7 +171,7 @@ const NotesOptions = ({ notes, closeMenu }: NotesOptionsProps) => {
{
label: 'Open',
handler: (toastId) => {
application.itemListController.selectItem(duplicated.uuid, true).catch(console.error)
application.itemListController.selectUuids([duplicated.uuid], true).catch(console.error)
dismissToast(toastId)
},
},
@@ -213,10 +205,6 @@ const NotesOptions = ({ notes, closeMenu }: NotesOptionsProps) => {
[application],
)
const enableSuperMarkdownPreview = useCallback(() => {
commandService.triggerCommand(SUPER_SHOW_MARKDOWN_PREVIEW)
}, [commandService])
const toggleLineWidthModal = useCallback(() => {
application.keyboardService.triggerCommand(CHANGE_EDITOR_WIDTH_COMMAND)
}, [application.keyboardService])
@@ -468,13 +456,7 @@ const NotesOptions = ({ notes, closeMenu }: NotesOptionsProps) => {
{notes.length === 1 && (
<>
{notes[0].noteType === NoteType.Super && (
<SuperNoteOptions
note={notes[0]}
markdownShortcut={markdownShortcut}
enableSuperMarkdownPreview={enableSuperMarkdownPreview}
/>
)}
{notes[0].noteType === NoteType.Super && <SuperNoteOptions closeMenu={closeMenu} />}
{!areSomeNotesInSharedVault && (
<MenuSection>
@@ -1,20 +1,42 @@
import { SNNote } from '@standardnotes/snjs'
import { PlatformedKeyboardShortcut } from '@standardnotes/ui-services'
import Icon from '../Icon/Icon'
import { KeyboardShortcutIndicator } from '../KeyboardShortcutIndicator/KeyboardShortcutIndicator'
import MenuItem from '../Menu/MenuItem'
import { iconClass } from './ClassNames'
import MenuSection from '../Menu/MenuSection'
import { SUPER_SHOW_MARKDOWN_PREVIEW, SUPER_TOGGLE_SEARCH } from '@standardnotes/ui-services'
import { useMemo, useCallback } from 'react'
import { useCommandService } from '../CommandProvider'
type Props = {
note: SNNote
markdownShortcut?: PlatformedKeyboardShortcut
enableSuperMarkdownPreview: () => void
closeMenu: () => void
}
const SuperNoteOptions = ({ markdownShortcut, enableSuperMarkdownPreview }: Props) => {
const SuperNoteOptions = ({ closeMenu }: Props) => {
const commandService = useCommandService()
const markdownShortcut = useMemo(
() => commandService.keyboardShortcutForCommand(SUPER_SHOW_MARKDOWN_PREVIEW),
[commandService],
)
const findShortcut = useMemo(() => commandService.keyboardShortcutForCommand(SUPER_TOGGLE_SEARCH), [commandService])
const enableSuperMarkdownPreview = useCallback(() => {
commandService.triggerCommand(SUPER_SHOW_MARKDOWN_PREVIEW)
}, [commandService])
const findInNote = useCallback(() => {
commandService.triggerCommand(SUPER_TOGGLE_SEARCH)
closeMenu()
}, [closeMenu, commandService])
return (
<MenuSection>
<MenuItem onClick={findInNote}>
<Icon type="search" className={iconClass} />
Find in note
{findShortcut && <KeyboardShortcutIndicator className="ml-auto" shortcut={findShortcut} />}
</MenuItem>
<MenuItem onClick={enableSuperMarkdownPreview}>
<Icon type="markdown" className={iconClass} />
Show Markdown
@@ -4,7 +4,7 @@ import { usePremiumModal } from '@/Hooks/usePremiumModal'
import HorizontalSeparator from '@/Components/Shared/HorizontalSeparator'
import Switch from '@/Components/Switch/Switch'
import { WebApplication } from '@/Application/WebApplication'
import { PrefKey, FeatureStatus, naturalSort, PrefDefaults } from '@standardnotes/snjs'
import { FeatureStatus, naturalSort, LocalPrefKey } from '@standardnotes/snjs'
import { observer } from 'mobx-react-lite'
import { FunctionComponent, useEffect, useState } from 'react'
import { Subtitle, Title, Text } from '@/Components/Preferences/PreferencesComponents/Content'
@@ -14,7 +14,7 @@ import PreferencesSegment from '../PreferencesComponents/PreferencesSegment'
import { PremiumFeatureIconName } from '@/Components/Icon/PremiumFeatureIcon'
import EditorAppearance from './Appearance/EditorAppearance'
import { GetAllThemesUseCase } from '@standardnotes/ui-services'
import usePreference from '@/Hooks/usePreference'
import { useLocalPreference } from '@/Hooks/usePreference'
type Props = {
application: WebApplication
@@ -24,19 +24,14 @@ const Appearance: FunctionComponent<Props> = ({ application }) => {
const premiumModal = usePremiumModal()
const [themeItems, setThemeItems] = useState<DropdownItem[]>([])
const [autoLightTheme, setAutoLightTheme] = useState<string>(() =>
application.getPreference(PrefKey.AutoLightThemeIdentifier, PrefDefaults[PrefKey.AutoLightThemeIdentifier]),
)
const [autoDarkTheme, setAutoDarkTheme] = useState<string>(() =>
application.getPreference(PrefKey.AutoDarkThemeIdentifier, PrefDefaults[PrefKey.AutoDarkThemeIdentifier]),
)
const [useDeviceSettings, setUseDeviceSettings] = useState(() =>
application.getPreference(PrefKey.UseSystemColorScheme, PrefDefaults[PrefKey.UseSystemColorScheme]),
)
const useTranslucentUI = usePreference(PrefKey.UseTranslucentUI)
const [autoLightTheme, setAutoLightTheme] = useLocalPreference(LocalPrefKey.AutoLightThemeIdentifier)
const [autoDarkTheme, setAutoDarkTheme] = useLocalPreference(LocalPrefKey.AutoDarkThemeIdentifier)
const [useDeviceSettings, setUseDeviceSettings] = useLocalPreference(LocalPrefKey.UseSystemColorScheme)
const [useTranslucentUI, setUseTranslucentUI] = useLocalPreference(LocalPrefKey.UseTranslucentUI)
const toggleTranslucentUI = () => {
application.setPreference(PrefKey.UseTranslucentUI, !useTranslucentUI).catch(console.error)
setUseTranslucentUI(!useTranslucentUI)
}
useEffect(() => {
@@ -76,12 +71,12 @@ const Appearance: FunctionComponent<Props> = ({ application }) => {
}, [application])
const toggleUseDeviceSettings = () => {
application.setPreference(PrefKey.UseSystemColorScheme, !useDeviceSettings).catch(console.error)
if (!application.getPreference(PrefKey.AutoLightThemeIdentifier)) {
application.setPreference(PrefKey.AutoLightThemeIdentifier, autoLightTheme).catch(console.error)
setUseDeviceSettings(!useDeviceSettings)
if (!application.preferences.getLocalValue(LocalPrefKey.AutoLightThemeIdentifier)) {
setAutoLightTheme(autoLightTheme)
}
if (!application.getPreference(PrefKey.AutoDarkThemeIdentifier)) {
application.setPreference(PrefKey.AutoDarkThemeIdentifier, autoDarkTheme).catch(console.error)
if (!application.preferences.getLocalValue(LocalPrefKey.AutoDarkThemeIdentifier)) {
setAutoDarkTheme(autoDarkTheme)
}
setUseDeviceSettings(!useDeviceSettings)
}
@@ -92,7 +87,6 @@ const Appearance: FunctionComponent<Props> = ({ application }) => {
premiumModal.activate(`${item.label} theme`)
return
}
application.setPreference(PrefKey.AutoLightThemeIdentifier, value).catch(console.error)
setAutoLightTheme(value)
}
@@ -102,7 +96,6 @@ const Appearance: FunctionComponent<Props> = ({ application }) => {
premiumModal.activate(`${item.label} theme`)
return
}
application.setPreference(PrefKey.AutoDarkThemeIdentifier, value).catch(console.error)
setAutoDarkTheme(value)
}
@@ -76,7 +76,7 @@ const QuickSettingsMenu: FunctionComponent<MenuProps> = ({ closeMenu }) => {
useEffect(() => {
return application.preferences.addEventObserver((event) => {
if (event === PreferencesServiceEvent.PreferencesChanged) {
if (event === PreferencesServiceEvent.LocalPreferencesChanged) {
reloadThemes()
}
})
@@ -14,8 +14,11 @@ import {
import { classNames } from '@standardnotes/utils'
import { useCallback, useMemo, useState } from 'react'
import { useSuperSearchContext } from './Context'
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
export const SearchDialog = ({ open, closeDialog }: { open: boolean; closeDialog: () => void }) => {
const [editor] = useLexicalComposerContext()
const { query, results, currentResultIndex, isCaseSensitive, isReplaceMode, dispatch, dispatchReplaceEvent } =
useSuperSearchContext()
@@ -53,22 +56,27 @@ export const SearchDialog = ({ open, closeDialog }: { open: boolean; closeDialog
return (
<div
className="absolute right-6 top-13 z-10 flex select-none rounded border border-border bg-default"
className={classNames(
'absolute left-2 right-6 top-2 z-10 flex select-none rounded border border-border bg-default md:left-auto',
editor.isEditable() ? 'md:top-13' : 'md:top-3',
)}
ref={setElement}
>
<button
className="focus:ring-none border-r border-border px-1 hover:bg-contrast focus:shadow-inner focus:shadow-info"
onClick={() => {
dispatch({ type: 'toggle-replace-mode' })
}}
title={`Toggle Replace Mode (${toggleReplaceShortcut})`}
>
{isReplaceMode ? (
<ArrowDownIcon className="h-4 w-4 fill-text" />
) : (
<ArrowRightIcon className="h-4 w-4 fill-text" />
)}
</button>
{editor.isEditable() && (
<button
className="focus:ring-none border-r border-border px-1 hover:bg-contrast focus:shadow-inner focus:shadow-info"
onClick={() => {
dispatch({ type: 'toggle-replace-mode' })
}}
title={`Toggle Replace Mode (${toggleReplaceShortcut})`}
>
{isReplaceMode ? (
<ArrowDownIcon className="h-4 w-4 fill-text" />
) : (
<ArrowRightIcon className="h-4 w-4 fill-text" />
)}
</button>
)}
<div
className="flex flex-col gap-2 px-2 py-2"
onKeyDown={(event) => {
@@ -171,7 +179,7 @@ export const SearchDialog = ({ open, closeDialog }: { open: boolean; closeDialog
</button>
</div>
{isReplaceMode && (
<div className="flex items-center gap-2">
<div className="flex flex-wrap items-center gap-2 md:flex-nowrap">
<input
type="text"
placeholder="Replace"
@@ -28,26 +28,15 @@ export const SearchPlugin = () => {
const resultsRef = useStateRef(results)
useEffect(() => {
const isFocusInEditor = () => {
if (!document.activeElement || !document.activeElement.closest('.blocks-editor')) {
return false
}
return true
}
return application.keyboardService.addCommandHandlers([
{
command: SUPER_TOGGLE_SEARCH,
category: 'Super notes',
description: 'Search in current note',
onKeyDown: (event) => {
if (!isFocusInEditor()) {
return
}
event.preventDefault()
event.stopPropagation()
dispatch({ type: 'toggle-search' })
editor.focus()
},
},
{
@@ -55,7 +44,7 @@ export const SearchPlugin = () => {
category: 'Super notes',
description: 'Search and replace in current note',
onKeyDown: (event) => {
if (!isFocusInEditor()) {
if (!editor.isEditable()) {
return
}
event.preventDefault()
@@ -66,9 +55,6 @@ export const SearchPlugin = () => {
{
command: SUPER_SEARCH_TOGGLE_CASE_SENSITIVE,
onKeyDown() {
if (!isFocusInEditor()) {
return
}
dispatch({
type: 'toggle-case-sensitive',
})
@@ -79,9 +65,6 @@ export const SearchPlugin = () => {
category: 'Super notes',
description: 'Go to next search result',
onKeyDown(event) {
if (!isFocusInEditor()) {
return
}
event.preventDefault()
event.stopPropagation()
dispatch({
@@ -94,9 +77,6 @@ export const SearchPlugin = () => {
category: 'Super notes',
description: 'Go to previous search result',
onKeyDown(event) {
if (!isFocusInEditor()) {
return
}
event.preventDefault()
event.stopPropagation()
dispatch({
@@ -1,6 +1,29 @@
import { useApplication } from '@/Components/ApplicationProvider'
import { ApplicationEvent, PrefKey, PrefDefaults } from '@standardnotes/snjs'
import { useEffect, useState } from 'react'
import { ApplicationEvent, PrefKey, PrefDefaults, LocalPrefKey, LocalPrefValue } from '@standardnotes/snjs'
import { useCallback, useEffect, useState } from 'react'
export function useLocalPreference<Key extends LocalPrefKey>(preference: Key) {
const application = useApplication()
const [value, setValue] = useState(application.preferences.getLocalValue(preference, PrefDefaults[preference]))
const setNewValue = useCallback(
(newValue: LocalPrefValue[Key]) => {
application.preferences.setLocalValue(preference, newValue)
},
[application, preference],
)
useEffect(() => {
return application.addEventObserver(async () => {
const latestValue = application.preferences.getLocalValue(preference, PrefDefaults[preference])
setValue(latestValue)
}, ApplicationEvent.LocalPreferencesChanged)
}, [application, preference])
return [value, setNewValue] as const
}
export default function usePreference<Key extends PrefKey>(preference: Key) {
const application = useApplication()
+5 -5
View File
@@ -7167,7 +7167,7 @@ __metadata:
get-yarn-workspaces: ^1.0.2
metro-react-native-babel-preset: ^0.77.0
npm-check-updates: "*"
pod-install: ^0.1.38
pod-install: ^0.2.0
prettier: "*"
prettier-plugin-organize-imports: ^3.2.0
react: 18.2.0
@@ -22317,12 +22317,12 @@ __metadata:
languageName: node
linkType: hard
"pod-install@npm:^0.1.38":
version: 0.1.38
resolution: "pod-install@npm:0.1.38"
"pod-install@npm:^0.2.0":
version: 0.2.0
resolution: "pod-install@npm:0.2.0"
bin:
pod-install: build/index.js
checksum: 9ff3e8f50dba2cee1c174deeb394312d6a950096f39c5a413a9dbf9acf4acb890440a9c316381799c8e125858c4c84d2c4f0c3d7ef2ceb056ea820a417004fd7
checksum: ecfe94d1285b42dd56fb03b9d1850d805f5626b8030acd32f2cb9ea6902e678deaefbb8475d2e307d0a6311159c6b5deea173adcc045c5ff6d58b377b0dcf1b8
languageName: node
linkType: hard