Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/OpenClaw.Tray.WinUI/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2678,7 +2678,7 @@ private string BuildTrayTooltip() =>

#region Window Management

internal void ShowHub(string? navigateTo = null, bool activate = true, string? originTag = null)
internal void ShowHub(string? navigateTo = null, bool activate = true)
{
if (_hubWindow == null || _hubWindow.IsClosed)
{
Expand Down Expand Up @@ -2729,7 +2729,7 @@ internal void ShowHub(string? navigateTo = null, bool activate = true, string? o

if (navigateTo != null)
{
_hubWindow.NavigateTo(navigateTo, originTag);
_hubWindow.NavigateTo(navigateTo);
}
if (activate)
{
Expand Down Expand Up @@ -3242,7 +3242,6 @@ private void OpenDashboard(string? path = null)

void IAppCommands.OpenDashboard(string? path) => OpenDashboard(path);
void IAppCommands.Navigate(string pageTag) => ShowHub(pageTag);
void IAppCommands.Navigate(string pageTag, string? originTag) => ShowHub(pageTag, originTag: originTag);
void IAppCommands.Reconnect() => _ = _connectionManager?.ReconnectAsync();
void IAppCommands.Disconnect()
{
Expand Down
5 changes: 4 additions & 1 deletion src/OpenClaw.Tray.WinUI/Pages/ConfigPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.UI.Xaml.Controls"
xmlns:toolkit="using:CommunityToolkit.WinUI.Controls"
xmlns:helpers="using:OpenClawTray.Helpers"
xmlns:local="using:OpenClawTray.Controls">

<Grid Padding="24,20,24,16">
Expand All @@ -18,7 +19,8 @@
</Grid.RowDefinitions>

<!-- Page header -->
<Grid Grid.Row="0" ColumnSpacing="16">
<StackPanel Grid.Row="0" Spacing="4">
<Grid ColumnSpacing="16">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
Expand All @@ -45,6 +47,7 @@
</StackPanel>
</Button>
</Grid>
</StackPanel>

<StackPanel Grid.Row="1" Spacing="8">
<InfoBar x:Name="ConnectionInfoBar"
Expand Down
1 change: 1 addition & 0 deletions src/OpenClaw.Tray.WinUI/Pages/ConfigPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using OpenClawTray.Controls;
using OpenClawTray.Helpers;
using OpenClawTray.Services;
using OpenClawTray.Windows;
using System;
using System.Collections.Generic;
using System.ComponentModel;
Expand Down
6 changes: 3 additions & 3 deletions src/OpenClaw.Tray.WinUI/Pages/ConnectionPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1848,12 +1848,12 @@ private void OnInstallLocalWslGateway(object sender, RoutedEventArgs e)

// ─── Operator card navigation ────────────────────────────────────

private void OnOpenSessions(object sender, RoutedEventArgs e) => ((IAppCommands)CurrentApp).Navigate("sessions", "connection");
private void OnOpenInstances(object sender, RoutedEventArgs e) => ((IAppCommands)CurrentApp).Navigate("instances", "connection");
private void OnOpenSessions(object sender, RoutedEventArgs e) => ((IAppCommands)CurrentApp).Navigate("sessions");
private void OnOpenInstances(object sender, RoutedEventArgs e) => ((IAppCommands)CurrentApp).Navigate("instances");

// ─── Node card navigation ────────────────────────────────────────

private void OnOpenPermissions(object sender, RoutedEventArgs e) => ((IAppCommands)CurrentApp).Navigate("permissions", "connection");
private void OnOpenPermissions(object sender, RoutedEventArgs e) => ((IAppCommands)CurrentApp).Navigate("permissions");

private void OnCopyNodeApproveCommand(object sender, RoutedEventArgs e)
{
Expand Down
14 changes: 0 additions & 14 deletions src/OpenClaw.Tray.WinUI/Pages/InstancesPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@
<Grid HorizontalAlignment="Stretch">
<StackPanel Padding="24" Spacing="16" HorizontalAlignment="Stretch" MaxWidth="900">

<!-- Inline back link — only shown when the user arrived via a
cross-page link from Connection. Set by InstancesPage.Initialize
based on HubWindow.LastNavigationOrigin. -->
<HyperlinkButton x:Name="BackToConnectionLink"
Click="OnBackToConnectionClicked"
Padding="0" Margin="0,0,0,-8"
Visibility="Collapsed"
AutomationProperties.AutomationId="BackToConnectionLink">
<StackPanel Orientation="Horizontal" Spacing="6">
<FontIcon Glyph="&#xE72B;" FontSize="12"/>
<TextBlock x:Uid="InstancesPage_BackToConnectionText" Text="Back to Connection"/>
</StackPanel>
</HyperlinkButton>

<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
Expand Down
11 changes: 0 additions & 11 deletions src/OpenClaw.Tray.WinUI/Pages/InstancesPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ public InstancesPage()
/// <summary>Called by HubWindow when this page becomes the navigation target.</summary>
public void Initialize()
{
// Show "← Back to Connection" only when the user arrived from
// Connection's cross-page link; staying hidden when the rail nav
// is used keeps the page chrome quiet for direct navigation.
var hub = CurrentApp.ActiveHubWindow as HubWindow;
BackToConnectionLink.Visibility = hub?.LastNavigationOrigin == "connection"
? Visibility.Visible
: Visibility.Collapsed;

if (_appState != null) _appState.PropertyChanged -= OnAppStateChanged;
_appState = CurrentApp.AppState!;
_appState.PropertyChanged += OnAppStateChanged;
Expand All @@ -71,9 +63,6 @@ public void Initialize()
}
}

private void OnBackToConnectionClicked(object sender, RoutedEventArgs e)
=> ((IAppCommands)CurrentApp).Navigate("connection");

private void OnAppStateChanged(object? sender, PropertyChangedEventArgs e)
{
switch (e.PropertyName)
Expand Down
14 changes: 0 additions & 14 deletions src/OpenClaw.Tray.WinUI/Pages/PermissionsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Padding="24" Spacing="8" HorizontalAlignment="Stretch" MaxWidth="900">

<!-- Inline back link — only shown when the user arrived via a
cross-page link from Connection. Set by PermissionsPage.Initialize
based on HubWindow.LastNavigationOrigin. -->
<HyperlinkButton x:Name="BackToConnectionLink"
Click="OnBackToConnectionClicked"
Padding="0" Margin="0,0,0,4"
Visibility="Collapsed"
AutomationProperties.AutomationId="BackToConnectionLink">
<StackPanel Orientation="Horizontal" Spacing="6">
<FontIcon Glyph="&#xE72B;" FontSize="12"/>
<TextBlock x:Uid="PermissionsPage_BackToConnection" Text="Back to Connection"/>
</StackPanel>
</HyperlinkButton>

<!-- ───────── Page header ───────── -->
<TextBlock x:Uid="PermissionsPage_Permissions" Text="Permissions"
Style="{StaticResource TitleTextBlockStyle}"
Expand Down
11 changes: 0 additions & 11 deletions src/OpenClaw.Tray.WinUI/Pages/PermissionsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ public void Initialize()
{
HostnameText.Text = Environment.MachineName;

// Show "← Back to Connection" only when the user arrived from
// Connection's cross-page link; staying hidden when the rail nav
// is used keeps the page chrome quiet for direct navigation.
var hub = CurrentApp.ActiveHubWindow as HubWindow;
BackToConnectionLink.Visibility = hub?.LastNavigationOrigin == "connection"
? Visibility.Visible
: Visibility.Collapsed;

BindNodeModeMaster();
BuildCapabilityToggles();
UpdateMcpStatus();
Expand All @@ -59,9 +51,6 @@ public void Initialize()
LoadAllowlist(CurrentApp.AppState?.Config);
}

private void OnBackToConnectionClicked(object sender, RoutedEventArgs e)
=> ((IAppCommands)CurrentApp).Navigate("connection");

private void OnLoaded(object sender, RoutedEventArgs e)
{
if (CurrentApp.Settings != null)
Expand Down
21 changes: 2 additions & 19 deletions src/OpenClaw.Tray.WinUI/Pages/SessionsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,9 @@
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid HorizontalAlignment="Stretch">
<StackPanel Padding="24" Spacing="12"
HorizontalAlignment="Stretch" MaxWidth="900">
HorizontalAlignment="Stretch" MaxWidth="900">

<!-- Shown only when the user arrived via Connection's cross-page link. -->
<HyperlinkButton x:Name="BackToConnectionLink"
Click="OnBackToConnectionClicked"
Padding="0" Margin="0,0,0,4"
Visibility="Collapsed"
AutomationProperties.AutomationId="BackToConnectionLink">
<StackPanel Orientation="Horizontal" Spacing="6">
<FontIcon Glyph="&#xE72B;"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="12"
IsTextScaleFactorEnabled="False"/>
<TextBlock x:Uid="SessionsPage_BackToConnection"
Text="Back to Connection"
Style="{StaticResource CaptionTextBlockStyle}"/>
</StackPanel>
</HyperlinkButton>

<TextBlock x:Uid="SessionsPage_Sessions"
<TextBlock x:Uid="SessionsPage_Sessions"
Text="Sessions"
Style="{StaticResource TitleTextBlockStyle}"
Margin="0,0,0,2"/>
Expand Down
14 changes: 2 additions & 12 deletions src/OpenClaw.Tray.WinUI/Pages/SessionsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ public void Initialize()
_appState = CurrentApp.AppState!;
_appState.PropertyChanged += OnAppStateChanged;

// Show "← Back to Connection" only when the user arrived from
// Connection's cross-page link; staying hidden when the rail nav
// is used keeps the page chrome quiet for direct navigation.
var hub = CurrentApp.ActiveHubWindow as HubWindow;
BackToConnectionLink.Visibility = hub?.LastNavigationOrigin == "connection"
? Visibility.Visible
: Visibility.Collapsed;

var client = CurrentApp.GatewayClient;
if (client == null)
{
Expand Down Expand Up @@ -75,9 +67,6 @@ public void Initialize()
_ = client.RequestModelsListAsync();
}

private void OnBackToConnectionClicked(object sender, RoutedEventArgs e)
=> ((IAppCommands)CurrentApp).Navigate("connection");

private void OnOpenConnectionClick(object sender, RoutedEventArgs e)
=> ((IAppCommands)CurrentApp).Navigate("connection");

Expand Down Expand Up @@ -247,7 +236,8 @@ private void OnOpenChat(object sender, RoutedEventArgs e)
{
hub.PendingChatSessionKey = key;
}
((IAppCommands)CurrentApp).Navigate("chat", "sessions");
// The native title-bar back button handles returning to Sessions.
((IAppCommands)CurrentApp).Navigate("chat");
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/OpenClaw.Tray.WinUI/Pages/VoiceSettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<Page
x:Class="OpenClawTray.Pages.VoiceSettingsPage"
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:helpers="using:OpenClawTray.Helpers">

<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid HorizontalAlignment="Stretch">
Expand Down
1 change: 1 addition & 0 deletions src/OpenClaw.Tray.WinUI/Pages/VoiceSettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using OpenClaw.Shared.Capabilities;
using OpenClawTray.Helpers;
using OpenClawTray.Services;
using OpenClawTray.Windows;
using System;
using System.Globalization;
using System.Linq;
Expand Down
1 change: 0 additions & 1 deletion src/OpenClaw.Tray.WinUI/Services/IAppCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ internal interface IAppCommands
{
void OpenDashboard(string? path = null);
void Navigate(string pageTag);
void Navigate(string pageTag, string? originTag);
void Reconnect();
void Disconnect();
void ShowVoiceOverlay();
Expand Down
15 changes: 6 additions & 9 deletions src/OpenClaw.Tray.WinUI/Strings/en-us/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -2283,6 +2283,12 @@ On your gateway host (Mac/Linux), run:
<data name="NavPaneToggleButton.[using:Microsoft.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Toggle navigation pane</value>
</data>
<data name="NavBackButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
<value>Back</value>
</data>
<data name="NavBackButton.[using:Microsoft.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Back</value>
</data>
<data name="TitleStatusText.Text" xml:space="preserve">
<value>Disconnected</value>
</data>
Expand Down Expand Up @@ -3303,9 +3309,6 @@ On your gateway host (Mac/Linux), run:
<data name="InstancesPage_Reason_Resync" xml:space="preserve">
<value>Resync</value>
</data>
<data name="InstancesPage_BackToConnectionText.Text" xml:space="preserve">
<value>Back to Connection</value>
</data>
<data name="ConnectionPage_NodePairing_Title.Text" xml:space="preserve">
<value>🔗 Pending Operator/Node Pairing</value>
</data>
Expand Down Expand Up @@ -4185,9 +4188,6 @@ On your gateway host (Mac/Linux), run:
<data name="InstancesPage_ReviewOnConnectionPage.Content" xml:space="preserve">
<value>Review on Connection page</value>
</data>
<data name="PermissionsPage_BackToConnection.Text" xml:space="preserve">
<value>Back to Connection</value>
</data>
<data name="PermissionsPage_Permissions.Text" xml:space="preserve">
<value>Permissions</value>
</data>
Expand Down Expand Up @@ -4407,9 +4407,6 @@ On your gateway host (Mac/Linux), run:
<data name="SandboxPage_64MiB.Content" xml:space="preserve">
<value>64 MiB</value>
</data>
<data name="SessionsPage_BackToConnection.Text" xml:space="preserve">
<value>Back to Connection</value>
</data>
<data name="SessionsPage_Sessions.Text" xml:space="preserve">
<value>Sessions</value>
</data>
Expand Down
15 changes: 6 additions & 9 deletions src/OpenClaw.Tray.WinUI/Strings/fr-fr/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -2235,6 +2235,12 @@ Sur votre hôte passerelle (Mac/Linux), exécutez :
<data name="NavPaneToggleButton.[using:Microsoft.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Basculer le volet de navigation</value>
</data>
<data name="NavBackButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
<value>Retour</value>
</data>
<data name="NavBackButton.[using:Microsoft.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Retour</value>
</data>
<data name="TitleStatusText.Text" xml:space="preserve">
<value>Déconnecté</value>
</data>
Expand Down Expand Up @@ -3255,9 +3261,6 @@ Sur votre hôte passerelle (Mac/Linux), exécutez :
<data name="InstancesPage_Reason_Resync" xml:space="preserve">
<value>Resync</value>
</data>
<data name="InstancesPage_BackToConnectionText.Text" xml:space="preserve">
<value>Retour à la connexion</value>
</data>
<data name="ConnectionPage_NodePairing_Title.Text" xml:space="preserve">
<value>🔗 Pending Operator/Node Pairing</value>
</data>
Expand Down Expand Up @@ -4137,9 +4140,6 @@ Sur votre hôte passerelle (Mac/Linux), exécutez :
<data name="InstancesPage_ReviewOnConnectionPage.Content" xml:space="preserve">
<value>Examiner sur la page Connexion</value>
</data>
<data name="PermissionsPage_BackToConnection.Text" xml:space="preserve">
<value>Retour à la connexion</value>
</data>
<data name="PermissionsPage_Permissions.Text" xml:space="preserve">
<value>Autorisations</value>
</data>
Expand Down Expand Up @@ -4359,9 +4359,6 @@ Sur votre hôte passerelle (Mac/Linux), exécutez :
<data name="SandboxPage_64MiB.Content" xml:space="preserve">
<value>64 MiB</value>
</data>
<data name="SessionsPage_BackToConnection.Text" xml:space="preserve">
<value>Retour à la connexion</value>
</data>
<data name="SessionsPage_Sessions.Text" xml:space="preserve">
<value>Mes sessions</value>
</data>
Expand Down
15 changes: 6 additions & 9 deletions src/OpenClaw.Tray.WinUI/Strings/nl-nl/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -2236,6 +2236,12 @@ Voer op uw gateway-host (Mac/Linux) uit:
<data name="NavPaneToggleButton.[using:Microsoft.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Navigatievenster in- of uitschakelen</value>
</data>
<data name="NavBackButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
<value>Terug</value>
</data>
<data name="NavBackButton.[using:Microsoft.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Terug</value>
</data>
<data name="TitleStatusText.Text" xml:space="preserve">
<value>Verbinding verbroken</value>
</data>
Expand Down Expand Up @@ -3256,9 +3262,6 @@ Voer op uw gateway-host (Mac/Linux) uit:
<data name="InstancesPage_Reason_Resync" xml:space="preserve">
<value>Resync</value>
</data>
<data name="InstancesPage_BackToConnectionText.Text" xml:space="preserve">
<value>Terug naar verbinding</value>
</data>
<data name="ConnectionPage_NodePairing_Title.Text" xml:space="preserve">
<value>🔗 Pending Operator/Node Pairing</value>
</data>
Expand Down Expand Up @@ -4138,9 +4141,6 @@ Voer op uw gateway-host (Mac/Linux) uit:
<data name="InstancesPage_ReviewOnConnectionPage.Content" xml:space="preserve">
<value>Bekijken op pagina Verbinding</value>
</data>
<data name="PermissionsPage_BackToConnection.Text" xml:space="preserve">
<value>Terug naar verbinding</value>
</data>
<data name="PermissionsPage_Permissions.Text" xml:space="preserve">
<value>Machtigingen</value>
</data>
Expand Down Expand Up @@ -4360,9 +4360,6 @@ Voer op uw gateway-host (Mac/Linux) uit:
<data name="SandboxPage_64MiB.Content" xml:space="preserve">
<value>64 MiB</value>
</data>
<data name="SessionsPage_BackToConnection.Text" xml:space="preserve">
<value>Terug naar verbinding</value>
</data>
<data name="SessionsPage_Sessions.Text" xml:space="preserve">
<value>Sessies</value>
</data>
Expand Down
Loading
Loading