mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-27 19:53:41 +08:00
This contains a bunch of things packaged in 1: 1) UI improvements for the 3D viewer to support all sort of file types and create a nice rendering in a clean way with all sort of options 2) enable people to use Filestash as an SDK so we can embed the 3d viewer elsewhere
16 lines
410 B
JavaScript
16 lines
410 B
JavaScript
const settings = JSON.parse(window.localStorage.getItem("settings") || "null") || {};
|
|
|
|
export function settings_get(key, def = null) {
|
|
if (settings[key] === undefined) {
|
|
return def;
|
|
}
|
|
return settings[key];
|
|
}
|
|
|
|
export function settings_put(key, value) {
|
|
settings[key] = value;
|
|
setTimeout(() => {
|
|
window.localStorage.setItem("settings", JSON.stringify(settings));
|
|
}, 0);
|
|
}
|