mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 10:01:39 -05:00
Update default_config help page layout
The previous layout behaved badly on small screens.
This commit is contained in:
parent
5a837397f2
commit
d8c59a5a21
3 changed files with 8 additions and 11 deletions
13
src/help.ts
13
src/help.ts
|
@ -154,12 +154,7 @@ async function onSettingsPageLoad() {
|
||||||
|
|
||||||
Array.from(document.querySelectorAll("a.tsd-anchor")).forEach(
|
Array.from(document.querySelectorAll("a.tsd-anchor")).forEach(
|
||||||
async (a: HTMLAnchorElement) => {
|
async (a: HTMLAnchorElement) => {
|
||||||
let signature = (a.parentNode as any).querySelector(
|
let section = a.parentNode
|
||||||
"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 settingName = a.name.split(".")
|
let settingName = a.name.split(".")
|
||||||
let value = await config.getAsync(settingName)
|
let value = await config.getAsync(settingName)
|
||||||
|
@ -179,7 +174,11 @@ async function onSettingsPageLoad() {
|
||||||
input.className = inputClassName
|
input.className = inputClassName
|
||||||
input.addEventListener("keyup", onKeyUp)
|
input.addEventListener("keyup", onKeyUp)
|
||||||
|
|
||||||
signature.appendChild(input)
|
let div = document.createElement("div")
|
||||||
|
div.appendChild(document.createTextNode("Current value:"))
|
||||||
|
div.appendChild(input)
|
||||||
|
|
||||||
|
section.appendChild(div)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 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 {
|
class default_config {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3000,9 +3000,7 @@ ul.tsd-descriptions h4 {
|
||||||
}
|
}
|
||||||
|
|
||||||
.TridactylSettingInput {
|
.TridactylSettingInput {
|
||||||
position: absolute;
|
margin-left: 6pt;
|
||||||
top: 0px;
|
|
||||||
right: 0px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.TridactylSettingInputModified {
|
.TridactylSettingInputModified {
|
||||||
|
|
Loading…
Add table
Reference in a new issue