Update default_config help page layout

The previous layout behaved badly on small screens.
This commit is contained in:
glacambre 2018-10-10 10:26:28 +02:00
parent 5a837397f2
commit d8c59a5a21
No known key found for this signature in database
GPG key ID: B9625DB1767553AC
3 changed files with 8 additions and 11 deletions

View file

@ -154,12 +154,7 @@ async function onSettingsPageLoad() {
Array.from(document.querySelectorAll("a.tsd-anchor")).forEach(
async (a: HTMLAnchorElement) => {
let signature = (a.parentNode as any).querySelector(
"div.tsd-signature",
)
if (!signature)
// console.logging is ok because we're only spamming our own console
return console.log("Failed to grab signature of ", a)
let section = a.parentNode
let settingName = a.name.split(".")
let value = await config.getAsync(settingName)
@ -179,7 +174,11 @@ async function onSettingsPageLoad() {
input.className = inputClassName
input.addEventListener("keyup", onKeyUp)
signature.appendChild(input)
let div = document.createElement("div")
div.appendChild(document.createTextNode("Current value:"))
div.appendChild(input)
section.appendChild(div)
},
)
}

View file

@ -47,7 +47,7 @@ export type LoggingLevel = "never" | "error" | "warning" | "info" | "debug"
*
* You can change anything here using `set key1.key2.key3 value` or specific things any of the various helper commands such as `bind` or `command`.
*
* You can also jump to the help section of a setting using `:help $settingname`. Some of the settings have a small input field containing their current value next to them. You can modify these values and save them by pressing `<Enter>` but using `:set $setting $value` is a good habit to take as it doesn't force you to leave the page you're visiting to change your settings.
* You can also jump to the help section of a setting using `:help $settingname`. Some of the settings have an input field containing their current. You can modify these values and save them by pressing `<Enter>` but using `:set $setting $value` is a good habit to take as it doesn't force you to leave the page you're visiting to change your settings.
*/
class default_config {
/**

View file

@ -3000,9 +3000,7 @@ ul.tsd-descriptions h4 {
}
.TridactylSettingInput {
position: absolute;
top: 0px;
right: 0px;
margin-left: 6pt;
}
.TridactylSettingInputModified {