forked from files-community/Files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFoldersPage.xaml
199 lines (171 loc) · 9.35 KB
/
FoldersPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!-- Copyright (c) Files Community. Licensed under the MIT License. -->
<Page
x:Class="Files.App.Views.Settings.FoldersPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:helpers="using:Files.App.Helpers"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uc="using:Files.App.UserControls"
xmlns:vm="using:Files.App.ViewModels.Settings"
xmlns:wctcontrols="using:CommunityToolkit.WinUI.Controls"
mc:Ignorable="d">
<Page.DataContext>
<vm:FoldersViewModel x:Name="ViewModel" />
</Page.DataContext>
<Grid>
<StackPanel
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Spacing="4">
<!-- Title -->
<TextBlock
Padding="0,0,0,12"
FontSize="24"
FontWeight="Medium"
Text="{helpers:ResourceString Name=FilesAndFolders}" />
<!-- Display -->
<TextBlock
Padding="0,16,0,4"
FontSize="16"
FontWeight="Medium"
Text="{helpers:ResourceString Name=Display}" />
<!-- Hidden Items -->
<wctcontrols:SettingsExpander Header="{helpers:ResourceString Name=HiddenItems}">
<wctcontrols:SettingsExpander.HeaderIcon>
<PathIcon Data="{StaticResource App.Theme.PathIcon.Hide}" />
</wctcontrols:SettingsExpander.HeaderIcon>
<wctcontrols:SettingsExpander.Items>
<!-- Hidden Files -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=SettingsFilesAndFoldersShowHiddenItems}">
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=SettingsFilesAndFoldersShowHiddenItems}" IsOn="{x:Bind ViewModel.ShowHiddenItems, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<!-- Dots Files -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowDotFiles}">
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowDotFiles}" IsOn="{x:Bind ViewModel.ShowDotFiles, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<!-- System Files -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowProtectedSystemFiles}">
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowProtectedSystemFiles}" IsOn="{x:Bind ViewModel.ShowProtectedSystemFiles, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<!-- Alternate Data Streams -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowAlternateStreams}">
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowAlternateStreams}" IsOn="{x:Bind ViewModel.AreAlternateStreamsVisible, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
</wctcontrols:SettingsExpander.Items>
</wctcontrols:SettingsExpander>
<!-- File Extensions -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=SettingsFilesAndFoldersShowFileExtensions}">
<wctcontrols:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</wctcontrols:SettingsCard.HeaderIcon>
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=SettingsFilesAndFoldersShowFileExtensions}" IsOn="{x:Bind ViewModel.ShowFileExtensions, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<!-- Show Thumbnails -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=SettingsFilesAndFoldersShowThumbnails}">
<wctcontrols:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</wctcontrols:SettingsCard.HeaderIcon>
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=SettingsFilesAndFoldersShowThumbnails}" IsOn="{x:Bind ViewModel.ShowThumbnails, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<!-- Show Checkboxes When Selecting Items -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowCheckboxesWhenSelectingItems}">
<wctcontrols:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</wctcontrols:SettingsCard.HeaderIcon>
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowCheckboxesWhenSelectingItems}" IsOn="{x:Bind ViewModel.ShowCheckboxesWhenSelectingItems, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<!-- Behaviors -->
<TextBlock
Padding="0,16,0,4"
FontSize="16"
FontWeight="Medium"
Text="{helpers:ResourceString Name=Behaviors}" />
<!-- Opening items -->
<wctcontrols:SettingsExpander Header="{helpers:ResourceString Name=OpeningItems}">
<wctcontrols:SettingsExpander.HeaderIcon>
<FontIcon Glyph="" />
</wctcontrols:SettingsExpander.HeaderIcon>
<wctcontrols:SettingsExpander.Items>
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=SettingsOpenItemsWithOneClick}">
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=SettingsOpenItemsWithOneClick}" IsOn="{x:Bind ViewModel.OpenItemsWithOneClick, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=OpenFolderWithOneClickColumnsLayout}">
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=OpenFolderWithOneClickColumnsLayout}" IsOn="{x:Bind ViewModel.ColumnLayoutOpenFoldersWithOneClick, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=OpenFoldersInNewTab}">
<ToggleSwitch
x:Name="OpenFoldersNewTab"
AutomationProperties.Name="{helpers:ResourceString Name=OpenFoldersInNewTab}"
IsOn="{x:Bind ViewModel.OpenFoldersNewTab, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
</wctcontrols:SettingsExpander.Items>
</wctcontrols:SettingsExpander>
<!-- Confirm Delete -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowConfirmationWhenDeletingItems}">
<wctcontrols:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</wctcontrols:SettingsCard.HeaderIcon>
<uc:ComboBoxEx AutomationProperties.Name="{helpers:ResourceString Name=ShowConfirmationWhenDeletingItems}" SelectedIndex="{x:Bind ViewModel.SelectedDeleteConfirmationPolicyIndex, Mode=TwoWay}">
<ComboBoxItem Content="{helpers:ResourceString Name=Always}" />
<ComboBoxItem Content="{helpers:ResourceString Name=PermanentDeletionOnly}" />
<ComboBoxItem Content="{helpers:ResourceString Name=Never}" />
</uc:ComboBoxEx>
</wctcontrols:SettingsCard>
<!-- File Extension Warning -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowFileExtensionWarning}">
<wctcontrols:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</wctcontrols:SettingsCard.HeaderIcon>
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowFileExtensionWarning}" IsOn="{x:Bind ViewModel.ShowFileExtensionWarning, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<!-- Select On Hover -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=SelectFilesAndFoldersOnHover}">
<wctcontrols:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</wctcontrols:SettingsCard.HeaderIcon>
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=SelectFilesAndFoldersOnHover}" IsOn="{x:Bind ViewModel.SelectFilesOnHover, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<!-- Double click to go up -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=DoubleClickBlankSpaceToGoUp}">
<wctcontrols:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</wctcontrols:SettingsCard.HeaderIcon>
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=DoubleClickBlankSpaceToGoUp}" IsOn="{x:Bind ViewModel.DoubleClickToGoUp, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<!-- Scroll to parent folder when navigating up -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ScrollToPreviousFolderWhenNavigatingUp}">
<wctcontrols:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</wctcontrols:SettingsCard.HeaderIcon>
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ScrollToPreviousFolderWhenNavigatingUp}" IsOn="{x:Bind ViewModel.ScrollToPreviousFolderWhenNavigatingUp, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<!-- Size format -->
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=SizeFormat}">
<wctcontrols:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</wctcontrols:SettingsCard.HeaderIcon>
<uc:ComboBoxEx
AutomationProperties.Name="{helpers:ResourceString Name=SizeFormat}"
ItemsSource="{x:Bind ViewModel.SizeUnitsOptions.Values}"
SelectedItem="{x:Bind ViewModel.SizeUnitFormat, Mode=TwoWay}" />
</wctcontrols:SettingsCard>
<!-- Calculate folder sizes -->
<wctcontrols:SettingsExpander Header="{helpers:ResourceString Name=CalculateFolderSizes}" IsExpanded="True">
<wctcontrols:SettingsExpander.HeaderIcon>
<FontIcon Glyph="" />
</wctcontrols:SettingsExpander.HeaderIcon>
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=CalculateFolderSizes}" IsOn="{x:Bind ViewModel.CalculateFolderSizes, Mode=TwoWay}" />
<wctcontrols:SettingsExpander.ItemsHeader>
<InfoBar
CornerRadius="0"
IsClosable="False"
IsIconVisible="True"
IsOpen="True"
Message="{helpers:ResourceString Name=ShowFolderSizesWarning}"
Severity="Warning" />
</wctcontrols:SettingsExpander.ItemsHeader>
</wctcontrols:SettingsExpander>
</StackPanel>
</Grid>
</Page>