You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
committed by
GitHub
parent
3bda77d504
commit
5c7dcf0117
@ -10,7 +10,7 @@ import Tag from './Tag';
|
||||
|
||||
const { sprintf } = require('sprintf-js');
|
||||
import Resource from './Resource';
|
||||
const { pregQuote } = require('../string-utils.js');
|
||||
const { pregQuote, substrWithEllipsis } = require('../string-utils.js');
|
||||
const { _ } = require('../locale');
|
||||
const ArrayUtils = require('../ArrayUtils.js');
|
||||
const lodash = require('lodash');
|
||||
@ -731,6 +731,18 @@ export default class Note extends BaseItem {
|
||||
}
|
||||
}
|
||||
|
||||
static async deleteMessage(noteIds: string[]): Promise<string|null> {
|
||||
let msg = '';
|
||||
if (noteIds.length === 1) {
|
||||
const note = await Note.load(noteIds[0]);
|
||||
if (!note) return null;
|
||||
msg = _('Delete note "%s"?', substrWithEllipsis(note.title, 0, 32));
|
||||
} else {
|
||||
msg = _('Delete these %d notes?', noteIds.length);
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
||||
static dueNotes() {
|
||||
return this.modelSelectAll('SELECT id, title, body, is_todo, todo_due, todo_completed, is_conflict FROM notes WHERE is_conflict = 0 AND is_todo = 1 AND todo_completed = 0 AND todo_due > ?', [time.unixMs()]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user