提交 ac27229b 编写于 作者: R RMBGAME

💄 fixed FontFamily Error

上级 70fe88c5
......@@ -83,7 +83,7 @@ partial class Program
builder.With(new FontManagerOptions
{
DefaultFamilyName = UI.App.DefaultFontFamily.Name,
DefaultFamilyName = UI.App.DefaultFontFamilyName,
FontFallbacks = new[]
{
new FontFallback
......
......@@ -11,7 +11,7 @@
</ItemGroup>
<ItemGroup>
<None Remove="UI\Assets\Fonts\HarmonyOS_Sans_SC_Regular.woff2" />
<None Remove="UI\Assets\Fonts\HarmonyOS_Sans_SC_Regular.ttf" />
</ItemGroup>
<ItemGroup>
......
......@@ -213,8 +213,7 @@ public sealed partial class App : Application
try
{
//var fontFamily = IPlatformService.Instance.GetDefaultFontFamily();
var fontFamily = "avares://BD.WTTS.Client.Avalonia/UI/Assets/Fonts/HarmonyOS_Sans_SC_Regular.woff2#HarmonyOS Sans SC";
return FontFamily.Parse(fontFamily);
return FontFamily.Parse(DefaultFontFamilyName);
}
catch
{
......@@ -222,6 +221,8 @@ public sealed partial class App : Application
return FontFamily.Default;
}
public const string DefaultFontFamilyName = "avares://BD.WTTS.Client.Avalonia/UI/Assets/Fonts/HarmonyOS_Sans_SC_Regular.ttf#HarmonyOS Sans SC";
static readonly Lazy<FontFamily> _DefaultFontFamily = new(GetDefaultFontFamily);
public static FontFamily DefaultFontFamily => _DefaultFontFamily.Value;
......
......@@ -40,7 +40,7 @@
Name="FilePickerTipBorder"
MaxWidth="{ReflectionBinding $parent.Bounds.Width}"
MaxHeight="{ReflectionBinding $parent.Bounds.Height}">
<Border Background="{DynamicResource CardBackgroundFillColorDefaultBrush}">
<Border Background="{DynamicResource ControlOnImageFillColorSecondaryBrush}">
<StackPanel
Margin="10,5"
HorizontalAlignment="Center"
......
......@@ -4,18 +4,16 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ms="https://steampp.net/settings"
xmlns:spp="https://steampp.net/ui"
xmlns:ms="https://steampp.net/settings"
Title="{Binding Title}"
Width="1080"
Height="660"
d:DesignHight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="spp:MainWindowViewModel"
Width="1080"
Height="660"
WindowStartupLocation="CenterScreen"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Panel>
<spp:MainView DataContext="{Binding}" />
</Panel>
<spp:MainView DataContext="{Binding}" />
</Window>
......@@ -9,7 +9,7 @@ public partial class AuthenticatorItemModel : ReactiveObject, IDisposable
Timer? _progressTimer;
public void OnPointerLeftPressed()
public void Tapped()
{
IsSelected = !IsSelected;
}
......@@ -52,7 +52,7 @@ public partial class AuthenticatorItemModel : ReactiveObject, IDisposable
{
Code = null;
Toast.Show(ToastIcon.Error, Strings.Error_AuthSynchronizationFailed_.Format(ex.Message));
Log.Error(nameof(AuthenticatorItemModel), ex, nameof(OnPointerLeftPressed));
Log.Error(nameof(AuthenticatorItemModel), ex, nameof(ShowCode));
}
if (string.IsNullOrEmpty(Code))
......
namespace BD.WTTS.UI.ViewModels;
public sealed partial class SteamMarketManagePageViewModel : ViewModelBase
{
}
......@@ -15,6 +15,7 @@
mc:Ignorable="d">
<spp:AppItem
Title="{Binding AuthName}"
Description="{Binding AuthData.Created}"
ImageMargin="10"
MoreFlyout="{Binding $parent.ContextFlyout}">
<spp:AppItem.Tags>
......
......@@ -18,7 +18,7 @@ public partial class AuthenticatorItem : UserControl
//{
// if (DataContext is AuthenticatorItemModel authenticatorItemModel)
// {
// authenticatorItemModel.OnPointerLeftPressed();
// authenticatorItemModel.Tapped();
// }
//}
......@@ -27,7 +27,7 @@ public partial class AuthenticatorItem : UserControl
if (DataContext is AuthenticatorItemModel authenticatorItemModel)
{
//await authenticatorItemModel.CopyCode();
authenticatorItemModel.OnPointerLeftPressed();
authenticatorItemModel.Tapped();
}
}
......@@ -39,7 +39,7 @@ public partial class AuthenticatorItem : UserControl
// {
// if (e.GetCurrentPoint(e.Source as Visual).Properties.PointerUpdateKind == PointerUpdateKind.LeftButtonPressed)
// {
// authenticatorItemModel.OnPointerLeftPressed();
// authenticatorItemModel.Tapped();
// }
// // else if (e.GetCurrentPoint(e.Source as Visual).Properties.PointerUpdateKind == PointerUpdateKind.RightButtonPressed)
// // {
......
......@@ -13,7 +13,7 @@
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="spp:AuthenticatorHomePageViewModel"
x:DataType="spp:SteamMarketManagePageViewModel"
Description="{ReflectionBinding Description,
Source={x:Static s:Plugin.Instance},
Mode=OneWay}"
......@@ -28,69 +28,6 @@
</spp:PageBase.PreviewImage>
<spp:PageBase.ActionContent>
<StackPanel Orientation="Horizontal" Spacing="2">
<Button
Padding="8,4"
Command="{Binding ShowAddWindow}"
DockPanel.Dock="Right"
Theme="{StaticResource TransparentButton}">
<Panel>
<Viewbox
Width="16"
Height="16"
HorizontalAlignment="Left">
<ui:SymbolIcon Symbol="Add" />
</Viewbox>
<TextBlock
Margin="28,4,0,4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{ReflectionBinding Path=Res.Add,
Mode=OneWay,
Source={x:Static s:ResourceService.Current}}" />
</Panel>
</Button>
<Button
Padding="8,4"
Command="{Binding SyncAuthenticators}"
DockPanel.Dock="Right"
Theme="{StaticResource TransparentButton}">
<Panel>
<Viewbox
Width="16"
Height="16"
HorizontalAlignment="Left">
<ui:SymbolIcon Symbol="Sync" />
</Viewbox>
<TextBlock
Margin="28,4,0,4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{ReflectionBinding Path=Res.LocalAuth_CloudSync,
Mode=OneWay,
Source={x:Static s:ResourceService.Current}}" />
</Panel>
</Button>
<Button
Padding="8,4"
Command="{Binding Initialize}"
DockPanel.Dock="Right"
Theme="{StaticResource TransparentButton}">
<Panel>
<Viewbox
Width="16"
Height="16"
HorizontalAlignment="Left">
<ui:SymbolIcon Symbol="Refresh" />
</Viewbox>
<TextBlock
Margin="28,4,0,4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{ReflectionBinding Path=Res.Refresh,
Mode=OneWay,
Source={x:Static s:ResourceService.Current}}" />
</Panel>
</Button>
<ToggleButton
Padding="8,4"
DockPanel.Dock="Right"
......@@ -122,8 +59,8 @@
Theme="{StaticResource TransparentButton}">
<DropDownButton.Flyout>
<ui:FAMenuFlyout>
<ui:MenuFlyoutSeparator />
<ui:MenuFlyoutItem IsEnabled="False" Text="{ReflectionBinding Path=Res.Auth_Version, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" />
<ui:MenuFlyoutSeparator />
<ui:MenuFlyoutItem Text="{ReflectionBinding Path=Res.ViewInStore, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" />
<ui:MenuFlyoutItem Text="{ReflectionBinding Path=Res.UseHelp, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" />
<ui:MenuFlyoutItem Text="{ReflectionBinding Path=Res.AboutThisPlugin, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" />
......
......@@ -2,10 +2,11 @@ using Avalonia.Controls;
namespace BD.WTTS.UI.Views.Pages;
public partial class SteamMarketManagePage : PageBase<AuthenticatorHomePageViewModel>
public partial class SteamMarketManagePage : PageBase<SteamMarketManagePageViewModel>
{
public SteamMarketManagePage()
{
InitializeComponent();
DataContext ??= new SteamMarketManagePageViewModel();
}
}
......@@ -184,40 +184,50 @@
FontFamily="{StaticResource SymbolThemeFontFamily}"
Theme="{StaticResource TabViewButtonStyle}">
<Button.Flyout>
<ui:FAMenuFlyout Placement="BottomEdgeAlignedLeft">
<ui:MenuFlyoutSubItem
<MenuFlyout Placement="BottomEdgeAlignedLeft">
<MenuItem
Header="{ReflectionBinding Path=Res.AddPlatform,
Mode=OneWay,
Source={x:Static s:ResourceService.Current}}"
IsVisible="{Binding !!AddGamePlatforms.Count}"
ItemsSource="{Binding AddGamePlatforms}"
Text="{ReflectionBinding Path=Res.AddPlatform,
Mode=OneWay,
Source={x:Static s:ResourceService.Current}}">
<ui:MenuFlyoutSubItem.DataTemplates>
ItemsSource="{Binding AddGamePlatforms}">
<MenuItem.Styles>
<Style x:DataType="spp:PlatformAccount" Selector="MenuItem">
<Setter Property="Header" Value="{Binding FullName}" />
<Setter Property="Icon">
<PathIcon Data="{Binding Icon, Converter={StaticResource ResourceKeyValueConverter}}" />
</Setter>
<Setter Property="Command" Value="{ReflectionBinding #u.DataContext.AddPlatformCommand}" />
<Setter Property="CommandParameter" Value="{Binding}" />
</Style>
</MenuItem.Styles>
<!--<MenuItem.DataTemplates>
<DataTemplate DataType="{x:Type spp:PlatformAccount}">
<ui:MenuFlyoutItem
<MenuItem
Command="{ReflectionBinding #u.DataContext.AddPlatformCommand}"
CommandParameter="{ReflectionBinding}"
Text="{Binding FullName}">
<ui:MenuFlyoutItem.IconSource>
<ui:PathIconSource Data="{Binding Icon, Converter={StaticResource ResourceKeyValueConverter}}" />
</ui:MenuFlyoutItem.IconSource>
</ui:MenuFlyoutItem>
CommandParameter="{Binding}"
Header="{Binding FullName}">
<MenuItem.Icon>
<PathIcon Data="{Binding Icon, Converter={StaticResource ResourceKeyValueConverter}}" />
</MenuItem.Icon>
</MenuItem>
</DataTemplate>
</ui:MenuFlyoutSubItem.DataTemplates>
</ui:MenuFlyoutSubItem>
<ui:MenuFlyoutSeparator />
<ui:MenuFlyoutItem
Command="{Binding LoginNewCommand}"
IconSource="Add"
Text="{ReflectionBinding Path=Res.UserChange_LoginNewAccount,
Mode=OneWay,
Source={x:Static s:ResourceService.Current}}" />
<ui:MenuFlyoutSeparator />
</MenuItem.DataTemplates>-->
</MenuItem>
<MenuItem Header="-" />
<MenuItem Command="{Binding LoginNewCommand}" Header="{ReflectionBinding Path=Res.UserChange_LoginNewAccount, Mode=OneWay, Source={x:Static s:ResourceService.Current}}">
<MenuItem.Icon>
<ui:SymbolIcon Symbol="Add" />
</MenuItem.Icon>
</MenuItem>
<!--<ui:MenuFlyoutSeparator />
<ui:MenuFlyoutSubItem Text="{ReflectionBinding Path=Res.GameAccount_EndProcessWay, Mode=OneWay, Source={x:Static s:ResourceService.Current}}">
<ui:RadioMenuFlyoutItem
GroupName="KillMethond"
IconSource="Games"
Text="TaskKill" />
<ui:RadioMenuFlyoutItem
<ui:RadioMenuFlyoutItem
GroupName="KillMethond"
IconSource="Icons"
Text="Direct" />
......@@ -233,8 +243,8 @@
Text="Direct" />
</ui:MenuFlyoutSubItem>
<ui:MenuFlyoutSeparator />
<ui:ToggleMenuFlyoutItem IconSource="Safe" Text="{ReflectionBinding Path=Res.AdministratorStartup, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" />
</ui:FAMenuFlyout>
<ui:ToggleMenuFlyoutItem IconSource="Safe" Text="{ReflectionBinding Path=Res.AdministratorStartup, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" />-->
</MenuFlyout>
</Button.Flyout>
</Button>
</ui:TabView.TabStripFooter>
......
......@@ -17,7 +17,7 @@ public sealed class Plugin : PluginBase<Plugin>, IPlugin
public sealed override string UniqueEnglishName => moduleName;
public sealed override string Description => "管理库存游戏";
public sealed override string Description => "管理 Steam 库存游戏信息,Steam启动时加载当前账号库存,未启动时加载 Steam 本地缓存数据";
protected sealed override string? AuthorOriginalString => null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册