diff --git a/app/assets/javascripts/directives/views/historyMenu.ts b/app/assets/javascripts/directives/views/historyMenu.ts index 70e355443..10c7d2769 100644 --- a/app/assets/javascripts/directives/views/historyMenu.ts +++ b/app/assets/javascripts/directives/views/historyMenu.ts @@ -4,8 +4,8 @@ import template from '%/directives/history-menu.pug'; import { SNItem, ItemHistoryEntry } from 'snjs/dist/@types'; import { PureViewCtrl } from '@/views'; import { ItemSessionHistory } from 'snjs/dist/@types/services/history/session/item_session_history'; -import { RemoteHistoryList, RemoteHistoryListEntry } from 'snjs/dist/@types/services/history/history_manager'; -import { confirmDialog } from '@/services/alertService'; +import { RevisionListEntry, SingleRevision } from 'snjs/dist/@types/services/api/responses'; +import { confirmDialog } from '@/services/alertService'; type HistoryState = { fetchingRemoteHistory: boolean @@ -23,7 +23,7 @@ class HistoryMenuCtrl extends PureViewCtrl<{}, HistoryState> implements HistoryS application!: WebApplication item!: SNItem sessionHistory?: ItemSessionHistory - remoteHistory?: RemoteHistoryList + remoteHistory?: RevisionListEntry[] /* @ngInject */ constructor( @@ -72,7 +72,7 @@ class HistoryMenuCtrl extends PureViewCtrl<{}, HistoryState> implements HistoryS ); } - async openRemoteRevision(revision: RemoteHistoryListEntry) { + async openRemoteRevision(revision: RevisionListEntry) { this.fetchingRemoteHistory = true; const remoteRevision = await this.application.historyManager!.fetchRemoteRevision(this.item.uuid, revision); this.fetchingRemoteHistory = false; @@ -169,7 +169,7 @@ class HistoryMenuCtrl extends PureViewCtrl<{}, HistoryState> implements HistoryS }); } - previewRemoteHistoryTitle(revision: RemoteHistoryListEntry) { + previewRemoteHistoryTitle(revision: SingleRevision) { const createdAt = revision.created_at!; return new Date(createdAt).toLocaleString(); } diff --git a/dist/@types/app/assets/javascripts/services/bridge.d.ts b/dist/@types/app/assets/javascripts/services/bridge.d.ts index 785d06418..a61b3f734 100644 --- a/dist/@types/app/assets/javascripts/services/bridge.d.ts +++ b/dist/@types/app/assets/javascripts/services/bridge.d.ts @@ -10,6 +10,7 @@ export interface Bridge { onMajorDataChange(): void; onInitialDataLoad(): void; onSearch(text?: string): void; + downloadBackup(): void; } export declare class BrowserBridge implements Bridge { environment: Environment; @@ -21,4 +22,5 @@ export declare class BrowserBridge implements Bridge { onMajorDataChange(): void; onInitialDataLoad(): void; onSearch(): void; + downloadBackup(): void; } diff --git a/dist/@types/app/assets/javascripts/ui_models/application.d.ts b/dist/@types/app/assets/javascripts/ui_models/application.d.ts index 90d50704b..9a2ca8d54 100644 --- a/dist/@types/app/assets/javascripts/ui_models/application.d.ts +++ b/dist/@types/app/assets/javascripts/ui_models/application.d.ts @@ -21,7 +21,8 @@ declare type WebServices = { keyboardService: KeyboardManager; }; export declare class WebApplication extends SNApplication { - private $compile?; + private $compile; + private bridge; private scope?; private webServices; private currentAuthenticationElement?; diff --git a/package-lock.json b/package-lock.json index 26dd3e41c..67ef20e8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10956,8 +10956,8 @@ "from": "github:standardnotes/sncrypto#8794c88daa967eaae493cd5fdec7506d52b257ad" }, "snjs": { - "version": "github:standardnotes/snjs#3f2136d3c58c04ae2de24b3d0a85cffebcb816f5", - "from": "github:standardnotes/snjs#3f2136d3c58c04ae2de24b3d0a85cffebcb816f5" + "version": "github:standardnotes/snjs#da25bcf251eb0e47eb1ddd26f0488639f10d750a", + "from": "github:standardnotes/snjs#da25bcf251eb0e47eb1ddd26f0488639f10d750a" }, "sockjs": { "version": "0.3.20", diff --git a/package.json b/package.json index 5d039579c..3e63b94e7 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,6 @@ }, "dependencies": { "sncrypto": "github:standardnotes/sncrypto#8794c88daa967eaae493cd5fdec7506d52b257ad", - "snjs": "github:standardnotes/snjs#3f2136d3c58c04ae2de24b3d0a85cffebcb816f5" + "snjs": "github:standardnotes/snjs#da25bcf251eb0e47eb1ddd26f0488639f10d750a" } }