[CRX] Add option to customize Theme in options UI

The `viewerCssTheme` option was not rendered because its entry in
`preferences_schema.json` did not have a `title`.

The order of keys in `preferences_schema.json` determines the order of the
rendered preferences in the options UI. Since `viewerCssTheme` affects the UI
very significantly, I have moved the option to the top.
This commit is contained in:
Rob Wu 2021-08-01 18:51:02 +02:00
parent 273cea8675
commit 867150e4f0
2 changed files with 24 additions and 9 deletions

View File

@ -43,6 +43,19 @@ body {
</div>
</template>
<template id="viewerCssTheme-template">
<div class="settings-row">
<label>
<span></span>
<select>
<option value="0">Use system theme</option>
<option value="1">Light theme</option>
<option value="2">Dark theme</option>
</select>
</label>
</div>
</template>
<template id="viewOnLoad-template">
<div class="settings-row">
<label>

View File

@ -1,6 +1,17 @@
{
"type": "object",
"properties": {
"viewerCssTheme": {
"title": "Theme",
"description": "The theme to use.\n0 = Use system theme.\n1 = Light theme.\n2 = Dark theme.",
"type": "integer",
"enum": [
0,
1,
2
],
"default": 0
},
"showPreviousViewOnLoad": {
"description": "DEPRECATED. Set viewOnLoad to 1 to disable showing the last page/position on load.",
"type": "boolean",
@ -188,15 +199,6 @@
2
],
"default": -1
},
"viewerCssTheme": {
"type": "integer",
"enum": [
0,
1,
2
],
"default": 0
}
}
}