CI / Build and test (push) Successful in 10m37s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 9s
Release / Build, test and publish (push) Successful in 16m19s
CI / PostgreSQL 16 integration (push) Successful in 10m19s
CI / PostgreSQL 17 integration (push) Successful in 11m27s
CI / Docker image (push) Successful in 57s
Release / Server image (push) Successful in 1m34s
Owner review 4 and owner review 1 phase 6. - Work board in Videos (desktop and admin panel): Published and Workspace lanes (#29). - Anonymous usage counts removed: Chronos sends nothing about its use (#30). - The archive's whole folder tree is created inside any archive root, on the server and the desktop (#31). - Video cards start with the preset; sizes keep number and unit together (#28). - Deploy guide docs/deploy (Docker, Unraid, desktop), BRIEF §24, original documentation in docs/reference/original (#22). Closes #22 #28 #29 #30 #31 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
115 lines
7.9 KiB
XML
115 lines
7.9 KiB
XML
<UserControl x:Class="Chronos.App.Sections.WelcomeView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:ui="clr-namespace:Chronos.Ui.Controls;assembly=Chronos.Ui"
|
|
xmlns:l="clr-namespace:Chronos.Ui.Localization;assembly=Chronos.Ui">
|
|
<UserControl.Resources>
|
|
<!-- Welcome.html choice: 68 px card, highlighted = accent border with the AccentSelected glow. -->
|
|
<Style x:Key="RadioButton.Choice" TargetType="RadioButton">
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Ring}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
|
|
<Setter Property="Height" Value="68" />
|
|
<Setter Property="Margin" Value="0,0,0,10" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RadioButton">
|
|
<Grid>
|
|
<Border x:Name="Glow" Margin="-3" CornerRadius="11" BorderThickness="3" BorderBrush="{DynamicResource Brush.AccentSelected}" Visibility="Collapsed" />
|
|
<Border x:Name="Bd" Background="{DynamicResource Brush.Card}" BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="1"
|
|
CornerRadius="{StaticResource Radius.Card}" Padding="16,0">
|
|
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Stretch" />
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.CardHover}" />
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
|
|
<Setter TargetName="Glow" Property="Visibility" Value="Visible" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="Text.ChoiceTitle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="14" />
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
|
|
</Style>
|
|
<Style x:Key="Text.ChoiceDetail" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="12" />
|
|
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
|
|
<Setter Property="Margin" Value="0,3,0,0" />
|
|
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
|
|
</Style>
|
|
</UserControl.Resources>
|
|
|
|
<!-- A modal dialog over the dimmed shell: Tab, Ctrl+Tab and the arrows stay inside it, and it opens with focus on the chosen card. -->
|
|
<Border Width="640" Background="{DynamicResource Brush.Surface}" BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="1"
|
|
CornerRadius="{StaticResource Radius.Dialog}" Padding="32,28" Effect="{StaticResource Shadow.Popup}"
|
|
KeyboardNavigation.TabNavigation="Cycle" KeyboardNavigation.ControlTabNavigation="Cycle" KeyboardNavigation.DirectionalNavigation="Contained">
|
|
<StackPanel>
|
|
<DockPanel LastChildFill="True">
|
|
<ComboBox DockPanel.Dock="Right" VerticalAlignment="Top" MinWidth="120" ItemsSource="{Binding Languages}" SelectedItem="{Binding SelectedLanguage}"
|
|
DisplayMemberPath="Name" ToolTip="{l:Loc Tooltips.Welcome.Language}" AutomationProperties.Name="{l:Loc Settings.General.Language}" />
|
|
<ui:BrandMarkIcon Width="56" Height="56" ShowPlate="True" />
|
|
<StackPanel Margin="16,0,16,0" VerticalAlignment="Center">
|
|
<TextBlock Text="{l:Loc Shell.Welcome.Title}" FontSize="20" FontWeight="SemiBold" TextTrimming="CharacterEllipsis" />
|
|
<TextBlock Text="{l:Loc Shell.Welcome.Question}" Foreground="{DynamicResource Brush.TextMuted}" Margin="0,4,0,0" TextTrimming="CharacterEllipsis" />
|
|
</StackPanel>
|
|
</DockPanel>
|
|
|
|
<StackPanel Margin="0,20,0,0">
|
|
<!-- Create a local archive -->
|
|
<RadioButton x:Name="LocalChoice" Style="{StaticResource RadioButton.Choice}" IsChecked="{Binding IsLocal}" ToolTip="{l:Loc Tooltips.Welcome.Local}"
|
|
AutomationProperties.Name="{l:Loc Shell.Welcome.Local}">
|
|
<DockPanel>
|
|
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Subtle}" Content="{l:Loc Shell.Welcome.Change}" Command="{Binding ChangeRootCommand}"
|
|
ToolTip="{l:Loc Tooltips.Welcome.Change}" Foreground="{DynamicResource Brush.TextMuted}" />
|
|
<ui:Icon Glyph="{StaticResource Icon.Folder}" Size="24" Foreground="{DynamicResource Brush.Accent}" VerticalAlignment="Center" />
|
|
<StackPanel Margin="14,0,8,0" VerticalAlignment="Center">
|
|
<TextBlock Style="{StaticResource Text.ChoiceTitle}" Text="{l:Loc Shell.Welcome.Local}" />
|
|
<TextBlock Style="{StaticResource Text.ChoiceDetail}" Text="{Binding LocalDetail}" Typography.NumeralAlignment="Tabular" />
|
|
</StackPanel>
|
|
</DockPanel>
|
|
</RadioButton>
|
|
|
|
<!-- Adopt an existing folder -->
|
|
<RadioButton x:Name="AdoptChoice" Style="{StaticResource RadioButton.Choice}" IsChecked="{Binding IsAdopt}" ToolTip="{l:Loc Tooltips.Welcome.Adopt}"
|
|
AutomationProperties.Name="{l:Loc Shell.Welcome.Adopt}">
|
|
<DockPanel>
|
|
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Subtle}" Content="{l:Loc Shell.Welcome.Choose}" Command="{Binding ChooseAdoptCommand}"
|
|
ToolTip="{l:Loc Tooltips.Welcome.Choose}" Foreground="{DynamicResource Brush.TextMuted}" />
|
|
<ui:Icon Glyph="{StaticResource Icon.Archive}" Size="24" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" />
|
|
<StackPanel Margin="14,0,8,0" VerticalAlignment="Center">
|
|
<TextBlock Style="{StaticResource Text.ChoiceTitle}" Text="{l:Loc Shell.Welcome.Adopt}" />
|
|
<TextBlock Style="{StaticResource Text.ChoiceDetail}" Text="{Binding AdoptDetail}" Visibility="{Binding HasAdoptDetail, Converter={StaticResource BoolToVisibility}}" />
|
|
</StackPanel>
|
|
</DockPanel>
|
|
</RadioButton>
|
|
|
|
<!-- Connect to a server -->
|
|
<RadioButton x:Name="ServerChoice" Style="{StaticResource RadioButton.Choice}" IsChecked="{Binding IsServer}" ToolTip="{l:Loc Tooltips.Welcome.Server}"
|
|
AutomationProperties.Name="{l:Loc Shell.Welcome.Server}" Margin="0">
|
|
<DockPanel>
|
|
<ui:StatusGlyph DockPanel.Dock="Right" Kind="Online" Text="{l:Loc Shell.Welcome.Found}" VerticalAlignment="Center" ToolTip="{l:Loc Tooltips.Welcome.Found}"
|
|
Visibility="{Binding IsServerDiscovered, Converter={StaticResource BoolToVisibility}}" />
|
|
<ui:Icon Glyph="{StaticResource Icon.Server}" Size="24" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" />
|
|
<StackPanel Margin="14,0,8,0" VerticalAlignment="Center">
|
|
<TextBlock Style="{StaticResource Text.ChoiceTitle}" Text="{l:Loc Shell.Welcome.Server}" />
|
|
<TextBlock Style="{StaticResource Text.ChoiceDetail}" Text="{Binding ServerDetail}" Visibility="{Binding HasServerDetail, Converter={StaticResource BoolToVisibility}}" />
|
|
</StackPanel>
|
|
</DockPanel>
|
|
</RadioButton>
|
|
</StackPanel>
|
|
|
|
<!-- Continue, right-aligned; Chronos sends nothing about its use, so the first run asks no consent (owner review 4, R2). -->
|
|
<Button Style="{StaticResource Button.Primary}" Height="36" Padding="22,0" Margin="0,20,0,0" HorizontalAlignment="Right" Content="{l:Loc Shell.Welcome.Continue}"
|
|
Command="{Binding ContinueCommand}" ToolTip="{l:Loc Tooltips.Welcome.Continue}" IsDefault="True" />
|
|
</StackPanel>
|
|
</Border>
|
|
</UserControl>
|