|
165 | 165 | Visibility="Collapsed" |
166 | 166 | Click="OnStripPrimaryClicked" |
167 | 167 | AutomationProperties.AutomationId="StripPrimaryAction"/> |
| 168 | + <Button x:Name="StripTerminalButton" |
| 169 | + Width="32" Height="32" Padding="0" |
| 170 | + Background="Transparent" BorderThickness="0" |
| 171 | + Visibility="Collapsed" |
| 172 | + Click="OnOpenGatewayTerminal" |
| 173 | + ToolTipService.ToolTip="Open terminal" |
| 174 | + AutomationProperties.Name="Open terminal" |
| 175 | + AutomationProperties.AutomationId="StripTerminalAction"> |
| 176 | + <FontIcon Glyph="{x:Bind helpers:FluentIconCatalog.Terminal, Mode=OneTime}" FontSize="14" |
| 177 | + Foreground="{ThemeResource TextFillColorSecondaryBrush}"/> |
| 178 | + </Button> |
168 | 179 | <!-- Disconnect/connect toggle. ON = connection is live (or attempting). |
169 | 180 | Tap OFF → disconnect; tap ON (from off) → reconnect. --> |
170 | 181 | <Button x:Name="StripDashboardButton" |
|
189 | 200 | </StackPanel> |
190 | 201 | </Grid> |
191 | 202 |
|
| 203 | + <!-- Host access controls — only for setup-managed WSL gateways. |
| 204 | + SSH gateways keep the top-right terminal affordance but |
| 205 | + do not expose lifecycle buttons. --> |
| 206 | + <StackPanel x:Name="GatewayHostControlsSection" Spacing="8" Visibility="Collapsed"> |
| 207 | + <Border Height="1" Background="{ThemeResource CardStrokeColorDefaultBrush}" Margin="0,0,0,4"/> |
| 208 | + <Grid ColumnSpacing="14"> |
| 209 | + <Grid.ColumnDefinitions> |
| 210 | + <ColumnDefinition Width="36"/> |
| 211 | + <ColumnDefinition Width="*"/> |
| 212 | + <ColumnDefinition Width="Auto"/> |
| 213 | + </Grid.ColumnDefinitions> |
| 214 | + <FontIcon Grid.Column="0" |
| 215 | + Glyph="{x:Bind helpers:FluentIconCatalog.Terminal, Mode=OneTime}" |
| 216 | + FontSize="22" |
| 217 | + VerticalAlignment="Center" HorizontalAlignment="Center" |
| 218 | + AutomationProperties.AccessibilityView="Raw"/> |
| 219 | + <StackPanel Grid.Column="1" VerticalAlignment="Center" Spacing="2"> |
| 220 | + <TextBlock x:Name="GatewayHostControlsTitleText" |
| 221 | + Text="WSL gateway" |
| 222 | + Style="{StaticResource BodyStrongTextBlockStyle}" |
| 223 | + AutomationProperties.HeadingLevel="Level2"/> |
| 224 | + <TextBlock x:Name="GatewayHostControlsDescriptionText" |
| 225 | + Text="Open a shell or manage the local gateway service in WSL." |
| 226 | + Style="{StaticResource CaptionTextBlockStyle}" |
| 227 | + Foreground="{ThemeResource TextFillColorSecondaryBrush}" |
| 228 | + TextWrapping="Wrap"/> |
| 229 | + <StackPanel x:Name="GatewayHostActionStatusPanel" |
| 230 | + Orientation="Horizontal" |
| 231 | + Spacing="6" |
| 232 | + Margin="0,4,0,0" |
| 233 | + Visibility="Collapsed"> |
| 234 | + <ProgressRing x:Name="GatewayHostActionProgress" |
| 235 | + Width="14" Height="14" |
| 236 | + IsActive="False" |
| 237 | + VerticalAlignment="Center"/> |
| 238 | + <TextBlock x:Name="GatewayHostActionStatusText" |
| 239 | + Text="" |
| 240 | + Style="{StaticResource CaptionTextBlockStyle}" |
| 241 | + Foreground="{ThemeResource TextFillColorSecondaryBrush}" |
| 242 | + TextWrapping="Wrap" |
| 243 | + VerticalAlignment="Center" |
| 244 | + AutomationProperties.LiveSetting="Polite"/> |
| 245 | + </StackPanel> |
| 246 | + </StackPanel> |
| 247 | + <StackPanel Grid.Column="2" |
| 248 | + Orientation="Horizontal" |
| 249 | + Spacing="8" |
| 250 | + HorizontalAlignment="Right" |
| 251 | + VerticalAlignment="Center"> |
| 252 | + <Button x:Name="GatewayHostOpenTerminalButton" |
| 253 | + Click="OnOpenGatewayTerminal" |
| 254 | + ToolTipService.ToolTip="Open terminal" |
| 255 | + AutomationProperties.Name="Open terminal" |
| 256 | + AutomationProperties.AutomationId="GatewayHostOpenTerminalAction"> |
| 257 | + <StackPanel Orientation="Horizontal" Spacing="6"> |
| 258 | + <FontIcon Glyph="{x:Bind helpers:FluentIconCatalog.Terminal, Mode=OneTime}" FontSize="12" |
| 259 | + AutomationProperties.AccessibilityView="Raw"/> |
| 260 | + <TextBlock Text="Terminal" FontSize="13"/> |
| 261 | + </StackPanel> |
| 262 | + </Button> |
| 263 | + <Button x:Name="GatewayHostStartButton" |
| 264 | + Content="Start" |
| 265 | + Click="OnStartGatewayClicked" |
| 266 | + ToolTipService.ToolTip="Run openclaw gateway start in WSL" |
| 267 | + AutomationProperties.Name="Start WSL gateway" |
| 268 | + AutomationProperties.AutomationId="GatewayHostStartAction"/> |
| 269 | + <Button x:Name="GatewayHostStopButton" |
| 270 | + Content="Stop" |
| 271 | + Click="OnStopGatewayClicked" |
| 272 | + ToolTipService.ToolTip="Run openclaw gateway stop in WSL" |
| 273 | + AutomationProperties.Name="Stop WSL gateway" |
| 274 | + AutomationProperties.AutomationId="GatewayHostStopAction"/> |
| 275 | + <Button x:Name="GatewayHostRestartButton" |
| 276 | + Content="Restart" |
| 277 | + Click="OnRestartGatewayClicked" |
| 278 | + ToolTipService.ToolTip="Run openclaw gateway restart in WSL" |
| 279 | + AutomationProperties.Name="Restart WSL gateway" |
| 280 | + AutomationProperties.AutomationId="GatewayHostRestartAction"/> |
| 281 | + </StackPanel> |
| 282 | + </Grid> |
| 283 | + </StackPanel> |
| 284 | + |
192 | 285 | <!-- Operator section — visible only when there's an active operator session. |
193 | 286 | Mirrors the Permissions Node card pattern: 22-px icon |
194 | 287 | column + title + small description, then a status |
|
0 commit comments