Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

feat(config): add color mode preference to environment variables

HoshinoSuzumi1024fbd9e465
diff --git a/.env.example b/.env.example
index bb7b8495..d606dd54 100644
--- a/.env.example
+++ b/.env.example
@@ -10,6 +10,8 @@ NUXT_PUBLIC_APP_TITLE=ChronoFrame
NUXT_PUBLIC_APP_SLOGAN=Mems rest within the lens.
NUXT_PUBLIC_APP_AUTHOR=
NUXT_PUBLIC_APP_AVATAR_URL=/avatar.webp
+# Color mode preference: light, dark, or system
+NUXT_PUBLIC_COLOR_MODE_PREFERENCE=light
# Mapbox access token for map features, Mapbox GL JS (Client-side, public)
NUXT_PUBLIC_MAPBOX_ACCESS_TOKEN=
diff --git a/nuxt.config.ts b/nuxt.config.ts
index 9364e3fd..0c42c437 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -97,7 +97,8 @@ export default defineNuxtConfig({
},
colorMode: {
- preference: 'dark',
+ preference: process.env.NUXT_PUBLIC_COLOR_MODE_PREFERENCE || 'dark',
+ storageKey: 'cframe-color-mode',
},
icon: {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ab957c03..ff234392 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -219,22 +219,22 @@ importers:
devDependencies:
'@nuxt/eslint':
specifier: ^1.9.0
'@types/node':
specifier: ^22.0.0
version: 22.18.6
'@vitejs/plugin-vue':
specifier: ^6.0.1
typescript:
specifier: ^5.0.0
version: 5.9.2
vite:
specifier: ^7.1.3
vite-plugin-dts:
specifier: ^4.0.0
vue-tsc:
specifier: ^2.0.0
version: 2.2.12([email protected])
@@ -9047,14 +9047,6 @@ snapshots:
transitivePeerDependencies:
- magicast
- dependencies:
- '@nuxt/kit': 3.19.2([email protected])
- execa: 8.0.1
- transitivePeerDependencies:
- - magicast
-
dependencies:
consola: 3.4.2
@@ -9175,34 +9167,6 @@ snapshots:
- utf-8-validate
- vite
- dependencies:
- '@eslint/config-inspector': 1.3.0([email protected]([email protected]))
- '@nuxt/eslint-plugin': 1.9.0([email protected]([email protected]))([email protected])
- '@nuxt/kit': 4.1.2([email protected])
- chokidar: 4.0.3
- eslint: 9.36.0([email protected])
- eslint-flat-config-utils: 2.1.4
- eslint-typegen: 2.3.0([email protected]([email protected]))
- find-up: 7.0.0
- get-port-please: 3.2.0
- mlly: 1.8.0
- pathe: 2.0.3
- unimport: 5.3.0
- transitivePeerDependencies:
- - '@typescript-eslint/utils'
- - '@vue/compiler-sfc'
- - bufferutil
- - eslint-import-resolver-node
- - eslint-plugin-format
- - magicast
- - supports-color
- - typescript
- - utf-8-validate
- - vite
-
dependencies:
@@ -11142,12 +11106,6 @@ snapshots:
vue: 3.5.21([email protected])
- dependencies:
- '@rolldown/pluginutils': 1.0.0-beta.29
- vue: 3.5.21([email protected])
-
dependencies:
'@volar/source-map': 2.4.15
@@ -15763,7 +15721,7 @@ snapshots:
typescript: 5.9.2
vue-tsc: 2.2.12([email protected])
dependencies:
'@microsoft/api-extractor': 7.52.13(@types/[email protected])
'@rollup/pluginutils': 5.3.0([email protected])
@@ -15776,7 +15734,7 @@ snapshots:
magic-string: 0.30.19
typescript: 5.9.2
optionalDependencies:
transitivePeerDependencies:
- '@types/node'
- rollup
@@ -15827,22 +15785,6 @@ snapshots:
terser: 5.44.0
yaml: 2.8.1
- dependencies:
- esbuild: 0.25.10
- fdir: 6.5.0([email protected])
- picomatch: 4.0.3
- postcss: 8.5.6
- rollup: 4.52.0
- tinyglobby: 0.2.15
- optionalDependencies:
- '@types/node': 22.18.6
- fsevents: 2.3.3
- jiti: 2.5.1
- lightningcss: 1.30.1
- terser: 5.44.0
- yaml: 2.8.1
-
dependencies:
'@docsearch/css': 4.1.0