Skip to content

Commit

Permalink
Add Elevate flag to the SUI (#12257)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zadjii-msft committed Jan 27, 2022
1 parent e520779 commit f854988
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsEditor/ProfileViewModel.h
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsEditor/ProfileViewModel.idl
Expand Up @@ -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);
}
}
8 changes: 8 additions & 0 deletions src/cascadia/TerminalSettingsEditor/Profiles.xaml
Expand Up @@ -143,6 +143,14 @@
Text="{x:Bind Profile.TabTitle, Mode=TwoWay}" />
</local:SettingContainer>

<!-- Elevate -->
<local:SettingContainer x:Uid="Profile_Elevate"
ClearSettingValue="{x:Bind Profile.ClearElevate}"
HasSettingValue="{x:Bind Profile.HasElevate, Mode=OneWay}"
SettingOverrideSource="{x:Bind Profile.ElevateOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind Profile.Elevate, Mode=TwoWay}" />
</local:SettingContainer>

<!-- Hidden -->
<local:SettingContainer x:Uid="Profile_Hidden"
Visibility="{x:Bind local:Converters.InvertedBooleanToVisibility(Profile.IsBaseLayer), Mode=OneWay}">
Expand Down
Expand Up @@ -759,6 +759,14 @@
<value>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.</value>
<comment>A description for what the "hidden" setting does. Presented near "Profile_Hidden".</comment>
</data>
<data name="Profile_Elevate.Header" xml:space="preserve">
<value>Run this profile as Administrator</value>
<comment>Header for a control to toggle whether the profile should always open elevated (in an admin window)</comment>
</data>
<data name="Profile_Elevate.HelpText" xml:space="preserve">
<value>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.</value>
<comment>A description for what the "elevate" setting does. Presented near "Profile_Elevate".</comment>
</data>
<data name="Profile_HistorySize.Header" xml:space="preserve">
<value>History size</value>
<comment>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.</comment>
Expand Down

0 comments on commit f854988

Please sign in to comment.