Compare commits

..
5 changed files with 88 additions and 73 deletions
+17 -16
View File
@@ -1,29 +1,30 @@
<Application x:Class="ClaudeCheckerWindows.App" <Application x:Class="ClaudeCheckerWindows.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:po="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
ShutdownMode="OnExplicitShutdown"> ShutdownMode="OnExplicitShutdown">
<Application.Resources> <Application.Resources>
<SolidColorBrush x:Key="BackgroundBrush" Color="#F3F3F3"/> <SolidColorBrush x:Key="BackgroundBrush" Color="#F3F3F3" po:Freeze="False"/>
<SolidColorBrush x:Key="CardBrush" Color="#FFFFFF"/> <SolidColorBrush x:Key="CardBrush" Color="#FFFFFF" po:Freeze="False"/>
<SolidColorBrush x:Key="AccentBrush" Color="#F97316"/> <SolidColorBrush x:Key="AccentBrush" Color="#F97316" po:Freeze="False"/>
<SolidColorBrush x:Key="TextBrush" Color="#1C1C1C"/> <SolidColorBrush x:Key="TextBrush" Color="#1C1C1C" po:Freeze="False"/>
<SolidColorBrush x:Key="SecondaryBrush" Color="#6E6E6E"/> <SolidColorBrush x:Key="SecondaryBrush" Color="#6E6E6E" po:Freeze="False"/>
<SolidColorBrush x:Key="BorderBrush" Color="#E0E0E0"/> <SolidColorBrush x:Key="BorderBrush" Color="#E0E0E0" po:Freeze="False"/>
<SolidColorBrush x:Key="BlueBrush" Color="#0078D4"/> <SolidColorBrush x:Key="BlueBrush" Color="#0078D4" po:Freeze="False"/>
<SolidColorBrush x:Key="ButtonBrush" Color="#FFFFFF"/> <SolidColorBrush x:Key="ButtonBrush" Color="#FFFFFF" po:Freeze="False"/>
<SolidColorBrush x:Key="SurfaceBrush" Color="#FAFAFA"/> <SolidColorBrush x:Key="SurfaceBrush" Color="#FAFAFA" po:Freeze="False"/>
<SolidColorBrush x:Key="BannerBgBrush" Color="#E8F2FB"/> <SolidColorBrush x:Key="BannerBgBrush" Color="#E8F2FB" po:Freeze="False"/>
<SolidColorBrush x:Key="BannerBorderBrush" Color="#B3D6F5"/> <SolidColorBrush x:Key="BannerBorderBrush" Color="#B3D6F5" po:Freeze="False"/>
<Style x:Key="HeaderText" TargetType="TextBlock"> <Style x:Key="HeaderText" TargetType="TextBlock">
<Setter Property="FontSize" Value="10"/> <Setter Property="FontSize" Value="10"/>
<Setter Property="FontWeight" Value="SemiBold"/> <Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="{StaticResource SecondaryBrush}"/> <Setter Property="Foreground" Value="{DynamicResource SecondaryBrush}"/>
<Setter Property="FontFamily" Value="Segoe UI"/> <Setter Property="FontFamily" Value="Segoe UI"/>
</Style> </Style>
<Style x:Key="PrimaryButton" TargetType="Button"> <Style x:Key="PrimaryButton" TargetType="Button">
<Setter Property="Background" Value="{StaticResource BlueBrush}"/> <Setter Property="Background" Value="{DynamicResource BlueBrush}"/>
<Setter Property="Foreground" Value="White"/> <Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/> <Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="14,6"/> <Setter Property="Padding" Value="14,6"/>
@@ -52,10 +53,10 @@
</Style> </Style>
<Style x:Key="SmallButton" TargetType="Button"> <Style x:Key="SmallButton" TargetType="Button">
<Setter Property="Background" Value="{StaticResource ButtonBrush}"/> <Setter Property="Background" Value="{DynamicResource ButtonBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/> <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/> <Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/> <Setter Property="Foreground" Value="{DynamicResource TextBrush}"/>
<Setter Property="Padding" Value="10,4"/> <Setter Property="Padding" Value="10,4"/>
<Setter Property="FontSize" Value="12"/> <Setter Property="FontSize" Value="12"/>
<Setter Property="FontFamily" Value="Segoe UI"/> <Setter Property="FontFamily" Value="Segoe UI"/>
+13
View File
@@ -17,6 +17,19 @@ public partial class App : Application
protected override void OnStartup(StartupEventArgs e) protected override void OnStartup(StartupEventArgs e)
{ {
var logPath = System.IO.Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"ClaudeChecker", "startup_crash.txt");
AppDomain.CurrentDomain.UnhandledException += (_, ex) =>
System.IO.File.WriteAllText(logPath, ex.ExceptionObject?.ToString() ?? "unknown");
DispatcherUnhandledException += (_, ex) =>
{
System.IO.File.WriteAllText(logPath, ex.Exception?.ToString() ?? "unknown");
ex.Handled = false;
};
base.OnStartup(e); base.OnStartup(e);
ThemeManager.Initialize(); ThemeManager.Initialize();
SetupTray(); SetupTray();
+44 -44
View File
@@ -5,7 +5,7 @@
Title="ClaudeChecker" Title="ClaudeChecker"
Width="480" Height="660" Width="480" Height="660"
WindowStartupLocation="CenterScreen" WindowStartupLocation="CenterScreen"
Background="{StaticResource BackgroundBrush}" Background="{DynamicResource BackgroundBrush}"
FontFamily="Segoe UI" FontFamily="Segoe UI"
ShowInTaskbar="True" ShowInTaskbar="True"
ResizeMode="NoResize"> ResizeMode="NoResize">
@@ -16,8 +16,8 @@
<!-- Update banner --> <!-- Update banner -->
<Border x:Name="UpdateBanner" DockPanel.Dock="Top" Visibility="Collapsed" <Border x:Name="UpdateBanner" DockPanel.Dock="Top" Visibility="Collapsed"
Background="{StaticResource BannerBgBrush}" Background="{DynamicResource BannerBgBrush}"
BorderBrush="{StaticResource BannerBorderBrush}" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BannerBorderBrush}" BorderThickness="0,0,0,1"
Cursor="Hand" MouseLeftButtonUp="UpdateBanner_Click"> Cursor="Hand" MouseLeftButtonUp="UpdateBanner_Click">
<Grid Margin="16,10"> <Grid Margin="16,10">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -26,21 +26,21 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="⬇" FontSize="14" <TextBlock Grid.Column="0" Text="⬇" FontSize="14"
Foreground="{StaticResource BlueBrush}" VerticalAlignment="Center"/> Foreground="{DynamicResource BlueBrush}" VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Margin="10,0"> <StackPanel Grid.Column="1" Margin="10,0">
<TextBlock x:Name="UpdateBannerTitle" FontSize="12" FontWeight="SemiBold" <TextBlock x:Name="UpdateBannerTitle" FontSize="12" FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}"/> Foreground="{DynamicResource TextBrush}"/>
<TextBlock Text="Click to view release notes and install." <TextBlock Text="Click to view release notes and install."
FontSize="11" Foreground="{StaticResource SecondaryBrush}"/> FontSize="11" Foreground="{DynamicResource SecondaryBrush}"/>
</StackPanel> </StackPanel>
<Button Grid.Column="2" Content="Update" Style="{StaticResource SmallButton}" <Button Grid.Column="2" Content="Update" Style="{StaticResource SmallButton}"
Foreground="{StaticResource BlueBrush}" Click="UpdateBanner_Click"/> Foreground="{DynamicResource BlueBrush}" Click="UpdateBanner_Click"/>
</Grid> </Grid>
</Border> </Border>
<!-- Footer --> <!-- Footer -->
<Border DockPanel.Dock="Bottom" BorderBrush="{StaticResource BorderBrush}" <Border DockPanel.Dock="Bottom" BorderBrush="{DynamicResource BorderBrush}"
BorderThickness="0,1,0,0" Background="{StaticResource SurfaceBrush}"> BorderThickness="0,1,0,0" Background="{DynamicResource SurfaceBrush}">
<Grid Margin="12,8"> <Grid Margin="12,8">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
@@ -55,7 +55,7 @@
Width="12" Height="12" Visibility="Collapsed" Width="12" Height="12" Visibility="Collapsed"
Style="{x:Null}" Margin="0,0,6,0"/> Style="{x:Null}" Margin="0,0,6,0"/>
<TextBlock x:Name="LastUpdatedText" FontSize="11" <TextBlock x:Name="LastUpdatedText" FontSize="11"
Foreground="{StaticResource SecondaryBrush}" VerticalAlignment="Center"/> Foreground="{DynamicResource SecondaryBrush}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Button Grid.Column="1" Content="↻ Refresh" <Button Grid.Column="1" Content="↻ Refresh"
Style="{StaticResource SmallButton}" Click="Refresh_Click"/> Style="{StaticResource SmallButton}" Click="Refresh_Click"/>
@@ -72,17 +72,17 @@
<!-- Settings panel --> <!-- Settings panel -->
<Border x:Name="SettingsPanel" Visibility="Collapsed" <Border x:Name="SettingsPanel" Visibility="Collapsed"
Background="{StaticResource BackgroundBrush}"> Background="{DynamicResource BackgroundBrush}">
<DockPanel> <DockPanel>
<Border DockPanel.Dock="Top" BorderBrush="{StaticResource BorderBrush}" <Border DockPanel.Dock="Top" BorderBrush="{DynamicResource BorderBrush}"
BorderThickness="0,0,0,1" Background="{StaticResource SurfaceBrush}" Padding="12,10"> BorderThickness="0,0,0,1" Background="{DynamicResource SurfaceBrush}" Padding="12,10">
<Grid> <Grid>
<Button Content="← Back" HorizontalAlignment="Left" <Button Content="← Back" HorizontalAlignment="Left"
Style="{StaticResource SmallButton}" BorderThickness="0" Style="{StaticResource SmallButton}" BorderThickness="0"
Foreground="{StaticResource BlueBrush}" Background="Transparent" Foreground="{DynamicResource BlueBrush}" Background="Transparent"
Click="BackFromSettings_Click"/> Click="BackFromSettings_Click"/>
<TextBlock Text="Settings" FontSize="14" FontWeight="SemiBold" <TextBlock Text="Settings" FontSize="14" FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}" Foreground="{DynamicResource TextBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center"/> HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid> </Grid>
</Border> </Border>
@@ -91,13 +91,13 @@
<StackPanel Margin="20,16,20,20"> <StackPanel Margin="20,16,20,20">
<TextBlock Text="AUTHENTICATION" Style="{StaticResource HeaderText}" Margin="0,0,0,8"/> <TextBlock Text="AUTHENTICATION" Style="{StaticResource HeaderText}" Margin="0,0,0,8"/>
<Border Background="{StaticResource CardBrush}" CornerRadius="6" <Border Background="{DynamicResource CardBrush}" CornerRadius="6"
BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"
Padding="14,12" Margin="0,0,0,16"> Padding="14,12" Margin="0,0,0,16">
<StackPanel> <StackPanel>
<StackPanel x:Name="AuthPanel" Margin="0,0,0,10"/> <StackPanel x:Name="AuthPanel" Margin="0,0,0,10"/>
<TextBlock Text="Your session is stored locally and persists across restarts." <TextBlock Text="Your session is stored locally and persists across restarts."
FontSize="11" Foreground="{StaticResource SecondaryBrush}" FontSize="11" Foreground="{DynamicResource SecondaryBrush}"
TextWrapping="Wrap" Margin="0,0,0,10"/> TextWrapping="Wrap" Margin="0,0,0,10"/>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Button x:Name="SignInButton" Content="Sign In" <Button x:Name="SignInButton" Content="Sign In"
@@ -112,8 +112,8 @@
</Border> </Border>
<TextBlock Text="UPDATE CHANNEL" Style="{StaticResource HeaderText}" Margin="0,0,0,8"/> <TextBlock Text="UPDATE CHANNEL" Style="{StaticResource HeaderText}" Margin="0,0,0,8"/>
<Border Background="{StaticResource CardBrush}" CornerRadius="6" <Border Background="{DynamicResource CardBrush}" CornerRadius="6"
BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"
Padding="14,12" Margin="0,0,0,16"> Padding="14,12" Margin="0,0,0,16">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -122,9 +122,9 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel> <StackPanel>
<TextBlock Text="Beta updates" FontSize="12" FontWeight="SemiBold" <TextBlock Text="Beta updates" FontSize="12" FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}"/> Foreground="{DynamicResource TextBrush}"/>
<TextBlock Text="Receive early access builds — may be less stable" <TextBlock Text="Receive early access builds — may be less stable"
FontSize="11" Foreground="{StaticResource SecondaryBrush}"/> FontSize="11" Foreground="{DynamicResource SecondaryBrush}"/>
</StackPanel> </StackPanel>
<CheckBox Grid.Column="1" x:Name="BetaToggle" VerticalAlignment="Center" <CheckBox Grid.Column="1" x:Name="BetaToggle" VerticalAlignment="Center"
Checked="BetaToggle_Changed" Unchecked="BetaToggle_Changed"/> Checked="BetaToggle_Changed" Unchecked="BetaToggle_Changed"/>
@@ -132,8 +132,8 @@
</Border> </Border>
<TextBlock Text="AUTO-REFRESH" Style="{StaticResource HeaderText}" Margin="0,0,0,8"/> <TextBlock Text="AUTO-REFRESH" Style="{StaticResource HeaderText}" Margin="0,0,0,8"/>
<Border Background="{StaticResource CardBrush}" CornerRadius="6" <Border Background="{DynamicResource CardBrush}" CornerRadius="6"
BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"
Padding="14,12" Margin="0,0,0,16"> Padding="14,12" Margin="0,0,0,16">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -141,15 +141,15 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="Refresh interval" FontSize="12" FontWeight="SemiBold" <TextBlock Text="Refresh interval" FontSize="12" FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}" VerticalAlignment="Center"/> Foreground="{DynamicResource TextBrush}" VerticalAlignment="Center"/>
<ComboBox Grid.Column="1" x:Name="RefreshPicker" Width="100" <ComboBox Grid.Column="1" x:Name="RefreshPicker" Width="100"
SelectionChanged="RefreshPicker_Changed"/> SelectionChanged="RefreshPicker_Changed"/>
</Grid> </Grid>
</Border> </Border>
<TextBlock Text="ABOUT" Style="{StaticResource HeaderText}" Margin="0,0,0,8"/> <TextBlock Text="ABOUT" Style="{StaticResource HeaderText}" Margin="0,0,0,8"/>
<Border Background="{StaticResource CardBrush}" CornerRadius="6" <Border Background="{DynamicResource CardBrush}" CornerRadius="6"
BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"
Padding="14,12"> Padding="14,12">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -162,16 +162,16 @@
<StackPanel Grid.Column="1" VerticalAlignment="Center"> <StackPanel Grid.Column="1" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Text="ClaudeChecker" FontSize="12" FontWeight="SemiBold" <TextBlock Text="ClaudeChecker" FontSize="12" FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}"/> Foreground="{DynamicResource TextBrush}"/>
<Border Background="#F0F0F0" CornerRadius="3" <Border Background="#F0F0F0" CornerRadius="3"
Margin="6,0,0,0" Padding="5,1"> Margin="6,0,0,0" Padding="5,1">
<TextBlock x:Name="VersionLabel" FontSize="11" <TextBlock x:Name="VersionLabel" FontSize="11"
Foreground="{StaticResource SecondaryBrush}" Foreground="{DynamicResource SecondaryBrush}"
FontFamily="Consolas"/> FontFamily="Consolas"/>
</Border> </Border>
</StackPanel> </StackPanel>
<TextBlock Text="Built by superdooper86 &amp; claude" <TextBlock Text="Built by superdooper86 &amp; claude"
FontSize="11" Foreground="{StaticResource SecondaryBrush}"/> FontSize="11" Foreground="{DynamicResource SecondaryBrush}"/>
</StackPanel> </StackPanel>
<Button Grid.Column="2" x:Name="CheckUpdateButton" <Button Grid.Column="2" x:Name="CheckUpdateButton"
Style="{StaticResource SmallButton}" Style="{StaticResource SmallButton}"
@@ -186,17 +186,17 @@
<!-- Update panel --> <!-- Update panel -->
<Border x:Name="UpdatePanel" Visibility="Collapsed" <Border x:Name="UpdatePanel" Visibility="Collapsed"
Background="{StaticResource BackgroundBrush}"> Background="{DynamicResource BackgroundBrush}">
<DockPanel> <DockPanel>
<Border DockPanel.Dock="Top" BorderBrush="{StaticResource BorderBrush}" <Border DockPanel.Dock="Top" BorderBrush="{DynamicResource BorderBrush}"
BorderThickness="0,0,0,1" Background="{StaticResource SurfaceBrush}" Padding="12,10"> BorderThickness="0,0,0,1" Background="{DynamicResource SurfaceBrush}" Padding="12,10">
<Grid> <Grid>
<Button Content="← Back" HorizontalAlignment="Left" <Button Content="← Back" HorizontalAlignment="Left"
Style="{StaticResource SmallButton}" BorderThickness="0" Style="{StaticResource SmallButton}" BorderThickness="0"
Foreground="{StaticResource BlueBrush}" Background="Transparent" Foreground="{DynamicResource BlueBrush}" Background="Transparent"
Click="CloseUpdate_Click"/> Click="CloseUpdate_Click"/>
<TextBlock Text="Update Available" FontSize="14" FontWeight="SemiBold" <TextBlock Text="Update Available" FontSize="14" FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}" Foreground="{DynamicResource TextBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center"/> HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Button x:Name="NotNowButton" Content="Not Now" HorizontalAlignment="Right" <Button x:Name="NotNowButton" Content="Not Now" HorizontalAlignment="Right"
Style="{StaticResource SmallButton}" Click="CloseUpdate_Click"/> Style="{StaticResource SmallButton}" Click="CloseUpdate_Click"/>
@@ -204,8 +204,8 @@
</Border> </Border>
<StackPanel Margin="20,16"> <StackPanel Margin="20,16">
<Border Background="{StaticResource CardBrush}" CornerRadius="6" <Border Background="{DynamicResource CardBrush}" CornerRadius="6"
BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"
Padding="14,12" Margin="0,0,0,12"> Padding="14,12" Margin="0,0,0,12">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -217,26 +217,26 @@
<StackPanel Grid.Column="1" VerticalAlignment="Center"> <StackPanel Grid.Column="1" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" Margin="0,0,0,4"> <StackPanel Orientation="Horizontal" Margin="0,0,0,4">
<TextBlock x:Name="CurrentVerLabel" FontSize="12" FontFamily="Consolas" <TextBlock x:Name="CurrentVerLabel" FontSize="12" FontFamily="Consolas"
Foreground="{StaticResource SecondaryBrush}" VerticalAlignment="Center"/> Foreground="{DynamicResource SecondaryBrush}" VerticalAlignment="Center"/>
<TextBlock Text=" → " FontSize="11" Foreground="{StaticResource SecondaryBrush}" <TextBlock Text=" → " FontSize="11" Foreground="{DynamicResource SecondaryBrush}"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
<TextBlock x:Name="NewVerLabel" FontSize="13" FontWeight="SemiBold" <TextBlock x:Name="NewVerLabel" FontSize="13" FontWeight="SemiBold"
FontFamily="Consolas" Foreground="{StaticResource BlueBrush}" FontFamily="Consolas" Foreground="{DynamicResource BlueBrush}"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<TextBlock x:Name="ReleaseNotesText" FontSize="11" TextWrapping="Wrap" <TextBlock x:Name="ReleaseNotesText" FontSize="11" TextWrapping="Wrap"
Foreground="{StaticResource SecondaryBrush}" MaxHeight="160"/> Foreground="{DynamicResource SecondaryBrush}" MaxHeight="160"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Border> </Border>
<TextBlock x:Name="UpdateStatusText" Foreground="{StaticResource SecondaryBrush}" <TextBlock x:Name="UpdateStatusText" Foreground="{DynamicResource SecondaryBrush}"
FontSize="11" TextWrapping="Wrap" TextAlignment="Center" FontSize="11" TextWrapping="Wrap" TextAlignment="Center"
Visibility="Collapsed" Margin="0,0,0,8"/> Visibility="Collapsed" Margin="0,0,0,8"/>
<ProgressBar x:Name="UpdateProgress" Visibility="Collapsed" <ProgressBar x:Name="UpdateProgress" Visibility="Collapsed"
Height="4" Margin="0,0,0,12" Foreground="{StaticResource BlueBrush}"/> Height="4" Margin="0,0,0,12" Foreground="{DynamicResource BlueBrush}"/>
<TextBlock Text="ClaudeChecker will download, replace itself, and relaunch automatically." <TextBlock Text="ClaudeChecker will download, replace itself, and relaunch automatically."
FontSize="11" Foreground="{StaticResource SecondaryBrush}" FontSize="11" Foreground="{DynamicResource SecondaryBrush}"
TextWrapping="Wrap" TextAlignment="Center" Margin="0,0,0,12"/> TextWrapping="Wrap" TextAlignment="Center" Margin="0,0,0,12"/>
<Button x:Name="InstallButton" Content="⬇ Download &amp; Install" <Button x:Name="InstallButton" Content="⬇ Download &amp; Install"
Style="{StaticResource PrimaryButton}" HorizontalAlignment="Stretch" Style="{StaticResource PrimaryButton}" HorizontalAlignment="Stretch"
+5 -2
View File
@@ -1,3 +1,6 @@
## What's new ## What's new in beta.18
Initial Windows release. - Fixed startup crash caused by frozen WPF brushes
- Added system dark/light theme support (auto-detected, updates every 5 seconds)
- Native centered window instead of menubar popup
- Update notifications now work correctly for pre-release builds
+9 -11
View File
@@ -2,6 +2,7 @@ using Microsoft.Win32;
using System; using System;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Threading;
namespace ClaudeCheckerWindows; namespace ClaudeCheckerWindows;
@@ -14,20 +15,17 @@ public static class ThemeManager
{ {
IsDark = ReadIsDark(); IsDark = ReadIsDark();
Apply(); Apply();
SystemEvents.UserPreferenceChanged += OnPreferenceChanged;
}
private static void OnPreferenceChanged(object sender, UserPreferenceChangedEventArgs e) var timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(5) };
{ timer.Tick += (_, _) =>
if (e.Category != UserPreferenceCategory.General) return;
var nowDark = ReadIsDark();
if (nowDark == IsDark) return;
IsDark = nowDark;
Application.Current.Dispatcher.Invoke(() =>
{ {
var nowDark = ReadIsDark();
if (nowDark == IsDark) return;
IsDark = nowDark;
Apply(); Apply();
ThemeChanged?.Invoke(); ThemeChanged?.Invoke();
}); };
timer.Start();
} }
private static bool ReadIsDark() private static bool ReadIsDark()
@@ -74,6 +72,6 @@ public static class ThemeManager
private static void Set(ResourceDictionary res, string key, Color color) private static void Set(ResourceDictionary res, string key, Color color)
{ {
if (res[key] is SolidColorBrush b) b.Color = color; res[key] = new SolidColorBrush(color);
} }
} }