Adopt Semi desktop theme and fix UTF-8 process logs for 0.2.3
This commit is contained in:
1 parent
5b3022e1f3
commit
dc8edf0df6
16 files changed
+161
-55
No files matched your search
@@ -1,36 +1,29 @@
|
||||
<Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:Ads.Desktop"
|
||||
x:Class="Ads.Desktop.MainWindow" Title="ADS · 公网设备工作台"
|
||||
Width="1240" Height="880" MinWidth="980" MinHeight="700" Background="#10151F">
|
||||
<Window.Styles>
|
||||
<Style Selector="TextBox"><Setter Property="Margin" Value="0,5,0,12"/></Style>
|
||||
<Style Selector="Button"><Setter Property="Padding" Value="15,10"/><Setter Property="Margin" Value="0,0,8,8"/></Style>
|
||||
<Style Selector="TextBlock.label"><Setter Property="Foreground" Value="#9CAFC7"/></Style>
|
||||
<Style Selector="TextBlock.section"><Setter Property="FontSize" Value="18"/><Setter Property="FontWeight" Value="SemiBold"/></Style>
|
||||
<Style Selector="Border.card"><Setter Property="Background" Value="#192230"/><Setter Property="CornerRadius" Value="12"/><Setter Property="Padding" Value="20"/></Style>
|
||||
</Window.Styles>
|
||||
<Grid RowDefinitions="Auto,*,Auto" Margin="26">
|
||||
Width="1240" Height="880" MinWidth="980" MinHeight="700" Background="{DynamicResource SemiColorBackground0}">
|
||||
<Grid RowDefinitions="Auto,*,Auto" Margin="24">
|
||||
<Grid ColumnDefinitions="*,Auto" Margin="0,0,0,20">
|
||||
<StackPanel Spacing="5">
|
||||
<TextBlock Text="ANDROID DEVICE STREAMING" Foreground="#66D9C0" FontSize="11" LetterSpacing="3"/>
|
||||
<TextBlock Text="ANDROID DEVICE STREAMING" Foreground="{DynamicResource SemiColorPrimary}" FontSize="11" LetterSpacing="3"/>
|
||||
<TextBlock Text="公网设备工作台" FontSize="29" FontWeight="Bold"/>
|
||||
<TextBlock Text="连接远程手机,在本机调试与控制" Classes="label"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Spacing="8">
|
||||
<Border Height="3" HorizontalAlignment="Stretch"><ProgressBar IsIndeterminate="True" IsVisible="{Binding IsRefreshing}" Height="3"/></Border>
|
||||
<TextBlock x:Name="RelayStatusText" Text="{Binding RelayStatus}" HorizontalAlignment="Right" Foreground="#66D9C0"/>
|
||||
<StackPanel Orientation="Horizontal"><Button x:Name="RefreshButton" Content="刷新设备" Command="{Binding RefreshCommand}"/><Button Content="保存配置" Command="{Binding SaveCommand}"/></StackPanel>
|
||||
<TextBlock x:Name="RelayStatusText" Text="{Binding RelayStatus}" HorizontalAlignment="Right" Foreground="{DynamicResource SemiColorPrimary}"/>
|
||||
<StackPanel Orientation="Horizontal"><ToggleSwitch x:Name="ThemeSwitch" OnContent="深色" OffContent="浅色" IsChecked="False" IsCheckedChanged="ThemeChanged" Margin="0,0,16,8"/><Button x:Name="RefreshButton" Content="刷新设备" Command="{Binding RefreshCommand}"/><Button Content="保存配置" Command="{Binding SaveCommand}"/></StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<TabControl x:Name="MainTabs" Grid.Row="1">
|
||||
<TabControl x:Name="MainTabs" Classes="workbench" TabStripPlacement="Left" Grid.Row="1">
|
||||
<TabItem Header="设备与连接">
|
||||
<Grid ColumnDefinitions="320,*" Margin="0,16,0,0">
|
||||
<Grid ColumnDefinitions="270,*" Margin="0,16,0,0">
|
||||
<Border Classes="card" Margin="0,0,16,0">
|
||||
<Grid RowDefinitions="Auto,*,Auto,Auto,Auto">
|
||||
<TextBlock Text="在线设备" Classes="section"/>
|
||||
<ListBox x:Name="DeviceList" Grid.Row="1" ItemsSource="{Binding Devices}" SelectedItem="{Binding SelectedDevice}" Margin="0,14,0,12" Background="Transparent">
|
||||
<ListBox.ItemTemplate><DataTemplate><StackPanel Margin="5,10" Spacing="6"><TextBlock Text="{Binding Id}" FontSize="17" TextWrapping="Wrap"/><TextBlock Text="{Binding ComputerLabel}" Classes="label" TextWrapping="Wrap"/><TextBlock Text="{Binding Description}" Classes="label" TextWrapping="Wrap"/></StackPanel></DataTemplate></ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<TextBlock Grid.Row="2" Text="{Binding ConnectionSummary}" Foreground="#66D9C0" Margin="0,0,0,8" TextWrapping="Wrap"/>
|
||||
<TextBlock Grid.Row="2" Text="{Binding ConnectionSummary}" Foreground="{DynamicResource SemiColorPrimary}" Margin="0,0,0,8" TextWrapping="Wrap"/>
|
||||
<TextBlock Grid.Row="3" Text="{Binding DeviceSummary}" Classes="label" TextWrapping="Wrap"/>
|
||||
<CheckBox Grid.Row="4" Content="自动刷新设备列表" IsChecked="{Binding AutoRefresh}" Margin="0,12,0,0"/>
|
||||
</Grid>
|
||||
@@ -39,15 +32,15 @@
|
||||
<StackPanel Spacing="14">
|
||||
<Border Classes="card">
|
||||
<StackPanel Spacing="12">
|
||||
<Grid ColumnDefinitions="*,Auto"><TextBlock Text="多设备连接总览" Classes="section"/><TextBlock Grid.Column="1" Text="{Binding ConnectionSummary}" Foreground="#66D9C0" VerticalAlignment="Center"/></Grid>
|
||||
<WrapPanel><Button x:Name="ConnectAllButton" Content="连接全部空闲设备" Command="{Binding ConnectAllCommand}"/><Button Content="投屏全部就绪设备" Command="{Binding StartAllScreensCommand}"/><Button x:Name="DisconnectAllButton" Content="断开全部" Command="{Binding DisconnectAllCommand}"/></WrapPanel>
|
||||
<Grid ColumnDefinitions="*,Auto"><TextBlock Text="多设备连接总览" Classes="section"/><TextBlock Grid.Column="1" Text="{Binding ConnectionSummary}" Foreground="{DynamicResource SemiColorPrimary}" VerticalAlignment="Center"/></Grid>
|
||||
<WrapPanel><Button Classes="Primary" Theme="{DynamicResource SolidButton}" x:Name="ConnectAllButton" Content="连接全部空闲设备" Command="{Binding ConnectAllCommand}"/><Button Content="投屏全部就绪设备" Command="{Binding StartAllScreensCommand}"/><Button Classes="Danger" x:Name="DisconnectAllButton" Content="断开全部" Command="{Binding DisconnectAllCommand}"/></WrapPanel>
|
||||
<ScrollViewer MaxHeight="380">
|
||||
<ItemsControl x:Name="ConnectionsList" ItemsSource="{Binding Connections}">
|
||||
<ItemsControl.ItemTemplate><DataTemplate>
|
||||
<Border Background="#101923" CornerRadius="8" Padding="12" Margin="0,0,0,8">
|
||||
<Border Classes="inset" Margin="0,0,0,8">
|
||||
<StackPanel Spacing="6">
|
||||
<Grid ColumnDefinitions="*,Auto"><TextBlock Text="{Binding DeviceId}" FontSize="17" FontWeight="SemiBold"/><TextBlock Grid.Column="1" Text="{Binding Mode}" Foreground="#66D9C0"/></Grid>
|
||||
<TextBlock Text="{Binding Status}" Foreground="#66D9C0"/>
|
||||
<Grid ColumnDefinitions="*,Auto"><TextBlock Text="{Binding DeviceId}" FontSize="17" FontWeight="SemiBold"/><TextBlock Grid.Column="1" Text="{Binding Mode}" Foreground="{DynamicResource SemiColorPrimary}"/></Grid>
|
||||
<TextBlock Text="{Binding Status}" Foreground="{DynamicResource SemiColorPrimary}"/>
|
||||
<TextBlock Text="{Binding Endpoint}" Classes="label"/><TextBlock Text="{Binding PortSummary}" Classes="label" FontSize="12" TextWrapping="Wrap"/><TextBlock Text="{Binding TransportStatus}" Classes="label" TextWrapping="Wrap"/>
|
||||
<WrapPanel>
|
||||
<Button Content="查看" Command="{Binding $parent[Window].DataContext.SelectConnectionCommand}" CommandParameter="{Binding}" Padding="10,6"/>
|
||||
@@ -67,10 +60,10 @@
|
||||
<Border Classes="card">
|
||||
<StackPanel Spacing="12">
|
||||
<TextBlock Text="所选设备 · 连接管理" Classes="section"/>
|
||||
<TextBlock x:Name="ConnectionStatusText" Text="{Binding Status}" Foreground="#66D9C0" FontSize="19" TextWrapping="Wrap"/>
|
||||
<TextBlock x:Name="TransportStatusText" Text="{Binding TransportStatus}" Foreground="#A8B7CC" TextWrapping="Wrap"/>
|
||||
<TextBlock x:Name="ConnectionStatusText" Text="{Binding Status}" Foreground="{DynamicResource SemiColorPrimary}" FontSize="19" TextWrapping="Wrap"/>
|
||||
<TextBlock x:Name="TransportStatusText" Text="{Binding TransportStatus}" Foreground="{DynamicResource SemiColorText2}" TextWrapping="Wrap"/>
|
||||
<TextBlock x:Name="EndpointText" Text="{Binding ActiveEndpoint}" Classes="label" TextWrapping="Wrap"/>
|
||||
<WrapPanel><Button x:Name="ConnectButton" Content="连接所选设备" Command="{Binding ConnectCommand}"/><Button x:Name="ReconnectButton" Content="重新连接" Command="{Binding ReconnectCommand}"/><Button x:Name="DisconnectButton" Content="断开连接" Command="{Binding DisconnectCommand}"/><Button Content="复制设备标识" IsEnabled="{Binding HasConnection}" Click="CopyEndpointClick"/><Button x:Name="ClearPortButton" Content="清理占用端口" Command="{Binding ClearPortCommand}"/></WrapPanel>
|
||||
<WrapPanel><Button Classes="Primary" Theme="{DynamicResource SolidButton}" x:Name="ConnectButton" Content="连接所选设备" Command="{Binding ConnectCommand}"/><Button x:Name="ReconnectButton" Content="重新连接" Command="{Binding ReconnectCommand}"/><Button x:Name="DisconnectButton" Content="断开连接" Command="{Binding DisconnectCommand}"/><Button Content="复制设备标识" IsEnabled="{Binding HasConnection}" Click="CopyEndpointClick"/><Button x:Name="ClearPortButton" Content="清理占用端口" Command="{Binding ClearPortCommand}"/></WrapPanel>
|
||||
<TextBlock Text="断开连接只释放本机通道,远程手机守护程序会继续在线。" TextWrapping="Wrap" Classes="label" FontSize="12"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
@@ -93,7 +86,7 @@
|
||||
<StackPanel Grid.Column="1"><TextBlock Text="最大帧率" Classes="label"/><NumericUpDown Value="{Binding MaxFps}" Minimum="1" Maximum="240" Increment="10" Margin="8,6,0,4"/></StackPanel>
|
||||
</Grid>
|
||||
<WrapPanel><CheckBox Content="传输音频" IsChecked="{Binding Audio}" Margin="0,0,24,0"/><CheckBox Content="只看画面" IsChecked="{Binding ViewOnly}"/></WrapPanel>
|
||||
<WrapPanel><Button x:Name="StartScreenButton" Content="打开手机控制" Command="{Binding StartScrcpyCommand}"/><Button Content="停止投屏" Command="{Binding StopScrcpyCommand}"/></WrapPanel>
|
||||
<WrapPanel><Button Classes="Primary" Theme="{DynamicResource SolidButton}" x:Name="StartScreenButton" Content="打开手机控制" Command="{Binding StartScrcpyCommand}"/><Button Content="停止投屏" Command="{Binding StopScrcpyCommand}"/></WrapPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
@@ -106,7 +99,7 @@
|
||||
<StackPanel Margin="4,18" MaxWidth="880" Spacing="16">
|
||||
<Border Classes="card"><StackPanel>
|
||||
<TextBlock Text="控制中心" Classes="section" Margin="0,0,0,12"/>
|
||||
<ItemsControl ItemsSource="{Binding RelayNodes}" Margin="0,0,0,12"><ItemsControl.ItemTemplate><DataTemplate><TextBlock Text="{Binding Description}" Foreground="#66D9C0" Margin="0,3"/></DataTemplate></ItemsControl.ItemTemplate></ItemsControl>
|
||||
<ItemsControl ItemsSource="{Binding RelayNodes}" Margin="0,0,0,12"><ItemsControl.ItemTemplate><DataTemplate><TextBlock Text="{Binding Description}" Foreground="{DynamicResource SemiColorPrimary}" Margin="0,3"/></DataTemplate></ItemsControl.ItemTemplate></ItemsControl>
|
||||
<TextBlock Text="控制中心地址(WSS,可包含路径)"/><TextBox x:Name="ServerBox" Text="{Binding Server}" Watermark="wss://ttstd.com/ads"/>
|
||||
<TextBlock Text="直连服务器(可选)"/><TextBox x:Name="OriginBox" Text="{Binding Origin}" Watermark="175.178.213.60:443"/>
|
||||
<TextBlock Text="留空则按域名解析;指定公网 IP 时仍验证域名证书。当前部署使用此设置避开 Cloudflare 连接超时。" Classes="label" TextWrapping="Wrap"/>
|
||||
@@ -148,10 +141,10 @@
|
||||
<TabItem Header="运行日志">
|
||||
<Grid RowDefinitions="Auto,*" Margin="0,16,0,0">
|
||||
<StackPanel Orientation="Horizontal"><Button Content="打开日志文件夹" Command="{Binding OpenLogFolderCommand}"/><Button Content="清空日志" Command="{Binding ClearLogsCommand}"/><Button Content="导出日志" Command="{Binding ExportLogsCommand}"/></StackPanel>
|
||||
<ListBox Grid.Row="1" ItemsSource="{Binding Logs}" Margin="0,8,0,0" FontFamily="Cascadia Mono,Consolas" FontSize="12"><ListBox.ItemTemplate><DataTemplate><TextBlock Text="{Binding}" TextWrapping="Wrap"/></DataTemplate></ListBox.ItemTemplate></ListBox>
|
||||
<ListBox x:Name="RuntimeLogs" Grid.Row="1" ItemsSource="{Binding Logs}" Margin="0,8,0,0" FontFamily="Cascadia Mono,Consolas,Microsoft YaHei UI,Noto Sans CJK SC" FontSize="12"><ListBox.ItemTemplate><DataTemplate><TextBlock Text="{Binding}" TextWrapping="Wrap"/></DataTemplate></ListBox.ItemTemplate></ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<TextBlock Grid.Row="2" x:Name="NoticeText" Text="{Binding Notice}" Foreground="#A8B7CC" Margin="0,18,0,0" TextWrapping="Wrap" MaxHeight="70"/>
|
||||
<TextBlock Grid.Row="2" x:Name="NoticeText" Text="{Binding Notice}" Foreground="{DynamicResource SemiColorText2}" Margin="0,18,0,0" TextWrapping="Wrap" MaxHeight="70"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in new issue
Block a user