feat: shortcuts

This commit is contained in:
2025-04-16 13:20:43 +00:00
parent d3145bfc4e
commit e6c21ef04a
10 changed files with 83 additions and 3 deletions

View File

@ -85,6 +85,15 @@ listen('launch-end', () => {
getCurrentWindow().setFocus();
});
const createShortcut = async () => {
const current = prf.current;
if (current !== null) {
await invoke('create_shortcut', {
profileMeta: current.meta,
});
}
};
const menuItems = [
{
label: 'Refresh and start',
@ -96,6 +105,11 @@ const menuItems = [
icon: 'pi pi-exclamation-circle',
command: async () => await startline(true, false),
},
{
label: 'Create shortcut',
icon: 'pi pi-link',
command: createShortcut,
},
];
const menu = ref();