5ce2c8a982
为 Claude Code 提供原生 Windows toast 通知:点击跳回原窗口、切回 Windows Terminal 标签、跨虚拟桌面、调用方图标、非阻塞投递;NativeAOT 单文件分发。
85 lines
3.3 KiB
XML
85 lines
3.3 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:u="https://irihi.tech/ursa"
|
||
xmlns:vm="clr-namespace:Notify.ViewModels"
|
||
xmlns:m="clr-namespace:Notify.Models"
|
||
x:Class="Notify.Views.SettingsWindow"
|
||
x:DataType="vm:SettingsViewModel"
|
||
Width="420"
|
||
SizeToContent="Height"
|
||
CanResize="False"
|
||
WindowStartupLocation="CenterScreen"
|
||
Icon="/Assets/claude.ico"
|
||
Title="弹窗设置">
|
||
|
||
<StackPanel Margin="20" Spacing="16">
|
||
|
||
<TextBlock Text="弹窗设置"
|
||
FontSize="18"
|
||
FontWeight="Bold" />
|
||
|
||
<u:Form LabelPosition="Left" LabelWidth="120">
|
||
|
||
<u:FormItem Label="停留时长(秒)">
|
||
<u:NumericIntUpDown Value="{Binding DurationSeconds}" Minimum="1" Maximum="60" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="聚焦时停留(秒)">
|
||
<u:NumericIntUpDown Value="{Binding FocusedDurationSeconds}" Minimum="1" Maximum="60" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="水平方向">
|
||
<ComboBox ItemsSource="{Binding Horizontals}"
|
||
SelectedItem="{Binding Horizontal}"
|
||
HorizontalAlignment="Stretch" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="垂直方向">
|
||
<ComboBox ItemsSource="{Binding Verticals}"
|
||
SelectedItem="{Binding Vertical}"
|
||
HorizontalAlignment="Stretch" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="边缘留白(DIP)">
|
||
<u:NumericIntUpDown Value="{Binding Margin}" Minimum="0" Maximum="200" Step="2" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="不透明度">
|
||
<u:NumericDoubleUpDown Value="{Binding Opacity}" Minimum="0.3" Maximum="1.0" Step="0.05" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="最多同时显示">
|
||
<u:NumericIntUpDown Value="{Binding MaxVisible}" Minimum="1" Maximum="10" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="宽度(DIP)">
|
||
<u:NumericDoubleUpDown Value="{Binding Width}" Minimum="240" Maximum="600" Step="10" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="淡入淡出(毫秒)">
|
||
<u:NumericIntUpDown Value="{Binding FadeMilliseconds}" Minimum="0" Maximum="2000" Step="50" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="播放提示音">
|
||
<ToggleSwitch IsChecked="{Binding PlaySound}" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="跨所有桌面显示">
|
||
<ToggleSwitch IsChecked="{Binding ShowOnAllDesktops}" />
|
||
</u:FormItem>
|
||
|
||
</u:Form>
|
||
|
||
<StackPanel Orientation="Horizontal" Spacing="10" HorizontalAlignment="Right">
|
||
<TextBlock Text="{Binding StatusText}"
|
||
VerticalAlignment="Center"
|
||
Foreground="#FF4CAF50" />
|
||
<Button Content="测试弹窗" Command="{Binding TestToastCommand}" />
|
||
<Button Content="保存"
|
||
Classes="Primary"
|
||
Command="{Binding SaveCommand}" />
|
||
</StackPanel>
|
||
|
||
</StackPanel>
|
||
</Window>
|