Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Elevate flag to the SUI #12257

Merged
1 commit merged into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsEditor/ProfileViewModel.h
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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