1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

All: Resolves #483: Add trash folder (#9671)

This commit is contained in:
Laurent Cozic
2024-03-02 14:25:27 +00:00
committed by GitHub
parent 07fbd547dc
commit f19b1c5364
112 changed files with 2322 additions and 966 deletions

View File

@ -0,0 +1,24 @@
import { CommandRuntime, CommandDeclaration } from '@joplin/lib/services/CommandService';
import { _ } from '@joplin/lib/locale';
import emptyTrash from '@joplin/lib/services/trash/emptyTrash';
import bridge from '../services/bridge';
export const declaration: CommandDeclaration = {
name: 'emptyTrash',
label: () => _('Empty trash'),
};
export const runtime = (): CommandRuntime => {
return {
execute: async () => {
const ok = await bridge().showConfirmMessageBox(_('This will permanently delete all items in the trash. Continue?'), {
buttons: [
_('Empty trash'),
_('Cancel'),
],
});
if (ok) await emptyTrash();
},
};
};