wraith/node_modules/@tauri-apps/api/menu/predefinedMenuItem.js
Vantz Stockwell 2848d79915 feat: Phase 1 complete — Tauri v2 foundation
Rust backend: SQLite (WAL mode, 8 tables), vault encryption
(Argon2id + AES-256-GCM), settings/connections/credentials
services, 19 Tauri command wrappers. 46/46 tests passing.

Vue 3 frontend: unlock/create vault flow, Pinia app store,
Tailwind CSS v4 dark theme with Wraith branding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:09:41 -04:00

32 lines
1.0 KiB
JavaScript

import { MenuItemBase, newMenu } from './base.js';
import { invoke } from '../core.js';
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
/** A predefined (native) menu item which has a predefined behavior by the OS or by tauri. */
class PredefinedMenuItem extends MenuItemBase {
/** @ignore */
constructor(rid, id) {
super(rid, id, 'Predefined');
}
/** Create a new predefined menu item. */
static async new(opts) {
return newMenu('Predefined', opts).then(([rid, id]) => new PredefinedMenuItem(rid, id));
}
/** Returns the text of this predefined menu item. */
async text() {
return invoke('plugin:menu|text', { rid: this.rid, kind: this.kind });
}
/** Sets the text for this predefined menu item. */
async setText(text) {
return invoke('plugin:menu|set_text', {
rid: this.rid,
kind: this.kind,
text
});
}
}
export { PredefinedMenuItem };