Files
ESP32-WijiBoard/web/js/settings.js
T
PROFERIS - Mi³osz Stocki 366de88ee4 Implement Text Input
2026-07-07 10:29:57 +02:00

26 lines
688 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* WijiBoard Global Settings
* web/js/settings.js
*
* Manages persisted application settings and defaults.
*/
const DEFAULTS = {
speed: 600,
accel: 100,
delay: 2500
};
export default {
get speed() { return parseInt(localStorage.getItem('wiji_speed') || DEFAULTS.speed); },
set speed(val) { localStorage.setItem('wiji_speed', val); },
get accel() { return parseInt(localStorage.getItem('wiji_accel') || DEFAULTS.accel); },
set accel(val) { localStorage.setItem('wiji_accel', val); },
get delay() { return parseInt(localStorage.getItem('wiji_delay') || DEFAULTS.delay); },
set delay(val) { localStorage.setItem('wiji_delay', val); },
DEFAULTS
};