Skip to content

Commit b9afa13

Browse files
committed
Adjust Label / Fix Order
1 parent e154b12 commit b9afa13

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
<system:String x:Key="installbtn">Install</system:String>
9696
<system:String x:Key="uninstallbtn">Uninstall</system:String>
9797
<system:String x:Key="updatebtn">Update</system:String>
98-
<system:String x:Key="LabelInstalled">Installed</system:String>
9998
<system:String x:Key="LabelInstalledToolTip">Plug-in already installed</system:String>
10099
<system:String x:Key="LabelNew">New Version</system:String>
101100
<system:String x:Key="LabelNewToolTip">This plug-in has been updated within the last 7 days</system:String>

Flow.Launcher/SettingWindow.xaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,19 +1558,15 @@
15581558
Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" />
15591559
<Border
15601560
x:Name="Labelinstalled"
1561+
Height="12"
15611562
Margin="0,10,8,0"
15621563
Padding="6,2,6,2"
15631564
HorizontalAlignment="Right"
15641565
VerticalAlignment="Top"
15651566
Background="{DynamicResource ToggleSwitchFillOn}"
1566-
CornerRadius="4"
1567+
CornerRadius="36"
15671568
ToolTip="{DynamicResource LabelInstalledToolTip}"
1568-
Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}}">
1569-
<TextBlock
1570-
FontSize="11"
1571-
Foreground="{DynamicResource Color01B}"
1572-
Text="{DynamicResource LabelInstalled}" />
1573-
</Border>
1569+
Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}}" />
15741570
</StackPanel>
15751571

15761572
<StackPanel

Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ public PluginStoreItemViewModel(UserPlugin plugin)
2727
public string IcoPath => _plugin.IcoPath;
2828

2929
public bool LabelInstalled => PluginManager.GetPluginForId(_plugin.ID) != null;
30-
public bool LabelUpdate => LabelInstalled && _plugin.Version != PluginManager.GetPluginForId(_plugin.ID).Metadata.Version;
31-
public bool LabelNew => DateTime.Now - _plugin.LatestReleaseDate < TimeSpan.FromDays(7) && !LabelUpdate; // Show Update Label show first.
32-
30+
public bool LabelUpdate => LabelInstalled && _plugin.Version != PluginManager.GetPluginForId(_plugin.ID).Metadata.Version;
3331
public string Category
3432
{
3533
get

Flow.Launcher/ViewModel/SettingWindowViewModel.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,10 @@ public IList<PluginStoreItemViewModel> ExternalPlugins
296296
private IList<PluginStoreItemViewModel> LabelMaker(IList<UserPlugin> list)
297297
{
298298
return list.Select(p=>new PluginStoreItemViewModel(p))
299-
.OrderByDescending(p=>p.LabelNew)
300-
.ThenByDescending(p=>p.LabelUpdate)
301-
.ThenBy(p=>p.LabelInstalled)
299+
.OrderByDescending(p => p.Category == "NewRelease")
300+
.ThenByDescending(p=>p.Category == "RecentlyUpdated")
301+
.ThenByDescending(p => p.Category == "None")
302+
.ThenByDescending(p => p.Category == "Installed")
302303
.ToList();
303304
}
304305

0 commit comments

Comments
 (0)