From f8549886f53c0e3e6547e0011f60cc828ac7b7c4 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 27 Jan 2022 17:37:32 -0600 Subject: [PATCH] Add Elevate flag to the SUI (#12257) Does what it says on the box ![image](https://user-images.githubusercontent.com/18356694/151168418-68dd9737-ceee-4dbc-8ab4-2b07f5d3fddb.png) * [x] I work here * [x] Discussed in OneNote --- src/cascadia/TerminalSettingsEditor/ProfileViewModel.h | 1 + src/cascadia/TerminalSettingsEditor/ProfileViewModel.idl | 1 + src/cascadia/TerminalSettingsEditor/Profiles.xaml | 8 ++++++++ .../TerminalSettingsEditor/Resources/en-US/Resources.resw | 8 ++++++++ 4 files changed, 18 insertions(+) diff --git a/src/cascadia/TerminalSettingsEditor/ProfileViewModel.h b/src/cascadia/TerminalSettingsEditor/ProfileViewModel.h index 0cce255e8c2..c147d67462c 100644 --- a/src/cascadia/TerminalSettingsEditor/ProfileViewModel.h +++ b/src/cascadia/TerminalSettingsEditor/ProfileViewModel.h @@ -109,6 +109,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation OBSERVABLE_PROJECTED_SETTING(_profile, AltGrAliasing); OBSERVABLE_PROJECTED_SETTING(_profile, BellStyle); OBSERVABLE_PROJECTED_SETTING(_profile, UseAtlasEngine); + OBSERVABLE_PROJECTED_SETTING(_profile, Elevate); TYPED_EVENT(DeleteProfile, Editor::ProfileViewModel, Editor::DeleteProfileEventArgs); diff --git a/src/cascadia/TerminalSettingsEditor/ProfileViewModel.idl b/src/cascadia/TerminalSettingsEditor/ProfileViewModel.idl index 7215989d626..ce159803826 100644 --- a/src/cascadia/TerminalSettingsEditor/ProfileViewModel.idl +++ b/src/cascadia/TerminalSettingsEditor/ProfileViewModel.idl @@ -93,5 +93,6 @@ namespace Microsoft.Terminal.Settings.Editor OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, AltGrAliasing); OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.Settings.Model.BellStyle, BellStyle); OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, UseAtlasEngine); + OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, Elevate); } } diff --git a/src/cascadia/TerminalSettingsEditor/Profiles.xaml b/src/cascadia/TerminalSettingsEditor/Profiles.xaml index 218e05fb84e..8f3df23f96e 100644 --- a/src/cascadia/TerminalSettingsEditor/Profiles.xaml +++ b/src/cascadia/TerminalSettingsEditor/Profiles.xaml @@ -143,6 +143,14 @@ Text="{x:Bind Profile.TabTitle, Mode=TwoWay}" /> + + + + + diff --git a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw index cacbffb70fd..45a2f6e0ab8 100644 --- a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw +++ b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw @@ -759,6 +759,14 @@ If enabled, the profile will not appear in the list of profiles. This can be used to hide default profiles and dynamically generated profiles, while leaving them in your settings file. A description for what the "hidden" setting does. Presented near "Profile_Hidden". + + Run this profile as Administrator + Header for a control to toggle whether the profile should always open elevated (in an admin window) + + + If enabled, the profile will open in an Admin terminal window automatically. If the current window is already running as admin, it'll open in this window. + A description for what the "elevate" setting does. Presented near "Profile_Elevate". + History size Header for a control to determine how many lines of text can be saved in a session. In terminals, the "history" is the output generated within your session.