chore(claude-do): Update notif popup is still not in the bottom Right hand cor
THe update notification should be in the Bottom Rught hand corner as a Small Popup card. IT should have the Update and Dismiss Butotns. It should only show when there is a new Update available, not if everything is up to date ClaudeDo-Task: c14606f009e44e4ba04bfe5bcbc884ad
This commit is contained in:
@@ -97,7 +97,6 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable
|
|||||||
|
|
||||||
[ObservableProperty] private bool _isUpdateBannerVisible;
|
[ObservableProperty] private bool _isUpdateBannerVisible;
|
||||||
[ObservableProperty] private string? _updateBannerLatestVersion;
|
[ObservableProperty] private string? _updateBannerLatestVersion;
|
||||||
[ObservableProperty] private string? _inlineUpdateStatus;
|
|
||||||
private bool _bannerDismissedThisSession;
|
private bool _bannerDismissedThisSession;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
@@ -305,25 +304,15 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable
|
|||||||
if (_bannerDismissedThisSession) { IsUpdateBannerVisible = false; break; }
|
if (_bannerDismissedThisSession) { IsUpdateBannerVisible = false; break; }
|
||||||
UpdateBannerLatestVersion = _updateCheck.LatestVersion;
|
UpdateBannerLatestVersion = _updateCheck.LatestVersion;
|
||||||
IsUpdateBannerVisible = true;
|
IsUpdateBannerVisible = true;
|
||||||
InlineUpdateStatus = null;
|
|
||||||
break;
|
break;
|
||||||
case UpdateCheckStatus.UpToDate:
|
case UpdateCheckStatus.UpToDate:
|
||||||
IsUpdateBannerVisible = false;
|
IsUpdateBannerVisible = false;
|
||||||
ShowInlineStatus($"You're up to date (v{_updateCheck.CurrentVersion})");
|
|
||||||
break;
|
break;
|
||||||
case UpdateCheckStatus.CheckFailed:
|
case UpdateCheckStatus.CheckFailed:
|
||||||
ShowInlineStatus("Could not check for updates");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void ShowInlineStatus(string text)
|
|
||||||
{
|
|
||||||
InlineUpdateStatus = text;
|
|
||||||
await Task.Delay(3000);
|
|
||||||
if (InlineUpdateStatus == text) InlineUpdateStatus = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void OpenMissionControl()
|
private void OpenMissionControl()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<KeyBinding Gesture="Shift+OemQuestion" Command="{Binding FocusSearchCommand}"/>
|
<KeyBinding Gesture="Shift+OemQuestion" Command="{Binding FocusSearchCommand}"/>
|
||||||
<KeyBinding Gesture="Ctrl+N" Command="{Binding FocusAddTaskCommand}"/>
|
<KeyBinding Gesture="Ctrl+N" Command="{Binding FocusAddTaskCommand}"/>
|
||||||
</Window.KeyBindings>
|
</Window.KeyBindings>
|
||||||
<Grid x:Name="RootGrid" RowDefinitions="36,Auto,*,22">
|
<Grid x:Name="RootGrid" RowDefinitions="36,*,22">
|
||||||
<!-- Custom title bar -->
|
<!-- Custom title bar -->
|
||||||
<Border Grid.Row="0"
|
<Border Grid.Row="0"
|
||||||
Background="{DynamicResource DeepBrush}"
|
Background="{DynamicResource DeepBrush}"
|
||||||
@@ -107,45 +107,8 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Update banner -->
|
|
||||||
<Border Grid.Row="1"
|
|
||||||
Background="{DynamicResource DeepBrush}"
|
|
||||||
BorderBrush="{DynamicResource LineBrush}"
|
|
||||||
BorderThickness="0,0,0,1"
|
|
||||||
Padding="14,6"
|
|
||||||
IsVisible="{Binding IsUpdateBannerVisible}">
|
|
||||||
<Grid ColumnDefinitions="*,Auto,Auto">
|
|
||||||
<TextBlock Grid.Column="0"
|
|
||||||
Classes="body"
|
|
||||||
VerticalAlignment="Center">
|
|
||||||
<Run Text="{loc:Tr shell.update.available}"/>
|
|
||||||
<Run Text="{Binding UpdateCheck.CurrentVersion}"/>
|
|
||||||
<Run Text=" → v"/>
|
|
||||||
<Run Text="{Binding UpdateBannerLatestVersion}"/>
|
|
||||||
</TextBlock>
|
|
||||||
<Button Grid.Column="1"
|
|
||||||
Classes="btn"
|
|
||||||
Margin="0,0,8,0"
|
|
||||||
Content="{loc:Tr shell.update.updateNow}"
|
|
||||||
Command="{Binding UpdateNowCommand}"/>
|
|
||||||
<Button Grid.Column="2"
|
|
||||||
Classes="btn"
|
|
||||||
Content="{loc:Tr shell.update.dismiss}"
|
|
||||||
Command="{Binding DismissBannerCommand}"/>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<!-- Inline update status (appears at right of banner row when no banner) -->
|
|
||||||
<TextBlock Grid.Row="1"
|
|
||||||
Classes="meta"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Margin="0,0,14,0"
|
|
||||||
Text="{Binding InlineUpdateStatus}"
|
|
||||||
IsVisible="{Binding InlineUpdateStatus, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
|
||||||
|
|
||||||
<!-- Background gradient layer -->
|
<!-- Background gradient layer -->
|
||||||
<Border Grid.Row="2">
|
<Border Grid.Row="1">
|
||||||
<Border.Background>
|
<Border.Background>
|
||||||
<RadialGradientBrush Center="50%,50%" GradientOrigin="50%,50%" RadiusX="70%" RadiusY="70%">
|
<RadialGradientBrush Center="50%,50%" GradientOrigin="50%,50%" RadiusX="70%" RadiusY="70%">
|
||||||
<GradientStop Offset="0" Color="{StaticResource DeepColor}" />
|
<GradientStop Offset="0" Color="{StaticResource DeepColor}" />
|
||||||
@@ -155,7 +118,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Three islands (user-resizable) -->
|
<!-- Three islands (user-resizable) -->
|
||||||
<Grid Grid.Row="2" Margin="7">
|
<Grid Grid.Row="1" Margin="7">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="260" MinWidth="200"/>
|
<ColumnDefinition Width="260" MinWidth="200"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
@@ -196,7 +159,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Footer: connection status -->
|
<!-- Footer: connection status -->
|
||||||
<Border Grid.Row="3"
|
<Border Grid.Row="2"
|
||||||
Background="{DynamicResource DeepBrush}"
|
Background="{DynamicResource DeepBrush}"
|
||||||
BorderBrush="{DynamicResource LineBrush}"
|
BorderBrush="{DynamicResource LineBrush}"
|
||||||
BorderThickness="0,1,0,0">
|
BorderThickness="0,1,0,0">
|
||||||
@@ -255,5 +218,35 @@
|
|||||||
<Panel/>
|
<Panel/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
<!-- Update popup card — bottom-right corner, only when update available -->
|
||||||
|
<Border Grid.Row="0" Grid.RowSpan="3"
|
||||||
|
VerticalAlignment="Bottom" HorizontalAlignment="Right"
|
||||||
|
Margin="0,0,16,30"
|
||||||
|
ZIndex="100"
|
||||||
|
IsVisible="{Binding IsUpdateBannerVisible}"
|
||||||
|
Background="{DynamicResource DeepBrush}"
|
||||||
|
BorderBrush="{DynamicResource LineBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="6"
|
||||||
|
Padding="14,10">
|
||||||
|
<StackPanel Spacing="8" Width="260">
|
||||||
|
<TextBlock Classes="body">
|
||||||
|
<Run Text="{loc:Tr shell.update.available}"/>
|
||||||
|
<Run Text=" v"/>
|
||||||
|
<Run Text="{Binding UpdateCheck.CurrentVersion}"/>
|
||||||
|
<Run Text=" → v"/>
|
||||||
|
<Run Text="{Binding UpdateBannerLatestVersion}"/>
|
||||||
|
</TextBlock>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Right">
|
||||||
|
<Button Classes="btn"
|
||||||
|
Content="{loc:Tr shell.update.dismiss}"
|
||||||
|
Command="{Binding DismissBannerCommand}"/>
|
||||||
|
<Button Classes="btn"
|
||||||
|
Content="{loc:Tr shell.update.updateNow}"
|
||||||
|
Command="{Binding UpdateNowCommand}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
Reference in New Issue
Block a user