mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-30 10:19:51 +08:00
统一修改AboutWindow、RepoUpdateDialog、ScriptRepoWindow、CheckUpdateWindow和PromptDialog的WindowBackdropType属性为Auto,提升窗口在透明背景下的显示效果。同时清理了WindowHelper.cs中的代码格式。
252 lines
14 KiB
XML
252 lines
14 KiB
XML
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.CheckUpdateWindow"
|
||
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:local="clr-namespace:BetterGenshinImpact.View.Windows"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||
xmlns:vio="http://schemas.lepo.co/wpfui/2022/xaml/violeta"
|
||
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
|
||
xmlns:webview="clr-namespace:BetterGenshinImpact.View.Controls.Webview"
|
||
x:Name="app"
|
||
Title="发现新版本"
|
||
Width="680"
|
||
MinHeight="10"
|
||
SizeToContent="Height"
|
||
Background="#202020"
|
||
ExtendsContentIntoTitleBar="True"
|
||
FontFamily="{DynamicResource TextThemeFontFamily}"
|
||
WindowBackdropType="Auto"
|
||
WindowStartupLocation="CenterOwner"
|
||
mc:Ignorable="d">
|
||
<Grid>
|
||
<ui:Grid Name="MyGrid" Margin="0,48,0,0" RowDefinitions="Auto,*,Auto,Auto">
|
||
<webview:WebpagePanel x:Name="WebpagePanel"
|
||
Grid.Row="1"
|
||
Height="400"
|
||
Margin="12,0,12,0" />
|
||
<ui:Grid Name="UpdateStatusMessageGrid"
|
||
Grid.Row="0"
|
||
Margin="16,0,16,0"
|
||
ColumnDefinitions="Auto,*"
|
||
Visibility="{Binding ShowUpdateStatus, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||
<vio:Loading Grid.Column="0" />
|
||
<ui:StackPanel Grid.Column="1" Margin="16,0,0,0">
|
||
<TextBlock Text="{Binding UpdateStatusMessage}" />
|
||
</ui:StackPanel>
|
||
</ui:Grid>
|
||
<!-- 新增:多渠道更新方式卡片 -->
|
||
<StackPanel Name="ServerPanel" Grid.Row="2" Margin="12,0,12,0">
|
||
<ui:CardControl Name="GitSourceCard" Margin="0,0,0,4" Padding="12,12">
|
||
<ui:CardControl.Icon>
|
||
<ui:FontIcon Glyph="" Style="{StaticResource FaFontIconStyle}" />
|
||
</ui:CardControl.Icon>
|
||
<ui:CardControl.Header>
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<ui:TextBlock Grid.Row="0"
|
||
Grid.Column="0"
|
||
FontTypography="Body"
|
||
Text="开源渠道"
|
||
TextWrapping="Wrap" />
|
||
<ui:TextBlock Grid.Row="1"
|
||
Grid.Column="0"
|
||
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
|
||
Text="{Binding GitSourceDescription}"
|
||
TextWrapping="Wrap" />
|
||
</Grid>
|
||
</ui:CardControl.Header>
|
||
<StackPanel Orientation="Horizontal">
|
||
<ComboBox x:Name="GitSourceComboBox"
|
||
SelectedValue="{Binding SelectedGitSource}"
|
||
SelectedValuePath="Content"
|
||
Margin="0,0,8,0"
|
||
MinWidth="80">
|
||
<ComboBoxItem Content="Github" />
|
||
<ComboBoxItem Content="CNB" />
|
||
</ComboBox>
|
||
<ui:Button
|
||
Icon="{ui:SymbolIcon ArrowDownload24}"
|
||
Content="立即更新"
|
||
Command="{Binding UpdateFromGitHostPlatformCommand}" />
|
||
</StackPanel>
|
||
</ui:CardControl>
|
||
<ui:CardControl Name="SteambirdCard" Margin="0,0,0,4" Padding="12,12">
|
||
<ui:CardControl.Icon>
|
||
<ui:FontIcon Glyph="" Style="{StaticResource FaFontIconStyle}" />
|
||
</ui:CardControl.Icon>
|
||
<ui:CardControl.Header>
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<emoji:TextBlock Grid.Row="0"
|
||
Grid.Column="0"
|
||
Text="Steambird 服务 🆓"
|
||
TextWrapping="Wrap" />
|
||
<ui:TextBlock Grid.Row="1"
|
||
Grid.Column="0"
|
||
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
|
||
Text="【国内】普通用户可点此直接更新"
|
||
TextWrapping="Wrap" />
|
||
</Grid>
|
||
</ui:CardControl.Header>
|
||
<StackPanel Orientation="Horizontal">
|
||
<ui:Button
|
||
Appearance="Success"
|
||
Icon="{ui:SymbolIcon ArrowDownload24}"
|
||
Content="立即更新"
|
||
Command="{Binding UpdateFromSteambirdCommand}" />
|
||
</StackPanel>
|
||
</ui:CardControl>
|
||
<ui:CardControl Margin="0,0,0,4" Padding="12,12">
|
||
<ui:CardControl.Icon>
|
||
<ui:FontIcon Glyph="" Style="{StaticResource FaFontIconStyle}" />
|
||
</ui:CardControl.Icon>
|
||
<ui:CardControl.Header>
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<emoji:TextBlock Grid.Row="0"
|
||
Grid.Column="0"
|
||
Text="Mirror酱服务 ⚡"
|
||
TextWrapping="Wrap" />
|
||
<ui:TextBlock Grid.Row="1"
|
||
Grid.Column="0"
|
||
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
|
||
Text="【国内】Mirror酱用户可以输入CDK高速更新"
|
||
TextWrapping="Wrap" />
|
||
</Grid>
|
||
</ui:CardControl.Header>
|
||
<StackPanel Orientation="Horizontal">
|
||
<ui:Button
|
||
Name="EditCdkButton"
|
||
Margin="0,0,8,0"
|
||
Icon="{ui:SymbolIcon TicketDiagonal24}"
|
||
Content="修改CDK"
|
||
Command="{Binding EditCdkCommand}" />
|
||
<ui:Button
|
||
Icon="{ui:SymbolIcon ArrowDownload24}"
|
||
Content="立即更新"
|
||
Command="{Binding UpdateFromMirrorChyanCommand}" />
|
||
</StackPanel>
|
||
</ui:CardControl>
|
||
|
||
<!--<ui:CardControl Margin="0,0,0,8">
|
||
<ui:CardControl.Icon>
|
||
<ui:FontIcon Glyph="" Style="{StaticResource FaFontIconStyle}" />
|
||
</ui:CardControl.Icon>
|
||
<ui:CardControl.Header>
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<emoji:TextBlock Grid.Row="0"
|
||
Grid.Column="0"
|
||
Text="Hutao Cloud 胡桃云⚡"
|
||
TextWrapping="Wrap" />
|
||
<ui:TextBlock Grid.Row="1"
|
||
Grid.Column="0"
|
||
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
|
||
Text="胡桃云CDN用户,可使用 Hutao Cloud CDN 高速更新"
|
||
TextWrapping="Wrap" />
|
||
</Grid>
|
||
</ui:CardControl.Header>
|
||
<StackPanel Orientation="Horizontal">
|
||
<ui:Button
|
||
Appearance="Primary"
|
||
Icon="{ui:SymbolIcon ArrowBounce24}"
|
||
Content="唤起胡桃"
|
||
Command="{Binding OneKeyExecuteCommand}" />
|
||
</StackPanel>
|
||
</ui:CardControl>-->
|
||
</StackPanel>
|
||
<!-- 原有按钮区域 -->
|
||
<ui:Grid Grid.Row="3"
|
||
Margin="8"
|
||
ColumnDefinitions="*,Auto,Auto,Auto,Auto">
|
||
<ui:Button Grid.Column="0"
|
||
MinWidth="90"
|
||
Margin="8,0,8,0"
|
||
Command="{Binding BackgroundUpdateCommand}"
|
||
Content="后台更新"
|
||
Visibility="Collapsed" />
|
||
<Grid Grid.Column="0">
|
||
<ui:Button x:Name="OtherUpdateButton"
|
||
Icon="{ui:SymbolIcon Globe24}"
|
||
Appearance="Primary"
|
||
MinWidth="90"
|
||
Margin="8,0,8,0"
|
||
Command="{Binding OtherUpdateCommand}"
|
||
Content="手动下载" />
|
||
<!-- 气泡提示 -->
|
||
<Popup x:Name="OtherUpdateTipPopup"
|
||
IsOpen="{Binding ShowOtherUpdateTip}"
|
||
PlacementTarget="{Binding ElementName=OtherUpdateButton}"
|
||
Placement="Top"
|
||
HorizontalOffset="0"
|
||
VerticalOffset="-3"
|
||
AllowsTransparency="True"
|
||
PopupAnimation="Fade">
|
||
<Grid>
|
||
<Border Background="#FF4A4A4A"
|
||
CornerRadius="8"
|
||
Padding="12,8"
|
||
MaxWidth="200"
|
||
MouseLeftButtonDown="OnCloseTipClick"
|
||
Cursor="Hand">
|
||
<Border.Effect>
|
||
<DropShadowEffect Color="Black"
|
||
Opacity="0.3"
|
||
ShadowDepth="2"
|
||
BlurRadius="8"/>
|
||
</Border.Effect>
|
||
<emoji:TextBlock Text="💡 如果上方更新渠道无法正常更新,可以点击此按钮手动下载安装包进行更新"
|
||
Foreground="#FFE6E6E6"
|
||
TextWrapping="Wrap"
|
||
FontSize="12"/>
|
||
</Border>
|
||
<!-- 小三角形指示器 -->
|
||
<Polygon Points="0,0 10,0 5,8"
|
||
Fill="#FF4A4A4A"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Bottom"
|
||
Margin="0,0,0,-8"/>
|
||
</Grid>
|
||
</Popup>
|
||
</Grid>
|
||
<!--<ui:Button Grid.Column="1"
|
||
MinWidth="90"
|
||
Margin="8,0,8,0"
|
||
Appearance="Success"
|
||
Command="{Binding UpdateCommand}"
|
||
Content="立即更新" />-->
|
||
<ui:Button Name="IgnoreButton"
|
||
Grid.Column="2"
|
||
MinWidth="90"
|
||
Margin="8,0,8,0"
|
||
Command="{Binding IgnoreCommand}"
|
||
Content="不再提示" />
|
||
<ui:Button Grid.Column="3"
|
||
MinWidth="90"
|
||
Margin="8,0,8,0"
|
||
Command="{Binding CancelCommand}"
|
||
Content="取消" />
|
||
</ui:Grid>
|
||
</ui:Grid>
|
||
<ui:TitleBar Title="{Binding Title, ElementName=app}"
|
||
ShowMaximize="False"
|
||
ShowMinimize="False">
|
||
<ui:TitleBar.Icon>
|
||
<ui:ImageIcon Source="pack://application:,,,/Resources/Images/logo.png" />
|
||
</ui:TitleBar.Icon>
|
||
</ui:TitleBar>
|
||
</Grid>
|
||
</ui:FluentWindow> |