forked from sim0n00ps/OF-DL
Creator config modal improvements
This commit is contained in:
parent
85e299db41
commit
162811b267
@ -848,7 +848,8 @@
|
||||
<Grid Grid.RowSpan="3"
|
||||
IsVisible="{Binding CreatorConfigEditor.ModalViewModel.IsOpen}"
|
||||
Background="#80000000"
|
||||
ZIndex="1000">
|
||||
ZIndex="1000"
|
||||
PointerPressed="OnModalOverlayClicked">
|
||||
<Border Background="#FFFFFF"
|
||||
BorderBrush="#DDE5F3"
|
||||
BorderThickness="1"
|
||||
@ -858,7 +859,8 @@
|
||||
MaxHeight="750"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
BoxShadow="0 8 32 0 #26000000">
|
||||
BoxShadow="0 8 32 0 #26000000"
|
||||
PointerPressed="OnModalContentClicked">
|
||||
<ScrollViewer DataContext="{Binding CreatorConfigEditor.ModalViewModel}">
|
||||
<StackPanel Spacing="14" Margin="8,4,8,4" x:DataType="vm:CreatorConfigModalViewModel">
|
||||
<TextBlock FontSize="18"
|
||||
@ -887,6 +889,8 @@
|
||||
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock FontWeight="SemiBold" Foreground="#1F2A44" Text="Paid Post Filename Format" />
|
||||
<TextBox Text="{Binding PaidPostFileNameFormat}"
|
||||
Watermark="Optional: override global paid post format" />
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<ComboBox Grid.Column="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
@ -898,8 +902,6 @@
|
||||
Content="Insert"
|
||||
Command="{Binding InsertPaidPostVariableCommand}" />
|
||||
</Grid>
|
||||
<TextBox Text="{Binding PaidPostFileNameFormat}"
|
||||
Watermark="Optional: override global paid post format" />
|
||||
<Border Padding="8"
|
||||
Background="#F5F8FE"
|
||||
BorderBrush="#D8E3F4"
|
||||
@ -929,6 +931,8 @@
|
||||
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock FontWeight="SemiBold" Foreground="#1F2A44" Text="Post Filename Format" />
|
||||
<TextBox Text="{Binding PostFileNameFormat}"
|
||||
Watermark="Optional: override global post format" />
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<ComboBox Grid.Column="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
@ -940,8 +944,6 @@
|
||||
Content="Insert"
|
||||
Command="{Binding InsertPostVariableCommand}" />
|
||||
</Grid>
|
||||
<TextBox Text="{Binding PostFileNameFormat}"
|
||||
Watermark="Optional: override global post format" />
|
||||
<Border Padding="8"
|
||||
Background="#F5F8FE"
|
||||
BorderBrush="#D8E3F4"
|
||||
@ -971,6 +973,8 @@
|
||||
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock FontWeight="SemiBold" Foreground="#1F2A44" Text="Paid Message Filename Format" />
|
||||
<TextBox Text="{Binding PaidMessageFileNameFormat}"
|
||||
Watermark="Optional: override global paid message format" />
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<ComboBox Grid.Column="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
@ -982,8 +986,6 @@
|
||||
Content="Insert"
|
||||
Command="{Binding InsertPaidMessageVariableCommand}" />
|
||||
</Grid>
|
||||
<TextBox Text="{Binding PaidMessageFileNameFormat}"
|
||||
Watermark="Optional: override global paid message format" />
|
||||
<Border Padding="8"
|
||||
Background="#F5F8FE"
|
||||
BorderBrush="#D8E3F4"
|
||||
@ -1013,6 +1015,8 @@
|
||||
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock FontWeight="SemiBold" Foreground="#1F2A44" Text="Message Filename Format" />
|
||||
<TextBox Text="{Binding MessageFileNameFormat}"
|
||||
Watermark="Optional: override global message format" />
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<ComboBox Grid.Column="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
@ -1024,8 +1028,6 @@
|
||||
Content="Insert"
|
||||
Command="{Binding InsertMessageVariableCommand}" />
|
||||
</Grid>
|
||||
<TextBox Text="{Binding MessageFileNameFormat}"
|
||||
Watermark="Optional: override global message format" />
|
||||
<Border Padding="8"
|
||||
Background="#F5F8FE"
|
||||
BorderBrush="#D8E3F4"
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Platform;
|
||||
using Avalonia.Platform.Storage;
|
||||
@ -103,4 +104,22 @@ public partial class MainWindow : Window
|
||||
|
||||
vm.SetDownloadPath(selectedFolder.Name);
|
||||
}
|
||||
|
||||
private void OnModalOverlayClicked(object? sender, PointerPressedEventArgs e)
|
||||
{
|
||||
// Only handle clicks on the overlay itself (the Grid background)
|
||||
if (DataContext is not MainWindowViewModel vm)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute cancel command on the modal
|
||||
vm.CreatorConfigEditor.ModalViewModel?.CancelCommand?.Execute(null);
|
||||
}
|
||||
|
||||
private void OnModalContentClicked(object? sender, PointerPressedEventArgs e)
|
||||
{
|
||||
// Stop the event from bubbling up to the overlay
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user