Files
LanMountainDesktop/LanMountainDesktop.Launcher/Views/ErrorDebugWindow.axaml
2026-06-05 23:38:32 +08:00

165 lines
7.6 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
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:views="clr-namespace:LanMountainDesktop.Launcher.Views"
xmlns:res="clr-namespace:LanMountainDesktop.Launcher.Resources"
mc:Ignorable="d"
d:DesignWidth="460"
d:DesignHeight="500"
x:Class="LanMountainDesktop.Launcher.Views.ErrorDebugWindow"
x:DataType="views:ErrorDebugWindow"
x:CompileBindings="False"
Title="{x:Static res:Strings.DebugDebug_Title}"
Width="460"
Height="500"
CanResize="False"
WindowStartupLocation="CenterOwner"
Background="{DynamicResource SolidBackgroundFillColorBaseBrush}"
TransparencyLevelHint="None"
Icon="/Assets/logo.ico">
<Window.Resources>
<CornerRadius x:Key="DesignCornerRadiusMicro">2</CornerRadius>
<CornerRadius x:Key="DesignCornerRadiusXs">4</CornerRadius>
<CornerRadius x:Key="DesignCornerRadiusSm">4</CornerRadius>
<CornerRadius x:Key="DesignCornerRadiusMd">8</CornerRadius>
<CornerRadius x:Key="DesignCornerRadiusLg">8</CornerRadius>
<CornerRadius x:Key="DesignCornerRadiusXl">12</CornerRadius>
<CornerRadius x:Key="DesignCornerRadiusIsland">16</CornerRadius>
<CornerRadius x:Key="DesignCornerRadiusComponent">8</CornerRadius>
<CornerRadius x:Key="OverlayCornerRadius">8</CornerRadius>
<CornerRadius x:Key="ControlCornerRadius">4</CornerRadius>
</Window.Resources>
<Design.DataContext>
<views:ErrorDebugWindow />
</Design.DataContext>
<Grid Margin="24" RowDefinitions="Auto,*,Auto">
<TextBlock Grid.Row="0"
Text="{x:Static res:Strings.DebugDebug_SettingsTitle}"
FontSize="20"
FontWeight="SemiBold"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Margin="0,0,0,16" />
<ScrollViewer Grid.Row="1"
VerticalScrollBarVisibility="Auto">
<StackPanel Spacing="16">
<Border Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
CornerRadius="{DynamicResource DesignCornerRadiusMd}"
Padding="16,12">
<Grid ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0" VerticalAlignment="Center">
<TextBlock Text="{x:Static res:Strings.DebugDebug_DevMode}"
FontSize="14"
Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
<TextBlock Text="{x:Static res:Strings.DebugDebug_DevModeDesc}"
FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Margin="0,2,0,0" />
</StackPanel>
<ToggleSwitch x:Name="DevModeToggle"
Grid.Column="1"
OnContent="{x:Static res:Strings.DebugDebug_On}"
OffContent="{x:Static res:Strings.DebugDebug_Off}" />
</Grid>
</Border>
<Border Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
CornerRadius="{DynamicResource DesignCornerRadiusMd}"
Padding="16,12">
<Grid RowDefinitions="Auto,Auto" ColumnDefinitions="*,Auto">
<TextBlock Grid.Row="0" Grid.Column="0"
Text="{x:Static res:Strings.DebugDebug_AppPath}"
FontSize="14"
Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
<TextBlock x:Name="PathTextBlock"
Grid.Row="1" Grid.Column="0"
Text="{x:Static res:Strings.DebugDebug_NotSelected}"
FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
TextTrimming="CharacterEllipsis"
Margin="0,4,12,0" />
<Button x:Name="BrowseButton"
Grid.Row="0" Grid.RowSpan="2" Grid.Column="1"
Content="{x:Static res:Strings.DebugDebug_Browse}"
VerticalAlignment="Center" />
</Grid>
</Border>
<Border Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
CornerRadius="{DynamicResource DesignCornerRadiusMd}"
Padding="16,12">
<Grid RowDefinitions="Auto,Auto,Auto" ColumnDefinitions="*,Auto">
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Spacing="2">
<TextBlock Text="{x:Static res:Strings.DebugDebug_BackgroundImage}"
FontSize="14"
Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
<TextBlock Text="{x:Static res:Strings.DebugDebug_BackgroundImageDesc}"
FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
TextWrapping="Wrap" />
</StackPanel>
<TextBlock x:Name="BackgroundImagePathTextBlock"
Grid.Row="1" Grid.Column="0"
Text="{x:Static res:Strings.DebugDebug_BackgroundImageNotSet}"
FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
TextTrimming="CharacterEllipsis"
Margin="0,10,12,0" />
<StackPanel Grid.Row="1"
Grid.Column="1"
Orientation="Horizontal"
Spacing="8"
Margin="0,6,0,0">
<Button x:Name="BrowseImageButton"
Content="{x:Static res:Strings.DebugDebug_Browse}"
VerticalAlignment="Center" />
<Button x:Name="ClearImageButton"
Content="{x:Static res:Strings.DebugDebug_Clear}"
VerticalAlignment="Center" />
</StackPanel>
<TextBlock x:Name="BackgroundImageStatusTextBlock"
Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
Text="{x:Static res:Strings.DebugDebug_BackgroundImageNotSet}"
FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
TextWrapping="Wrap"
Margin="0,8,0,0" />
</Grid>
</Border>
<Border Background="{DynamicResource SystemFillColorCautionBackgroundBrush}"
CornerRadius="{DynamicResource DesignCornerRadiusMd}"
Padding="12,10"
IsVisible="True">
<TextBlock Text="{x:Static res:Strings.DebugDebug_Warning}"
FontSize="12"
Foreground="{DynamicResource SystemFillColorCautionBrush}"
TextWrapping="Wrap" />
</Border>
</StackPanel>
</ScrollViewer>
<StackPanel Grid.Row="2"
Orientation="Horizontal"
HorizontalAlignment="Right"
Spacing="12"
Margin="0,16,0,0">
<Button x:Name="CancelButton"
Content="{x:Static res:Strings.DebugDebug_ButtonCancel}"
Width="80"
Height="32" />
<Button x:Name="OkButton"
Content="{x:Static res:Strings.DebugDebug_ButtonOk}"
Width="80"
Height="32"
Theme="{DynamicResource AccentButtonTheme}" />
</StackPanel>
</Grid>
</Window>