Skip to content
Source
Sign inSign up
pingdotgg/t3code

Polish web context menu fallback and sidebar icon actions #3025

Mergedjuliusmarmingemerged 4 commits intomain fromrefs/pull/3025/headmerged by juliusmarminge View on GitHub

Showing 6 changed files with 9 additions and 0 deletions (loading 3).

x
0 of 6 viewed, 6 left
6 additions and 0 deletionsapps/desktop/src/electron/ElectronMenu.tsModified
View file
@@ -44,6 +44,12 @@
continue;
​
+ // Header items are decorative section labels for the web fallback only —
+ // Electron's native menu has no equivalent affordance, so we skip them.
+ if (sourceItem.header === true) {
+ continue;
+ }
+​
const normalizedItem: ContextMenuItem = {
id: sourceItem.id,
label: sourceItem.label,
2 additions and 0 deletionsapps/web/src/components/CommandPalette.logic.tsModified
View file
@@ -95,6 +95,7 @@
valuePrefix: string;
icon: (project: Project) => ReactNode;
runProject: (project: Project) => Promise<void>;
+ shortcutCommand?: KeybindingCommand;
}): CommandPaletteActionItem[] {
return input.projects.map((project) => ({
kind: "action",
@@ -103,6 +104,7 @@
title: project.name,
description: project.cwd,
icon: input.icon(project),