File tree Expand file tree Collapse file tree 4 files changed +8
-14
lines changed Expand file tree Collapse file tree 4 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 95
95
<system : String x : Key =" installbtn" >Install</system : String >
96
96
<system : String x : Key =" uninstallbtn" >Uninstall</system : String >
97
97
<system : String x : Key =" updatebtn" >Update</system : String >
98
- <system : String x : Key =" LabelInstalled" >Installed</system : String >
99
98
<system : String x : Key =" LabelInstalledToolTip" >Plug-in already installed</system : String >
100
99
<system : String x : Key =" LabelNew" >New Version</system : String >
101
100
<system : String x : Key =" LabelNewToolTip" >This plug-in has been updated within the last 7 days</system : String >
Original file line number Diff line number Diff line change 1558
1558
Visibility =" {Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" />
1559
1559
<Border
1560
1560
x : Name =" Labelinstalled"
1561
+ Height =" 12"
1561
1562
Margin =" 0,10,8,0"
1562
1563
Padding =" 6,2,6,2"
1563
1564
HorizontalAlignment =" Right"
1564
1565
VerticalAlignment =" Top"
1565
1566
Background =" {DynamicResource ToggleSwitchFillOn}"
1566
- CornerRadius =" 4 "
1567
+ CornerRadius =" 36 "
1567
1568
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}}" />
1574
1570
</StackPanel >
1575
1571
1576
1572
<StackPanel
Original file line number Diff line number Diff line change @@ -27,9 +27,7 @@ public PluginStoreItemViewModel(UserPlugin plugin)
27
27
public string IcoPath => _plugin . IcoPath ;
28
28
29
29
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 ;
33
31
public string Category
34
32
{
35
33
get
Original file line number Diff line number Diff line change @@ -296,9 +296,10 @@ public IList<PluginStoreItemViewModel> ExternalPlugins
296
296
private IList < PluginStoreItemViewModel > LabelMaker ( IList < UserPlugin > list )
297
297
{
298
298
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" )
302
303
. ToList ( ) ;
303
304
}
304
305
You can’t perform that action at this time.
0 commit comments