/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Actions/Open/OpenTerminalFromHomeAction.cs
40 строк
1 KB
Yair
Feature: Respect default terminal from Windows Settings
30 апр 2026, 01:32
30 апр 2026, 01:32
c512727
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. namespace Files.App.Actions { [GeneratedRichCommand] internal sealed partial class OpenTerminalFromHomeAction : OpenTerminalAction { private IHomePageContext HomePageContext { get; } = Ioc.Default.GetRequiredService<IHomePageContext>(); public override string Label => Strings.OpenTerminal.GetLocalizedResource(); public override string Description => Strings.OpenTerminalDescription.GetLocalizedResource(); public override bool IsExecutable => HomePageContext.IsAnyItemRightClicked && HomePageContext.RightClickedItem is not null && (HomePageContext.RightClickedItem is WidgetFileTagCardItem fileTagItem ? fileTagItem.IsFolder : true) && HomePageContext.RightClickedItem.Path is not null && HomePageContext.RightClickedItem.Path != Constants.UserEnvironmentPaths.RecycleBinPath; public override bool IsAccessibleGlobally => false; public override HotKey HotKey => HotKey.None; protected override string[] GetPaths() { if (HomePageContext.IsAnyItemRightClicked && HomePageContext.RightClickedItem?.Path is not null) return [HomePageContext.RightClickedItem.Path]; return []; } } }