- Add 11 destinations that exist in the app but were absent from the palette: World Map, Event Log, Operations, Ops Ledger, Reservations, Supply Boxes, Promotions, Leaderboard, Minigame Leaderboards, Chronicle, Surveys - Show G N / G A shortcut labels for Notifications and Admin (chords were already wired in KeyboardShortcutsProvider but unlabelled) - Add a Toggle Mini XP Display action mirroring the sidebar control - Add an Open Unassigned Tickets queue shortcut and point Create Support Ticket at the compose deep link - Teach /helpdesk to open the create dialog via ?compose=1 and to preselect a filter tab via ?view=unassigned
121 lines
3.1 KiB
TypeScript
121 lines
3.1 KiB
TypeScript
import {
|
|
UserPlus,
|
|
Bell,
|
|
Backpack,
|
|
LogOut,
|
|
RefreshCw,
|
|
Wallet,
|
|
Wallpaper,
|
|
Tag,
|
|
Link2,
|
|
Inbox,
|
|
Sparkles,
|
|
} from "lucide-react";
|
|
|
|
export interface ActionCommand {
|
|
id: string;
|
|
label: string;
|
|
icon: React.ComponentType<{ className?: string }>;
|
|
keywords?: string[];
|
|
/** Action type determines how onSelect is handled */
|
|
actionType: "navigate" | "callback";
|
|
/** For navigate actions */
|
|
href?: string;
|
|
/** For callback actions - the action key that CommandPalette maps to a handler */
|
|
actionKey?: string;
|
|
/** If set, only shown for these roles */
|
|
roles?: string[];
|
|
/** If set, only shown when user has this qualification */
|
|
requires?: "intelligence" | "logistics";
|
|
}
|
|
|
|
export const actionCommands: ActionCommand[] = [
|
|
{
|
|
id: "action:provision-bank-account",
|
|
label: "Provision Personal Bank Account",
|
|
icon: Wallet,
|
|
keywords: ["banking", "wallet", "money", "create", "open"],
|
|
actionType: "callback",
|
|
actionKey: "ensureBankAccount",
|
|
},
|
|
{
|
|
id: "action:toggle-background-texture",
|
|
label: "Toggle Background Texture",
|
|
icon: Wallpaper,
|
|
keywords: ["display", "appearance", "theme", "texture", "background"],
|
|
actionType: "callback",
|
|
actionKey: "toggleBackgroundTexture",
|
|
},
|
|
{
|
|
id: "action:toggle-callsign",
|
|
label: "Toggle Callsign Display",
|
|
icon: Tag,
|
|
keywords: ["display", "callsign", "name", "sidebar"],
|
|
actionType: "callback",
|
|
actionKey: "toggleCallsign",
|
|
},
|
|
{
|
|
id: "action:toggle-mini-xp",
|
|
label: "Toggle Mini XP Display",
|
|
icon: Sparkles,
|
|
keywords: ["display", "xp", "level", "compact", "sidebar", "progress"],
|
|
actionType: "callback",
|
|
actionKey: "toggleMiniXp",
|
|
},
|
|
{
|
|
id: "action:copy-page-link",
|
|
label: "Copy Page Link",
|
|
icon: Link2,
|
|
keywords: ["share", "url", "clipboard", "copy", "link"],
|
|
actionType: "callback",
|
|
actionKey: "copyPageLink",
|
|
},
|
|
{
|
|
id: "action:mark-all-read",
|
|
label: "Mark All Notifications Read",
|
|
icon: Bell,
|
|
keywords: ["clear", "dismiss", "notifications"],
|
|
actionType: "callback",
|
|
actionKey: "markAllRead",
|
|
},
|
|
{
|
|
id: "action:auto-arrange-locker",
|
|
label: "Auto-Arrange Locker",
|
|
icon: Backpack,
|
|
keywords: ["sort", "organize", "inventory"],
|
|
actionType: "callback",
|
|
actionKey: "autoArrangeLocker",
|
|
},
|
|
{
|
|
id: "action:refresh-page",
|
|
label: "Refresh Page",
|
|
icon: RefreshCw,
|
|
keywords: ["reload", "update"],
|
|
actionType: "callback",
|
|
actionKey: "refreshPage",
|
|
},
|
|
{
|
|
id: "action:logout",
|
|
label: "Log Out",
|
|
icon: LogOut,
|
|
keywords: ["signout", "exit"],
|
|
actionType: "callback",
|
|
actionKey: "logout",
|
|
},
|
|
{
|
|
id: "action:create-ticket",
|
|
label: "Create Support Ticket",
|
|
icon: UserPlus,
|
|
keywords: ["help", "support", "report", "new", "compose"],
|
|
actionType: "navigate",
|
|
href: "/helpdesk?compose=1",
|
|
},
|
|
{
|
|
id: "action:open-unassigned-tickets",
|
|
label: "Open Unassigned Tickets",
|
|
icon: Inbox,
|
|
keywords: ["helpdesk", "support", "queue", "backlog", "triage", "staff"],
|
|
actionType: "navigate",
|
|
href: "/helpdesk?view=unassigned",
|
|
},
|
|
];
|