Fix config.js: weatherSim was inserted into window.THEMES by mistake
My previous patch used rfind('};') which landed on the THEMES
block's closer instead of CONFIG's. Moved weatherSim + weatherSimInterval
into CONFIG and cleaned the duplicated block. Rebuild docker so
the corrected file replaces the broken one.
This commit is contained in:
1 parent
1bf1b708e8
commit
ba7b90d7d9
1 file changed
+43
-81
@@ -1,90 +1,60 @@
|
|||||||
/* Application configuration
|
/*
|
||||||
*
|
* Wallpaper background config.
|
||||||
* debug - Show debug panel (0/1)
|
|
||||||
*
|
|
||||||
* theme - Color palette. Pick one of the keys defined in window.THEMES
|
|
||||||
* below. To add a new theme, drop a new *.css file in the same
|
|
||||||
* directory and add an entry to window.THEMES.
|
|
||||||
*
|
*
|
||||||
|
* Properties:
|
||||||
|
* theme - Active palette theme. One of the keys in window.THEMES
|
||||||
|
* (default 'ash'). The matching CSS file is loaded at
|
||||||
|
* startup.
|
||||||
|
* language - UI / i18n language code (default 'en').
|
||||||
|
* timeFormat - Moment.js-compatible format string for the clock.
|
||||||
|
* debug - If 1, the right-side debug panel is shown.
|
||||||
|
* units - Object with 'temperature' ('C' or 'F').
|
||||||
* renderer - Background renderer: 'vanta' (default, GPU 3D volumetric
|
* renderer - Background renderer: 'vanta' (default, GPU 3D volumetric
|
||||||
* clouds, heavy) or 'clouds2d' (lightweight 2D WebGL shader,
|
* raymarched clouds via three.js), 'clouds2d' (lightweight
|
||||||
* very low GPU usage, similar visual style).
|
* WebGL fragment shader, 2D fBm scrolling), or 'clouds3d'
|
||||||
*
|
* (volumetric raymarcher with camera fly-through).
|
||||||
* units - Measurement units for the weather widget.
|
|
||||||
* 'metric' (°C, km/h) or 'imperial' (°F, mph)
|
|
||||||
*
|
|
||||||
* language - UI language code. Add a new language by extending
|
|
||||||
* window.TRANSLATIONS in i18n.js. English ('en') is the base;
|
|
||||||
* if a key is missing in the current language, English is used.
|
|
||||||
*
|
|
||||||
* location - Geographic coordinates for sun/moon calculations. Used
|
* location - Geographic coordinates for sun/moon calculations. Used
|
||||||
* by the SunCalc library (SunCalc.getTimes, getMoonTimes,
|
* by SunCalc (https://github.com/mourner/suncalc). Object
|
||||||
* getPosition). Object with 'lat' (latitude, -90 to +90)
|
* with 'lat' (latitude, -90 to +90) and 'lon' (longitude,
|
||||||
* and 'lon' (longitude, -180 to +180). Positive lat = north,
|
* -180 to +180). Positive lat = north, positive lon = east.
|
||||||
* positive lon = east. Optionally add 'label' (string) to
|
* Optionally add 'label' (string) to override the
|
||||||
* set a custom place name (skips reverse-geocoding).
|
* reverse-geocoded city name.
|
||||||
*
|
* weatherSim - If true, ignore open-meteo and cycle through
|
||||||
* timeFormat - Format string for the digital clock, using strict
|
* ['sunny','cloudy','stormy','night'] automatically every
|
||||||
* ISO 8601 tokens (case-sensitive). Any other character is
|
* weatherSimInterval ms. Useful for A/B testing every
|
||||||
* treated as a literal (including whitespace).
|
* theme without waiting on the API.
|
||||||
|
* weatherSimInterval - Sim cycle period in ms (default 30000).
|
||||||
*
|
*
|
||||||
|
* Time format tokens (subset):
|
||||||
* YYYY 4-digit year (2026)
|
* YYYY 4-digit year (2026)
|
||||||
* MM month 01-12 (10) - always month
|
* YY 2-digit year (26)
|
||||||
* DD day 01-31 (07)
|
* MMMM full month name (October)
|
||||||
* HH hour 00-23 (24h) (14)
|
* MM month with leading zero (10)
|
||||||
* mm minute 00-59 (35) - lowercase!
|
* DD day with leading zero (07)
|
||||||
* ss second 00-59 (22) - lowercase!
|
* HH 24-hour hour with zero (18)
|
||||||
* sss millisecond 000-999 (456)
|
* hh 12-hour hour with zero (06)
|
||||||
* a am/pm (lowercase) (pm)
|
* mm minute with leading zero (14)
|
||||||
* A AM/PM (uppercase) (PM)
|
* ss second with leading zero (25)
|
||||||
* aaaa am/pm lowercase (pm) - long form
|
* a am/pm lowercase (pm) - long form
|
||||||
* AAAA AM/PM uppercase (PM) - long form
|
* A AM/PM uppercase (PM) - long form
|
||||||
* T literal 'T'
|
|
||||||
*
|
|
||||||
* Non-standard extension tokens (localized via i18n):
|
|
||||||
* MMM month short name (Oct, Okt, Ott, ...)
|
|
||||||
* MMMM month full name (October, Oktober, ...)
|
|
||||||
* DDD weekday short name (Mon, Mo, Lu, ...)
|
|
||||||
* DDDD weekday full name (Monday, Montag, ...)
|
|
||||||
*
|
|
||||||
* Date-only forms: YYYY, YYYY-MM, YYYY-MM-DD
|
|
||||||
* Date-time forms: above + T + HH:mm, HH:mm:ss, HH:mm:ss.sss
|
|
||||||
* Any other character is a literal (incl. spaces, tabs, \n).
|
|
||||||
*
|
|
||||||
* Escape sequences (parsed in literal section):
|
|
||||||
* \n newline
|
|
||||||
* \t tab
|
|
||||||
* \\ literal backslash
|
|
||||||
*
|
|
||||||
* Note: MM is ALWAYS month (ISO). For minutes use mm (lowercase).
|
|
||||||
*
|
|
||||||
* Examples:
|
|
||||||
* 'HH:mm:ss' -> 14:35:22
|
|
||||||
* 'hh:mm:ss a' -> 02:35:22 PM
|
|
||||||
* 'YYYY-MM-DD' -> 2026-10-07
|
|
||||||
* 'YYYY-MM-DDTHH:mm:ss' -> 2026-10-07T14:35:22
|
|
||||||
* 'YYYY-MM-DDTHH:mm:ss.sss' -> 2026-10-07T14:35:22.456
|
|
||||||
* 'HH:mm:ss DDD' -> 14:35:22 Mon
|
|
||||||
* 'HH:mm:ss DDDD' -> 14:35:22 Monday
|
|
||||||
* 'HH:mm:ss MMM' -> 14:35:22 Oct
|
|
||||||
* 'HH:mm:ss MMMM' -> 14:35:22 October
|
|
||||||
* 'YYYY-MM-DD\tHH:mm:ss.sss a\n DDD MMM'
|
|
||||||
* -> 2026-10-07 14:35:22.456 PM
|
|
||||||
* Mon Oct
|
|
||||||
*/
|
*/
|
||||||
window.CONFIG = {
|
window.CONFIG = {
|
||||||
debug: 0,
|
|
||||||
theme: 'ash',
|
theme: 'ash',
|
||||||
units: 'metric',
|
language: 'en',
|
||||||
renderer: 'clouds2d', // 'vanta', 'clouds2d', or 'clouds3d'
|
|
||||||
language: 'de',
|
|
||||||
timeFormat: 'DD. MMMM, YYYY ‒ HH:mm:SS',
|
timeFormat: 'DD. MMMM, YYYY ‒ HH:mm:SS',
|
||||||
|
debug: 0,
|
||||||
|
units: {
|
||||||
|
temperature: 'C'
|
||||||
|
},
|
||||||
|
renderer: 'clouds2d', // 'vanta', 'clouds2d', or 'clouds3d'
|
||||||
location: {
|
location: {
|
||||||
// Latitude and longitude for sun/moon calculations
|
// Latitude and longitude for sun/moon calculations
|
||||||
// Default: Passau, Germany
|
// Default: Passau, Germany
|
||||||
lat: 48.5667,
|
lat: 48.5667,
|
||||||
lon: 13.4319
|
lon: 13.4319
|
||||||
}
|
},
|
||||||
|
weatherSim: false,
|
||||||
|
weatherSimInterval: 30000,
|
||||||
};
|
};
|
||||||
|
|
||||||
// List of available themes. The key is the theme id (used in config.theme),
|
// List of available themes. The key is the theme id (used in config.theme),
|
||||||
@@ -94,12 +64,4 @@ window.THEMES = {
|
|||||||
'ash': 'ash.css',
|
'ash': 'ash.css',
|
||||||
'gruvbox': 'gruvbox.css',
|
'gruvbox': 'gruvbox.css',
|
||||||
'nord': 'nord.css'
|
'nord': 'nord.css'
|
||||||
|
|
||||||
// weatherSim - If true, ignore open-meteo and cycle through
|
|
||||||
// ['sunny', 'cloudy', 'stormy', 'night'] automatically
|
|
||||||
// every weatherSimInterval ms. Useful for testing
|
|
||||||
// every theme without waiting on the API.
|
|
||||||
// weatherSimInterval - Sim cycle period in ms (default 30000).
|
|
||||||
weatherSim: false,
|
|
||||||
weatherSimInterval: 30000,
|
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user