csharpdeeb25a2 | 1 | using CascadeIDE.Contracts; |
| 2 | |
| 3 | namespace CascadeIDE.Features.Shell.Application; |
| 4 | |
| 5 | /// <summary>Тексты подсказки/плейсхолдера оверлея палитры (без привязки к VM).</summary> |
| 6 | [PresentationProjection] |
| 7 | public static class CommandPaletteChromeProjection |
| 8 | { |
| 9 | private static string ModeHints(string? melodyAliasesSample) => |
| 10 | string.IsNullOrEmpty(melodyAliasesSample) |
| 11 | ? CommandPaletteChromeModeHints.SeparatorLineJoin |
| 12 | : $"{CommandPaletteChromeModeHints.SeparatorLineJoin} ({melodyAliasesSample})"; |
| 13 | |
| 14 | public static string FooterHint(string? toggleCommandPaletteHotkeyDisplay, string? melodyAliasesSampleForFooter) |
| 15 | { |
| 16 | var nav = ModeHints(melodyAliasesSampleForFooter); |
| 17 | return !string.IsNullOrEmpty(toggleCommandPaletteHotkeyDisplay) |
| 18 | ? $"↑↓ выбор · Enter выполнить · Esc закрыть · PgUp/PgDn страница · {toggleCommandPaletteHotkeyDisplay} выделить запрос · {nav}" |
| 19 | : $"↑↓ выбор · Enter выполнить · Esc закрыть · PgUp/PgDn страница · {nav}"; |
| 20 | } |
| 21 | |
| 22 | public static string QueryPlaceholder(string? melodyAliasesSample) |
| 23 | { |
| 24 | var baseText = "Команда… · " + CommandPaletteChromeModeHints.SeparatorLineJoin; |
| 25 | return string.IsNullOrEmpty(melodyAliasesSample) |
| 26 | ? baseText |
| 27 | : $"{baseText} ({melodyAliasesSample})"; |
| 28 | } |
| 29 | } |
| 30 | |
View only · write via MCP/CIDE