Skip to content

Commit 00543d8

Browse files
authored
Feature: Indicate "Always keep on device" status (#14012)
1 parent 92c5231 commit 00543d8

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

src/Files.App/ResourceDictionaries/PathIcons.xaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2628,6 +2628,35 @@
26282628
</Setter>
26292629
</Style>
26302630

2631+
<Style x:Key="ColorIconCloudKeepOffline" TargetType="local:OpacityIcon">
2632+
<Setter Property="Template">
2633+
<Setter.Value>
2634+
<ControlTemplate>
2635+
<Viewbox Stretch="Fill">
2636+
<Grid Width="16" Height="16">
2637+
<Path
2638+
x:Name="Path1"
2639+
Data="M2.66782 6.1263C2.87421 5.94284 3.19025 5.96143 3.37371 6.16782L6.02141 9.27148L13.1465 2.14645C13.3417 1.95118 13.6583 1.95118 13.8536 2.14645C14.0488 2.34171 14.0488 2.65829 13.8536 2.85355L6.35356 10.3536C6.15013 10.557 5.81743 10.5472 5.6263 10.3322L2.6263 6.83218C2.44284 6.62579 2.46143 6.30975 2.66782 6.1263Z"
2640+
Fill="{ThemeResource SystemFillColorSuccessBrush}" />
2641+
<Path
2642+
x:Name="Path2"
2643+
Data="M2.5 11C2.22386 11 2 11.2239 2 11.5V13.5C2 13.7761 2.22386 14 2.5 14H13.5C13.7761 14 14 13.7761 14 13.5V11.5C14 11.2239 13.7761 11 13.5 11C13.2239 11 13 11.2239 13 11.5V13H3V11.5C3 11.2239 2.77614 11 2.5 11Z"
2644+
Fill="{ThemeResource SystemFillColorSuccessBrush}" />
2645+
</Grid>
2646+
2647+
<VisualStateManager.VisualStateGroups>
2648+
<VisualStateGroup>
2649+
<VisualState x:Name="Normal" />
2650+
<VisualState x:Name="Disabled" />
2651+
<VisualState x:Name="Selected" />
2652+
</VisualStateGroup>
2653+
</VisualStateManager.VisualStateGroups>
2654+
</Viewbox>
2655+
</ControlTemplate>
2656+
</Setter.Value>
2657+
</Setter>
2658+
</Style>
2659+
26312660
<Style x:Key="ColorIconGitAdded" TargetType="local:OpacityIcon">
26322661
<Setter Property="Template">
26332662
<Setter.Value>

src/Files.App/Utils/Cloud/CloudDriveSyncStatusUI.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,20 @@ private CloudDriveSyncStatusUI(string glyph, Style opacityIcon, CloudDriveSyncSt
4141
// File
4242
CloudDriveSyncStatus.FileOnline
4343
=> new CloudDriveSyncStatusUI("\uE753", (Style)Application.Current.Resources["ColorIconCloud"], syncStatus, "CloudDriveSyncStatus_Online"),
44-
CloudDriveSyncStatus.FileOffline or CloudDriveSyncStatus.FileOfflinePinned
44+
CloudDriveSyncStatus.FileOffline
4545
=> new CloudDriveSyncStatusUI("\uE73E", (Style)Application.Current.Resources["ColorIconCloudSynced"], syncStatus, "CloudDriveSyncStatus_Offline"),
46+
CloudDriveSyncStatus.FileOfflinePinned
47+
=> new CloudDriveSyncStatusUI("\uE73E", (Style)Application.Current.Resources["ColorIconCloudKeepOffline"], syncStatus, "CloudDriveSyncStatus_Offline"),
4648
CloudDriveSyncStatus.FileSync
4749
=> new CloudDriveSyncStatusUI("\uE895", (Style)Application.Current.Resources["ColorIconCloudSyncing"], syncStatus, "CloudDriveSyncStatus_Sync"),
4850

4951
// Folder
5052
CloudDriveSyncStatus.FolderOnline or CloudDriveSyncStatus.FolderOfflinePartial
5153
=> new CloudDriveSyncStatusUI("\uE753", (Style)Application.Current.Resources["ColorIconCloud"], syncStatus, "CloudDriveSyncStatus_PartialOffline"),
52-
CloudDriveSyncStatus.FolderOfflineFull or CloudDriveSyncStatus.FolderOfflinePinned or CloudDriveSyncStatus.FolderEmpty
54+
CloudDriveSyncStatus.FolderOfflineFull or CloudDriveSyncStatus.FolderEmpty
5355
=> new CloudDriveSyncStatusUI("\uE73E", (Style)Application.Current.Resources["ColorIconCloudSynced"], syncStatus, "CloudDriveSyncStatus_Offline"),
56+
CloudDriveSyncStatus.FolderOfflinePinned
57+
=> new CloudDriveSyncStatusUI("\uE73E", (Style)Application.Current.Resources["ColorIconCloudKeepOffline"], syncStatus, "CloudDriveSyncStatus_Offline"),
5458
CloudDriveSyncStatus.FolderExcluded
5559
=> new CloudDriveSyncStatusUI("\uF140", (Style)Application.Current.Resources["ColorIconCloudUnavailable"], syncStatus, "CloudDriveSyncStatus_Excluded"),
5660

0 commit comments

Comments
 (0)