mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-17 22:03:54 +01: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
15 lines
410 B
JavaScript
15 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);
|
|
}
|