You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
All: Fixes #87: Show warningn when deleting notebook that contains notes.
This commit is contained in:
@ -29,7 +29,7 @@ class Command extends BaseCommand {
|
|||||||
|
|
||||||
const folder = await app().loadItem(BaseModel.TYPE_FOLDER, pattern);
|
const folder = await app().loadItem(BaseModel.TYPE_FOLDER, pattern);
|
||||||
if (!folder) throw new Error(_('Cannot find "%s".', pattern));
|
if (!folder) throw new Error(_('Cannot find "%s".', pattern));
|
||||||
const ok = force ? true : await this.prompt(_('Delete notebook "%s"?', folder.title), { booleanAnswerDefault: 'n' });
|
const ok = force ? true : await this.prompt(_('Delete notebook? All notes within this notebook will also be deleted.'), { booleanAnswerDefault: 'n' });
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
|
|
||||||
await Folder.delete(folder.id);
|
await Folder.delete(folder.id);
|
||||||
|
@ -98,7 +98,7 @@ class SideBarComponent extends React.Component {
|
|||||||
|
|
||||||
let deleteMessage = '';
|
let deleteMessage = '';
|
||||||
if (itemType === BaseModel.TYPE_FOLDER) {
|
if (itemType === BaseModel.TYPE_FOLDER) {
|
||||||
deleteMessage = _('Delete notebook?');
|
deleteMessage = _('Delete notebook? All notes within this notebook will also be deleted.');
|
||||||
} else if (itemType === BaseModel.TYPE_TAG) {
|
} else if (itemType === BaseModel.TYPE_TAG) {
|
||||||
deleteMessage = _('Remove this tag from all the notes?');
|
deleteMessage = _('Remove this tag from all the notes?');
|
||||||
} else if (itemType === BaseModel.TYPE_SEARCH) {
|
} else if (itemType === BaseModel.TYPE_SEARCH) {
|
||||||
|
@ -69,7 +69,7 @@ class NotesScreenComponent extends BaseScreenComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
deleteFolder_onPress(folderId) {
|
deleteFolder_onPress(folderId) {
|
||||||
dialogs.confirm(this, _('Delete notebook?')).then((ok) => {
|
dialogs.confirm(this, _('Delete notebook? All notes within this notebook will also be deleted.')).then((ok) => {
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
|
|
||||||
Folder.delete(folderId).then(() => {
|
Folder.delete(folderId).then(() => {
|
||||||
|
Reference in New Issue
Block a user