Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

Donut groups: a new group joins no donut; create buttons above the list

SeoJCalive09ff0fb3fd91
diff --git a/src/Filee.App/ViewModels/Pages/ToolbarPageViewModel.cs b/src/Filee.App/ViewModels/Pages/ToolbarPageViewModel.cs
index 8c014fad..accf8790 100644
--- a/src/Filee.App/ViewModels/Pages/ToolbarPageViewModel.cs
+++ b/src/Filee.App/ViewModels/Pages/ToolbarPageViewModel.cs
@@ -250,7 +250,10 @@ public sealed partial class ToolbarPageViewModel : ObservableObject
Commit();
}
- /// <summary>A new group (a slice that fans out presets), added to the selected donut when there's room.</summary>
+ /// <summary>
+ /// A new group (a slice that fans out presets). It joins the available presets only: no donut gets it until the
+ /// user drags it there.
+ /// </summary>
[RelayCommand]
private async Task NewGroup()
{
@@ -258,8 +261,6 @@ public sealed partial class ToolbarPageViewModel : ObservableObject
if (!await _windows.EditGroupAsync(group, _windows.Main, isNew: true))
return;
_store.Presets.Add(group);
- if (Profile is not null && Profile.PresetIds.Count < ToolbarProfile.MaxSlices)
- Profile.PresetIds.Add(group.Id);
Commit();
}
diff --git a/src/Filee.App/Views/Pages/ToolbarPage.axaml b/src/Filee.App/Views/Pages/ToolbarPage.axaml
index 3cfc5c59..9891c439 100644
--- a/src/Filee.App/Views/Pages/ToolbarPage.axaml
+++ b/src/Filee.App/Views/Pages/ToolbarPage.axaml
@@ -270,6 +270,21 @@
<!-- Palette -->
<StackPanel Grid.Column="4" Spacing="8">
<TextBlock Classes="label" Text="{DynamicResource toolbar.available}" />
+ <Grid ColumnDefinitions="*,8,*">
+ <Button HorizontalAlignment="Stretch" Command="{Binding NewPresetCommand}">
+ <StackPanel Orientation="Horizontal" Spacing="6">
+ <PathIcon Width="12" Height="12" Data="{StaticResource Icon.Plus}" />
+ <TextBlock Text="{DynamicResource toolbar.new_preset}" />
+ </StackPanel>
+ </Button>
+ <Button Grid.Column="2" HorizontalAlignment="Stretch" Command="{Binding NewGroupCommand}"
+ ToolTip.Tip="{DynamicResource group.hint}">
+ <StackPanel Orientation="Horizontal" Spacing="6">
+ <PathIcon Width="12" Height="12" Data="{StaticResource Icon.Donut}" />
+ <TextBlock Text="{DynamicResource toolbar.new_group}" />
+ </StackPanel>
+ </Button>
+ </Grid>
<TextBox Classes="search" Text="{Binding PaletteSearch}" Watermark="{DynamicResource common.search}">
<TextBox.InnerLeftContent>
<PathIcon Width="14" Height="14" Margin="10,0,0,0" Data="{StaticResource Icon.Search}" Foreground="{DynamicResource TextSecondaryBrush}" />
@@ -295,21 +310,6 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>
- <Grid ColumnDefinitions="*,8,*">
- <Button HorizontalAlignment="Stretch" Command="{Binding NewPresetCommand}">
- <StackPanel Orientation="Horizontal" Spacing="6">
- <PathIcon Width="12" Height="12" Data="{StaticResource Icon.Plus}" />
- <TextBlock Text="{DynamicResource toolbar.new_preset}" />
- </StackPanel>
- </Button>
- <Button Grid.Column="2" HorizontalAlignment="Stretch" Command="{Binding NewGroupCommand}"
- ToolTip.Tip="{DynamicResource group.hint}">
- <StackPanel Orientation="Horizontal" Spacing="6">
- <PathIcon Width="12" Height="12" Data="{StaticResource Icon.Donut}" />
- <TextBlock Text="{DynamicResource toolbar.new_group}" />
- </StackPanel>
- </Button>
- </Grid>
<StackPanel Spacing="4" Margin="2,6,0,0">
<TextBlock Classes="caption" TextWrapping="Wrap" Text="{DynamicResource toolbar.hint_add}" />
<TextBlock Classes="caption" TextWrapping="Wrap" Text="{DynamicResource toolbar.hint_remove}" />