Skip to content

Commit e0fb9ae

Browse files
committed
Moved cache settings to Experimental
1 parent 2f39834 commit e0fb9ae

File tree

2 files changed

+40
-60
lines changed

2 files changed

+40
-60
lines changed

src/Files.App/Strings/en-US/Resources.resw

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -228,17 +228,11 @@
228228
<data name="Advanced" xml:space="preserve">
229229
<value>Advanced</value>
230230
</data>
231-
<data name="ThumbnailCache" xml:space="preserve">
232-
<value>Thumbnail Cache</value>
233-
</data>
234-
<data name="EnableThumbnailCache" xml:space="preserve">
235-
<value>Enable Thumbnail Cache</value>
236-
</data>
237-
<data name="EnableThumbnailCacheDescription" xml:space="preserve">
238-
<value>Cache thumbnails to disk for faster loading.</value>
231+
<data name="CacheThumbnails" xml:space="preserve">
232+
<value>Cache thumbnails</value>
239233
</data>
240234
<data name="CacheSizeLimitMB" xml:space="preserve">
241-
<value>Cache Size Limit (MB)</value>
235+
<value>Cache size limit (MB)</value>
242236
</data>
243237
<data name="CacheSizeLimitDescription" xml:space="preserve">
244238
<value>Maximum disk space to use for thumbnail cache (100-5000 MB).</value>
@@ -247,13 +241,13 @@
247241
<value>Cache Size Limit</value>
248242
</data>
249243
<data name="ClearCachedThumbnails" xml:space="preserve">
250-
<value>Remove all cached thumbnails to free up disk space</value>
244+
<value>Clear cached thumbnails to free up disk space</value>
251245
</data>
252246
<data name="CurrentCacheSize" xml:space="preserve">
253247
<value>Current cache size: </value>
254248
</data>
255249
<data name="ClearCache" xml:space="preserve">
256-
<value>Clear Cache</value>
250+
<value>Clear cache</value>
257251
</data>
258252
<data name="SettingsOnStartupContinueWhereYouLeftOff.Content" xml:space="preserve">
259253
<value>Continue where you left off</value>

src/Files.App/Views/Settings/AdvancedPage.xaml

Lines changed: 35 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -120,55 +120,6 @@
120120
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowSystemTrayIcon}" IsOn="{x:Bind ViewModel.ShowSystemTrayIcon, Mode=TwoWay}" />
121121
</wctcontrols:SettingsCard>
122122

123-
<!-- Thumbnail Cache -->
124-
<TextBlock
125-
Padding="0,16,0,4"
126-
FontSize="16"
127-
FontWeight="Medium"
128-
Text="{helpers:ResourceString Name=ThumbnailCache}" />
129-
130-
<!-- Enable Thumbnail Cache -->
131-
<wctcontrols:SettingsExpander Header="{helpers:ResourceString Name=EnableThumbnailCache}" IsExpanded="False">
132-
<wctcontrols:SettingsExpander.Description>
133-
<TextBlock Text="{helpers:ResourceString Name=EnableThumbnailCacheDescription}" TextWrapping="WrapWholeWords" />
134-
</wctcontrols:SettingsExpander.Description>
135-
<wctcontrols:SettingsExpander.HeaderIcon>
136-
<FontIcon Glyph="&#xE74C;" />
137-
</wctcontrols:SettingsExpander.HeaderIcon>
138-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=EnableThumbnailCache}" IsOn="{x:Bind ViewModel.EnableThumbnailCache, Mode=TwoWay}" />
139-
<wctcontrols:SettingsExpander.Items>
140-
141-
<!-- Cache Size Limit -->
142-
<wctcontrols:SettingsCard
143-
Header="{helpers:ResourceString Name=CacheSizeLimitMB}"
144-
IsEnabled="{x:Bind ViewModel.EnableThumbnailCache, Mode=OneWay}">
145-
<wctcontrols:SettingsCard.Description>
146-
<TextBlock Text="{helpers:ResourceString Name=CacheSizeLimitDescription}" TextWrapping="WrapWholeWords" />
147-
</wctcontrols:SettingsCard.Description>
148-
<NumberBox
149-
AutomationProperties.Name="{helpers:ResourceString Name=CacheSizeLimit}"
150-
Maximum="5000"
151-
Minimum="100"
152-
SpinButtonPlacementMode="Compact"
153-
Value="{x:Bind ViewModel.ThumbnailCacheSizeLimit, Mode=TwoWay}" />
154-
</wctcontrols:SettingsCard>
155-
<wctcontrols:SettingsCard
156-
Header="{helpers:ResourceString Name=ClearCachedThumbnails}"
157-
IsEnabled="{x:Bind ViewModel.EnableThumbnailCache, Mode=OneWay}">
158-
<wctcontrols:SettingsCard.Description>
159-
<TextBlock>
160-
<Run Text="{helpers:ResourceString Name=CurrentCacheSize}" />
161-
<Run FontWeight="SemiBold" Text="{x:Bind ViewModel.CacheSizeText, Mode=OneWay}" />
162-
</TextBlock>
163-
</wctcontrols:SettingsCard.Description>
164-
<Button
165-
Command="{x:Bind ViewModel.ClearThumbnailCacheCommand}"
166-
Content="{helpers:ResourceString Name=ClearCache}"
167-
IsEnabled="{x:Bind ViewModel.IsClearCacheButtonEnabled, Mode=OneWay}" />
168-
</wctcontrols:SettingsCard>
169-
</wctcontrols:SettingsExpander.Items>
170-
</wctcontrols:SettingsExpander>
171-
172123
<!-- Experimental Settings -->
173124
<TextBlock
174125
Padding="0,16,0,4"
@@ -210,6 +161,41 @@
210161
</ToggleSwitch>
211162
</wctcontrols:SettingsCard>
212163

164+
<!-- Thumbnail Caching -->
165+
<wctcontrols:SettingsExpander Header="{helpers:ResourceString Name=CacheThumbnails}" IsExpanded="False">
166+
<wctcontrols:SettingsExpander.HeaderIcon>
167+
<FontIcon Glyph="&#xEDA2;" />
168+
</wctcontrols:SettingsExpander.HeaderIcon>
169+
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=CacheThumbnails}" IsOn="{x:Bind ViewModel.EnableThumbnailCache, Mode=TwoWay}" />
170+
<wctcontrols:SettingsExpander.Items>
171+
172+
<!-- Cache Size Limit -->
173+
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=CacheSizeLimitMB}" IsEnabled="{x:Bind ViewModel.EnableThumbnailCache, Mode=OneWay}">
174+
<wctcontrols:SettingsCard.Description>
175+
<TextBlock Text="{helpers:ResourceString Name=CacheSizeLimitDescription}" TextWrapping="WrapWholeWords" />
176+
</wctcontrols:SettingsCard.Description>
177+
<NumberBox
178+
AutomationProperties.Name="{helpers:ResourceString Name=CacheSizeLimit}"
179+
Maximum="5000"
180+
Minimum="100"
181+
SpinButtonPlacementMode="Inline"
182+
Value="{x:Bind ViewModel.ThumbnailCacheSizeLimit, Mode=TwoWay}" />
183+
</wctcontrols:SettingsCard>
184+
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ClearCachedThumbnails}" IsEnabled="{x:Bind ViewModel.EnableThumbnailCache, Mode=OneWay}">
185+
<wctcontrols:SettingsCard.Description>
186+
<TextBlock>
187+
<Run Text="{helpers:ResourceString Name=CurrentCacheSize}" />
188+
<Run FontWeight="SemiBold" Text="{x:Bind ViewModel.CacheSizeText, Mode=OneWay}" />
189+
</TextBlock>
190+
</wctcontrols:SettingsCard.Description>
191+
<Button
192+
Command="{x:Bind ViewModel.ClearThumbnailCacheCommand}"
193+
Content="{helpers:ResourceString Name=ClearCache}"
194+
IsEnabled="{x:Bind ViewModel.IsClearCacheButtonEnabled, Mode=OneWay}" />
195+
</wctcontrols:SettingsCard>
196+
</wctcontrols:SettingsExpander.Items>
197+
</wctcontrols:SettingsExpander>
198+
213199
<!-- Flatten options -->
214200
<wctcontrols:SettingsCard Description="{helpers:ResourceString Name=ShowFlattenOptionsDescription}" Header="{helpers:ResourceString Name=ShowFlattenOptions}">
215201
<wctcontrols:SettingsCard.HeaderIcon>

0 commit comments

Comments
 (0)