Update SNJS
This commit is contained in:
@@ -369,13 +369,13 @@ class EditorCtrl extends PureCtrl {
|
||||
const note = this.state.note;
|
||||
note.dummy = false;
|
||||
if (note.deleted) {
|
||||
this.application.alertManager.alert({
|
||||
this.application.alertService.alert({
|
||||
text: STRING_DELETED_NOTE
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.application.findItem({ uuid: note.uuid })) {
|
||||
this.application.alertManager.alert({
|
||||
this.application.alertService.alert({
|
||||
text: STRING_INVALID_NOTE
|
||||
});
|
||||
return;
|
||||
@@ -520,14 +520,14 @@ class EditorCtrl extends PureCtrl {
|
||||
|
||||
async deleteNote(permanently) {
|
||||
if (this.state.note.dummy) {
|
||||
this.application.alertManager.alert({
|
||||
this.application.alertService.alert({
|
||||
text: STRING_DELETE_PLACEHOLDER_ATTEMPT
|
||||
});
|
||||
return;
|
||||
}
|
||||
const run = () => {
|
||||
if (this.state.note.locked) {
|
||||
this.application.alertManager.alert({
|
||||
this.application.alertService.alert({
|
||||
text: STRING_DELETE_LOCKED_ATTEMPT
|
||||
});
|
||||
return;
|
||||
@@ -539,7 +539,7 @@ class EditorCtrl extends PureCtrl {
|
||||
title: title,
|
||||
permanently: permanently
|
||||
});
|
||||
this.application.alertManager.confirm({
|
||||
this.application.alertService.confirm({
|
||||
text: text,
|
||||
destructive: true,
|
||||
onConfirm: () => {
|
||||
@@ -605,7 +605,7 @@ class EditorCtrl extends PureCtrl {
|
||||
|
||||
emptyTrash() {
|
||||
const count = this.getTrashCount();
|
||||
this.application.alertManager.confirm({
|
||||
this.application.alertService.confirm({
|
||||
text: StringEmptyTrash({ count }),
|
||||
destructive: true,
|
||||
onConfirm: () => {
|
||||
|
||||
@@ -254,7 +254,7 @@ class FooterCtrl extends PureCtrl {
|
||||
this.isRefreshing = false;
|
||||
}, 200);
|
||||
if (response && response.error) {
|
||||
this.application.alertManager.alert({
|
||||
this.application.alertService.alert({
|
||||
text: STRING_GENERIC_SYNC_ERROR
|
||||
});
|
||||
} else {
|
||||
@@ -273,7 +273,7 @@ class FooterCtrl extends PureCtrl {
|
||||
|
||||
clickedNewUpdateAnnouncement() {
|
||||
this.newUpdateAvailable = false;
|
||||
this.application.alertManager.alert({
|
||||
this.application.alertService.alert({
|
||||
text: STRING_NEW_UPDATE_READY
|
||||
});
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class LockScreenCtrl extends PureCtrl {
|
||||
}
|
||||
|
||||
beginDeleteData() {
|
||||
this.application.alertManager.confirm({
|
||||
this.application.alertService.confirm({
|
||||
text: "Are you sure you want to clear all local data?",
|
||||
destructive: true,
|
||||
onConfirm: async () => {
|
||||
|
||||
@@ -85,7 +85,7 @@ class RootCtrl extends PureCtrl {
|
||||
handleChallengeFailures: (responses) => {
|
||||
for (const response of responses) {
|
||||
if (response.challenge === Challenges.LocalPasscode) {
|
||||
this.application.alertManager.alert({
|
||||
this.application.alertService.alert({
|
||||
text: "Invalid passcode. Please try again.",
|
||||
onClose: () => {
|
||||
this.lockScreenPuppet.focusInput();
|
||||
@@ -188,13 +188,13 @@ class RootCtrl extends PureCtrl {
|
||||
// if (!lastShownDate || lastShownSeconds > SHOW_INTERVAL) {
|
||||
// lastShownDate = new Date();
|
||||
// setTimeout(() => {
|
||||
// this.alertManager.alert({
|
||||
// this.alertService.alert({
|
||||
// text: STRING_SESSION_EXPIRED
|
||||
// });
|
||||
// }, 500);
|
||||
// }
|
||||
// } else if (syncEvent === 'sync-exception') {
|
||||
// this.alertManager.alert({
|
||||
// this.alertService.alert({
|
||||
// text: StringSyncException(data)
|
||||
// });
|
||||
// }
|
||||
@@ -247,7 +247,7 @@ class RootCtrl extends PureCtrl {
|
||||
window.addEventListener('drop', (event) => {
|
||||
if (event.dataTransfer.files.length > 0) {
|
||||
event.preventDefault();
|
||||
this.application.alertManager.alert({
|
||||
this.application.alertService.alert({
|
||||
text: STRING_DEFAULT_FILE_ERROR
|
||||
});
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ class TagsPanelCtrl extends PureCtrl {
|
||||
const matchingTag = this.application.findTag({ title: tag.title });
|
||||
const alreadyExists = matchingTag && matchingTag !== tag;
|
||||
if (this.state.newTag === tag && alreadyExists) {
|
||||
this.application.alertManager.alert({
|
||||
this.application.alertService.alert({
|
||||
text: "A tag with this name already exists."
|
||||
});
|
||||
/** @todo Should not be accessing internal function */
|
||||
@@ -257,7 +257,7 @@ class TagsPanelCtrl extends PureCtrl {
|
||||
}
|
||||
|
||||
removeTag(tag) {
|
||||
this.application.alertManager.confirm({
|
||||
this.application.alertService.confirm({
|
||||
text: STRING_DELETE_TAG,
|
||||
destructive: true,
|
||||
onConfirm: () => {
|
||||
|
||||
Reference in New Issue
Block a user