/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Actions/Global/EditPathAction.cs
43 строки
1 KB
yair100
Code Quality: Add Category, ExtendedLabel, AutomationId and AccessKey to actions (#18308)
27 мар 2026, 00:40
Не верифицирован
27 мар 2026, 00:40
6ef1f17
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. namespace Files.App.Actions { [GeneratedRichCommand] internal sealed class EditPathAction : IAction { private readonly IContentPageContext context = Ioc.Default.GetRequiredService<IContentPageContext>(); private readonly IGeneralSettingsService GeneralSettingsService = Ioc.Default.GetRequiredService<IGeneralSettingsService>(); public string Label => Strings.EditPath.GetLocalizedResource(); public string Description => Strings.EditPathDescription.GetLocalizedResource(); public ActionCategory Category => ActionCategory.Open; public HotKey HotKey => new(Keys.L, KeyModifiers.Ctrl); public HotKey SecondHotKey => new(Keys.D, KeyModifiers.Alt); public RichGlyph Glyph => new(themedIconStyle: "App.ThemedIcons.Omnibar.Path"); public EditPathAction() { } public Task ExecuteAsync(object? parameter = null) { if (context.ShellPage is not null) _ = context.ShellPage!.ToolbarViewModel.SwitchToPathMode(); return Task.CompletedTask; } } }