Compare commits

...
Author SHA1 Message Date
StandardNotes CI debf59a5c3 chore(release): publish
- @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].0
2023-04-24 11:42:51 +00:00
Aman Harwara 2ce2b8410f feat(clipper): Added default tag setting to clipper 2023-04-24 16:33:51 +05:30
Aman Harwara f009f72dcf chore: allow tooltip store overrides 2023-04-24 16:29:18 +05:30
Aman Harwara 5fb04e38a1 chore: fix menu navigation when focus is in input 2023-04-24 16:28:41 +05:30
Aman Harwara 353a76c1ab chore: tooltips 2023-04-24 14:29:26 +05:30
Aman Harwara 15776bdd3a chore: pref view scrollbar on mobile 2023-04-24 14:21:43 +05:30
StandardNotes CI 6f3e78cdab chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-04-23 22:09:53 +00:00
Aman Harwara b2a835bff6 chore: fix webpack config 2023-04-24 03:09:57 +05:30
StandardNotes CI baa0876142 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].9
2023-04-21 18:01:59 +00:00
Aman Harwara c02c45b916 refactor: migrate disclosure & combobox from reach-ui (#2316) 2023-04-21 22:56:09 +05:30
StandardNotes CI bf294eccd4 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].9
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
2023-04-21 14:18:22 +00:00
Aman Harwara 87cd75d324 fix: Fixed issue on desktop where custom titlebar would overlap with preferences view header 2023-04-21 19:21:00 +05:30
StandardNotes CI ab5b292364 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
2023-04-21 11:57:14 +00:00
Aman Harwara 3d68ae0923 refactor: migrate dropdowns from reach-ui (#2315) 2023-04-21 16:59:45 +05:30
StandardNotes CI e5b1c32730 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
2023-04-21 09:55:07 +00:00
Aman Harwara a5d536b5f2 refactor: migrate checkbox from reach-ui 2023-04-21 14:58:35 +05:30
StandardNotes CI 0d235ed1d2 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2023-04-20 20:51:43 +00:00
Aman Harwara 9996dac00a refactor: migrate dialogs & tooltips from reach-ui (#2314) 2023-04-21 01:51:22 +05:30
StandardNotes CI 5a02003458 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].4
2023-04-20 11:51:44 +00:00
Karol Sójko 862db49c32 chore(web): display recovery code on hardware security keys section 2023-04-20 13:19:49 +02:00
Karol Sójko 922a4a2d5d chore: fix wording on UI from U2F to Hardware Security Key 2023-04-20 13:10:43 +02:00
Aman Harwara 37854c00b2 chore: fix releases 2023-04-19 13:45:26 +05:30
157 changed files with 1180 additions and 1567 deletions
@@ -91,6 +91,7 @@ jobs:
name: "Clipper ${{ env.PACKAGE_VERSION }}"
body: ${{ steps.release-notes.outputs.result }}
draft: false
prerelease: true
files: packages/clipper/artifacts/*
- name: Publish to Chrome Web Store
uses: trmcnvn/chrome-addon@v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/api
# [1.26.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-17)
### Features
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api",
"version": "1.26.0",
"version": "1.26.1",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.0.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/clipper
## [1.0.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-23)
**Note:** Version bump only for package @standardnotes/clipper
## [1.0.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/clipper
## [1.0.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/clipper
## [1.0.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/clipper
## [1.0.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/clipper
## [1.0.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/clipper
## [1.0.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/clipper
## [1.0.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-18)
**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.0.9",
"version": "1.0.17",
"private": true,
"scripts": {
"build-mv2": "yarn clean && webpack --config ./webpack.config.prod.js",
+34
View File
@@ -3,6 +3,40 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.105.66](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/desktop
## [3.105.65](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-23)
**Note:** Version bump only for package @standardnotes/desktop
## [3.105.64](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/desktop
## [3.105.63](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
### Bug Fixes
* Fixed issue on desktop where custom titlebar would overlap with preferences view header ([87cd75d](https://github.com/standardnotes/app/commit/87cd75d3244e05b3d9dfb26c8ea907564b98826b))
## [3.105.62](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/desktop
## [3.105.61](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/desktop
## [3.105.60](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/desktop
## [3.105.59](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/desktop
## [3.105.58](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-18)
**Note:** Version bump only for package @standardnotes/desktop
@@ -114,18 +114,6 @@ async function configureWindow(remoteBridge: CrossProcessBridge) {
if (isMacOS || useSystemMenuBar) {
// !important is important here because #desktop-title-bar has display: flex.
sheet.insertRule('#desktop-title-bar { display: none !important; }', sheet.cssRules.length)
} else {
/* Use custom title bar. Take the sn-titlebar-height off of
the app content height so its not overflowing */
sheet.insertRule(
'body, [data-reach-dialog-overlay], [data-mobile-popover] { padding-top: var(--sn-desktop-titlebar-height) !important; }',
sheet.cssRules.length,
)
sheet.insertRule(
`.main-ui-view { height: calc(100vh - var(--sn-desktop-titlebar-height)) !important;
min-height: calc(100vh - var(--sn-desktop-titlebar-height)) !important; }`,
sheet.cssRules.length,
)
}
}
+11 -1
View File
@@ -37,7 +37,6 @@ panel-resizer {
display: flex;
justify-content: space-between;
z-index: 99999;
position: absolute;
width: 100%;
top: 0;
}
@@ -84,3 +83,14 @@ input,
.panel-resizer {
-webkit-app-region: no-drag;
}
body {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}
#app-group-root {
min-height: 0;
}
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/desktop",
"main": "./app/dist/index.js",
"version": "3.105.58",
"version": "3.105.66",
"license": "AGPL-3.0-or-later",
"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.29](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/encryption
## [1.21.28](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-17)
**Note:** Version bump only for package @standardnotes/encryption
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/encryption",
"version": "1.21.28",
"version": "1.21.29",
"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.34](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.28.33](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-17)
**Note:** Version bump only for package @standardnotes/filepicker
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/filepicker",
"version": "1.28.33",
"version": "1.28.34",
"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.14.44](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/files
## [1.14.43](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-17)
**Note:** Version bump only for package @standardnotes/files
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files",
"version": "1.14.43",
"version": "1.14.44",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.52.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/mobile
## [3.52.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-23)
**Note:** Version bump only for package @standardnotes/mobile
## [3.52.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.52.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.52.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.52.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/mobile
## [3.52.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/mobile
## [3.52.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/mobile
## [3.52.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-18)
**Note:** Version bump only for package @standardnotes/mobile
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.52.4",
"version": "3.52.12",
"author": "Standard Notes.",
"private": true,
"license": "AGPL-3.0-or-later",
+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.44.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
### Features
* **clipper:** Added default tag setting to clipper ([2ce2b84](https://github.com/standardnotes/app/commit/2ce2b8410f5053f77d02b93dbb80aad5f33c728c))
## [1.43.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-17)
**Note:** Version bump only for package @standardnotes/models
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/models",
"version": "1.43.16",
"version": "1.44.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -42,6 +42,7 @@ export enum PrefKey {
DarkMode = 'darkMode',
DefaultEditorIdentifier = 'defaultEditorIdentifier',
MomentsDefaultTagUuid = 'momentsDefaultTagUuid',
ClipperDefaultTagUuid = 'clipperDefaultTagUuid',
SystemViewPreferences = 'systemViewPreferences',
SuperNoteExportFormat = 'superNoteExportFormat',
AuthenticatorNames = 'authenticatorNames',
@@ -111,6 +112,7 @@ export type PrefValue = {
[PrefKey.DarkMode]: boolean
[PrefKey.DefaultEditorIdentifier]: EditorIdentifier
[PrefKey.MomentsDefaultTagUuid]: string | undefined
[PrefKey.ClipperDefaultTagUuid]: string | undefined
[PrefKey.SystemViewPreferences]: Partial<Record<SystemViewId, TagPreferences>>
[PrefKey.SuperNoteExportFormat]: 'json' | 'md' | 'html'
[PrefKey.AuthenticatorNames]: string
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.243](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.242](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-23)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.241](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.240](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.239](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.238](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.237](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.236](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.235](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-18)
**Note:** Version bump only for package @standardnotes/releases
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/releases",
"version": "1.4.235",
"version": "1.4.243",
"license": "AGPL-3.0-or-later",
"main": "dist/releases.json",
"types": "dist/index.d.ts",
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.58.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/services
## [1.58.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/services
# [1.58.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-17)
### Features
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/services",
"version": "1.58.0",
"version": "1.58.2",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -121,7 +121,7 @@ export const SessionStrings = {
},
SessionRestored: 'Your session has been successfully restored.',
EnterMfa: 'Please enter your two-factor authentication code.',
InputU2FDevice: 'Please authenticate with your U2F device.',
InputU2FDevice: 'Please authenticate with your hardware security key.',
MfaInputPlaceholder: 'Two-factor authentication code',
EmailInputPlaceholder: 'Email',
PasswordInputPlaceholder: 'Password',
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.167.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/snjs
## [2.167.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/snjs
# [2.167.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-17)
### Features
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/snjs",
"version": "2.167.0",
"version": "2.167.2",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.25.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/ui-services
## [1.25.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/ui-services
# [1.25.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-17)
### Features
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/ui-services",
"version": "1.25.0",
"version": "1.25.2",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+36
View File
@@ -3,6 +3,42 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.152.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
### Features
* **clipper:** Added default tag setting to clipper ([2ce2b84](https://github.com/standardnotes/app/commit/2ce2b8410f5053f77d02b93dbb80aad5f33c728c))
## [3.151.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-23)
**Note:** Version bump only for package @standardnotes/web
## [3.151.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/web
## [3.151.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
### Bug Fixes
* Fixed issue on desktop where custom titlebar would overlap with preferences view header ([87cd75d](https://github.com/standardnotes/app/commit/87cd75d3244e05b3d9dfb26c8ea907564b98826b))
## [3.151.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/web
## [3.151.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)
**Note:** Version bump only for package @standardnotes/web
## [3.151.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/web
## [3.151.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)
**Note:** Version bump only for package @standardnotes/web
## [3.151.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-18)
**Note:** Version bump only for package @standardnotes/web
+94
View File
@@ -1,5 +1,99 @@
{
"versions": [
{
"version": "3.152.0",
"title": "[3.152.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)",
"date": null,
"body": "### Features\n\n* **clipper:** Added default tag setting to clipper ([2ce2b84](https://github.com/standardnotes/app/commit/2ce2b8410f5053f77d02b93dbb80aad5f33c728c))",
"parsed": {
"_": [
"clipper: Added default tag setting to clipper (2ce2b84)"
],
"Features": [
"clipper: Added default tag setting to clipper (2ce2b84)"
]
}
},
{
"version": "3.151.10",
"title": "[3.151.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-23)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.151.9",
"title": "[3.151.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.151.8",
"title": "[3.151.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)",
"date": null,
"body": "### Bug Fixes\n\n* Fixed issue on desktop where custom titlebar would overlap with preferences view header ([87cd75d](https://github.com/standardnotes/app/commit/87cd75d3244e05b3d9dfb26c8ea907564b98826b))",
"parsed": {
"_": [
"Fixed issue on desktop where custom titlebar would overlap with preferences view header (87cd75d)"
],
"Bug Fixes": [
"Fixed issue on desktop where custom titlebar would overlap with preferences view header (87cd75d)"
]
}
},
{
"version": "3.151.7",
"title": "[3.151.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.151.6",
"title": "[3.151.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-21)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.151.5",
"title": "[3.151.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.151.4",
"title": "[3.151.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-20)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.151.3",
"title": "[3.151.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-18)",
+3 -11
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/web",
"version": "3.151.3",
"version": "3.152.0",
"license": "AGPL-3.0-or-later",
"main": "dist/app.js",
"author": "Standard Notes.",
@@ -30,14 +30,6 @@
"@babel/preset-typescript": "^7.18.6",
"@lexical/react": "0.9.2",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
"@reach/alert": "^0.18.0",
"@reach/alert-dialog": "^0.18.0",
"@reach/checkbox": "^0.18.0",
"@reach/dialog": "^0.18.0",
"@reach/disclosure": "^0.18.0",
"@reach/listbox": "^0.18.0",
"@reach/tooltip": "^0.18.0",
"@reach/visually-hidden": "^0.18.0",
"@simplewebauthn/browser": "^7.1.0",
"@standardnotes/authenticator": "^2.3.9",
"@standardnotes/autobiography-theme": "^1.2.7",
@@ -67,7 +59,6 @@
"@types/jest": "^29.2.4",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@types/styled-components": "^5.1.26",
"@types/wicg-file-system-access": "^2020.9.5",
"@zip.js/zip.js": "^2.6.60",
"autoprefixer": "^10.4.13",
@@ -101,7 +92,6 @@
"react-dom": "^18.2.0",
"react-refresh": "^0.14.0",
"sass-loader": "*",
"styled-components": "^5.3.8",
"svg-jest": "^1.0.1",
"tailwindcss": "^3.2.7",
"ts-jest": "^29.0.3",
@@ -117,7 +107,9 @@
"app/**/*.{js,ts,jsx,tsx,css,md}": "prettier --write"
},
"dependencies": {
"@ariakit/react": "^0.1.2",
"@lexical/headless": "0.9.2",
"@radix-ui/react-slot": "^1.0.1",
"contactjs": "2.1.5"
}
}
@@ -0,0 +1,35 @@
import { Dialog, DialogStoreProps, useDialogStore } from '@ariakit/react'
import { classNames } from '@standardnotes/snjs'
import { ReactNode } from 'react'
const AlertDialog = ({
children,
closeDialog,
className,
...props
}: { children: ReactNode; closeDialog: () => void; className?: string } & Partial<DialogStoreProps>) => {
const dialog = useDialogStore({
open: true,
...props,
})
return (
<Dialog store={dialog} role="alertdialog" className="h-full w-full" backdropProps={{ className: '!z-modal' }}>
<div
className="absolute z-0 h-full w-full bg-passive-5 opacity-0 md:opacity-75"
role="presentation"
onClick={closeDialog}
/>
<div
className={classNames(
'absolute top-1/2 left-1/2 z-[1] max-w-[600px] -translate-x-1/2 -translate-y-1/2 rounded border border-border bg-default px-6 py-5 shadow-xl',
className,
)}
>
{children}
</div>
</Dialog>
)
}
export default AlertDialog
@@ -4,7 +4,6 @@ import { Component } from 'react'
import ApplicationView from '@/Components/ApplicationView/ApplicationView'
import { WebOrDesktopDevice } from '@/Application/Device/WebOrDesktopDevice'
import { ApplicationGroupEvent, ApplicationGroupEventData, DeinitSource } from '@standardnotes/snjs'
import { DialogContent, DialogOverlay } from '@reach/dialog'
import { getPlatformString, isDesktopApplication } from '@/Utils'
import DeallocateHandler from '../DeallocateHandler/DeallocateHandler'
@@ -23,6 +22,20 @@ type State = {
deviceDestroyed?: boolean
}
const renderDialog = (message: string) => {
return (
<div className="flex h-full w-full items-center justify-center bg-passive-5" role="alert">
<div
className={
'challenge-modal shadow-overlay-light relative flex max-w-125 flex-col items-center rounded border border-solid border-border bg-default p-6'
}
>
<div className="text-base lg:text-xs">{message}</div>
</div>
</div>
)
}
class ApplicationGroupView extends Component<Props, State> {
applicationObserverRemover?: () => void
private group?: ApplicationGroup
@@ -83,21 +96,6 @@ class ApplicationGroupView extends Component<Props, State> {
}
override render() {
const renderDialog = (message: string) => {
return (
<DialogOverlay className={'sn-component challenge-modal-overlay'}>
<DialogContent
aria-label="Switching workspace"
className={
'challenge-modal shadow-overlay-light relative flex flex-col items-center rounded border border-solid border-border bg-default p-8'
}
>
<div className="text-base lg:text-xs">{message}</div>
</DialogContent>
</DialogOverlay>
)
}
if (this.state.deviceDestroyed) {
const message = `Secure memory has destroyed this application instance. ${
isDesktopApplication()
@@ -2,7 +2,7 @@ import { FunctionComponent } from 'react'
const DotOrgNotice: FunctionComponent = () => {
return (
<div className="z-modal flex h-30 w-full w-full items-center bg-danger text-center text-info-contrast">
<div className="z-modal flex h-30 w-full items-center bg-danger text-center text-info-contrast">
<div className="w-full text-center text-xl font-bold">
app.standardnotes.org is no longer maintained. Please switch to{' '}
<a className="underline" href="https://app.standardnotes.com">
@@ -1,7 +1,8 @@
import { ForwardedRef, forwardRef, MouseEventHandler } from 'react'
import { ComponentPropsWithoutRef, ForwardedRef, forwardRef, MouseEventHandler } from 'react'
import Icon from '@/Components/Icon/Icon'
import { IconType } from '@standardnotes/snjs'
import { classNames } from '@standardnotes/utils'
import StyledTooltip from '../StyledTooltip/StyledTooltip'
type Props = {
onClick: () => void
@@ -10,30 +11,35 @@ type Props = {
iconClassName?: string
label: string
id?: string
}
} & ComponentPropsWithoutRef<'button'>
const RoundIconButton = forwardRef(
({ onClick, className, icon: iconType, iconClassName, id, label }: Props, ref: ForwardedRef<HTMLButtonElement>) => {
(
{ onClick, className, icon: iconType, iconClassName, id, label, ...props }: Props,
ref: ForwardedRef<HTMLButtonElement>,
) => {
const click: MouseEventHandler = (e) => {
e.preventDefault()
onClick()
}
return (
<button
className={classNames(
'bg-text-padding m-0 flex h-10 min-w-10 cursor-pointer items-center justify-center rounded-full border',
'border-solid border-border bg-clip-padding text-neutral hover:bg-contrast hover:text-text focus:bg-contrast',
'focus:text-text focus:outline-none focus:ring-info md:h-8 md:min-w-8',
className,
)}
onClick={click}
ref={ref}
id={id}
title={label}
aria-label={label}
>
<Icon type={iconType} className={iconClassName} />
</button>
<StyledTooltip label={label}>
<button
className={classNames(
'bg-text-padding m-0 flex h-10 min-w-10 cursor-pointer items-center justify-center rounded-full border',
'border-solid border-border bg-clip-padding text-neutral hover:bg-contrast hover:text-text focus:bg-contrast',
'focus:text-text focus:outline-none focus:ring-info md:h-8 md:min-w-8',
className,
)}
onClick={click}
ref={ref}
id={id}
aria-label={label}
{...props}
>
<Icon type={iconType} className={iconClassName} />
</button>
</StyledTooltip>
)
},
)
@@ -155,7 +155,6 @@ const PhotoCaptureModal = ({ filesController, close }: Props) => {
<label className="text-sm font-medium text-neutral">
Device:
<Dropdown
id={'photo-capture-device-dropdown'}
label={'Photo Capture Device'}
items={devicesAsDropdownItems}
value={recorder.selectedDevice.deviceId}
@@ -164,7 +163,6 @@ const PhotoCaptureModal = ({ filesController, close }: Props) => {
}}
classNameOverride={{
wrapper: 'mt-1',
popover: 'z-modal',
}}
/>
</label>
@@ -71,7 +71,6 @@ const ChallengeModal: FunctionComponent<Props> = ({
const [isSubmitting, setIsSubmitting] = useState(false)
const [isProcessing, setIsProcessing] = useState(false)
const [, setProcessingPrompts] = useState<ChallengePrompt[]>([])
const [bypassModalFocusLock, setBypassModalFocusLock] = useState(false)
const shouldShowForgotPasscode = [ChallengeReason.ApplicationUnlock, ChallengeReason.Migration].includes(
challenge.reason,
@@ -238,23 +237,17 @@ const ChallengeModal: FunctionComponent<Props> = ({
})
return (
<ModalOverlay
isOpen={true}
className={`sn-component p-0 ${isFullScreenBlocker ? 'bg-passive-5' : ''}`}
onDismiss={cancelChallenge}
dangerouslyBypassFocusLock={bypassModalFocusLock}
key={challenge.id}
ref={setModalElement}
>
<ModalOverlay isOpen={true} key={challenge.id} ref={setModalElement}>
<Modal
title="Authenticate"
close={cancelChallenge}
className={{
content: classNames(
'challenge-modal relative m-0 flex h-full w-full flex-col items-center rounded border-solid border-border bg-default p-0 md:h-auto md:!w-auto md:border',
'sn-component challenge-modal relative m-0 flex h-full w-full flex-col items-center rounded border-solid border-border bg-default p-0 md:h-auto md:!w-max md:border',
!isMobileScreen && 'shadow-overlay-light',
isMobileOverlay && 'shadow-overlay-light border border-solid border-border',
),
backdrop: isFullScreenBlocker ? 'bg-passive-5' : '',
}}
customHeader={<></>}
customFooter={<></>}
@@ -319,7 +312,6 @@ const ChallengeModal: FunctionComponent<Props> = ({
<Button
className="flex min-w-76 items-center justify-center"
onClick={() => {
setBypassModalFocusLock(true)
application.alertService
.confirm(
'If you forgot your local passcode, your only option is to clear your local data from this device and sign back in to your account.',
@@ -333,9 +325,6 @@ const ChallengeModal: FunctionComponent<Props> = ({
}
})
.catch(console.error)
.finally(() => {
setBypassModalFocusLock(false)
})
}}
>
<Icon type="help" className="mr-2 text-neutral" />
@@ -223,7 +223,7 @@ const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
)
})}
</Menu>
<ModalOverlay isOpen={showSuperImporter} onDismiss={closeSuperNoteImporter}>
<ModalOverlay isOpen={showSuperImporter}>
{note && (
<SuperNoteImporter
note={note}
@@ -180,7 +180,7 @@ const ChangeMultipleMenu = ({ application, notes, setDisableClickOutside }: Prop
</Fragment>
))}
</Menu>
<ModalOverlay isOpen={showSuperImporter} onDismiss={closeCurrentSuperNoteImporter}>
<ModalOverlay isOpen={showSuperImporter}>
{confirmationQueue[0] && (
<SuperNoteImporter
note={confirmationQueue[0]}
@@ -15,11 +15,14 @@ import { confirmDialog } from '@standardnotes/ui-services'
import {
ApplicationEvent,
ContentType,
DecryptedItem,
FeatureIdentifier,
FeatureStatus,
NoteContent,
NoteType,
PrefKey,
SNNote,
SNTag,
} from '@standardnotes/snjs'
import { addToast, ToastType } from '@standardnotes/toast'
import { getSuperJSONFromClipPayload } from './getSuperJSONFromClipHTML'
@@ -28,6 +31,11 @@ import { PremiumFeatureIconClass, PremiumFeatureIconName } from '../Icon/Premium
import Button from '../Button/Button'
import { openSubscriptionDashboard } from '@/Utils/ManageSubscription'
import { useStateRef } from '@/Hooks/useStateRef'
import usePreference from '@/Hooks/usePreference'
import { createLinkFromItem } from '@/Utils/Items/Search/createLinkFromItem'
import ItemSelectionDropdown from '../ItemSelectionDropdown/ItemSelectionDropdown'
import LinkedItemBubble from '../LinkedItems/LinkedItemBubble'
import StyledTooltip from '../StyledTooltip/StyledTooltip'
const Header = () => (
<div className="flex items-center border-b border-border p-1 px-3 py-2 text-base font-semibold text-info-contrast">
@@ -79,6 +87,30 @@ const ClipperView = ({
})
}, [application])
const defaultTagId = usePreference<string>(PrefKey.ClipperDefaultTagUuid)
const [defaultTag, setDefaultTag] = useState<SNTag | undefined>()
useEffect(() => {
if (!defaultTagId) {
setDefaultTag(undefined)
return
}
const tag = application.items.findItem(defaultTagId) as SNTag | undefined
setDefaultTag(tag)
}, [defaultTagId, application])
const selectTag = useCallback(
(tag: DecryptedItem) => {
void application.setPreference(PrefKey.ClipperDefaultTagUuid, tag.uuid)
},
[application],
)
const unselectTag = useCallback(async () => {
void application.setPreference(PrefKey.ClipperDefaultTagUuid, undefined)
}, [application])
const [menuPane, setMenuPane] = useState<AccountMenuPane>()
const activateRegisterPane = useCallback(() => {
@@ -167,18 +199,24 @@ const ClipperView = ({
references: [],
})
void application.items.insertItem(note).then((note) => {
setClippedNote(note as SNNote)
addToast({
type: ToastType.Success,
message: 'Note clipped successfully',
})
void application.sync.sync()
const insertedNote = await application.items.insertItem(note)
if (defaultTag) {
await application.linkingController.linkItems(insertedNote, defaultTag)
}
setClippedNote(insertedNote as SNNote)
addToast({
type: ToastType.Success,
message: 'Note clipped successfully',
})
void application.sync.sync()
}
void createNoteFromClip()
}, [application.items, application.sync, clipPayload, isEntitledRef])
}, [application.items, application.linkingController, application.sync, clipPayload, defaultTag, isEntitledRef])
const upgradePlan = useCallback(async () => {
if (hasSubscription) {
@@ -309,6 +347,34 @@ const ClipperView = ({
>
Select elements to clip
</MenuItem>
<div className="border-t border-border px-3 py-3 text-base text-foreground">
<div className="flex items-center justify-between">
<div className="font-medium">Default tag:</div>
{defaultTag && (
<StyledTooltip label="Remove default tag" gutter={2}>
<button className="rounded-full p-1 hover:bg-contrast hover:text-info" onClick={unselectTag}>
<Icon type="clear-circle-filled" />
</button>
</StyledTooltip>
)}
</div>
{defaultTag && (
<div>
<LinkedItemBubble
className="m-1 mr-2"
link={createLinkFromItem(defaultTag, 'linked')}
unlinkItem={unselectTag}
isBidirectional={false}
inlineFlex={true}
/>
</div>
)}
<ItemSelectionDropdown
onSelection={selectTag}
placeholder="Select tag to save clipped notes to..."
contentTypes={[ContentType.Tag]}
/>
</div>
<div className="border-t border-border px-3 pt-3 pb-1 text-base text-foreground">
<div>You're signed in as:</div>
<div className="wrap my-0.5 font-bold">{user.email}</div>
@@ -1,11 +1,11 @@
import { observer } from 'mobx-react-lite'
import { ViewControllerManager } from '@Controllers/ViewControllerManager'
import { AlertDialog, AlertDialogDescription, AlertDialogLabel } from '@reach/alert-dialog'
import { useCallback, useRef } from 'react'
import { STRING_DELETE_ACCOUNT_CONFIRMATION } from '@/Constants/Strings'
import Button from '@/Components/Button/Button'
import { WebApplication } from '@/Application/Application'
import Icon from '../Icon/Icon'
import AlertDialog from '../AlertDialog/AlertDialog'
type Props = {
viewControllerManager: ViewControllerManager
@@ -25,37 +25,26 @@ const ConfirmDeleteAccountModal = ({ application, viewControllerManager }: Props
}, [application.user, closeDialog])
return (
<AlertDialog onDismiss={closeDialog} leastDestructiveRef={cancelRef} className="max-w-[600px] p-0">
<div className="sk-modal-content">
<div className="sn-component">
<div className="sk-panel">
<div className="sk-panel-content">
<div className="sk-panel-section">
<AlertDialogLabel className="flex items-center justify-between text-lg font-bold">
Delete account?
<button className="rounded p-1 font-bold hover:bg-contrast" onClick={closeDialog}>
<Icon type="close" />
</button>
</AlertDialogLabel>
<AlertDialogDescription className="sk-panel-row">
<div>
<p className="text-base text-foreground lg:text-sm">{STRING_DELETE_ACCOUNT_CONFIRMATION}</p>
</div>
</AlertDialogDescription>
<div className="my-1 mt-4 flex justify-end gap-2">
<Button ref={cancelRef} onClick={closeDialog}>
Cancel
</Button>
<Button primary colorStyle="danger" onClick={confirm}>
Delete my account for good
</Button>
</div>
</div>
</div>
</div>
<AlertDialog closeDialog={closeDialog}>
<div className="flex items-center justify-between text-lg font-bold">
Delete account?
<button className="rounded p-1 font-bold hover:bg-contrast" onClick={closeDialog}>
<Icon type="close" />
</button>
</div>
<div className="sk-panel-row">
<div>
<p className="text-base text-foreground lg:text-sm">{STRING_DELETE_ACCOUNT_CONFIRMATION}</p>
</div>
</div>
<div className="mt-4 flex justify-end gap-2">
<Button ref={cancelRef} onClick={closeDialog}>
Cancel
</Button>
<Button primary colorStyle="danger" onClick={confirm}>
Delete my account for good
</Button>
</div>
</AlertDialog>
)
}
@@ -1,5 +1,4 @@
import { FunctionComponent, useCallback, useEffect, useRef, useState } from 'react'
import { AlertDialog, AlertDialogDescription, AlertDialogLabel } from '@reach/alert-dialog'
import { STRING_SIGN_OUT_CONFIRMATION } from '@/Constants/Strings'
import { WebApplication } from '@/Application/Application'
import { ViewControllerManager } from '@/Controllers/ViewControllerManager'
@@ -8,6 +7,7 @@ import { ApplicationGroup } from '@/Application/ApplicationGroup'
import { isDesktopApplication } from '@/Utils'
import Button from '@/Components/Button/Button'
import Icon from '../Icon/Icon'
import AlertDialog from '../AlertDialog/AlertDialog'
type Props = {
application: WebApplication
@@ -42,75 +42,65 @@ const ConfirmSignoutModal: FunctionComponent<Props> = ({ application, viewContro
}, [application, closeDialog, deleteLocalBackups])
return (
<AlertDialog onDismiss={closeDialog} leastDestructiveRef={cancelRef} className="max-w-[600px] p-0">
<div className="sk-modal-content">
<div className="sn-component">
<div className="sk-panel">
<div className="sk-panel-content">
<div className="sk-panel-section">
<AlertDialogLabel className="flex items-center justify-between text-lg font-bold">
Sign out workspace?
<button className="rounded p-1 font-bold hover:bg-contrast" onClick={closeDialog}>
<Icon type="close" />
</button>
</AlertDialogLabel>
<AlertDialogDescription className="sk-panel-row">
<div>
<p className="text-base text-foreground lg:text-sm">{STRING_SIGN_OUT_CONFIRMATION}</p>
{showWorkspaceWarning && (
<>
<br />
<p className="text-base text-foreground lg:text-sm">
<strong>Note: </strong>
Because you have other workspaces signed in, this sign out may leave logs and other metadata
of your session on this device. For a more robust sign out that performs a hard clear of all
app-related data, use the <i>Sign out all workspaces</i> option under <i>Switch workspace</i>.
</p>
</>
)}
</div>
</AlertDialogDescription>
{localBackupsCount > 0 && (
<div className="flex">
<div className="sk-panel-row"></div>
<label className="flex items-center">
<input
type="checkbox"
checked={deleteLocalBackups}
onChange={(event) => {
setDeleteLocalBackups((event.target as HTMLInputElement).checked)
}}
/>
<span className="ml-2">
Delete {localBackupsCount} local backup file
{localBackupsCount > 1 ? 's' : ''}
</span>
</label>
<button
className="sk-a ml-1.5 cursor-pointer rounded p-0 capitalize"
onClick={() => {
application.desktopDevice?.viewlocalBackups()
}}
>
View backup files
</button>
</div>
)}
<div className="my-1 mt-4 flex justify-end gap-2">
<Button ref={cancelRef} onClick={closeDialog}>
Cancel
</Button>
<Button primary colorStyle="danger" onClick={confirm}>
{application.hasAccount() ? 'Sign Out' : 'Delete Workspace'}
</Button>
</div>
</div>
</div>
</div>
<AlertDialog closeDialog={closeDialog}>
<div className="flex items-center justify-between text-lg font-bold">
Sign out workspace?
<button className="rounded p-1 font-bold hover:bg-contrast" onClick={closeDialog}>
<Icon type="close" />
</button>
</div>
<div className="sk-panel-row">
<div>
<p className="text-base text-foreground lg:text-sm">{STRING_SIGN_OUT_CONFIRMATION}</p>
{showWorkspaceWarning && (
<>
<br />
<p className="text-base text-foreground lg:text-sm">
<strong>Note: </strong>
Because you have other workspaces signed in, this sign out may leave logs and other metadata of your
session on this device. For a more robust sign out that performs a hard clear of all app-related data,
use the <i>Sign out all workspaces</i> option under <i>Switch workspace</i>.
</p>
</>
)}
</div>
</div>
{localBackupsCount > 0 && (
<div className="flex">
<div className="sk-panel-row"></div>
<label className="flex items-center">
<input
type="checkbox"
checked={deleteLocalBackups}
onChange={(event) => {
setDeleteLocalBackups((event.target as HTMLInputElement).checked)
}}
/>
<span className="ml-2">
Delete {localBackupsCount} local backup file
{localBackupsCount > 1 ? 's' : ''}
</span>
</label>
<button
className="sk-a ml-1.5 cursor-pointer rounded p-0 capitalize"
onClick={() => {
application.desktopDevice?.viewlocalBackups()
}}
>
View backup files
</button>
</div>
)}
<div className="mt-4 flex justify-end gap-2">
<Button ref={cancelRef} onClick={closeDialog}>
Cancel
</Button>
<Button primary colorStyle="danger" onClick={confirm}>
{application.hasAccount() ? 'Sign Out' : 'Delete Workspace'}
</Button>
</div>
</AlertDialog>
)
}
@@ -9,6 +9,7 @@ import { FilesController } from '@/Controllers/FilesController'
import { PhotoRecorder } from '@/Controllers/Moments/PhotoRecorder'
import { classNames } from '@standardnotes/snjs'
import { useEffect, useRef, useState } from 'react'
import StyledTooltip from '@/Components/StyledTooltip/StyledTooltip'
type Props = {
isDailyEntry: boolean
@@ -47,24 +48,25 @@ const AddItemMenuButton = ({
return (
<>
<button
className={classNames(
'z-editor-title-bar hidden h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-solid border-transparent hover:brightness-125 md:flex',
isDailyEntry ? 'bg-danger text-danger-contrast' : 'bg-info text-info-contrast',
)}
title={addButtonLabel}
aria-label={addButtonLabel}
onClick={() => {
if (canShowMenu) {
setIsMenuOpen((isOpen) => !isOpen)
} else {
addNewItem()
}
}}
ref={addItemButtonRef}
>
<Icon type="add" size="custom" className="h-5 w-5" />
</button>
<StyledTooltip label={addButtonLabel}>
<button
className={classNames(
'z-editor-title-bar hidden h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-solid border-transparent hover:brightness-125 md:flex',
isDailyEntry ? 'bg-danger text-danger-contrast' : 'bg-info text-info-contrast',
)}
aria-label={addButtonLabel}
onClick={() => {
if (canShowMenu) {
setIsMenuOpen((isOpen) => !isOpen)
} else {
addNewItem()
}
}}
ref={addItemButtonRef}
>
<Icon type="add" size="custom" className="h-5 w-5" />
</button>
</StyledTooltip>
<Popover
title="Add item"
open={canShowMenu && isMenuOpen}
@@ -106,10 +108,10 @@ const AddItemMenuButton = ({
</MenuItem>
</Menu>
</Popover>
<ModalOverlay isOpen={captureType === 'photo'} onDismiss={closeCaptureModal}>
<ModalOverlay isOpen={captureType === 'photo'}>
<PhotoCaptureModal filesController={filesController} close={closeCaptureModal} />
</ModalOverlay>
<ModalOverlay isOpen={captureType === 'video'} onDismiss={closeCaptureModal}>
<ModalOverlay isOpen={captureType === 'video'}>
<VideoCaptureModal filesController={filesController} close={closeCaptureModal} />
</ModalOverlay>
</>
@@ -149,12 +149,8 @@ const NewNotePreferences: FunctionComponent<Props> = ({
<div className="mt-3 text-mobile-menu-item md:text-menu-item">Note Type</div>
<div className="mt-2">
<Dropdown
classNameOverride={{
popover: 'z-modal',
}}
disabled={disabled}
fullWidth={true}
id="def-editor-dropdown"
label="Select the default note type"
items={editorItems}
value={defaultEditorIdentifier}
@@ -166,12 +162,8 @@ const NewNotePreferences: FunctionComponent<Props> = ({
<div className="mt-3 text-mobile-menu-item md:text-menu-item">Title Format</div>
<div className="mt-2">
<Dropdown
classNameOverride={{
popover: 'z-modal',
}}
disabled={disabled}
fullWidth={true}
id="def-new-note-title-format"
label="Select the default note type"
items={NoteTitleFormatOptions}
value={newNoteTitleFormat}
@@ -50,7 +50,7 @@ const SearchButton = ({ itemListController }: Props) => {
setIsSearchBarVisible(!isSearchBarVisible)
}}
icon={isSearchBarVisible ? 'close' : 'search'}
label="Display options menu"
label="Search"
/>
</>
)
@@ -1,15 +1,18 @@
import { ListboxArrow, ListboxInput, ListboxList, ListboxPopover } from '@reach/listbox'
import '@reach/listbox/styles.css'
import { VisuallyHidden } from '@reach/visually-hidden'
import { FunctionComponent } from 'react'
import { useEffect } from 'react'
import Icon from '@/Components/Icon/Icon'
import { DropdownItem } from './DropdownItem'
import StyledListboxButton from './StyledListboxButton'
import StyledListboxOption from './StyledListboxOption'
import { classNames } from '@standardnotes/snjs'
import {
Select,
SelectArrow,
SelectItem,
SelectLabel,
SelectPopover,
useSelectStore,
VisuallyHidden,
} from '@ariakit/react'
type DropdownProps = {
id: string
label: string
items: DropdownItem[]
value: string
@@ -21,92 +24,77 @@ type DropdownProps = {
popover?: string
}
fullWidth?: boolean
portal?: boolean
}
type ListboxButtonProps = DropdownItem & {
isExpanded: boolean
}
const Dropdown = ({ label, value, onChange, items, disabled, fullWidth, classNameOverride = {} }: DropdownProps) => {
const select = useSelectStore({
defaultValue: value,
})
const CustomDropdownButton: FunctionComponent<ListboxButtonProps> = ({
label,
isExpanded,
icon,
iconClassName = '',
}) => (
<>
<div className="flex items-center">
{icon ? (
<div className="mr-2 flex">
<Icon type={icon} className={iconClassName} size="small" />
</div>
) : null}
<div className="text-base lg:text-sm">{label}</div>
</div>
<ListboxArrow className={`flex ${isExpanded ? 'rotate-180' : ''}`}>
<Icon type="menu-arrow-down" className="text-passive-1" size="small" />
</ListboxArrow>
</>
)
const selectedValue = select.useState('value')
const isExpanded = select.useState('open')
const Dropdown: FunctionComponent<DropdownProps> = ({
id,
label,
items,
value,
onChange,
disabled,
classNameOverride = {},
fullWidth,
portal = true,
}) => {
const labelId = `${id}-label`
const currentItem = items.find((item) => item.value === selectedValue)
const handleChange = (value: string) => {
const selectedItem = items.find((item) => item.value === value) as DropdownItem
onChange(value, selectedItem)
}
useEffect(() => {
return select.subscribe(
(state) => {
if (state.value !== value) {
onChange(state.value, items.find((item) => item.value === state.value) as DropdownItem)
}
},
['value'],
)
}, [items, onChange, select, value])
return (
<div className={classNameOverride.wrapper}>
<VisuallyHidden id={labelId}>{label}</VisuallyHidden>
<ListboxInput value={value} onChange={handleChange} aria-labelledby={labelId} disabled={disabled}>
<StyledListboxButton
className={classNames('w-full', !fullWidth && 'md:w-fit', classNameOverride.button)}
children={({ value, label, isExpanded }) => {
const current = items.find((item) => item.value === value)
const icon = current ? current?.icon : null
const iconClassName = current ? current?.iconClassName : null
return CustomDropdownButton({
value: value ? value : label.toLowerCase(),
label,
isExpanded,
...(icon ? { icon } : null),
...(iconClassName ? { iconClassName } : null),
})
}}
/>
<ListboxPopover
portal={portal}
className={classNames('sn-dropdown sn-dropdown-popover', classNameOverride.popover)}
>
<div className="sn-component">
<ListboxList>
{items.map((item) => (
<StyledListboxOption key={item.value} value={item.value} label={item.label} disabled={item.disabled}>
{item.icon ? (
<div className="mr-3 flex">
<Icon type={item.icon} className={item.iconClassName ?? ''} size="small" />
</div>
) : null}
<div className="text-base lg:text-sm">{item.label}</div>
</StyledListboxOption>
))}
</ListboxList>
</div>
</ListboxPopover>
</ListboxInput>
<VisuallyHidden>
<SelectLabel store={select}>{label}</SelectLabel>
</VisuallyHidden>
<Select
className={classNames(
'flex w-full min-w-55 items-center justify-between rounded border border-border bg-default py-1.5 px-3.5 text-sm text-foreground',
disabled && 'opacity-50',
classNameOverride.button,
!fullWidth && 'md:w-fit',
)}
store={select}
disabled={disabled}
>
<div className="flex items-center">
{currentItem?.icon ? (
<div className="mr-2 flex">
<Icon type={currentItem.icon} className={currentItem.iconClassName ?? ''} size="small" />
</div>
) : null}
<div className="text-base lg:text-sm">{currentItem?.label}</div>
</div>
<SelectArrow className={classNames('text-passive-1', isExpanded && 'rotate-180')} />
</Select>
<SelectPopover
store={select}
className={classNames(
'max-h-[var(--popover-available-height)] w-[var(--popover-anchor-width)] overflow-y-auto rounded border border-border bg-default py-1',
classNameOverride.popover,
)}
>
{items.map((item) => (
<SelectItem
className="flex cursor-pointer items-center bg-transparent py-1.5 px-3 text-sm text-text hover:bg-contrast hover:text-foreground [&[data-active-item]]:bg-info [&[data-active-item]]:text-info-contrast"
key={item.value}
value={item.value}
disabled={item.disabled}
>
{item.icon ? (
<div className="mr-3 flex">
<Icon type={item.icon} className={item.iconClassName ?? ''} size="small" />
</div>
) : null}
<div className="text-base lg:text-sm">{item.label}</div>
</SelectItem>
))}
</SelectPopover>
</div>
)
}
@@ -1,20 +0,0 @@
import { ListboxButton } from '@reach/listbox'
import styled from 'styled-components'
const StyledListboxButton = styled(ListboxButton)`
&[data-reach-listbox-button] {
background-color: var(--sn-stylekit-background-color);
border-radius: 0.25rem;
border: 1px solid var(--sn-stylekit-border-color);
color: var(--sn-stylekit-contrast-foreground-color);
font-size: 0.875rem;
line-height: 1.25rem;
min-width: 13.75rem;
padding-bottom: 0.375rem;
padding-left: 0.875rem;
padding-right: 0.875rem;
padding-top: 0.375rem;
}
`
export default StyledListboxButton

Some files were not shown because too many files have changed in this diff Show More