182 lines
9.3 KiB
XML
182 lines
9.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"
|
|
Title="历史版本回滚" Height="650" Width="900" ResizeMode="CanResize"
|
|
WindowStartupLocation="CenterScreen"
|
|
Topmost="True"
|
|
Background="{DynamicResource SettingsPageBackground}" MinHeight="550" MinWidth="800"
|
|
SnapsToDevicePixels="True"
|
|
TextOptions.TextRenderingMode="ClearType"
|
|
TextOptions.TextFormattingMode="Display"
|
|
ui:ThemeManager.IsThemeAware="True"
|
|
ui:TitleBar.ExtendViewIntoTitleBar="True"
|
|
ui:WindowHelper.SystemBackdropType="Mica"
|
|
ui:WindowHelper.UseModernWindowStyle="True"
|
|
ui:TitleBar.Height="48">
|
|
<Window.Resources>
|
|
<!-- 主题相关颜色资源 -->
|
|
<SolidColorBrush x:Key="PrimaryBrush" Color="#FF2563eb"/>
|
|
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#FF1f2937"/>
|
|
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#FF6b7280"/>
|
|
</Window.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 自定义标题栏 -->
|
|
<Border x:Name="Border_TitleBarRoot"
|
|
Height="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Path=(ui:TitleBar.Height)}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Path=Title}"
|
|
VerticalAlignment="Center" Margin="12,0,0,0" FontSize="12" FontWeight="SemiBold"/>
|
|
|
|
<!--Right Inset-->
|
|
<Rectangle Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Path=(ui:TitleBar.SystemOverlayRightInset)}"
|
|
Grid.Column="2"/>
|
|
|
|
<!--Right Buttons-->
|
|
<ikw:SimpleStackPanel x:Name="StackPanel_RightButtons"
|
|
Orientation="Horizontal" Grid.Column="1" Spacing="5">
|
|
</ikw:SimpleStackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- 主内容区 -->
|
|
<Grid Grid.Row="1" Background="{DynamicResource SettingsPageBackground}" Margin="20,20,20,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>
|
|
</Grid>
|
|
</Window> |