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.

Prototype: show group slices and chips as "Group of N"

SeoJCalivec12f75961cf3
diff --git a/src/Filee.App/Assets/i18n/en.json b/src/Filee.App/Assets/i18n/en.json
index 069cb022..b55a3f49 100644
--- a/src/Filee.App/Assets/i18n/en.json
+++ b/src/Filee.App/Assets/i18n/en.json
@@ -43,6 +43,7 @@
"donut.edit": "Edit preset",
"donut.empty": "Drag presets here",
"donut.same_format": "Same format",
+ "donut.group_caption": "Group of {0}",
"toast.converting": "{0} → {1}",
"toast.done": "Done",
diff --git a/src/Filee.App/Assets/i18n/ko.json b/src/Filee.App/Assets/i18n/ko.json
index 5ef8f8f9..140ae0ba 100644
--- a/src/Filee.App/Assets/i18n/ko.json
+++ b/src/Filee.App/Assets/i18n/ko.json
@@ -43,6 +43,7 @@
"donut.edit": "프리셋 편집",
"donut.empty": "프리셋을 끌어다 놓으세요",
"donut.same_format": "같은 형식",
+ "donut.group_caption": "묶음 · {0}개",
"toast.converting": "{0} → {1}",
"toast.done": "완료",
diff --git a/src/Filee.App/Assets/i18n/zh-CN.json b/src/Filee.App/Assets/i18n/zh-CN.json
index e0123280..1fdfc06a 100644
--- a/src/Filee.App/Assets/i18n/zh-CN.json
+++ b/src/Filee.App/Assets/i18n/zh-CN.json
@@ -43,6 +43,7 @@
"donut.edit": "编辑预设",
"donut.empty": "把预设拖到这里",
"donut.same_format": "同格式",
+ "donut.group_caption": "组 · {0} 项",
"toast.converting": "{0} → {1}",
"toast.done": "完成",
diff --git a/src/Filee.App/ViewModels/Pages/ToolbarPageViewModel.cs b/src/Filee.App/ViewModels/Pages/ToolbarPageViewModel.cs
index 3b651bdd..20e62a85 100644
--- a/src/Filee.App/ViewModels/Pages/ToolbarPageViewModel.cs
+++ b/src/Filee.App/ViewModels/Pages/ToolbarPageViewModel.cs
@@ -323,5 +323,6 @@ public sealed partial class ToolbarPageViewModel : ObservableObject
}
private string? Caption(Preset p) =>
- p.TargetFormat == BuiltInData.SameAsSource ? _loc["donut.same_format"] : FormatLabels.NameOf(_loc, p.TargetFormat);
+ p.IsGroup ? _loc.Format("donut.group_caption", p.SubPresetIds.Count)
+ : p.TargetFormat == BuiltInData.SameAsSource ? _loc["donut.same_format"] : FormatLabels.NameOf(_loc, p.TargetFormat);
}
diff --git a/src/Filee.App/ViewModels/RadialViewModel.cs b/src/Filee.App/ViewModels/RadialViewModel.cs
index d1e35bbd..051e4495 100644
--- a/src/Filee.App/ViewModels/RadialViewModel.cs
+++ b/src/Filee.App/ViewModels/RadialViewModel.cs
@@ -119,13 +119,13 @@ public sealed partial class RadialViewModel(UserDataStore store, ILocalizer loc,
{
if (!p.IsGroup)
return ItemOf(p);
- // A group: its own name with "···", and its presets on the ring it fans out (labels only, they're small).
+ // A group: its own name and size, and its presets on the ring it fans out (labels only, they're small).
var children = _subPresets[i].Select(c => ItemOf(c, caption: false)).ToList();
return new DonutItem
{
Id = p.Id,
Label = loc.DisplayName(p),
- Caption = "···",
+ Caption = loc.Format("donut.group_caption", children.Count),
IsEnabled = children.Any(c => c.IsEnabled),
DisabledReason = children.Select(c => c.DisabledReason).FirstOrDefault(r => r is not null),
Children = children,