Initial commit: mumh5, a modern Mumble client
Electron desktop app with a Svelte 5 interface for any Mumble server. - Mumble protocol core: TLS, handshake, channels, users, text, plugin data, client-side pacing of Murmur's rate limits - Voice: WebCodecs Opus over the TCP tunnel, voice activity, push to talk, always-on, devices, per-user volume and local mute - Several servers at once, voice on one; server rail with icons and ordering - Chat: channels, direct messages, side chat, file sharing through f0ckm, inline images without it, click-to-play YouTube - Profiles with rich descriptions, registration, rename, nicknames, connection information and moderation menus - Identity wizard, multiple identities, PKCS#12 import/export, desktop Mumble certificate import, certificate pinning and viewer - Tray icon with voice state - Unit, server and end-to-end tests against a real Murmur Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
export interface MenuItem {
|
||||
label: string;
|
||||
action?: () => void;
|
||||
danger?: boolean;
|
||||
checked?: boolean;
|
||||
disabled?: boolean;
|
||||
separator?: boolean;
|
||||
}
|
||||
|
||||
// One context menu for the whole app, opened at the pointer position
|
||||
class MenuStore {
|
||||
open = $state<{ x: number; y: number; items: MenuItem[] } | null>(null);
|
||||
|
||||
show(e: MouseEvent, items: MenuItem[]): void {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.open = { x: e.clientX, y: e.clientY, items };
|
||||
}
|
||||
|
||||
close(): void {
|
||||
this.open = null;
|
||||
}
|
||||
}
|
||||
|
||||
export const menu = new MenuStore();
|
||||
Reference in New Issue
Block a user