Compare commits

...
Author SHA1 Message Date
StandardNotes CI 681f717072 chore(release): publish
- @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected].3
2023-04-26 14:25:15 +00:00
Mo af84d09b7a chore(snjs): remove cloudlink 2023-04-26 08:50:46 -05:00
Aman Harwara ccac1494c2 chore: revert labs changes 2023-04-26 19:05:52 +05:30
Aman Harwara 51b2d8b115 Merge branch 'main' of github.com:standardnotes/app 2023-04-26 19:02:28 +05:30
Aman Harwara d501ae4410 chore: preferences changes 2023-04-26 19:02:19 +05:30
StandardNotes CI ac73dba1db chore(release): publish
- @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].2
2023-04-26 13:29:50 +00:00
Aman Harwara 157ad0b052 Merge branch 'main' of github.com:standardnotes/app 2023-04-26 18:29:16 +05:30
Aman Harwara e79c4ceea4 chore: fix dropdown z-index 2023-04-26 18:29:08 +05:30
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
50 changed files with 517 additions and 587 deletions
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.26.4](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.3](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.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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api",
"version": "1.26.1",
"version": "1.26.4",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.0.24](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.23](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.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 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/clipper",
"description": "Web clipper browser extension for Standard Notes",
"version": "1.0.20",
"version": "1.0.24",
"private": true,
"scripts": {
"build-mv2": "yarn clean && webpack --config ./webpack.config.prod.js",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.105.73](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.72](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.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
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/desktop",
"main": "./app/dist/index.js",
"version": "3.105.69",
"version": "3.105.73",
"license": "AGPL-3.0-or-later",
"author": "Standard Notes.",
"private": true,
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.21.32](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.31](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.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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/encryption",
"version": "1.21.29",
"version": "1.21.32",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.59.3](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.2](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.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.3",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -1,9 +1,5 @@
export enum FeatureIdentifier {
CloudLink = 'org.standardnotes.cloudlink',
DailyDropboxBackup = 'org.standardnotes.daily-dropbox-backup',
DailyEmailBackup = 'org.standardnotes.daily-email-backup',
DailyGDriveBackup = 'org.standardnotes.daily-gdrive-backup',
DailyOneDriveBackup = 'org.standardnotes.daily-onedrive-backup',
Files = 'org.standardnotes.files',
FilesLowStorageTier = 'org.standardnotes.files-low-storage-tier',
FilesMaximumStorageTier = 'org.standardnotes.files-max-storage-tier',
@@ -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,
@@ -42,21 +41,6 @@ export function serverFeatures(): ServerFeatureDescription[] {
identifier: FeatureIdentifier.SignInAlerts,
permission_name: PermissionName.SignInAlerts,
},
{
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
identifier: FeatureIdentifier.DailyDropboxBackup,
permission_name: PermissionName.DailyDropboxBackup,
},
{
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
identifier: FeatureIdentifier.DailyGDriveBackup,
permission_name: PermissionName.DailyGDriveBackup,
},
{
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
identifier: FeatureIdentifier.DailyOneDriveBackup,
permission_name: PermissionName.DailyOneDriveBackup,
},
{
availableInSubscriptions: [SubscriptionName.ProPlan],
identifier: FeatureIdentifier.FilesMaximumStorageTier,
@@ -2,14 +2,10 @@ export enum PermissionName {
AccountSwitcher = 'app:account-switcher',
AutobiographyTheme = 'theme:autobiography',
BoldEditor = 'editor:bold',
CloudLink = 'component:cloud-link',
CodeEditor = 'editor:code-editor',
ComponentFilesafe = 'component:filesafe',
ComponentFolders = 'component:folders',
DailyDropboxBackup = 'server:daily-dropbox-backup',
DailyEmailBackup = 'server:daily-email-backup',
DailyGDriveBackup = 'server:daily-gdrive-backup',
DailyOneDriveBackup = 'server:daily-onedrive-backup',
Files = 'app:files',
FilesMaximumStorageTier = 'server:files-max-storage-tier',
FilesLowStorageTier = 'server:files-low-storage-tier',
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.37](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.36](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.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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/filepicker",
"version": "1.28.34",
"version": "1.28.37",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.14.47](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.46](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.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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files",
"version": "1.14.44",
"version": "1.14.47",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.52.20](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.19](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.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
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.52.16",
"version": "3.52.20",
"author": "Standard Notes.",
"private": true,
"license": "AGPL-3.0-or-later",
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.44.3](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.2](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.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
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/models",
"version": "1.44.0",
"version": "1.44.3",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.251](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.250](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.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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/releases",
"version": "1.4.247",
"version": "1.4.251",
"license": "AGPL-3.0-or-later",
"main": "dist/releases.json",
"types": "dist/index.d.ts",
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.13.21](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.20](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.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.21",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.58.5](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.4](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.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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/services",
"version": "1.58.2",
"version": "1.58.5",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.167.5](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.4](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.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
@@ -29,7 +29,6 @@ import * as Models from '@standardnotes/models'
import * as Responses from '@standardnotes/responses'
import * as InternalServices from '../Services'
import * as Utils from '@standardnotes/utils'
import * as Settings from '@standardnotes/settings'
import { Subscription } from '@standardnotes/security'
import { UuidString, ApplicationEventPayload } from '../Types'
import { applicationEventForSyncEvent } from '@Lib/Application/Event'
@@ -1154,10 +1153,6 @@ export class SNApplication implements ApplicationInterface, AppGroupManagedAppli
return this.apiService.isThirdPartyHostUsed()
}
public getCloudProviderIntegrationUrl(cloudProviderName: Settings.CloudProvider): string {
return this.settingsService.getCloudProviderIntegrationUrl(cloudProviderName)
}
private constructServices() {
this.createMappers()
this.createPayloadManager()
@@ -1,8 +1,7 @@
import { SNApiService } from '../Api/ApiService'
import { SettingsGateway } from './SettingsGateway'
import { SNSessionManager } from '../Session/SessionManager'
import { CloudProvider, EmailBackupFrequency, SettingName } from '@standardnotes/settings'
import { ExtensionsServerURL } from '@Lib/Hosts'
import { EmailBackupFrequency, SettingName } from '@standardnotes/settings'
import { AbstractService, InternalEventBusInterface } from '@standardnotes/services'
import { SettingsClientInterface } from './SettingsClientInterface'
@@ -14,12 +13,6 @@ export class SNSettingsService extends AbstractService implements SettingsClient
[EmailBackupFrequency.Weekly]: 'Weekly',
}
private cloudProviderIntegrationUrlEndpoints = {
[CloudProvider.Dropbox]: 'dropbox',
[CloudProvider.Google]: 'gdrive',
[CloudProvider.OneDrive]: 'onedrive',
}
constructor(
private readonly sessionManager: SNSessionManager,
private readonly apiService: SNApiService,
@@ -60,11 +53,6 @@ export class SNSettingsService extends AbstractService implements SettingsClient
return this.frequencyOptionsLabels[frequency]
}
getCloudProviderIntegrationUrl(cloudProviderName: CloudProvider): string {
const { Prod } = ExtensionsServerURL
return `${Prod}/${this.cloudProviderIntegrationUrlEndpoints[cloudProviderName]}?redirect_url=${Prod}/components/cloudlink?`
}
override deinit(): void {
this.provider?.deinit()
;(this.provider as unknown) = undefined
@@ -1,13 +1,9 @@
import { SettingData } from '@standardnotes/responses'
import {
OneDriveBackupFrequency,
MuteSignInEmailsOption,
MuteFailedCloudBackupsEmailsOption,
MuteFailedBackupsEmailsOption,
CloudProvider,
DropboxBackupFrequency,
EmailBackupFrequency,
GoogleDriveBackupFrequency,
ListedAuthorSecretsData,
LogSessionUserAgentOption,
SettingName,
@@ -15,17 +11,13 @@ import {
} from '@standardnotes/settings'
type SettingType =
| CloudProvider
| DropboxBackupFrequency
| EmailBackupFrequency
| GoogleDriveBackupFrequency
| ListedAuthorSecretsData
| LogSessionUserAgentOption
| MuteFailedBackupsEmailsOption
| MuteFailedCloudBackupsEmailsOption
| MuteSignInEmailsOption
| MuteMarketingEmailsOption
| OneDriveBackupFrequency
export class SettingsList {
private map: Partial<Record<string, SettingData>> = {}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/snjs",
"version": "2.167.2",
"version": "2.167.5",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.25.5](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.4](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.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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/ui-services",
"version": "1.25.2",
"version": "1.25.5",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -10,7 +10,6 @@ const PREFERENCE_IDS = [
'get-free-month',
'help-feedback',
'whats-new',
'filesend',
] as const
export type PreferenceId = typeof PREFERENCE_IDS[number]
+19 -3
View File
@@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.153.3](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.2](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.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
@@ -17,9 +35,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
# [3.152.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)
### Features
* **clipper:** Added default tag setting to clipper ([2ce2b84](https://github.com/standardnotes/app/commit/2ce2b8410f5053f77d02b93dbb80aad5f33c728c))
**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)
+49 -5
View File
@@ -1,5 +1,52 @@
{
"versions": [
{
"version": "3.153.3",
"title": "[3.153.3](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.2",
"title": "[3.153.2](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.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)",
@@ -37,13 +84,10 @@
"version": "3.152.0",
"title": "[3.152.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-04-24)",
"date": null,
"body": "### Features\n\n* **clipper:** Added default tag setting to clipper ([2ce2b84](https://github.com/standardnotes/app/commit/2ce2b8410f5053f77d02b93dbb80aad5f33c728c))",
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"clipper: Added default tag setting to clipper (2ce2b84)"
],
"Features": [
"clipper: Added default tag setting to clipper (2ce2b84)"
"Note: Version bump only for package @standardnotes/web"
]
}
},
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/web",
"version": "3.152.3",
"version": "3.153.3",
"license": "AGPL-3.0-or-later",
"main": "dist/app.js",
"author": "Standard Notes.",
@@ -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}
/>
)}
@@ -29,6 +29,13 @@ type DropdownProps = {
const Dropdown = ({ label, value, onChange, items, disabled, fullWidth, classNameOverride = {} }: DropdownProps) => {
const select = useSelectStore({
defaultValue: value,
renderCallback(props) {
const { popoverElement, defaultRenderCallback } = props
defaultRenderCallback()
if (popoverElement) {
popoverElement.style.zIndex = 'var(--z-index-dropdown-menu)'
}
},
})
const selectedValue = select.useState('value')
@@ -2,7 +2,6 @@ import { WebApplication } from '@/Application/Application'
import { ViewControllerManager } from '@/Controllers/ViewControllerManager'
import { FunctionComponent } from 'react'
import PreferencesPane from '@/Components/Preferences/PreferencesComponents/PreferencesPane'
import CloudLink from './CloudBackups/CloudBackups'
import DataBackups from './DataBackups'
import EmailBackups from './EmailBackups'
import FileBackupsCrossPlatform from './Files/FileBackupsCrossPlatform'
@@ -19,7 +18,6 @@ const Backups: FunctionComponent<Props> = ({ application, viewControllerManager
<DataBackups application={application} viewControllerManager={viewControllerManager} />
<FileBackupsCrossPlatform application={application} />
<EmailBackups application={application} />
<CloudLink application={application} />
</PreferencesPane>
)
}
@@ -1,220 +0,0 @@
import {
useCallback,
useEffect,
useState,
FunctionComponent,
KeyboardEventHandler,
ChangeEventHandler,
MouseEventHandler,
} from 'react'
import {
ButtonType,
SettingName,
CloudProvider,
DropboxBackupFrequency,
GoogleDriveBackupFrequency,
OneDriveBackupFrequency,
} from '@standardnotes/snjs'
import { WebApplication } from '@/Application/Application'
import Button from '@/Components/Button/Button'
import { openInNewTab } from '@/Utils'
import { Subtitle } from '@/Components/Preferences/PreferencesComponents/Content'
import { KeyboardKey } from '@standardnotes/ui-services'
type Props = {
application: WebApplication
providerName: CloudProvider
isEntitledToCloudBackups: boolean
}
const CloudBackupProvider: FunctionComponent<Props> = ({ application, providerName, isEntitledToCloudBackups }) => {
const [authBegan, setAuthBegan] = useState(false)
const [successfullyInstalled, setSuccessfullyInstalled] = useState(false)
const [backupFrequency, setBackupFrequency] = useState<string | undefined>(undefined)
const [confirmation, setConfirmation] = useState('')
const disable: MouseEventHandler = async (event) => {
event.stopPropagation()
try {
const shouldDisable = await application.alertService.confirm(
'Are you sure you want to disable this integration?',
'Disable?',
'Disable',
ButtonType.Danger,
'Cancel',
)
if (shouldDisable) {
await application.settings.deleteSetting(backupFrequencySettingName)
await application.settings.deleteSetting(backupTokenSettingName)
setBackupFrequency(undefined)
}
} catch (error) {
application.alertService.alert(error as string).catch(console.error)
}
}
const installIntegration: MouseEventHandler = (event) => {
if (!isEntitledToCloudBackups) {
return
}
event.stopPropagation()
const authUrl = application.getCloudProviderIntegrationUrl(providerName)
openInNewTab(authUrl)
setAuthBegan(true)
}
const performBackupNow = async () => {
// A backup is performed anytime the setting is updated with the integration token, so just update it here
try {
await application.settings.updateSetting(backupFrequencySettingName, backupFrequency as string)
void application.alertService.alert(
'A backup has been triggered for this provider. Please allow a couple minutes for your backup to be processed.',
)
} catch (err) {
application.alertService
.alert('There was an error while trying to trigger a backup for this provider. Please try again.')
.catch(console.error)
}
}
const backupSettingsData = {
[CloudProvider.Dropbox]: {
backupTokenSettingName: SettingName.create(SettingName.NAMES.DropboxBackupToken).getValue(),
backupFrequencySettingName: SettingName.create(SettingName.NAMES.DropboxBackupFrequency).getValue(),
defaultBackupFrequency: DropboxBackupFrequency.Daily,
},
[CloudProvider.Google]: {
backupTokenSettingName: SettingName.create(SettingName.NAMES.GoogleDriveBackupToken).getValue(),
backupFrequencySettingName: SettingName.create(SettingName.NAMES.GoogleDriveBackupFrequency).getValue(),
defaultBackupFrequency: GoogleDriveBackupFrequency.Daily,
},
[CloudProvider.OneDrive]: {
backupTokenSettingName: SettingName.create(SettingName.NAMES.OneDriveBackupToken).getValue(),
backupFrequencySettingName: SettingName.create(SettingName.NAMES.OneDriveBackupFrequency).getValue(),
defaultBackupFrequency: OneDriveBackupFrequency.Daily,
},
}
const { backupTokenSettingName, backupFrequencySettingName, defaultBackupFrequency } =
backupSettingsData[providerName]
const getCloudProviderIntegrationTokenFromUrl = (url: URL) => {
const urlSearchParams = new URLSearchParams(url.search)
let integrationTokenKeyInUrl = ''
switch (providerName) {
case CloudProvider.Dropbox:
integrationTokenKeyInUrl = 'dbt'
break
case CloudProvider.Google:
integrationTokenKeyInUrl = 'key'
break
case CloudProvider.OneDrive:
integrationTokenKeyInUrl = 'key'
break
default:
throw new Error('Invalid Cloud Provider name')
}
return urlSearchParams.get(integrationTokenKeyInUrl)
}
const handleKeyPress: KeyboardEventHandler = async (event) => {
if (event.key === KeyboardKey.Enter) {
try {
const decryptedCode = atob(confirmation)
const urlFromDecryptedCode = new URL(decryptedCode)
const cloudProviderToken = getCloudProviderIntegrationTokenFromUrl(urlFromDecryptedCode)
if (!cloudProviderToken) {
throw new Error()
}
await application.settings.updateSetting(backupTokenSettingName, cloudProviderToken)
await application.settings.updateSetting(backupFrequencySettingName, defaultBackupFrequency)
setBackupFrequency(defaultBackupFrequency)
setAuthBegan(false)
setSuccessfullyInstalled(true)
setConfirmation('')
await application.alertService.alert(
`${providerName} has been successfully installed. Your first backup has also been queued and should be reflected in your external cloud's folder within the next few minutes.`,
)
} catch (e) {
await application.alertService.alert('Invalid code. Please try again.')
}
}
}
const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {
setConfirmation(event.target.value)
}
const getIntegrationStatus = useCallback(async () => {
if (!application.getUser()) {
return
}
const frequency = await application.settings.getSetting(backupFrequencySettingName)
setBackupFrequency(frequency)
}, [application, backupFrequencySettingName])
useEffect(() => {
getIntegrationStatus().catch(console.error)
}, [getIntegrationStatus])
const isExpanded = authBegan || successfullyInstalled
const shouldShowEnableButton = !backupFrequency && !authBegan
const additionalClass = isEntitledToCloudBackups ? '' : 'opacity-50 cursor-default pointer-events-none'
return (
<div
className={`mr-1 ${isExpanded ? 'expanded' : ' '} ${
shouldShowEnableButton || backupFrequency ? 'flex items-center justify-between' : ''
}`}
>
<div>
<Subtitle className={additionalClass}>{providerName}</Subtitle>
{successfullyInstalled && <p>{providerName} has been successfully enabled.</p>}
</div>
{authBegan && (
<div>
<p className="sk-panel-row">
Complete authentication from the newly opened window. Upon completion, a confirmation code will be
displayed. Enter this code below:
</p>
<div className={'mt-1'}>
<input
className="sk-input sk-base center-text"
placeholder="Enter confirmation code"
value={confirmation}
onKeyPress={handleKeyPress}
onChange={handleChange}
/>
</div>
</div>
)}
{shouldShowEnableButton && (
<div>
<Button
label="Enable"
className={`min-w-40 px-1 text-xs ${additionalClass}`}
onClick={installIntegration}
disabled={!isEntitledToCloudBackups}
/>
</div>
)}
{backupFrequency && (
<div className={'flex flex-col items-end'}>
<Button className={`mb-2 min-w-40 ${additionalClass}`} label="Perform Backup" onClick={performBackupNow} />
<Button className="min-w-40" label="Disable" onClick={disable} />
</div>
)}
</div>
)
}
export default CloudBackupProvider
@@ -1,155 +0,0 @@
import CloudBackupProvider from './CloudBackupProvider'
import { useCallback, useEffect, useState, FunctionComponent, Fragment } from 'react'
import { WebApplication } from '@/Application/Application'
import { Subtitle, Text, Title } from '@/Components/Preferences/PreferencesComponents/Content'
import HorizontalSeparator from '@/Components/Shared/HorizontalSeparator'
import {
FeatureStatus,
FeatureIdentifier,
CloudProvider,
MuteFailedCloudBackupsEmailsOption,
SettingName,
} from '@standardnotes/snjs'
import Switch from '@/Components/Switch/Switch'
import { convertStringifiedBooleanToBoolean } from '@/Utils'
import { STRING_FAILED_TO_UPDATE_USER_SETTING } from '@/Constants/Strings'
import PreferencesGroup from '@/Components/Preferences/PreferencesComponents/PreferencesGroup'
import PreferencesSegment from '@/Components/Preferences/PreferencesComponents/PreferencesSegment'
import Spinner from '@/Components/Spinner/Spinner'
const providerData = [{ name: CloudProvider.Dropbox }, { name: CloudProvider.Google }, { name: CloudProvider.OneDrive }]
type Props = {
application: WebApplication
}
const CloudLink: FunctionComponent<Props> = ({ application }) => {
const [isEntitledToCloudBackups, setIsEntitledToCloudBackups] = useState(false)
const [isFailedCloudBackupEmailMuted, setIsFailedCloudBackupEmailMuted] = useState(true)
const [isLoading, setIsLoading] = useState(false)
const additionalClass = isEntitledToCloudBackups ? '' : 'opacity-50 cursor-default pointer-events-none'
const loadIsFailedCloudBackupEmailMutedSetting = useCallback(async () => {
if (!application.getUser()) {
return
}
setIsLoading(true)
try {
const userSettings = await application.settings.listSettings()
setIsFailedCloudBackupEmailMuted(
convertStringifiedBooleanToBoolean(
userSettings.getSettingValue(
SettingName.create(SettingName.NAMES.MuteFailedCloudBackupsEmails).getValue(),
MuteFailedCloudBackupsEmailsOption.NotMuted,
),
),
)
} catch (error) {
console.error(error)
} finally {
setIsLoading(false)
}
}, [application])
useEffect(() => {
const dailyDropboxBackupStatus = application.features.getFeatureStatus(FeatureIdentifier.DailyDropboxBackup)
const dailyGdriveBackupStatus = application.features.getFeatureStatus(FeatureIdentifier.DailyGDriveBackup)
const dailyOneDriveBackupStatus = application.features.getFeatureStatus(FeatureIdentifier.DailyOneDriveBackup)
const isCloudBackupsAllowed = [dailyDropboxBackupStatus, dailyGdriveBackupStatus, dailyOneDriveBackupStatus].every(
(status) => status === FeatureStatus.Entitled,
)
setIsEntitledToCloudBackups(isCloudBackupsAllowed)
loadIsFailedCloudBackupEmailMutedSetting().catch(console.error)
}, [application, loadIsFailedCloudBackupEmailMutedSetting])
const updateSetting = async (settingName: SettingName, payload: string): Promise<boolean> => {
try {
await application.settings.updateSetting(settingName, payload)
return true
} catch (e) {
application.alertService.alert(STRING_FAILED_TO_UPDATE_USER_SETTING).catch(console.error)
return false
}
}
const toggleMuteFailedCloudBackupEmails = async () => {
if (!isEntitledToCloudBackups) {
return
}
const previousValue = isFailedCloudBackupEmailMuted
setIsFailedCloudBackupEmailMuted(!isFailedCloudBackupEmailMuted)
const updateResult = await updateSetting(
SettingName.create(SettingName.NAMES.MuteFailedCloudBackupsEmails).getValue(),
`${!isFailedCloudBackupEmailMuted}`,
)
if (!updateResult) {
setIsFailedCloudBackupEmailMuted(previousValue)
}
}
return (
<PreferencesGroup>
<PreferencesSegment>
<Title>Cloud Backups</Title>
{!isEntitledToCloudBackups && (
<>
<Text>
A <span className={'font-bold'}>Plus</span> or <span className={'font-bold'}>Pro</span> subscription plan
is required to enable Cloud Backups.{' '}
<a target="_blank" href="https://standardnotes.com/features">
Learn more
</a>
.
</Text>
<HorizontalSeparator classes="mt-3 mb-3" />
</>
)}
<div>
<Text className={additionalClass}>
Configure the integrations below to enable automatic daily backups of your encrypted data set to your
third-party cloud provider.
</Text>
<div>
<HorizontalSeparator classes={`mt-3 mb-3 ${additionalClass}`} />
<div>
{providerData.map(({ name }) => (
<Fragment key={name}>
<CloudBackupProvider
application={application}
providerName={name}
isEntitledToCloudBackups={isEntitledToCloudBackups}
/>
<HorizontalSeparator classes={`mt-3 mb-3 ${additionalClass}`} />
</Fragment>
))}
</div>
</div>
<div className={additionalClass}>
<Subtitle>Email preferences</Subtitle>
<div className="mt-1 flex items-center justify-between">
<div className="flex flex-col">
<Text>Receive a notification email if a cloud backup fails.</Text>
</div>
{isLoading ? (
<Spinner className="h-4 w-4" />
) : (
<Switch
onChange={toggleMuteFailedCloudBackupEmails}
checked={!isFailedCloudBackupEmailMuted}
disabled={!isEntitledToCloudBackups}
/>
)}
</div>
</div>
</div>
</PreferencesSegment>
</PreferencesGroup>
)
}
export default CloudLink
@@ -1,81 +0,0 @@
import { FunctionComponent } from 'react'
import { Title, Subtitle, Text, LinkButton } from '@/Components/Preferences/PreferencesComponents/Content'
import PreferencesPane from '../PreferencesComponents/PreferencesPane'
import PreferencesGroup from '../PreferencesComponents/PreferencesGroup'
import PreferencesSegment from '../PreferencesComponents/PreferencesSegment'
const CloudLink: FunctionComponent = () => (
<PreferencesPane>
<PreferencesGroup>
<PreferencesSegment>
<Title>Frequently asked questions</Title>
<div className="h-2 w-full" />
<Subtitle>Who can read my private notes?</Subtitle>
<Text>
Quite simply: no one but you. Not us, not your ISP, not a hacker, and not a government agency. As long as you
keep your password safe, and your password is reasonably strong, then you are the only person in the world
with the ability to decrypt your notes. For more on how we handle your privacy and security, check out our
easy to read{' '}
<a target="_blank" href="https://standardnotes.com/privacy">
Privacy Manifesto.
</a>
</Text>
</PreferencesSegment>
<PreferencesSegment>
<Subtitle>Can I collaborate with others on a note?</Subtitle>
<Text>
Because of our encrypted architecture, Standard Notes does not currently provide a real-time collaboration
solution. Multiple users can share the same account however, but editing at the same time may result in sync
conflicts, which may result in the duplication of notes.
</Text>
</PreferencesSegment>
<PreferencesSegment>
<Subtitle>Can I use Standard Notes totally offline?</Subtitle>
<Text>
Standard Notes can be used totally offline without an account, and without an internet connection. You can
find{' '}
<a target="_blank" href="https://standardnotes.com/help/59/can-i-use-standard-notes-totally-offline">
more details here.
</a>
</Text>
</PreferencesSegment>
<PreferencesSegment>
<Subtitle>Cant find your question here?</Subtitle>
<LinkButton className="mt-3" label="Open FAQ" link="https://standardnotes.com/help" />
</PreferencesSegment>
</PreferencesGroup>
<PreferencesGroup>
<PreferencesSegment>
<Title>Community forum</Title>
<Text>
If you have an issue, found a bug or want to suggest a feature, you can browse or post to the forum. Its
recommended for non-account related issues. Please read our{' '}
<a target="_blank" href="https://standardnotes.com/longevity/">
Longevity statement
</a>{' '}
before advocating for a feature request.
</Text>
<LinkButton className="mt-3" label="Go to the forum" link="https://forum.standardnotes.org/" />
</PreferencesSegment>
</PreferencesGroup>
<PreferencesGroup>
<PreferencesSegment>
<Title>Community groups</Title>
<Text>
Want to meet other passionate note-takers and privacy enthusiasts? Want to share your feedback with us? Join
the Standard Notes community groups for discussions on security, themes, editors and more.
</Text>
<LinkButton className="mt-3" link="https://standardnotes.com/discord" label="Join our Discord" />
</PreferencesSegment>
</PreferencesGroup>
<PreferencesGroup>
<PreferencesSegment>
<Title>Account related issue?</Title>
<Text>Send an email to help@standardnotes.com and well sort it out.</Text>
<LinkButton className="mt-3" link="mailto: [email protected]" label="Email us" />
</PreferencesSegment>
</PreferencesGroup>
</PreferencesPane>
)
export default CloudLink
@@ -42,7 +42,6 @@ const READY_PREFERENCES_MENU_ITEMS: PreferencesMenuItem[] = [
{ id: 'appearance', label: 'Appearance', icon: 'themes' },
{ id: 'listed', label: 'Listed', icon: 'listed' },
{ id: 'help-feedback', label: 'Help & feedback', icon: 'help' },
{ id: 'filesend', label: 'FileSend', icon: 'open-in' },
]
export class PreferencesMenu {
@@ -1,12 +1,11 @@
import { observer } from 'mobx-react-lite'
import { FunctionComponent, useCallback, useMemo } from 'react'
import { FunctionComponent, useMemo } from 'react'
import Dropdown from '../Dropdown/Dropdown'
import { DropdownItem } from '../Dropdown/DropdownItem'
import PreferencesMenuItem from './PreferencesComponents/MenuItem'
import { PreferencesMenu } from './PreferencesMenu'
import { PreferenceId } from '@standardnotes/ui-services'
import { useApplication } from '../ApplicationProvider'
import { classNames, Environment } from '@standardnotes/snjs'
import { classNames } from '@standardnotes/snjs'
import { isIOS } from '@/Utils'
type Props = {
@@ -14,35 +13,18 @@ type Props = {
}
const PreferencesMenuView: FunctionComponent<Props> = ({ menu }) => {
const application = useApplication()
const { selectedPaneId, selectPane, menuItems } = menu
const dropdownMenuItems: DropdownItem[] = useMemo(
() =>
menuItems
.filter((pref) => pref.id !== 'filesend')
.map((menuItem) => ({
icon: menuItem.icon,
label: menuItem.label,
value: menuItem.id,
})),
menuItems.map((menuItem) => ({
icon: menuItem.icon,
label: menuItem.label,
value: menuItem.id,
})),
[menuItems],
)
const openFileSend = useCallback(() => {
const link = 'https://filesend.standardnotes.com/'
if (application.isNativeMobileWeb()) {
application.mobileDevice().openUrl(link)
return
} else if (application.environment === Environment.Desktop) {
application.desktopDevice?.openUrl(link)
return
}
window.open(link, '_blank')
}, [application])
return (
<div
className={classNames(
@@ -59,10 +41,6 @@ const PreferencesMenuView: FunctionComponent<Props> = ({ menu }) => {
selected={pref.selected}
hasBubble={pref.hasBubble}
onClick={() => {
if (pref.id === 'filesend') {
openFileSend()
return
}
selectPane(pref.id)
}}
/>
@@ -0,0 +1,177 @@
import { ContentType, NoteContent, NoteType, SNNote, spaceSeparatedStrings } from '@standardnotes/snjs'
import { useCallback, useEffect, useMemo } from 'react'
import { useApplication } from '../ApplicationProvider'
import ComponentView from '../ComponentView/ComponentView'
import Icon from '../Icon/Icon'
import Modal, { ModalAction } from '../Modal/Modal'
import { EditorMenuItem } from '../NotesOptions/EditorMenuItem'
import { NoteViewController } from '../NoteView/Controller/NoteViewController'
import { exportSuperNote } from './SuperNoteExporter'
const SuperNoteConverter = ({
note,
convertTo,
closeDialog,
onComplete,
}: {
note: SNNote
convertTo: EditorMenuItem
closeDialog: () => void
onComplete: () => void
}) => {
const application = useApplication()
const { name, noteType, component } = convertTo
const format = useMemo(() => {
if (component && component.package_info.file_type) {
return component.package_info.file_type
}
if (noteType === NoteType.Markdown) {
return 'md'
}
if (noteType === NoteType.RichText) {
return 'html'
}
if (noteType === NoteType.Plain) {
return 'txt'
}
return 'json'
}, [component, noteType])
const convertedContent = useMemo(() => {
return exportSuperNote(note, format)
}, [format, note])
const componentViewer = useMemo(() => {
if (!component) {
return undefined
}
const templateNoteForRevision = application.mutator.createTemplateItem<NoteContent, SNNote>(ContentType.Note, {
title: note.title,
text: convertedContent,
references: note.references,
})
const componentViewer = application.componentManager.createComponentViewer(component)
componentViewer.setReadonly(true)
componentViewer.lockReadonly = true
componentViewer.overrideContextItem = templateNoteForRevision
return componentViewer
}, [application.componentManager, application.mutator, component, convertedContent, note.references, note.title])
useEffect(() => {
return () => {
if (componentViewer) {
application.componentManager.destroyComponentViewer(componentViewer)
}
}
}, [application.componentManager, componentViewer])
const performConvert = useCallback(
async (text: string) => {
const controller = new NoteViewController(application, note)
await controller.initialize()
await controller.saveAndAwaitLocalPropagation({
text,
isUserModified: true,
bypassDebouncer: true,
})
},
[application, note],
)
const confirmConvert = useCallback(async () => {
await performConvert(convertedContent)
onComplete()
closeDialog()
}, [closeDialog, convertedContent, onComplete, performConvert])
const isSeamlessConvert = note.text.length === 0
useEffect(() => {
if (isSeamlessConvert) {
void confirmConvert()
}
}, [isSeamlessConvert, confirmConvert])
const convertAsIs = useCallback(async () => {
const confirmed = await application.alertService.confirm(
spaceSeparatedStrings(
"This option is useful if you want to edit the note's content which is in Super's JSON format directly.",
'This format is not human-readable. If you want to convert the note to a human-readable format, please use the "Convert" option instead.',
),
'Are you sure?',
)
if (!confirmed) {
return
}
closeDialog()
await performConvert(note.text)
onComplete()
}, [closeDialog, application, note, onComplete, performConvert])
const modalActions = useMemo(
(): ModalAction[] => [
{
label: 'Cancel',
onClick: closeDialog,
type: 'cancel',
mobileSlot: 'left',
},
{
label: 'Convert',
onClick: confirmConvert,
mobileSlot: 'right',
type: 'primary',
},
{
label: 'Convert As-Is',
onClick: convertAsIs,
type: 'secondary',
},
],
[closeDialog, confirmConvert, convertAsIs],
)
return (
<Modal
title={`Convert to ${name}`}
close={closeDialog}
actions={modalActions}
className={{
content: 'md:h-full md:max-h-[90%]',
description: 'flex flex-col !overflow-hidden',
}}
>
{format === 'txt' || format === 'md' ? (
<div className="flex items-start border-b border-border p-4 text-sm">
<Icon type="warning" className="mr-2 flex-shrink-0" />
Conversion from Super's format to Markdown/Plaintext can be lossy. Please review the converted note before
saving.
</div>
) : null}
{componentViewer ? (
<div className="component-view min-h-0">
<ComponentView key={componentViewer.identifier} componentViewer={componentViewer} application={application} />
</div>
) : (
<div className="h-full min-h-0 overflow-hidden">
<textarea
readOnly={true}
className="font-editor h-full w-full resize-none border-0 bg-default p-4 text-editor text-text"
value={convertedContent}
/>
</div>
)}
</Modal>
)
}
export default SuperNoteConverter
@@ -21,6 +21,7 @@ export const exportSuperNote = (note: SNNote, format: 'txt' | 'md' | 'html' | 'j
headlessEditor.update(() => {
switch (format) {
case 'txt':
case 'md':
content = $convertToMarkdownString(MarkdownTransformers)
break
@@ -28,9 +29,6 @@ export const exportSuperNote = (note: SNNote, format: 'txt' | 'md' | 'html' | 'j
content = $generateHtmlFromNodes(headlessEditor)
break
case 'json':
content = JSON.stringify(headlessEditor.toJSON())
break
case 'txt':
default:
content = note.text
break
@@ -15,10 +15,10 @@ type Props = {
application: WebApplication
note: SNNote
closeDialog: () => void
onConvertComplete: () => void
onComplete: () => void
}
export const SuperNoteImporter: FunctionComponent<Props> = ({ note, application, closeDialog, onConvertComplete }) => {
export const SuperNoteImporter: FunctionComponent<Props> = ({ note, application, closeDialog, onComplete }) => {
const isSeamlessConvert = note.text.length === 0
const [lastValue, setLastValue] = useState({ text: '', previewPlain: '' })
@@ -50,8 +50,8 @@ export const SuperNoteImporter: FunctionComponent<Props> = ({ note, application,
await performConvert(lastValue.text, lastValue.previewPlain)
onConvertComplete()
}, [closeDialog, performConvert, onConvertComplete, lastValue])
onComplete()
}, [closeDialog, performConvert, onComplete, lastValue])
useEffect(() => {
if (isSeamlessConvert) {
@@ -76,8 +76,8 @@ export const SuperNoteImporter: FunctionComponent<Props> = ({ note, application,
await performConvert(note.text, note.preview_plain)
onConvertComplete()
}, [closeDialog, application, note, onConvertComplete, performConvert])
onComplete()
}, [closeDialog, application, note, onComplete, performConvert])
const modalActions: ModalAction[] = useMemo(
() => [