Various fixes, some settings handling

This commit is contained in:
ZXY101
2023-09-14 02:57:01 +02:00
parent 1093aaba30
commit 5a06f0e5b8
10 changed files with 52 additions and 33 deletions

View File

@@ -8,6 +8,8 @@ type Settings = {
textEditable: boolean;
textBoxBorders: boolean;
displayOCR: boolean;
boldFont: boolean;
backgroundColor: string;
};
const defaultSettings: Settings = {
@@ -16,7 +18,9 @@ const defaultSettings: Settings = {
singlePageView: false,
displayOCR: true,
textEditable: false,
textBoxBorders: false
textBoxBorders: false,
boldFont: false,
backgroundColor: '#0d0d0f'
}
const stored = browser ? window.localStorage.getItem('settings') : undefined
@@ -34,6 +38,8 @@ export function updateSetting(key: string, value: any) {
}
export function resetSettings() {
console.log('br', defaultSettings);
settingsStore.set(defaultSettings);
}