Skip to content

Commit

Permalink
新增 在线插件支持系统显示
Browse files Browse the repository at this point in the history
  • Loading branch information
MakesYT committed Aug 15, 2024
1 parent b741181 commit d8ad993
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Core/SDKs/Services/Plugin/PluginInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public partial class PluginInfo
public string Main { set; get; }
public string FullPath { set; get; }
public string Path { set; get; }
[ObservableProperty] private Bitmap _icon;
[ObservableProperty] private Bitmap? _icon;

[ObservableProperty] public bool isEnabled;
[ObservableProperty] public bool unloadFailed;
Expand Down
4 changes: 4 additions & 0 deletions Core/SDKs/Services/Plugin/PluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public static void UnloadPlugin(PluginInfo pluginInfoEx)

public static void Reload()
{
for (var i = 0; i < AllPluginInfos.Count; i++)
{
AllPluginInfos[i].Icon?.Dispose();
}
AllPluginInfos.Clear();
Load();
}
Expand Down
2 changes: 1 addition & 1 deletion Core/ViewModel/Pages/MarketPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public string AuthorName
public int LastVersionId { set; get; }

public string Description { set; get; }

public List<string> SupportSystems { set; get; }
public bool InLocal {
get{
return PluginManager.AllPluginInfos.Any(x=>x.NameSign==NameSign);
Expand Down
7 changes: 4 additions & 3 deletions KitopiaAvalonia/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
</ResourceDictionary>
</Application.Resources>
<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
<u-semi:SemiTheme Locale="zh-CN" />

<semi:SemiTheme Locale="zh-CN" />
<u-semi:SemiTheme Locale="zh-CN" />

<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
<StyleInclude Source="Styles/Styles.axaml" />

<StyleInclude Source="Controls/SearchItemShow.axaml" />
Expand Down
8 changes: 8 additions & 0 deletions KitopiaAvalonia/Pages/MarketPage.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
Text="{Binding Path=Name}"
Background="{x:Null}"
FontWeight="Normal" FontSize="18" />
<ItemsControl ItemsSource="{Binding SupportSystems}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="x:String">
<Label Theme="{StaticResource TagLabel}" Content="{Binding .}" Classes="Ghost Cyan"></Label>
</DataTemplate>

</ItemsControl.ItemTemplate>
</ItemsControl>
<StackPanel Orientation="Horizontal" Spacing="5">
<TextBlock VerticalAlignment="Top"
Text="{Binding LastVersion}" />
Expand Down
2 changes: 1 addition & 1 deletion Semi.Avalonia
Submodule Semi.Avalonia updated 49 files
+50 −29 demo/Semi.Avalonia.Demo/Pages/ColorPickerDemo.axaml
+1 −1 demo/Semi.Avalonia.Demo/Pages/ExpanderDemo.axaml
+31 −13 demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml
+23 −2 demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml.cs
+3 −2 demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml
+25 −2 demo/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml
+1 −1 src/Package.props
+196 −1 src/Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml
+145 −3 src/Semi.Avalonia.ColorPicker/Controls/ColorView.axaml
+34 −0 src/Semi.Avalonia.ColorPicker/Converters/ColorToTextConverter.cs
+36 −0 src/Semi.Avalonia.ColorPicker/Converters/HsvColorToTextConverter.cs
+21 −0 src/Semi.Avalonia.ColorPicker/Converters/ToColorModel.cs
+1 −0 src/Semi.Avalonia.ColorPicker/Shared.axaml
+2 −5 src/Semi.Avalonia/Controls/AdornerLayer.axaml
+7 −5 src/Semi.Avalonia/Controls/CalendarDatePicker.axaml
+1 −0 src/Semi.Avalonia/Controls/CheckBox.axaml
+10 −7 src/Semi.Avalonia/Controls/ComboBox.axaml
+61 −27 src/Semi.Avalonia/Controls/NotificationCard.axaml
+5 −1 src/Semi.Avalonia/Controls/RadioButton.axaml
+7 −1 src/Semi.Avalonia/Controls/TextBox.axaml
+202 −81 src/Semi.Avalonia/Controls/ToggleSwitch.axaml
+1 −0 src/Semi.Avalonia/Locale/en-us.axaml
+24 −0 src/Semi.Avalonia/Locale/ja-jp.axaml
+8 −0 src/Semi.Avalonia/Locale/ja-jp.axaml.cs
+24 −0 src/Semi.Avalonia/Locale/ru-ru.axaml
+8 −0 src/Semi.Avalonia/Locale/ru-ru.axaml.cs
+1 −0 src/Semi.Avalonia/Locale/zh-cn.axaml
+1 −1 src/Semi.Avalonia/Themes/Dark/AdornerLayer.axaml
+1 −1 src/Semi.Avalonia/Themes/Dark/AutoCompleteBox.axaml
+3 −3 src/Semi.Avalonia/Themes/Dark/Button.axaml
+4 −4 src/Semi.Avalonia/Themes/Dark/Calendar.axaml
+1 −1 src/Semi.Avalonia/Themes/Dark/ComboBox.axaml
+1 −1 src/Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml
+1 −1 src/Semi.Avalonia/Themes/Dark/Flyout.axaml
+2 −2 src/Semi.Avalonia/Themes/Dark/Menu.axaml
+2 −1 src/Semi.Avalonia/Themes/Dark/NotificationCard.axaml
+0 −3 src/Semi.Avalonia/Themes/Dark/TextBox.axaml
+3 −0 src/Semi.Avalonia/Themes/Dark/ToggleSwitch.axaml
+1 −1 src/Semi.Avalonia/Themes/Light/AdornerLayer.axaml
+3 −3 src/Semi.Avalonia/Themes/Light/Button.axaml
+1 −3 src/Semi.Avalonia/Themes/Light/Calendar.axaml
+2 −1 src/Semi.Avalonia/Themes/Light/NotificationCard.axaml
+0 −3 src/Semi.Avalonia/Themes/Light/TextBox.axaml
+3 −0 src/Semi.Avalonia/Themes/Light/ToggleSwitch.axaml
+7 −5 src/Semi.Avalonia/Themes/SemiTheme.axaml.cs
+1 −2 src/Semi.Avalonia/Themes/Shared/AdornerLayer.axaml
+18 −5 src/Semi.Avalonia/Themes/Shared/NotificationCard.axaml
+2 −2 src/Semi.Avalonia/Themes/Shared/TextBox.axaml
+4 −0 src/Semi.Avalonia/Themes/Shared/ToggleSwitch.axaml

0 comments on commit d8ad993

Please sign in to comment.