mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
feat(backgrounds): add constellation background
This commit is contained in:
@@ -23,6 +23,7 @@ const backgroundImports: Record<Exclude<BackgroundType, 'none'>, () => Promise<u
|
||||
starfield: () => import('./starfield'),
|
||||
'matrix-rain': () => import('./matrix-rain'),
|
||||
'liquid-gradient': () => import('./liquid-gradient'),
|
||||
constellation: () => import('./constellation'),
|
||||
};
|
||||
|
||||
/** Prefetch the JS chunk for a background type (call early to avoid lazy-load delay) */
|
||||
@@ -57,6 +58,7 @@ export const backgroundComponents: Record<
|
||||
starfield: lazy(() => import('./starfield')),
|
||||
'matrix-rain': lazy(() => import('./matrix-rain')),
|
||||
'liquid-gradient': lazy(() => import('./liquid-gradient')),
|
||||
constellation: lazy(() => import('./constellation')),
|
||||
};
|
||||
|
||||
// Registry of all background definitions with settings for the editor
|
||||
@@ -757,4 +759,37 @@ export const backgroundRegistry: BackgroundDefinition[] = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'constellation',
|
||||
labelKey: 'admin.backgrounds.constellation',
|
||||
descriptionKey: 'admin.backgrounds.constellationDesc',
|
||||
category: 'canvas',
|
||||
settings: [
|
||||
{
|
||||
key: 'particleColor',
|
||||
label: 'admin.backgrounds.particleColor',
|
||||
type: 'color',
|
||||
default: '#818cf8',
|
||||
},
|
||||
{ key: 'lineColor', label: 'admin.backgrounds.lineColor', type: 'color', default: '#818cf8' },
|
||||
{
|
||||
key: 'count',
|
||||
label: 'admin.backgrounds.count',
|
||||
type: 'number',
|
||||
min: 10,
|
||||
max: 200,
|
||||
step: 5,
|
||||
default: 60,
|
||||
},
|
||||
{
|
||||
key: 'linkDistance',
|
||||
label: 'admin.backgrounds.linkDistance',
|
||||
type: 'number',
|
||||
min: 40,
|
||||
max: 300,
|
||||
step: 10,
|
||||
default: 120,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user