feat: drag account groups and separate grouped card rows

This commit is contained in:
陈煜 committed 2026-10-03 17:12:04 +08:00
1 parent 59837cf09c
commit 9a133e82e9
13 files changed
+360 -94

No files matched your search

+9
View File
@@ -6,3 +6,12 @@ export function orderedGroups(groups: string[], order: string[] = []) {
export function mergeGroupOrder(visible: string[], saved: string[]) {
return [...visible, ...saved.filter((g) => !visible.includes(g))];
}
export function moveGroup(groups: string[], from: number, to: number) {
if (from === to || from < 0 || to < 0 || from >= groups.length || to >= groups.length)
return groups;
const next = [...groups],
[group] = next.splice(from, 1);
next.splice(to, 0, group);
return next;
}