feat: file backups (#1024)

This commit is contained in:
Mo
2022-05-12 18:26:11 -05:00
committed by GitHub
parent b671ecb2b9
commit 942226e15a
20 changed files with 499 additions and 207 deletions

View File

@@ -10,10 +10,10 @@ import {
DecryptedTransferPayload,
ComponentContent,
assert,
DesktopClientRequiresWebMethods,
DesktopDeviceInterface,
} from '@standardnotes/snjs'
import { WebAppEvent, WebApplication } from '@/UIModels/Application'
import { DesktopDeviceInterface } from '../Device/DesktopDeviceInterface'
import { DesktopClientRequiresWebMethods } from '@/Device/DesktopWebCommunication'
export class DesktopManager
extends ApplicationService

View File

@@ -1,30 +0,0 @@
import { removeFromArray } from '@standardnotes/snjs'
type StatusCallback = (string: string) => void
export class StatusManager {
private _message = ''
private observers: StatusCallback[] = []
get message(): string {
return this._message
}
setMessage(message: string) {
this._message = message
this.notifyObservers()
}
onStatusChange(callback: StatusCallback) {
this.observers.push(callback)
return () => {
removeFromArray(this.observers, callback)
}
}
private notifyObservers() {
for (const observer of this.observers) {
observer(this._message)
}
}
}