Files
community/Ink Canvas/Windows/HistoryRollbackWindow.xaml
T
doudou0720 3ae99c82cc fix(SymbolIcon):修复SymbolIcon问题并修改打包过程以正确构建单文件程序 (#407)
* refactor(Icon): 将SymbolIcon替换为FontIcon以使用Segoe Fluent Icons

Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>

* chore: 移除 Costura.Fody 的 IncludeAssets 配置

Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>

---------

Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>
2026-03-21 22:15:36 +08:00

146 lines
7.3 KiB
XML

<Window x:Class="Ink_Canvas.HistoryRollbackWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:mdxam="clr-namespace:MdXaml;assembly=MdXaml"
mc:Ignorable="d"
ui:WindowHelper.UseModernWindowStyle="False"
ui:WindowHelper.SystemBackdropType="Mica"
Title="历史版本回滚" Height="650" Width="900" ResizeMode="CanResize"
WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow"
Background="{DynamicResource SettingsPageBackground}" MinHeight="550" MinWidth="800"
SnapsToDevicePixels="True"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextFormattingMode="Display">
<Window.Resources>
<!-- 主题相关颜色资源 -->
<SolidColorBrush x:Key="PrimaryBrush" Color="#FF2563eb"/>
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#FF1f2937"/>
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#FF6b7280"/>
</Window.Resources>
<Grid Background="Transparent" Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题区域 -->
<ikw:SimpleStackPanel Grid.Row="0" Orientation="Horizontal" Spacing="12" Margin="0,0,0,16">
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="16" Padding="12" Margin="0,0,0,0">
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Undo}" FontSize="20" Foreground="White"
VerticalAlignment="Center"/>
</Border>
<ikw:SimpleStackPanel VerticalAlignment="Center" Spacing="4">
<TextBlock Text="选择要回滚到的历史版本" FontSize="22" FontWeight="Bold"
Foreground="{DynamicResource TextPrimaryBrush}"/>
</ikw:SimpleStackPanel>
</ikw:SimpleStackPanel>
<!-- 版本选择卡片 -->
<Border Grid.Row="1"
Background="{DynamicResource SettingsPageBackground}"
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
BorderThickness="1"
CornerRadius="12"
Margin="0,0,0,16"
Padding="20">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="0" Opacity="0.05"/>
</Border.Effect>
<ikw:SimpleStackPanel Spacing="16">
<TextBlock Text="选择版本" FontSize="16" FontWeight="SemiBold"
Foreground="{DynamicResource TextPrimaryBrush}"/>
<ComboBox x:Name="VersionComboBox"
Width="300" Height="40"
DisplayMemberPath="Version"
SelectionChanged="VersionComboBox_SelectionChanged"/>
</ikw:SimpleStackPanel>
</Border>
<!-- 发布说明卡片 -->
<Border Grid.Row="2"
Background="{DynamicResource SettingsPageBackground}"
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
BorderThickness="1"
CornerRadius="12"
Margin="0,0,0,16"
Padding="20">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="0" Opacity="0.05"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Text="版本更新说明" FontSize="16" FontWeight="SemiBold"
Foreground="{DynamicResource TextPrimaryBrush}"
Margin="0,0,0,16"/>
<Border Grid.Row="1"
Background="{DynamicResource SettingsPageBackground}"
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
BorderThickness="1"
CornerRadius="8">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="4" ShadowDepth="0" Opacity="0.03"/>
</Border.Effect>
<ScrollViewer x:Name="InnerReleaseNotesScrollViewer"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled"
Padding="16"
PanningMode="VerticalOnly"
PanningRatio="1.0"
IsManipulationEnabled="True">
<mdxam:MarkdownScrollViewer x:Name="ReleaseNotesViewer"
Foreground="{DynamicResource TextPrimaryBrush}"
MarkdownStyleName="GithubLike"
IsHitTestVisible="False"
IsManipulationEnabled="False"/>
</ScrollViewer>
</Border>
</Grid>
</Border>
<!-- 操作按钮区域 -->
<ikw:SimpleStackPanel Grid.Row="3" Spacing="16" Margin="0,0,0,0">
<Button x:Name="RollbackButton"
Content="回滚到此版本"
HorizontalAlignment="Center"
Click="RollbackButton_Click"
Style="{DynamicResource AccentButtonStyle}"
Width="200" Height="48"
FontSize="16" FontWeight="SemiBold"/>
<!-- 下载进度面板 -->
<Border x:Name="DownloadProgressPanel"
Background="{DynamicResource SettingsPageBackground}"
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
BorderThickness="1"
CornerRadius="12"
Visibility="Collapsed"
Margin="0,8,0,0"
Padding="24">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="0" Opacity="0.05"/>
</Border.Effect>
<ikw:SimpleStackPanel Spacing="12">
<ProgressBar x:Name="DownloadProgressBar"
Width="300" Height="8"
Minimum="0" Maximum="100" Value="0"/>
<TextBlock x:Name="DownloadProgressText"
Text="正在下载..."
FontSize="14"
Foreground="{DynamicResource TextPrimaryBrush}"
HorizontalAlignment="Center"/>
</ikw:SimpleStackPanel>
</Border>
</ikw:SimpleStackPanel>
</Grid>
</Window>