Skip to content

An open-source, self-hosted system for apps built with web technologies.

Remove grain animation from Theme

zohayrslileh70b365e6655a
diff --git a/scripts/verify-theme.mjs b/scripts/verify-theme.mjs
index 2ee3730..a17f275 100644
--- a/scripts/verify-theme.mjs
+++ b/scripts/verify-theme.mjs
@@ -11,7 +11,6 @@ const expected = {
surface: {
grain: 0,
grainAmount: 0,
- grainAnimation: 0,
backdrop: 0,
opacity: 1,
distortion: 0,
@@ -28,7 +27,6 @@ const configured = themeSchema.parse({
surface: {
grain: 0.9,
grainAmount: 0.5,
- grainAnimation: 16,
backdrop: 24,
opacity: 0,
distortion: 140,
@@ -42,7 +40,6 @@ assert.equal(configured.background, "black")
assert.deepEqual(configured.surface, {
grain: 0.9,
grainAmount: 0.5,
- grainAnimation: 16,
backdrop: 24,
opacity: 0,
distortion: 140,
@@ -56,7 +53,6 @@ assert.throws(() => themeSchema.parse({ glass: {} }))
assert.throws(() => themeSchema.parse({ surface: { grain: 1.01 } }))
assert.throws(() => themeSchema.parse({ surface: { grainAmount: -0.01 } }))
assert.throws(() => themeSchema.parse({ surface: { animation: 1 } }))
-assert.throws(() => themeSchema.parse({ surface: { grainAnimation: 17 } }))
assert.throws(() => themeSchema.parse({ surface: { backdrop: 25 } }))
assert.throws(() => themeSchema.parse({ surface: { distortion: 141 } }))
assert.throws(() => themeSchema.parse({ surface: { waves: 41 } }))
diff --git a/source/server/core/theme-manager.ts b/source/server/core/theme-manager.ts
index ee091fb..f5bd074 100644
--- a/source/server/core/theme-manager.ts
+++ b/source/server/core/theme-manager.ts
@@ -14,7 +14,6 @@ export const themeSchema: z.ZodType<ThemeProperties> = z.strictObject({
surface: z.strictObject({
grain: bounded(themeLimits.surface.grain).default(standardTheme.surface.grain),
grainAmount: bounded(themeLimits.surface.grainAmount).default(standardTheme.surface.grainAmount),
- grainAnimation: bounded(themeLimits.surface.grainAnimation).default(standardTheme.surface.grainAnimation),
backdrop: bounded(themeLimits.surface.backdrop).default(standardTheme.surface.backdrop),
opacity: bounded(themeLimits.surface.opacity).default(standardTheme.surface.opacity),
distortion: bounded(themeLimits.surface.distortion).default(standardTheme.surface.distortion),