未验证 提交 4451109b 编写于 作者: R Richasy 提交者: GitHub

添加关于应用的说明 (#57)

* 添加关于应用的说明

* Update doc.md

* Create LICENSE
上级 848a1218
......@@ -7,6 +7,8 @@ assignees: Richasy
---
<!-- 🚨 请不要跳过或删除下面的信息,它们都是评估与测试所需的信息,完整填写有助于更快通过评审 🚨 -->
## 关联文档
<!-- 请取消下方的注释,并使用这样的方式插入与该问题有关的文档链接,如果你的问题与某个具体文档无关,请忽略 -->
......
MIT License
Copyright (c) 2021 Richasy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
......@@ -10,6 +10,13 @@
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d">
<Page.Resources>
<Style x:Key="TipTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{ThemeResource TextFillColorDisabledBrush}" />
<Setter Property="FontSize" Value="12" />
</Style>
</Page.Resources>
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="LayoutGroup">
......@@ -55,6 +62,17 @@
<controls:PlayerModeSettingSection />
<controls:PlayerControlSettingSection />
<controls:MTCSettingSection />
<StackPanel
Margin="0,12,0,0"
HorizontalAlignment="Left"
Spacing="4">
<TextBlock Style="{StaticResource TipTextStyle}" Text="{loc:LocaleLocator Name=AboutThisApp}" />
<TextBlock Style="{StaticResource TipTextStyle}">
<Run Text="{loc:LocaleLocator Name=AppName}" />
<Run Text="{x:Bind ViewModel.Version}" />
</TextBlock>
<TextBlock Style="{StaticResource TipTextStyle}" Text="{loc:LocaleLocator Name=License}" />
</StackPanel>
</StackPanel>
</muxc:ScrollView>
</Grid>
......
......@@ -17,12 +17,18 @@ namespace Richasy.Bili.App.Pages
public SettingPage()
{
this.InitializeComponent();
ViewModel = SettingViewModel.Instance;
}
/// <summary>
/// 视图模型.
/// </summary>
public SettingViewModel ViewModel { get; private set; }
/// <inheritdoc/>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
SettingViewModel.Instance.InitializeSettings();
ViewModel.InitializeSettings();
}
}
}
......@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AboutThisApp" xml:space="preserve">
<value>关于此应用</value>
</data>
<data name="AddReplyFailed" xml:space="preserve">
<value>添加评论失败,请稍后再试</value>
</data>
......@@ -476,6 +479,9 @@
<data name="LastestReply" xml:space="preserve">
<value>最新评论</value>
</data>
<data name="License" xml:space="preserve">
<value>©2021 Richasy. MIT 许可证</value>
</data>
<data name="Light" xml:space="preserve">
<value>浅色</value>
</data>
......
......@@ -328,6 +328,8 @@ namespace Richasy.Bili.Models.Enums
NoRoomDescription,
LogEmptied,
FailedToClearLog,
AboutThisApp,
License,
#pragma warning restore SA1602 // Enumeration items should be documented
}
}
......@@ -105,5 +105,11 @@ namespace Richasy.Bili.ViewModels.Uwp
/// </summary>
[Reactive]
public double SingleFastForwardAndRewindSpan { get; set; }
/// <summary>
/// 应用版本.
/// </summary>
[Reactive]
public string Version { get; set; }
}
}
......@@ -42,6 +42,9 @@ namespace Richasy.Bili.ViewModels.Uwp
MTCControlModeInit();
StartupInitAsync();
var appVersion = Package.Current.Id.Version;
Version = $"{appVersion.Major}.{appVersion.Minor}.{appVersion.Build}.{appVersion.Revision}";
PropertyChanged += OnPropertyChangedAsync;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册