Files
WinWARP/WinWARP.Ui/Views/Dialogs/AddSubscriptionDialog.xaml
2026-09-09 16:19:45 +03:00

32 lines
1.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<ContentDialog
x:Class="WinWARP.Ui.Views.Dialogs.AddSubscriptionDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views.Dialogs"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:conv="using:WinWARP.Ui.Converters"
xmlns:u="using:WinUI3Localizer"
DefaultButton="Primary"
mc:Ignorable="d" Height="300" Width="400"
u:Uids.Uid="AddSubscriptionDialog"
IsPrimaryButtonEnabled="{x:Bind ViewModel.CanSubmit, Mode=OneWay}">
<ContentDialog.Resources>
<conv:UpdateIntervalToTextConverter x:Key="UpdateIntervalToTextConverter"/>
</ContentDialog.Resources>
<StackPanel Spacing="12" Width="400">
<TextBox u:Uids.Uid="AddSubscriptionDialogCustomName" Text="{x:Bind ViewModel.CustomName, Mode=TwoWay}"/>
<TextBox u:Uids.Uid="AddSubscriptionDialogUrl" Text="{x:Bind ViewModel.SubscriptionLink, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<Slider Minimum="-1" Maximum="48" x:Name="UpdateIntervalSlider" IsThumbToolTipEnabled="False"
Value="{x:Bind ViewModel.UpdateInterval, Mode=TwoWay}">
<Slider.Header>
<TextBlock>
<Run u:Uids.Uid="AddSubscriptionDialogUpdateInterval"/><Run Text=": "/><Run Text="{x:Bind UpdateIntervalSlider.Value, Converter={StaticResource UpdateIntervalToTextConverter}, Mode=OneWay}"/>
</TextBlock>
</Slider.Header>
</Slider>
</StackPanel>
</ContentDialog>