UI rework: per-row actions, drop sidebar
Replace the sidebar + hero + single big-button layout with a flat list of per-version cards. Each card carries its own action button: - Installed: ▶ Lancer (green, primary) - Available on server only: ⬇ Installer (blue, accent) + lighter blue card - Busy: inline mini progress bar with %, card tinted green Each card also exposes a "..." menu (left-click opens it) with: - Voir les release notes (works for installed and remote-only versions) - Ouvrir le dossier (installed only) - Supprimer cette version (installed only, with confirmation dialog) VersionRowViewModel owns its state (InstalledIdle / AvailableIdle / Downloading / Installing / Uninstalling) and its commands; MainViewModel wires per-row handlers after instantiation so the row VM stays UI-only and the services live one layer up. ReleaseNotesViewerDialog: separate dialog reused by the menu — same Markdown rendering as UpdateAvailableDialog but no download CTA. Theme: AccentButton + IconButton + dark ContextMenu/MenuItem styles. Behavior changes: - The single global SelectedVersion + AvailableUpdate are gone; each row is independently actionable. - The list now merges installed + remote: a version present on the server but not locally appears as a "remote-only" row, and vice-versa. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
42
src/PSLauncher.App/Views/ReleaseNotesViewerDialog.xaml
Normal file
42
src/PSLauncher.App/Views/ReleaseNotesViewerDialog.xaml
Normal file
@@ -0,0 +1,42 @@
|
||||
<Window x:Class="PSLauncher.App.Views.ReleaseNotesViewerDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Notes de version"
|
||||
Width="640" Height="540"
|
||||
MinWidth="480" MinHeight="400"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Background="{StaticResource Brush.Bg.Window}">
|
||||
<Grid Margin="24">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0"
|
||||
Text="{Binding Title}"
|
||||
FontSize="22" FontWeight="SemiBold"
|
||||
Margin="0,0,0,18"
|
||||
Foreground="{StaticResource Brush.Text.Primary}" />
|
||||
|
||||
<Border Grid.Row="1"
|
||||
Background="{StaticResource Brush.Bg.Card}"
|
||||
BorderBrush="{StaticResource Brush.Border}" BorderThickness="1"
|
||||
CornerRadius="6"
|
||||
Padding="16">
|
||||
<FlowDocumentScrollViewer
|
||||
Document="{Binding ReleaseNotesDocument}"
|
||||
Foreground="{StaticResource Brush.Text.Primary}"
|
||||
Background="Transparent" />
|
||||
</Border>
|
||||
|
||||
<Button Grid.Row="2"
|
||||
Style="{StaticResource SecondaryButton}"
|
||||
Content="Fermer"
|
||||
IsCancel="True"
|
||||
IsDefault="True"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,18,0,0"
|
||||
Click="OnClose" />
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user