|
9 | 9 | using System.Linq; |
10 | 10 | using Microsoft.CommandPalette.Extensions; |
11 | 11 | using Microsoft.CommandPalette.Extensions.Toolkit; |
| 12 | +using WebSearchShortcut.Commands; |
12 | 13 | using WebSearchShortcut.Helpers; |
13 | 14 | using WebSearchShortcut.Properties; |
14 | 15 | using WebSearchShortcut.Services; |
@@ -131,6 +132,17 @@ private void LoadShortcutFromFile() |
131 | 132 |
|
132 | 133 | private CommandItem CreateCommandItem(WebSearchShortcutDataEntry shortcut) |
133 | 134 | { |
| 135 | + var openHomepageCommand = new CommandContextItem( |
| 136 | + new OpenHomePageCommand(shortcut) |
| 137 | + { |
| 138 | + Name = StringFormatter.Format(Resources.OpenHomepageItem_NameTemplate, new() { ["shortcut"] = shortcut.Name }) |
| 139 | + } |
| 140 | + ) |
| 141 | + { |
| 142 | + Title = StringFormatter.Format(Resources.OpenHomepageItem_TitleTemplate, new() { ["shortcut"] = shortcut.Name }), |
| 143 | + Icon = Icons.Home |
| 144 | + }; |
| 145 | + |
134 | 146 | var editShortcutPage = new AddShortcutPage(shortcut) |
135 | 147 | { |
136 | 148 | Name = StringFormatter.Format(Resources.EditShortcutItem_NameTemplate, new() { ["shortcut"] = shortcut.Name }), |
@@ -173,7 +185,7 @@ private CommandItem CreateCommandItem(WebSearchShortcutDataEntry shortcut) |
173 | 185 | Title = StringFormatter.Format(Resources.ShortcutItem_TitleTemplate, new() { ["shortcut"] = shortcut.Name }), |
174 | 186 | Subtitle = StringFormatter.Format(Resources.ShortcutItem_SubtitleTemplate, new() { ["shortcut"] = shortcut.Name }), |
175 | 187 | Icon = IconService.GetIconInfo(shortcut), |
176 | | - MoreCommands = [editCommand, deleteCommand] |
| 188 | + MoreCommands = [openHomepageCommand, editCommand, deleteCommand] |
177 | 189 | }; |
178 | 190 |
|
179 | 191 | return commandItem; |
|
0 commit comments