feat(app): connection status indicator opens server settings on tap
The green/red dot + status text in the wallet header is now tappable: opens the server settings overlay directly. Added Hand cursor and tooltip (server title) to signal interactivity. Status text uses SystemAccentColor instead of Gray.
This commit is contained in:
@@ -151,13 +151,17 @@
|
|||||||
<TextBlock Text="{Binding UnconfirmedText}" Foreground="Orange"/>
|
<TextBlock Text="{Binding UnconfirmedText}" Foreground="Orange"/>
|
||||||
<TextBlock Text="{Binding NetworkInfo}" FontSize="12" Foreground="Gray"/>
|
<TextBlock Text="{Binding NetworkInfo}" FontSize="12" Foreground="Gray"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<!-- Cliccabile: apre le impostazioni del server -->
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="6"
|
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="6"
|
||||||
VerticalAlignment="Top">
|
VerticalAlignment="Top" Cursor="Hand" Background="Transparent"
|
||||||
|
ToolTip.Tip="{Binding Loc[server.title]}"
|
||||||
|
Tapped="OnConnectionStatusTapped">
|
||||||
<Ellipse Width="10" Height="10" Fill="LimeGreen" VerticalAlignment="Center"
|
<Ellipse Width="10" Height="10" Fill="LimeGreen" VerticalAlignment="Center"
|
||||||
IsVisible="{Binding IsConnected}"/>
|
IsVisible="{Binding IsConnected}"/>
|
||||||
<Ellipse Width="10" Height="10" Fill="IndianRed" VerticalAlignment="Center"
|
<Ellipse Width="10" Height="10" Fill="IndianRed" VerticalAlignment="Center"
|
||||||
IsVisible="{Binding !IsConnected}"/>
|
IsVisible="{Binding !IsConnected}"/>
|
||||||
<TextBlock Text="{Binding ConnectionStatus}" Foreground="Gray"
|
<TextBlock Text="{Binding ConnectionStatus}"
|
||||||
|
Foreground="{DynamicResource SystemAccentColor}"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -72,6 +72,12 @@ public partial class MainWindow : Window
|
|||||||
vm.IsServerSettingsOpen = false;
|
vm.IsServerSettingsOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnConnectionStatusTapped(object? sender, TappedEventArgs e)
|
||||||
|
{
|
||||||
|
if (DataContext is MainWindowViewModel vm)
|
||||||
|
vm.IsServerSettingsOpen = true;
|
||||||
|
}
|
||||||
|
|
||||||
private void OnSettingsOverlayBackdropTapped(object? sender, TappedEventArgs e)
|
private void OnSettingsOverlayBackdropTapped(object? sender, TappedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!ReferenceEquals(e.Source, sender)) return;
|
if (!ReferenceEquals(e.Source, sender)) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user