More css tweaks and bug fixes

This commit is contained in:
Pieter Vander Vennet 2020-07-25 18:00:08 +02:00
parent fd350bb095
commit eb4dda1ba2
29 changed files with 294 additions and 107303 deletions

View file

@ -3,9 +3,11 @@ import {UIEventSource} from "../UI/UIEventSource";
export class LocalStorageSource {
static Get(key: string, defaultValue: string = undefined): UIEventSource<string> {
const saved = localStorage.getItem(key);
const source = new UIEventSource<string>(saved ?? defaultValue);
// ignore when running from the console
source.addCallback((data) => {
localStorage.setItem(key, data);
console.log("Wriging ", key, data)