Compare commits

..
Author SHA1 Message Date
StandardNotes CI cfe951c977 chore(release): publish
- @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].1
2023-04-26 10:52:31 +00:00
Karol Sójko d198bc2123 chore(features): enable u2f feature on pro subscription (#2317) 2023-04-26 12:24:32 +02:00
StandardNotes CI b4d34394fc chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2023-04-25 16:23:20 +00:00
Aman Harwara d2dba42403 feat: Changing note type from Super to any other type will now show a conversion dialog 2023-04-25 21:24:11 +05:30
StandardNotes CI 11bbb6c7c1 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2023-04-25 09:45:14 +00:00
Aman Harwara 8c0b7d2056 refactor: files controller 2023-04-25 14:47:19 +05:30
Aman Harwara d08581c8a6 chore: fix downloads 2023-04-25 14:46:24 +05:30
StandardNotes CI 70fd47a697 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2023-04-24 16:57:11 +00:00
Aman Harwara 372991a8a0 chore: fix ios review 2023-04-24 22:00:11 +05:30
StandardNotes CI 358f91169c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2023-04-24 15:24:32 +00:00
Aman Harwara 1759923bfe Merge branch 'main' of github.com:standardnotes/app 2023-04-24 20:23:11 +05:30
Aman Harwara c4afd6d328 chore: trigger build 2023-04-24 20:23:04 +05:30
StandardNotes CI b1892605e1 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-04-24 14:48:45 +00:00
Aman Harwara a99aaee379 fix(mobile): Fixed issue where files could not downloaded on Android 2023-04-24 19:50:11 +05:30
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
115 changed files with 1214 additions and 1144 deletions
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.
+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.26.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/api
## [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.2",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+44
View File
@@ -3,6 +3,50 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.0.22](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/clipper
## [1.0.21](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)
**Note:** Version bump only for package @standardnotes/clipper
## [1.0.20](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)
**Note:** Version bump only for package @standardnotes/clipper
## [1.0.19](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.18](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.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 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/clipper",
"description": "Web clipper browser extension for Standard Notes",
"version": "1.0.11",
"version": "1.0.22",
"private": true,
"scripts": {
"build-mv2": "yarn clean && webpack --config ./webpack.config.prod.js",
+46
View File
@@ -3,6 +3,52 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.105.71](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/desktop
## [3.105.70](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)
**Note:** Version bump only for package @standardnotes/desktop
## [3.105.69](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)
**Note:** Version bump only for package @standardnotes/desktop
## [3.105.68](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.67](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.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
@@ -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.60",
"version": "3.105.71",
"license": "AGPL-3.0-or-later",
"author": "Standard Notes.",
"private": true,
+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.21.30](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/encryption
## [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.30",
"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.59.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/features
# [1.59.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/features",
"version": "1.59.0",
"version": "1.59.1",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -12,8 +12,7 @@ export function serverFeatures(): ServerFeatureDescription[] {
permission_name: PermissionName.TwoFactorAuth,
},
{
availableInSubscriptions: [],
availableInRoles: ['INTERNAL_TEAM_USER'],
availableInSubscriptions: [SubscriptionName.ProPlan],
name: 'U2F authentication',
identifier: FeatureIdentifier.UniversalSecondFactor,
permission_name: PermissionName.UniversalSecondFactor,
+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.28.35](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/filepicker
## [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.35",
"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.14.45](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/files
## [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.45",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+50
View File
@@ -3,6 +3,56 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.52.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/mobile
## [3.52.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)
**Note:** Version bump only for package @standardnotes/mobile
## [3.52.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)
**Note:** Version bump only for package @standardnotes/mobile
## [3.52.15](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.14](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.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
### Bug Fixes
* **mobile:** Fixed issue where files could not downloaded on Android ([a99aaee](https://github.com/standardnotes/app/commit/a99aaee37946a49dbd0b2f18613cb2702067e0cc))
## [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
@@ -10,7 +10,7 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
+2 -2
View File
@@ -637,7 +637,7 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"
SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
boost: 57d2868c099736d80fcd648bf211b4431e51a558
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
FBLazyVector: 60195509584153283780abdac5569feffb8f08cc
@@ -658,7 +658,7 @@ SPEC CHECKSUMS:
MMKV: 9c4663aa7ca255d478ff10f2f5cb7d17c1651ccd
MMKVCore: 89f5c8a66bba2dcd551779dea4d412eeec8ff5bb
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: bec48f07daf7bcdc2655a0cde84e07d24d2a9e2a
RCTTypeSafety: 171394eebacf71e1cfad79dbfae7ee8fc16ca80a
React: d7433ccb6a8c36e4cbed59a73c0700fc83c3e98a
Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 877 B

@@ -10,21 +10,15 @@
00E356F31AD99517003FC87E /* StandardNotesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* StandardNotesTests.m */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1C2EEB3B45F4EB07AC795C77 /* (null) in Frameworks */ = {isa = PBXBuildFile; };
1C2EEB3B45F4EB07AC795C77 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
33BB1B14071EBE5978EBF3A8 /* libPods-StandardNotes-StandardNotesTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04FCB5A3A3387CA3CFC82AA3 /* libPods-StandardNotes-StandardNotesTests.a */; };
BC8DEA834BF198E8511F04FF /* libPods-StandardNotesDev.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F2D747BE02C2A1BCFEEFD1 /* libPods-StandardNotesDev.a */; };
CD6592A9291EEFCC00C09DC6 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD6592A8291EEFCC00C09DC6 /* StoreKit.framework */; };
CD7D5ECA27800609005FE1BF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD7D5EC927800608005FE1BF /* LaunchScreen.storyboard */; };
CD7D5ED0278015D2005FE1BF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
CD7D5ED4278015D2005FE1BF /* Red.png in Resources */ = {isa = PBXBuildFile; fileRef = CD7D83FE277FF8CB00915D89 /* Red.png */; };
CD7D5ED5278015D2005FE1BF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
CD7D5ED6278015D2005FE1BF /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = CD7D83FF277FF8CB00915D89 /* [email protected] */; };
CD7D5ED7278015D2005FE1BF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD7D5EC927800608005FE1BF /* LaunchScreen.storyboard */; };
CD7D5ED8278015D2005FE1BF /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = CD7D83FD277FF8CB00915D89 /* [email protected] */; };
CD7D5EE3278016E3005FE1BF /* Dev.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CD7D5EE2278016E3005FE1BF /* Dev.xcassets */; };
CD7D8400277FF8CB00915D89 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = CD7D83FD277FF8CB00915D89 /* [email protected] */; };
CD7D8401277FF8CB00915D89 /* Red.png in Resources */ = {isa = PBXBuildFile; fileRef = CD7D83FE277FF8CB00915D89 /* Red.png */; };
CD7D8402277FF8CB00915D89 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = CD7D83FF277FF8CB00915D89 /* [email protected] */; };
CDC75796292552080019F4AF /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC75795292552080019F4AF /* AppDelegate.mm */; };
CDC75797292552080019F4AF /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC75795292552080019F4AF /* AppDelegate.mm */; };
D261494528699DCE00B17102 /* Web.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D261494428699DCE00B17102 /* Web.bundle */; };
@@ -67,9 +61,6 @@
CD7D5EE2278016E3005FE1BF /* Dev.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Dev.xcassets; sourceTree = "<group>"; };
CD7D5EE427801EFD005FE1BF /* SNDev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SNDev.entitlements; sourceTree = "<group>"; };
CD7D5EE527801F10005FE1BF /* StandardNotes.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = StandardNotes.entitlements; path = StandardNotes/StandardNotes.entitlements; sourceTree = "<group>"; };
CD7D83FD277FF8CB00915D89 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
CD7D83FE277FF8CB00915D89 /* Red.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Red.png; sourceTree = "<group>"; };
CD7D83FF277FF8CB00915D89 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
CDC75795292552080019F4AF /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = StandardNotes/AppDelegate.mm; sourceTree = "<group>"; };
D261494428699DCE00B17102 /* Web.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Web.bundle; path = ../html/Web.bundle; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
@@ -89,7 +80,7 @@
buildActionMask = 2147483647;
files = (
CD6592A9291EEFCC00C09DC6 /* StoreKit.framework in Frameworks */,
1C2EEB3B45F4EB07AC795C77 /* (null) in Frameworks */,
1C2EEB3B45F4EB07AC795C77 /* BuildFile in Frameworks */,
DD3D1CE428EC1C8BA0C49211 /* libPods-StandardNotes.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -144,11 +135,8 @@
CD7D5EE527801F10005FE1BF /* StandardNotes.entitlements */,
13B07FB51A68108700A75B9A /* Images.xcassets */,
13B07FB71A68108700A75B9A /* main.m */,
CD7D83FE277FF8CB00915D89 /* Red.png */,
CD7D5EC8278005B6005FE1BF /* Info.plist */,
CD7D83FF277FF8CB00915D89 /* [email protected] */,
CD7D5EC927800608005FE1BF /* LaunchScreen.storyboard */,
CD7D83FD277FF8CB00915D89 /* [email protected] */,
);
name = StandardNotes;
sourceTree = "<group>";
@@ -318,11 +306,8 @@
buildActionMask = 2147483647;
files = (
D261494528699DCE00B17102 /* Web.bundle in Resources */,
CD7D8401277FF8CB00915D89 /* Red.png in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
CD7D8402277FF8CB00915D89 /* [email protected] in Resources */,
CD7D5ECA27800609005FE1BF /* LaunchScreen.storyboard in Resources */,
CD7D8400277FF8CB00915D89 /* [email protected] in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -330,13 +315,10 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CD7D5ED4278015D2005FE1BF /* Red.png in Resources */,
D261494628699DCE00B17102 /* Web.bundle in Resources */,
CD7D5EE3278016E3005FE1BF /* Dev.xcassets in Resources */,
CD7D5ED5278015D2005FE1BF /* Images.xcassets in Resources */,
CD7D5ED6278015D2005FE1BF /* [email protected] in Resources */,
CD7D5ED7278015D2005FE1BF /* LaunchScreen.storyboard in Resources */,
CD7D5ED8278015D2005FE1BF /* [email protected] in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -10,18 +10,6 @@
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>Red</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Red</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
@@ -34,18 +22,6 @@
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>Red</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Red</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
@@ -10,18 +10,6 @@
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>Red</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Red</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.52.6",
"version": "3.52.18",
"author": "Standard Notes.",
"private": true,
"license": "AGPL-3.0-or-later",
+2 -18
View File
@@ -415,29 +415,13 @@ export class MobileDevice implements MobileDeviceInterface {
return `${directory}/${filename}`
}
async hasStoragePermissionOnAndroid(): Promise<boolean> {
if (Platform.OS !== 'android') {
return true
}
const grantedStatus = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE)
if (grantedStatus === PermissionsAndroid.RESULTS.GRANTED) {
return true
}
Alert.alert(
'Storage permissions are required in order to download files. Please accept the permissions prompt and try again.',
)
return false
}
async downloadBase64AsFile(
base64: string,
filename: string,
saveInTempLocation = false,
): Promise<string | undefined> {
const isGrantedStoragePermissionOnAndroid = await this.hasStoragePermissionOnAndroid()
if (!isGrantedStoragePermissionOnAndroid) {
return
if (Platform.OS === 'android') {
await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE)
}
try {
+10
View File
@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.44.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/models
# [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.1",
"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
+48
View File
@@ -3,6 +3,54 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.249](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.248](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.247](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.246](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.245](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.244](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.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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/releases",
"version": "1.4.237",
"version": "1.4.249",
"license": "AGPL-3.0-or-later",
"main": "dist/releases.json",
"types": "dist/index.d.ts",
+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.13.19](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/responses
## [1.13.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-17)
**Note:** Version bump only for package @standardnotes/responses
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/responses",
"version": "1.13.18",
"version": "1.13.19",
"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.58.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/services
## [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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/services",
"version": "1.58.1",
"version": "1.58.3",
"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.
## [2.167.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/snjs
## [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
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/snjs",
"version": "2.167.1",
"version": "2.167.3",
"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.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/ui-services
## [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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/ui-services",
"version": "1.25.1",
"version": "1.25.3",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+48
View File
@@ -3,6 +3,54 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.153.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)
**Note:** Version bump only for package @standardnotes/web
# [3.153.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)
### Features
* Changing note type from Super to any other type will now show a conversion dialog ([d2dba42](https://github.com/standardnotes/app/commit/d2dba42403e868a4f7a0d544b8e9bd87357fa8ef))
## [3.152.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)
**Note:** Version bump only for package @standardnotes/web
## [3.152.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/web
## [3.152.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/web
# [3.152.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
**Note:** Version bump only for package @standardnotes/web
## [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
+127
View File
@@ -1,5 +1,132 @@
{
"versions": [
{
"version": "3.153.1",
"title": "[3.153.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-26)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.153.0",
"title": "[3.153.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)",
"date": null,
"body": "### Features\n\n* Changing note type from Super to any other type will now show a conversion dialog ([d2dba42](https://github.com/standardnotes/app/commit/d2dba42403e868a4f7a0d544b8e9bd87357fa8ef))",
"parsed": {
"_": [
"Changing note type from Super to any other type will now show a conversion dialog (d2dba42)"
],
"Features": [
"Changing note type from Super to any other type will now show a conversion dialog (d2dba42)"
]
}
},
{
"version": "3.152.3",
"title": "[3.152.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-25)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.152.2",
"title": "[3.152.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.152.1",
"title": "[3.152.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"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": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"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)",
+1 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/web",
"version": "3.151.5",
"version": "3.153.1",
"license": "AGPL-3.0-or-later",
"main": "dist/app.js",
"author": "Standard Notes.",
@@ -30,9 +30,6 @@
"@babel/preset-typescript": "^7.18.6",
"@lexical/react": "0.9.2",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
"@reach/checkbox": "^0.18.0",
"@reach/disclosure": "^0.18.0",
"@reach/listbox": "^0.18.0",
"@simplewebauthn/browser": "^7.1.0",
"@standardnotes/authenticator": "^2.3.9",
"@standardnotes/autobiography-theme": "^1.2.7",
@@ -62,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",
@@ -96,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",
@@ -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>
@@ -14,6 +14,7 @@ import { SuperNoteImporter } from '../SuperEditor/SuperNoteImporter'
import MenuRadioButtonItem from '../Menu/MenuRadioButtonItem'
import { Pill } from '../Preferences/PreferencesComponents/Content'
import ModalOverlay from '../Modal/ModalOverlay'
import SuperNoteConverter from '../SuperEditor/SuperNoteConverter'
type ChangeEditorMenuProps = {
application: WebApplication
@@ -43,8 +44,12 @@ const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
)
const groups = useMemo(() => createEditorMenuGroups(application, editors), [application, editors])
const [currentComponent, setCurrentComponent] = useState<SNComponent>()
const [showSuperImporter, setShowSuperImporter] = useState(false)
const [pendingSuperItem, setPendingSuperItem] = useState<EditorMenuItem | null>(null)
const [pendingConversionItem, setPendingConversionItem] = useState<EditorMenuItem | null>(null)
const showSuperNoteImporter =
!!pendingConversionItem && note?.noteType !== NoteType.Super && pendingConversionItem.noteType === NoteType.Super
const showSuperNoteConverter =
!!pendingConversionItem && note?.noteType === NoteType.Super && pendingConversionItem.noteType !== NoteType.Super
useEffect(() => {
if (note) {
@@ -114,15 +119,28 @@ const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
return
}
if (note?.locked) {
if (!note) {
return
}
if (note.locked) {
application.alertService.alert(STRING_EDIT_LOCKED_ATTEMPT).catch(console.error)
return
}
if (itemToBeSelected.noteType === NoteType.Super) {
setPendingSuperItem(itemToBeSelected)
if (note.noteType === NoteType.Super) {
return
}
setPendingConversionItem(itemToBeSelected)
handleDisableClickoutsideRequest?.()
return
}
if (note.noteType === NoteType.Super) {
setPendingConversionItem(itemToBeSelected)
handleDisableClickoutsideRequest?.()
setShowSuperImporter(true)
return
}
@@ -139,7 +157,7 @@ const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
}
}
if (shouldMakeSelection && note) {
if (shouldMakeSelection) {
if (itemToBeSelected.component) {
selectComponent(itemToBeSelected.component, note).catch(console.error)
} else {
@@ -166,16 +184,23 @@ const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
],
)
const handleSuperNoteConversionCompletion = useCallback(() => {
if (!pendingSuperItem || !note) {
const handleConversionCompletion = useCallback(() => {
if (!pendingConversionItem || !note) {
return
}
selectNonComponent(pendingSuperItem, note).catch(console.error)
closeMenu()
}, [note, pendingSuperItem, selectNonComponent, closeMenu])
if (pendingConversionItem.component) {
selectComponent(pendingConversionItem.component, note).catch(console.error)
closeMenu()
return
}
const closeSuperNoteImporter = () => setShowSuperImporter(false)
selectNonComponent(pendingConversionItem, note).catch(console.error)
closeMenu()
}, [pendingConversionItem, note, selectNonComponent, closeMenu, selectComponent])
const closeSuperNoteImporter = () => setPendingConversionItem(null)
const closeSuperNoteConverter = () => setPendingConversionItem(null)
return (
<>
@@ -223,16 +248,26 @@ const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
)
})}
</Menu>
<ModalOverlay isOpen={showSuperImporter}>
<ModalOverlay isOpen={showSuperNoteImporter}>
{note && (
<SuperNoteImporter
note={note}
application={application}
onConvertComplete={handleSuperNoteConversionCompletion}
onComplete={handleConversionCompletion}
closeDialog={closeSuperNoteImporter}
/>
)}
</ModalOverlay>
<ModalOverlay isOpen={showSuperNoteConverter}>
{note && pendingConversionItem && (
<SuperNoteConverter
note={note}
convertTo={pendingConversionItem}
closeDialog={closeSuperNoteConverter}
onComplete={handleConversionCompletion}
/>
)}
</ModalOverlay>
</>
)
}
@@ -185,7 +185,7 @@ const ChangeMultipleMenu = ({ application, notes, setDisableClickOutside }: Prop
<SuperNoteImporter
note={confirmationQueue[0]}
application={application}
onConvertComplete={handleSuperNoteConversionCompletion}
onComplete={handleSuperNoteConversionCompletion}
closeDialog={closeCurrentSuperNoteImporter}
/>
)}
@@ -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>
@@ -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}
@@ -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 { 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 { VisuallyHidden } from '@ariakit/react'
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
@@ -1,38 +0,0 @@
import { ListboxOption } from '@reach/listbox'
import styled from 'styled-components'
const StyledListboxOption = styled(ListboxOption)`
&[data-reach-listbox-option] {
align-items: center;
background-color: transparent;
border: none;
color: var(--sn-stylekit-contrast-foreground-color);
cursor: pointer;
display: flex;
font-size: 0.875rem;
padding-bottom: 0.375rem;
padding-left: 0.75rem;
padding-right: 0.75rem;
padding-top: 0.375rem;
text-align: left;
width: 100%;
&[data-current-selected] {
color: var(--sn-stylekit-info-color);
background-color: var(--sn-stylekit-info-backdrop-color);
}
&:hover {
background-color: var(--sn-stylekit-contrast-background-color);
color: var(--sn-stylekit-foreground-color);
}
&:focus {
background-color: var(--sn-stylekit-info-backdrop-color);
box-shadow: none;
outline: none;
}
}
`
export default StyledListboxOption
@@ -1,6 +1,7 @@
import { FilesController } from '@/Controllers/FilesController'
import { NoPreviewIllustration } from '@standardnotes/icons'
import { FileItem } from '@standardnotes/snjs'
import { FileItemActionType } from '../AttachedFilesPopover/PopoverFileItemAction'
import Button from '../Button/Button'
type Props = {
@@ -32,7 +33,14 @@ const FilePreviewError = ({ file, filesController, isFilePreviewable, tryAgainCa
</Button>
<Button
onClick={() => {
filesController.downloadFile(file).catch(console.error)
filesController
.handleFileAction({
type: FileItemActionType.DownloadFile,
payload: {
file,
},
})
.catch(console.error)
}}
>
Download
@@ -47,7 +55,12 @@ const FilePreviewError = ({ file, filesController, isFilePreviewable, tryAgainCa
<Button
primary
onClick={() => {
filesController.downloadFile(file).catch(console.error)
filesController
.handleFileAction({
type: FileItemActionType.DownloadFile,
payload: { file },
})
.catch(console.error)
}}
>
Download
@@ -14,19 +14,10 @@ type Props = {
platform: Platform
useIconGrid?: boolean
iconGridClassName?: string
portalDropdown?: boolean
className?: string
}
const IconPicker = ({
selectedValue,
onIconChange,
platform,
className,
useIconGrid,
portalDropdown,
iconGridClassName,
}: Props) => {
const IconPicker = ({ selectedValue, onIconChange, platform, className, useIconGrid, iconGridClassName }: Props) => {
const iconKeys = useMemo(() => Object.keys(IconNameToSvgMapping), [])
const iconOptions = useMemo(
@@ -127,12 +118,10 @@ const IconPicker = ({
) : (
<Dropdown
fullWidth={true}
id="change-tag-icon-dropdown"
label="Change the icon for a tag"
items={iconOptions}
value={selectedValue as string}
onChange={handleIconChange}
portal={portalDropdown}
/>
))}
{currentType === 'emoji' && (
@@ -1,13 +1,10 @@
import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants/Constants'
import { useCloseOnBlur } from '@/Hooks/useCloseOnBlur'
import { doesItemMatchSearchQuery } from '@/Utils/Items/Search/doesItemMatchSearchQuery'
import { Disclosure, DisclosurePanel } from '@reach/disclosure'
import { classNames, ContentType, DecryptedItem, naturalSort } from '@standardnotes/snjs'
import { Combobox, ComboboxItem, ComboboxPopover, useComboboxStore, VisuallyHidden } from '@ariakit/react'
import { ContentType, DecryptedItem, naturalSort } from '@standardnotes/snjs'
import { observer } from 'mobx-react-lite'
import { ChangeEventHandler, FocusEventHandler, useCallback, useEffect, useRef, useState } from 'react'
import { useDeferredValue, useEffect, useState } from 'react'
import { useApplication } from '../ApplicationProvider'
import LinkedItemMeta from '../LinkedItems/LinkedItemMeta'
import Menu from '../Menu/Menu'
type Props = {
contentTypes: ContentType[]
@@ -18,41 +15,11 @@ type Props = {
const ItemSelectionDropdown = ({ contentTypes, placeholder, onSelection }: Props) => {
const application = useApplication()
const [searchQuery, setSearchQuery] = useState('')
const [dropdownVisible, setDropdownVisible] = useState(false)
const [dropdownMaxHeight, setDropdownMaxHeight] = useState<number | 'auto'>('auto')
const containerRef = useRef<HTMLDivElement>(null)
const inputRef = useRef<HTMLInputElement>(null)
const searchResultsMenuRef = useRef<HTMLMenuElement>(null)
const combobox = useComboboxStore()
const value = combobox.useState('value')
const searchQuery = useDeferredValue(value)
const [items, setItems] = useState<DecryptedItem[]>([])
const showDropdown = () => {
const { clientHeight } = document.documentElement
const inputRect = inputRef.current?.getBoundingClientRect()
if (inputRect) {
setDropdownMaxHeight(clientHeight - inputRect.bottom - 32 * 2)
setDropdownVisible(true)
}
}
const [closeOnBlur] = useCloseOnBlur(containerRef, (visible: boolean) => {
setDropdownVisible(visible)
setSearchQuery('')
})
const onBlur: FocusEventHandler = (event) => {
closeOnBlur(event)
}
const onSearchQueryChange: ChangeEventHandler<HTMLInputElement> = (event) => {
setSearchQuery(event.currentTarget.value)
}
const handleFocus = () => {
showDropdown()
}
useEffect(() => {
const searchableItems = naturalSort(application.items.getItems(contentTypes), 'title')
const filteredItems = searchableItems.filter((item) => {
@@ -61,70 +28,38 @@ const ItemSelectionDropdown = ({ contentTypes, placeholder, onSelection }: Props
setItems(filteredItems)
}, [searchQuery, application, contentTypes])
const onSelectItem = useCallback(
(item: DecryptedItem) => {
onSelection(item)
setSearchQuery('')
setDropdownVisible(false)
},
[onSelection],
)
return (
<div className="relative" ref={containerRef}>
<Disclosure open={dropdownVisible} onChange={showDropdown}>
<input
ref={inputRef}
className={classNames(
'mr-10 w-70',
'bg-transparent text-sm text-text focus:border-b-2 focus:border-solid focus:border-info lg:text-xs',
'no-border h-7 focus:shadow-none focus:outline-none',
)}
value={searchQuery}
onChange={onSearchQueryChange}
type="text"
<div>
<label>
<VisuallyHidden>Select an item</VisuallyHidden>
<Combobox
store={combobox}
placeholder={placeholder}
onFocus={handleFocus}
onBlur={onBlur}
autoComplete="off"
className="h-7 w-70 bg-transparent text-sm text-text focus:border-b-2 focus:border-info focus:shadow-none focus:outline-none lg:text-xs"
/>
{dropdownVisible && (
<DisclosurePanel
className={classNames(
'mr-10 w-70',
'absolute z-dropdown-menu flex flex-col overflow-y-auto rounded bg-default py-2 shadow-main',
)}
style={{
maxHeight: dropdownMaxHeight,
}}
tabIndex={FOCUSABLE_BUT_NOT_TABBABLE}
onBlur={closeOnBlur}
>
<Menu
isOpen={dropdownVisible}
a11yLabel="Tag search results"
ref={searchResultsMenuRef}
shouldAutoFocus={false}
</label>
<ComboboxPopover
store={combobox}
className="z-dropdown-menu max-h-[var(--popover-available-height)] w-[var(--popover-anchor-width)] overflow-y-auto rounded bg-default py-2 shadow-main"
>
{items.length > 0 ? (
items.map((item) => (
<ComboboxItem
key={item.uuid}
className="flex w-full cursor-pointer items-center justify-between gap-4 overflow-hidden py-2 px-3 hover:bg-contrast hover:text-foreground [&[data-active-item]]:bg-info-backdrop"
hideOnClick
onClick={() => {
combobox.setValue('')
onSelection(item)
}}
>
{items.map((item) => {
return (
<button
key={item.uuid}
className={classNames(
'flex w-full items-center justify-between gap-4 overflow-hidden py-2 px-3 hover:bg-contrast',
'hover:text-foreground focus:bg-info-backdrop',
)}
onClick={() => onSelectItem(item)}
>
<LinkedItemMeta item={item} searchQuery={searchQuery} />
</button>
)
})}
</Menu>
</DisclosurePanel>
<LinkedItemMeta item={item} searchQuery={searchQuery} />
</ComboboxItem>
))
) : (
<div className="px-2">No results found</div>
)}
</Disclosure>
</ComboboxPopover>
</div>
)
}
@@ -1,26 +1,18 @@
import {
ChangeEventHandler,
FocusEventHandler,
FormEventHandler,
KeyboardEventHandler,
useCallback,
useEffect,
useRef,
useState,
} from 'react'
import { Disclosure, DisclosurePanel } from '@reach/disclosure'
import { useCloseOnBlur } from '@/Hooks/useCloseOnBlur'
import { FormEventHandler, KeyboardEventHandler, useDeferredValue, useEffect, useRef } from 'react'
import { observer } from 'mobx-react-lite'
import { classNames } from '@standardnotes/utils'
import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants/Constants'
import LinkedItemSearchResults from './LinkedItemSearchResults'
import { LinkingController } from '@/Controllers/LinkingController'
import { KeyboardKey } from '@standardnotes/ui-services'
import { ElementIds } from '@/Constants/ElementIDs'
import Menu from '../Menu/Menu'
import { getLinkingSearchResults } from '@/Utils/Items/Search/getSearchResults'
import { useApplication } from '../ApplicationProvider'
import { DecryptedItem } from '@standardnotes/snjs'
import { DecryptedItem, SNNote } from '@standardnotes/snjs'
import { Combobox, ComboboxItem, ComboboxPopover, useComboboxStore, VisuallyHidden } from '@ariakit/react'
import LinkedItemMeta from './LinkedItemMeta'
import { LinkedItemSearchResultsAddTagOption } from './LinkedItemSearchResultsAddTagOption'
import { Slot } from '@radix-ui/react-slot'
import Icon from '../Icon/Icon'
import { PremiumFeatureIconName } from '../Icon/PremiumFeatureIcon'
import { KeyboardKey } from '@standardnotes/ui-services'
type Props = {
linkingController: LinkingController
@@ -45,33 +37,13 @@ const ItemLinkAutocompleteInput = ({
const tagsLinkedToItem = getLinkedTagsForItem(item) || []
const [searchQuery, setSearchQuery] = useState('')
const combobox = useComboboxStore()
const value = combobox.useState('value')
const searchQuery = useDeferredValue(value)
const { unlinkedItems, shouldShowCreateTag } = getLinkingSearchResults(searchQuery, application, item)
const [dropdownVisible, setDropdownVisible] = useState(false)
const [dropdownMaxHeight, setDropdownMaxHeight] = useState<number | 'auto'>('auto')
const containerRef = useRef<HTMLDivElement>(null)
const inputRef = useRef<HTMLInputElement>(null)
const searchResultsMenuRef = useRef<HTMLMenuElement>(null)
const [closeOnBlur] = useCloseOnBlur(containerRef, (visible: boolean) => {
setDropdownVisible(visible)
setSearchQuery('')
})
const showDropdown = () => {
const { clientHeight } = document.documentElement
const inputRect = inputRef.current?.getBoundingClientRect()
if (inputRect) {
setDropdownMaxHeight(clientHeight - inputRect.bottom - 32 * 2)
setDropdownVisible(true)
}
}
const onSearchQueryChange: ChangeEventHandler<HTMLInputElement> = (event) => {
setSearchQuery(event.currentTarget.value)
}
const inputRef = useRef<HTMLInputElement | null>(null)
const onFormSubmit: FormEventHandler = async (event) => {
event.preventDefault()
@@ -84,11 +56,6 @@ const ItemLinkAutocompleteInput = ({
if (focusedId !== ElementIds.ItemLinkAutocompleteInput) {
setFocusedId(ElementIds.ItemLinkAutocompleteInput)
}
showDropdown()
}
const onBlur: FocusEventHandler = (event) => {
closeOnBlur(event)
}
const onKeyDown: KeyboardEventHandler = (event) => {
@@ -98,12 +65,6 @@ const ItemLinkAutocompleteInput = ({
focusPreviousItem()
}
break
case KeyboardKey.Down:
if (searchQuery.length > 0) {
event.preventDefault()
searchResultsMenuRef.current?.focus()
}
break
}
}
@@ -113,70 +74,63 @@ const ItemLinkAutocompleteInput = ({
}
}, [focusedId])
const areSearchResultsVisible = dropdownVisible && (unlinkedItems.length > 0 || shouldShowCreateTag)
const handleMenuKeyDown: KeyboardEventHandler<HTMLMenuElement> = useCallback((event) => {
if (event.key === KeyboardKey.Escape) {
inputRef.current?.focus()
}
}, [])
return (
<div ref={containerRef}>
<div>
<form onSubmit={onFormSubmit}>
<Disclosure open={dropdownVisible} onChange={showDropdown}>
<input
ref={inputRef}
<label>
<VisuallyHidden>Link tags, notes or files</VisuallyHidden>
<Combobox
store={combobox}
placeholder="Link tags, notes, files..."
className={classNames(
`${tagsLinkedToItem.length > 0 ? 'w-80' : 'mr-10 w-70'}`,
'bg-transparent text-sm text-text focus:border-b-2 focus:border-solid focus:border-info lg:text-xs',
'no-border h-7 focus:shadow-none focus:outline-none',
'h-7 w-70 bg-transparent text-sm text-text focus:border-b-2 focus:border-info focus:shadow-none focus:outline-none lg:text-xs',
)}
value={searchQuery}
onChange={onSearchQueryChange}
type="text"
placeholder="Link tags, notes, files..."
onBlur={onBlur}
title={hoverLabel}
id={ElementIds.ItemLinkAutocompleteInput}
ref={inputRef}
onFocus={handleFocus}
onKeyDown={onKeyDown}
id={ElementIds.ItemLinkAutocompleteInput}
autoComplete="off"
title={hoverLabel}
aria-label={hoverLabel}
/>
{areSearchResultsVisible && (
<DisclosurePanel
className={classNames(
tagsLinkedToItem.length > 0 ? 'w-80' : 'mr-10 w-70',
'absolute z-dropdown-menu flex flex-col overflow-y-auto rounded bg-default py-2 shadow-main',
)}
style={{
maxHeight: dropdownMaxHeight,
}}
onBlur={closeOnBlur}
tabIndex={FOCUSABLE_BUT_NOT_TABBABLE}
>
<Menu
isOpen={areSearchResultsVisible}
a11yLabel="Unlinked items search results"
onKeyDown={handleMenuKeyDown}
ref={searchResultsMenuRef}
shouldAutoFocus={false}
>
<LinkedItemSearchResults
createAndAddNewTag={createAndAddNewTag}
linkItems={linkItems}
item={item}
results={unlinkedItems}
searchQuery={searchQuery}
shouldShowCreateTag={shouldShowCreateTag}
onClickCallback={() => setSearchQuery('')}
isEntitledToNoteLinking={isEntitledToNoteLinking}
/>
</Menu>
</DisclosurePanel>
</label>
<ComboboxPopover
store={combobox}
className={classNames(
'z-dropdown-menu max-h-[var(--popover-available-height)] w-[var(--popover-anchor-width)] overflow-y-auto rounded bg-default py-2 shadow-main',
unlinkedItems.length === 0 && !shouldShowCreateTag && 'hidden',
)}
</Disclosure>
>
{unlinkedItems.map((result) => {
const cannotLinkItem = !isEntitledToNoteLinking && result instanceof SNNote
return (
<ComboboxItem
key={result.uuid}
className="flex w-full cursor-pointer items-center justify-between gap-4 overflow-hidden py-2 px-3 hover:bg-contrast hover:text-foreground [&[data-active-item]]:bg-info-backdrop"
hideOnClick
onClick={() => {
linkItems(item, result).catch(console.error)
combobox.setValue('')
}}
>
<LinkedItemMeta item={result} searchQuery={searchQuery} />
{cannotLinkItem && <Icon type={PremiumFeatureIconName} className="ml-auto flex-shrink-0 text-info" />}
</ComboboxItem>
)
})}
{shouldShowCreateTag && (
<ComboboxItem
hideOnClick
as={Slot}
onClick={() => {
void createAndAddNewTag(searchQuery)
combobox.setValue('')
}}
>
<LinkedItemSearchResultsAddTagOption searchQuery={searchQuery} />
</ComboboxItem>
)}
</ComboboxPopover>
</form>
</div>
)
@@ -1,4 +1,3 @@
import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants/Constants'
import { FilesController } from '@/Controllers/FilesController'
import { FileItem } from '@standardnotes/snjs'
import { useState } from 'react'
@@ -6,8 +5,8 @@ import { FileItemActionType } from '../AttachedFilesPopover/PopoverFileItemActio
import { FileContextMenuBackupOption } from '../FileContextMenu/FileContextMenuBackupOption'
import Icon from '../Icon/Icon'
import MenuItem from '../Menu/MenuItem'
import MenuSwitchButtonItem from '../Menu/MenuSwitchButtonItem'
import HorizontalSeparator from '../Shared/HorizontalSeparator'
import Switch from '../Switch/Switch'
type Props = {
file: FileItem
@@ -37,9 +36,10 @@ const LinkedFileMenuOptions = ({ file, closeMenu, handleFileAction, setIsRenamin
Preview file
</MenuItem>
<HorizontalSeparator classes="my-1" />
<MenuItem
<MenuSwitchButtonItem
className="justify-between"
onClick={() => {
checked={isFileProtected}
onChange={() => {
handleFileAction({
type: FileItemActionType.ToggleFileProtection,
payload: { file },
@@ -49,12 +49,9 @@ const LinkedFileMenuOptions = ({ file, closeMenu, handleFileAction, setIsRenamin
}).catch(console.error)
}}
>
<span className="flex items-center">
<Icon type="lock" className="mr-2 text-neutral" />
Password protect
</span>
<Switch className="pointer-events-none px-0" tabIndex={FOCUSABLE_BUT_NOT_TABBABLE} checked={isFileProtected} />
</MenuItem>
<Icon type="lock" className="mr-2 text-neutral" />
Password protect
</MenuSwitchButtonItem>
<HorizontalSeparator classes="my-1" />
<MenuItem
onClick={() => {
@@ -1,42 +1,49 @@
import { classNames } from '@standardnotes/utils'
import { ComponentPropsWithoutRef, ForwardedRef, forwardRef } from 'react'
import Icon from '../Icon/Icon'
type Props = {
searchQuery: string
onClickCallback: (searchQuery: string) => void
onClickCallback?: (searchQuery: string) => void
isFocused?: boolean
}
} & ComponentPropsWithoutRef<'button'>
export const LinkedItemSearchResultsAddTagOption = ({ searchQuery, onClickCallback, isFocused }: Props) => {
return (
<button
className={classNames(
'group flex w-full items-center gap-2 overflow-hidden py-2 px-3 hover:bg-contrast hover:text-foreground',
'focus:bg-info-backdrop',
isFocused ? 'bg-contrast bg-info-backdrop text-foreground' : '',
)}
onClick={() => {
onClickCallback(searchQuery)
}}
>
<span className="flex-shrink-0 align-middle text-sm lg:text-xs">Create &amp; add tag</span>{' '}
<span
export const LinkedItemSearchResultsAddTagOption = forwardRef(
({ searchQuery, onClickCallback, isFocused, ...props }: Props, ref: ForwardedRef<HTMLButtonElement>) => {
return (
<button
className={classNames(
'inline-flex min-w-0 items-center gap-1 rounded py-1 pl-1 pr-2 align-middle text-xs ',
'group-hover:bg-info group-hover:text-info-contrast',
isFocused ? 'bg-info text-info-contrast' : 'bg-contrast text-text',
'group flex w-full items-center gap-2 overflow-hidden py-2 px-3 hover:bg-contrast hover:text-foreground',
'focus:bg-info-backdrop [&[data-active-item]]:bg-info-backdrop',
isFocused ? 'bg-info-backdrop text-foreground' : '',
)}
onClick={() => {
if (onClickCallback) {
onClickCallback(searchQuery)
}
}}
ref={ref}
{...props}
>
<Icon
type="hashtag"
<span className="flex-shrink-0 align-middle text-sm lg:text-xs">Create &amp; add tag</span>{' '}
<span
className={classNames(
'flex-shrink-0 group-hover:text-info-contrast',
isFocused ? 'text-info-contrast' : 'text-info',
'inline-flex min-w-0 items-center gap-1 rounded py-1 pl-1 pr-2 align-middle text-xs ',
'group-hover:bg-info group-hover:text-info-contrast',
isFocused ? 'bg-info text-info-contrast' : 'bg-contrast text-text',
)}
size="small"
/>
<span className="min-w-0 overflow-hidden text-ellipsis">{searchQuery}</span>
</span>
</button>
)
}
>
<Icon
type="hashtag"
className={classNames(
'flex-shrink-0 group-hover:text-info-contrast',
isFocused ? 'text-info-contrast' : 'text-info',
)}
size="small"
/>
<span className="min-w-0 overflow-hidden text-ellipsis">{searchQuery}</span>
</span>
</button>
)
},
)
@@ -5,7 +5,6 @@ import { observer } from 'mobx-react-lite'
import { useRef, useCallback } from 'react'
import RoundIconButton from '../Button/RoundIconButton'
import Popover from '../Popover/Popover'
import StyledTooltip from '../StyledTooltip/StyledTooltip'
import LinkedItemsPanel from './LinkedItemsPanel'
type Props = {
@@ -33,9 +32,7 @@ const LinkedItemsButton = ({ linkingController, filesController, onClickPreproce
return (
<>
<StyledTooltip label="Linked items panel">
<RoundIconButton label="Linked items panel" onClick={toggleMenu} ref={buttonRef} icon="link" />
</StyledTooltip>
<RoundIconButton label="Linked items panel" onClick={toggleMenu} ref={buttonRef} icon="link" />
<Popover
title="Linked items"
togglePopover={toggleMenu}
@@ -4,13 +4,12 @@ import { PlatformedKeyboardShortcut } from '@standardnotes/ui-services'
import { ComponentPropsWithoutRef, ForwardedRef, forwardRef, ReactNode } from 'react'
import { KeyboardShortcutIndicator } from '../KeyboardShortcutIndicator/KeyboardShortcutIndicator'
import Switch from '../Switch/Switch'
import { SwitchProps } from '../Switch/SwitchProps'
import MenuListItem from './MenuListItem'
type Props = {
checked: boolean
children: ReactNode
onChange: NonNullable<SwitchProps['onChange']>
onChange: (checked: boolean) => void
shortcut?: PlatformedKeyboardShortcut
} & Omit<ComponentPropsWithoutRef<'button'>, 'onChange'>
@@ -42,7 +41,7 @@ const MenuSwitchButtonItem = forwardRef(
<span className="flex flex-grow items-center">{children}</span>
<div className="flex items-center">
{shortcut && <KeyboardShortcutIndicator className="mr-2" shortcut={shortcut} />}
<Switch disabled={disabled} className="px-0" checked={checked} />
<Switch disabled={disabled} className="pointer-events-none px-0" checked={checked} onChange={onChange} />
</div>
</button>
</MenuListItem>
@@ -6,32 +6,39 @@ import { useModalAnimation } from '../Modal/useModalAnimation'
type Props = {
isOpen: boolean
children: ReactNode
portal?: boolean
}
const ModalOverlay = forwardRef(({ isOpen, children, ...props }: Props, ref: ForwardedRef<HTMLDivElement>) => {
const [isMounted, setElement] = useModalAnimation(isOpen)
const dialog = useDialogStore({
open: isMounted,
})
const ModalOverlay = forwardRef(
({ isOpen, children, portal = true, ...props }: Props, ref: ForwardedRef<HTMLDivElement>) => {
const [isMounted, setElement] = useModalAnimation(isOpen)
const dialog = useDialogStore({
open: isMounted,
})
if (!isMounted) {
return null
}
if (!isMounted) {
return null
}
return (
<Dialog
tabIndex={0}
className="h-full w-full"
backdropProps={{
className: '!z-modal',
}}
ref={mergeRefs([setElement, ref])}
store={dialog}
{...props}
>
{children}
</Dialog>
)
})
return (
<Dialog
tabIndex={0}
className="h-full w-full"
backdropProps={{
className: '!z-modal',
style: {
position: !portal ? 'absolute' : 'fixed',
},
}}
ref={mergeRefs([setElement, ref])}
store={dialog}
portal={portal}
{...props}
>
{children}
</Dialog>
)
},
)
export default ModalOverlay
@@ -47,7 +47,6 @@ const SuperExportModal = ({ exportNotes, close }: Props) => {
We detected your selection includes Super notes. How do you want to export them?
</div>
<Dropdown
id="export-format-dropdown"
label="Super notes export format"
items={[
{ label: 'Keep as Super', value: 'json' },
@@ -61,7 +60,6 @@ const SuperExportModal = ({ exportNotes, close }: Props) => {
value as PrefValue[PrefKey.SuperNoteExportFormat],
)
}}
portal={false}
/>
</div>
<div className="text-passive-0">
@@ -23,8 +23,8 @@ export const usePopoverCloseOnClickOutside = ({
const isAnchorElement = anchorElement ? anchorElement === event.target || anchorElement.contains(target) : false
const closestPopoverId = target.closest('[data-popover]')?.getAttribute('data-popover')
const isDescendantOfChildPopover = closestPopoverId && childPopovers.has(closestPopoverId)
const isPopoverInModal = popoverElement?.closest('[aria-modal="true"]')
const isDescendantOfModal = isPopoverInModal ? false : !!target.closest('[aria-modal="true"]')
const isPopoverInModal = popoverElement?.closest('[data-dialog]')
const isDescendantOfModal = isPopoverInModal ? false : !!target.closest('[data-dialog]')
if (!isDescendantOfMenu && !isAnchorElement && !isDescendantOfChildPopover && !isDescendantOfModal) {
if (!disabled) {
@@ -127,15 +127,11 @@ const Appearance: FunctionComponent<Props> = ({ application }) => {
<Text>Theme to be used for system light mode:</Text>
<div className="mt-2">
<Dropdown
id="auto-light-theme-dropdown"
label="Select the automatic light theme"
items={themeItems}
value={autoLightTheme}
onChange={changeAutoLightTheme}
disabled={!useDeviceSettings}
classNameOverride={{
popover: '!z-modal',
}}
/>
</div>
</div>
@@ -145,15 +141,11 @@ const Appearance: FunctionComponent<Props> = ({ application }) => {
<Text>Theme to be used for system dark mode:</Text>
<div className="mt-2">
<Dropdown
id="auto-dark-theme-dropdown"
label="Select the automatic dark theme"
items={themeItems}
value={autoDarkTheme}
onChange={changeAutoDarkTheme}
disabled={!useDeviceSettings}
classNameOverride={{
popover: '!z-modal',
}}
/>
</div>
</div>
@@ -94,14 +94,10 @@ const EditorDefaults = ({ application }: Props) => {
<Text>Sets the font size in plaintext and Super notes</Text>
<div className="mt-2">
<Dropdown
id="def-font-size"
label="Select the font size for plaintext notes"
items={fontSizeDropdownOptions}
value={fontSize}
onChange={handleFontSizeChange}
classNameOverride={{
popover: '!z-modal',
}}
/>
</div>
</div>
@@ -111,14 +107,10 @@ const EditorDefaults = ({ application }: Props) => {
<Text>Sets the line height (leading) in plaintext and Super notes</Text>
<div className="mt-2">
<Dropdown
id="def-line-height"
label="Select the line height for plaintext notes"
items={lineHeightDropdownOptions}
value={lineHeight}
onChange={handleLineHeightChange}
classNameOverride={{
popover: '!z-modal',
}}
/>
</div>
</div>
@@ -125,14 +125,10 @@ const EmailBackups = ({ application }: Props) => {
<Spinner className="h-4 w-4" />
) : (
<Dropdown
id="def-editor-dropdown"
label="Select email frequency"
items={emailFrequencyOptions}
value={emailFrequency}
onChange={handleEmailFrequencyChange}
classNameOverride={{
popover: '!z-modal',
}}
/>
)}
</div>
@@ -131,7 +131,6 @@ const EditSmartViewModal = ({ controller, platform }: Props) => {
}}
platform={platform}
useIconGrid={true}
portalDropdown={false}
/>
</div>
</Popover>
@@ -1,65 +1,21 @@
import Icon from '@/Components/Icon/Icon'
import { Disclosure, DisclosureButton, DisclosurePanel } from '@reach/disclosure'
import { FunctionComponent, useState, useRef, useEffect, MouseEventHandler } from 'react'
import { IconType } from '@standardnotes/snjs'
import { Hovercard, HovercardAnchor, useHovercardStore } from '@ariakit/react'
type Props = {
className?: string
icon: IconType
onMouseEnter?: MouseEventHandler<HTMLButtonElement>
onMouseLeave?: MouseEventHandler<HTMLButtonElement>
}
const DisclosureIconButton: FunctionComponent<Props> = ({ className = '', icon, onMouseEnter, onMouseLeave }) => (
<DisclosureButton
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
className={`no-border cursor-pointer bg-transparent p-0 hover:brightness-125 ${className ?? ''}`}
>
<Icon type={icon} />
</DisclosureButton>
)
/**
* AuthAppInfoPopup is an info icon that shows a tooltip when clicked
* Tooltip is dismissible by clicking outside
*
* Note: it can be generalized but more use cases are required
* @returns
*/
const AuthAppInfoTooltip: FunctionComponent = () => {
const [isClicked, setClicked] = useState(false)
const [isHover, setHover] = useState(false)
const ref = useRef(null)
useEffect(() => {
const dismiss = () => setClicked(false)
document.addEventListener('mousedown', dismiss)
return () => {
document.removeEventListener('mousedown', dismiss)
}
}, [ref])
const AuthAppInfoTooltip = () => {
const infoHovercard = useHovercardStore({
showTimeout: 100,
})
return (
<Disclosure open={isClicked || isHover} onChange={() => setClicked(!isClicked)}>
<div className="relative">
<DisclosureIconButton
icon="info"
className="mt-1"
onMouseEnter={() => setHover(true)}
onMouseLeave={() => setHover(false)}
/>
<DisclosurePanel>
<div
className={`bg-inverted-default text-inverted-default shadow-overlay w-103 -left-51
absolute -top-10 rounded py-1.5 px-2 text-center`}
>
Some apps, like Google Authenticator, do not back up and restore your secret keys if you lose your device or
get a new one.
</div>
</DisclosurePanel>
</div>
</Disclosure>
<>
<HovercardAnchor store={infoHovercard}>
<Icon type="info" />
</HovercardAnchor>
<Hovercard store={infoHovercard} className=" max-w-76 rounded border border-border bg-default py-2 px-3 text-sm">
Some apps, like Google Authenticator, do not back up and restore your secret keys if you lose your device or get
a new one.
</Hovercard>
</>
)
}

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