feat: Automatic plaintext backup option in Preferences > Backups will backup your notes and tags into plaintext, unencrypted folders on your computer. In addition, automatic encrypted text backups preference management has moved from the top-level menu in the desktop app to Preferences > Backups. (#2322)

This commit is contained in:
Mo
2023-05-02 11:05:10 -05:00
committed by GitHub
parent 3df23cdb5c
commit 7e3db49322
76 changed files with 1526 additions and 1013 deletions

View File

@@ -1,5 +1,5 @@
import { CrossControllerEvent } from '../CrossControllerEvent'
import { InternalEventBus, InternalEventPublishStrategy, removeFromArray } from '@standardnotes/snjs'
import { InternalEventBusInterface, InternalEventPublishStrategy, removeFromArray } from '@standardnotes/snjs'
import { WebApplication } from '../../Application/Application'
import { Disposer } from '@/Types/Disposer'
@@ -10,7 +10,7 @@ export abstract class AbstractViewController<Event = void, EventData = void> {
protected disposers: Disposer[] = []
private eventObservers: ControllerEventObserver<Event, EventData>[] = []
constructor(public application: WebApplication, protected eventBus: InternalEventBus) {}
constructor(public application: WebApplication, protected eventBus: InternalEventBusInterface) {}
protected async publishCrossControllerEventSync(name: CrossControllerEvent, data?: unknown): Promise<void> {
await this.eventBus.publishSync({ type: name, payload: data }, InternalEventPublishStrategy.SEQUENCE)

View File

@@ -1,5 +1,5 @@
import { addToast, dismissToast, ToastType } from '@standardnotes/toast'
import { ApplicationEvent, InternalEventBus, StorageKey } from '@standardnotes/services'
import { ApplicationEvent, InternalEventBusInterface, StorageKey } from '@standardnotes/services'
import { isDev } from '@/Utils'
import { FileItem, PrefKey, sleep, SNTag } from '@standardnotes/snjs'
import { FilesController } from '../FilesController'
@@ -19,7 +19,11 @@ export class MomentsService extends AbstractViewController {
isEnabled = false
private intervalReference: ReturnType<typeof setInterval> | undefined
constructor(application: WebApplication, private filesController: FilesController, eventBus: InternalEventBus) {
constructor(
application: WebApplication,
private filesController: FilesController,
eventBus: InternalEventBusInterface,
) {
super(application, eventBus)
this.disposers.push(

View File

@@ -4,10 +4,10 @@ import { PreferenceId, RootQueryParam } from '@standardnotes/ui-services'
import { AbstractViewController } from './Abstract/AbstractViewController'
import { WebApplication } from '@/Application/Application'
const DEFAULT_PANE: PreferenceId = 'account'
const DEFAULT_PANE: PreferenceId = 'backups'
export class PreferencesController extends AbstractViewController {
private _open = false
private _open = true
currentPane: PreferenceId = DEFAULT_PANE
constructor(application: WebApplication, eventBus: InternalEventBus) {