2026-04-21 20:59:52 +08:00
|
|
|
<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"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
x:Class="LanMountainDesktop.Launcher.Views.SplashWindow"
|
|
|
|
|
x:DataType="views:SplashWindow"
|
|
|
|
|
Title="LanMountain Desktop"
|
|
|
|
|
Width="480"
|
|
|
|
|
Height="320"
|
|
|
|
|
CanResize="False"
|
Add startup visual modes and attempt registry
Implement startup visual behavior, de-duplicate startup attempts, and improve failure UX.
Key changes:
- Add spec and docs for startup visuals and timing contract (.trae/specs and docs/LAUNCHER_STARTUP_VISUALS.md).
- Introduce StartupVisualPreferences contract and resolver; create SplashWindow via resolved mode.
- Add StartupAttemptRecord model and a file-backed StartupAttemptRegistry to persist and coordinate in-progress startup attempts (attach/adopt, soft/hard timeouts, IPC/connect state, lifecycle updates).
- Update LauncherFlowCoordinator to: adopt/attach to existing attempts, track IPC connection and soft/hard timeouts (30s/120s), show delayed UI state, attempt foreground recovery via public IPC, compose detailed launch result metadata, and mark registry states (soft timeout, detached waiting, succeeded, failed).
- Add TryActivateExistingInstanceAsync to attempt activating an existing desktop via IPC.
- Change failure flow: ShowFailureWindowAsync now returns user choice; ErrorWindow updated to present Activate/Wait/Open Logs/Exit semantics and new layouts/styles; improved button wiring and debug/dev mode handling.
- Add UI and resource tweaks (ErrorWindow and SplashWindow changes), project asset link for nightly logo, and unit tests for StartupVisualPreferences.
These changes prevent duplicate desktop processes during slow startups, provide clearer UX for delayed startups, and persist startup attempt state across Launcher invocations for safer recovery/attach behavior.
2026-04-23 09:03:35 +08:00
|
|
|
ShowInTaskbar="False"
|
2026-04-21 20:59:52 +08:00
|
|
|
WindowStartupLocation="CenterScreen"
|
|
|
|
|
SystemDecorations="None"
|
Add startup visual modes and attempt registry
Implement startup visual behavior, de-duplicate startup attempts, and improve failure UX.
Key changes:
- Add spec and docs for startup visuals and timing contract (.trae/specs and docs/LAUNCHER_STARTUP_VISUALS.md).
- Introduce StartupVisualPreferences contract and resolver; create SplashWindow via resolved mode.
- Add StartupAttemptRecord model and a file-backed StartupAttemptRegistry to persist and coordinate in-progress startup attempts (attach/adopt, soft/hard timeouts, IPC/connect state, lifecycle updates).
- Update LauncherFlowCoordinator to: adopt/attach to existing attempts, track IPC connection and soft/hard timeouts (30s/120s), show delayed UI state, attempt foreground recovery via public IPC, compose detailed launch result metadata, and mark registry states (soft timeout, detached waiting, succeeded, failed).
- Add TryActivateExistingInstanceAsync to attempt activating an existing desktop via IPC.
- Change failure flow: ShowFailureWindowAsync now returns user choice; ErrorWindow updated to present Activate/Wait/Open Logs/Exit semantics and new layouts/styles; improved button wiring and debug/dev mode handling.
- Add UI and resource tweaks (ErrorWindow and SplashWindow changes), project asset link for nightly logo, and unit tests for StartupVisualPreferences.
These changes prevent duplicate desktop processes during slow startups, provide clearer UX for delayed startups, and persist startup attempt state across Launcher invocations for safer recovery/attach behavior.
2026-04-23 09:03:35 +08:00
|
|
|
Background="#0B0B0B"
|
2026-04-21 20:59:52 +08:00
|
|
|
TransparencyLevelHint="None"
|
|
|
|
|
Icon="/Assets/logo.ico">
|
|
|
|
|
<Design.DataContext>
|
|
|
|
|
<views:SplashWindow />
|
|
|
|
|
</Design.DataContext>
|
|
|
|
|
|
Refactor data location paths and add background service
Refactor DataLocationResolver to centralize data path resolution (ResolveLauncherDataPath, ResolveDesktopDataPath, ResolveConfigPath, ResolveLauncherLogsPath, ResolveLauncherStatePath) and replace usages of the previous ".launcher" layout with a "Launcher" folder. Update API: LoadConfig/SaveConfig reorganized and ApplyLocationChoice now accepts an optional custom path and migration flag; migration logic updated accordingly. Update dependent services and views (Logger, DeploymentLocator, UpdateEngineService, OobeStateService, StartupAttemptRegistry, LauncherDebugSettingsStore, OobeWindow) to use the new resolver APIs and paths. Add LauncherBackgroundService to load/validate/cache a custom splash background image and wire it into SplashWindow (AXAML/Axaml.cs) with UI placeholders and overlay. Misc: minor cleanup of Oobe/Splash XAML and related code adjustments and logging improvements.
2026-04-25 18:14:29 +08:00
|
|
|
<Grid RowDefinitions="*,Auto">
|
|
|
|
|
<!-- 背景图片 -->
|
|
|
|
|
<Image x:Name="BackgroundImage"
|
|
|
|
|
Grid.RowSpan="2"
|
|
|
|
|
Stretch="UniformToFill"
|
|
|
|
|
IsVisible="False"
|
|
|
|
|
Opacity="0"/>
|
|
|
|
|
|
|
|
|
|
<!-- 半透明遮罩层 -->
|
|
|
|
|
<Border x:Name="BackgroundOverlay"
|
|
|
|
|
Grid.RowSpan="2"
|
|
|
|
|
Background="#0B0B0B"
|
|
|
|
|
Opacity="0.85"/>
|
|
|
|
|
|
2026-04-24 18:22:14 +08:00
|
|
|
<Grid Grid.Row="0"
|
|
|
|
|
Margin="24">
|
|
|
|
|
<TextBlock x:Name="AppNameText"
|
|
|
|
|
Text="LanMountain Desktop"
|
|
|
|
|
FontSize="24"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
Foreground="#F6F7FB" />
|
2026-04-21 20:59:52 +08:00
|
|
|
</Grid>
|
Add startup visual modes and attempt registry
Implement startup visual behavior, de-duplicate startup attempts, and improve failure UX.
Key changes:
- Add spec and docs for startup visuals and timing contract (.trae/specs and docs/LAUNCHER_STARTUP_VISUALS.md).
- Introduce StartupVisualPreferences contract and resolver; create SplashWindow via resolved mode.
- Add StartupAttemptRecord model and a file-backed StartupAttemptRegistry to persist and coordinate in-progress startup attempts (attach/adopt, soft/hard timeouts, IPC/connect state, lifecycle updates).
- Update LauncherFlowCoordinator to: adopt/attach to existing attempts, track IPC connection and soft/hard timeouts (30s/120s), show delayed UI state, attempt foreground recovery via public IPC, compose detailed launch result metadata, and mark registry states (soft timeout, detached waiting, succeeded, failed).
- Add TryActivateExistingInstanceAsync to attempt activating an existing desktop via IPC.
- Change failure flow: ShowFailureWindowAsync now returns user choice; ErrorWindow updated to present Activate/Wait/Open Logs/Exit semantics and new layouts/styles; improved button wiring and debug/dev mode handling.
- Add UI and resource tweaks (ErrorWindow and SplashWindow changes), project asset link for nightly logo, and unit tests for StartupVisualPreferences.
These changes prevent duplicate desktop processes during slow startups, provide clearer UX for delayed startups, and persist startup attempt state across Launcher invocations for safer recovery/attach behavior.
2026-04-23 09:03:35 +08:00
|
|
|
|
|
|
|
|
<Border Grid.Row="1"
|
|
|
|
|
Padding="24,18,24,24"
|
|
|
|
|
Background="Transparent">
|
|
|
|
|
<Grid RowDefinitions="Auto,Auto"
|
|
|
|
|
RowSpacing="10">
|
|
|
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
|
|
|
<Border x:Name="VersionTextBorder"
|
|
|
|
|
Background="Transparent"
|
|
|
|
|
Cursor="Hand"
|
|
|
|
|
HorizontalAlignment="Left">
|
|
|
|
|
<TextBlock x:Name="VersionText"
|
|
|
|
|
FontSize="11"
|
|
|
|
|
Foreground="#B9C0CC"
|
|
|
|
|
Text="0.0.0-dev (Administrate)" />
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<TextBlock x:Name="StatusText"
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
FontSize="11"
|
|
|
|
|
Foreground="#B9C0CC"
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
Text="Initializing..." />
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<ProgressBar x:Name="ProgressIndicator"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Minimum="0"
|
|
|
|
|
Maximum="100"
|
|
|
|
|
Value="0"
|
|
|
|
|
Height="4"
|
|
|
|
|
IsIndeterminate="False"
|
|
|
|
|
Foreground="#F6F7FB"
|
|
|
|
|
Background="#2C313D" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
2026-04-21 20:59:52 +08:00
|
|
|
</Grid>
|
|
|
|
|
</Window>
|