fix: use confirmDialog

This commit is contained in:
Johnny Almonte
2020-08-13 13:10:52 -04:00
parent ef651298e3
commit ee49d80ceb
2 changed files with 19 additions and 13 deletions

View File

@@ -9,6 +9,7 @@ import {
} from 'snjs';
import template from '%/directives/revision-preview-modal.pug';
import { PayloadContent } from '@node_modules/snjs/dist/@types/protocol/payloads/generator';
import { confirmDialog } from '@/services/alertService';
interface RevisionPreviewScope {
uuid: string
@@ -109,9 +110,10 @@ class RevisionPreviewModalCtrl implements RevisionPreviewScope {
};
if (!asCopy) {
this.application.alertService!.confirm(
"Are you sure you want to replace the current note's contents with what you see in this preview?"
).then((confirmed) => {
confirmDialog({
text: "Are you sure you want to replace the current note's contents with what you see in this preview?",
confirmButtonStyle: "danger"
}).then((confirmed) => {
if (confirmed) {
run();
}