feat: add multiple way to show collections and links

This commit is contained in:
Sonny
2025-08-21 02:27:51 +02:00
parent 18fe979069
commit 4ef2b639b6
41 changed files with 785 additions and 164 deletions

12
app/user/lib/index.ts Normal file
View File

@@ -0,0 +1,12 @@
import { type DisplayPreferences } from '#shared/types/index';
import User from '#user/models/user';
export function ensureDisplayPreferences(user: User): DisplayPreferences {
const defaults: DisplayPreferences = {
linkListDisplay: 'grid',
collectionListDisplay: 'list',
};
user.displayPreferences = { ...defaults, ...user.displayPreferences };
return user.displayPreferences;
}