ssblit -> ssb. Let's finally get rid of the old thing.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4080 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
577efb6b7a
commit
181b21080c
@ -1 +1 @@
|
|||||||
{"type":"tildefriends-app","files":{"app.js":"&uhGJsy5+qBgOgEgMqCTDasK+C+GWGptHKfPiAsD5eGA=.sha256","index.html":"&D3JwdPXy/QsLXkmwNDrBFXdzxfqO1/JGxfqEArnS5v4=.sha256","lit.min.js":"&3FfrVflmGr0n4lvN0GriN1Qz1lEw31SbZxRSJrcXR28=.sha256","script.js":"&AUPPnLdyXVocBHQwqWZ7rMdgj0h0/dxEERJz4+RoRQ0=.sha256"}}
|
{"type":"tildefriends-app","files":{"app.js":"&uhGJsy5+qBgOgEgMqCTDasK+C+GWGptHKfPiAsD5eGA=.sha256","index.html":"&D3JwdPXy/QsLXkmwNDrBFXdzxfqO1/JGxfqEArnS5v4=.sha256","lit.min.js":"&3FfrVflmGr0n4lvN0GriN1Qz1lEw31SbZxRSJrcXR28=.sha256","script.js":"&TZ2ymD6cFVUjQleGcDslt8apjp7k3xLlfv2F8rQVM4I=.sha256"}}
|
@ -25,17 +25,30 @@ window.addEventListener('load', function() {
|
|||||||
function input_template(key, description) {
|
function input_template(key, description) {
|
||||||
if (description.type === 'boolean') {
|
if (description.type === 'boolean') {
|
||||||
return html`
|
return html`
|
||||||
<label ?for=${'gs_' + key}>${key}: </label>
|
<label ?for=${'gs_' + key} style="grid-column: 1">${key}: </label>
|
||||||
<input type="checkbox" ?checked=${description.value} ?id=${'gs_' + key}></input>
|
<input type="checkbox" ?checked=${description.value} ?id=${'gs_' + key} style="grid-column: 2"></input>
|
||||||
<button @click=${(e) => global_settings_set(key, e.srcElement.previousElementSibling.checked)}>Set</button>
|
<div style="grid-column: 3">
|
||||||
<span>${description.description}</span>
|
<button @click=${(e) => global_settings_set(key, e.srcElement.parentElement.previousElementSibling.checked)}>Set</button>
|
||||||
|
<span>${description.description}</span>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
} else if (description.type === 'textarea') {
|
||||||
|
return html`
|
||||||
|
<label ?for=${'gs_' + key} style="grid-column: 1">${key}: </label>
|
||||||
|
<textarea style="vertical-align: top" rows=20 cols=80 ?id=${'gs_' + key}>${description.value}</textarea>
|
||||||
|
<div style="grid-column: 3">
|
||||||
|
<button @click=${(e) => global_settings_set(key, e.srcElement.parentElement.previousElementSibling.value)}>Set</button>
|
||||||
|
<span>${description.description}</span>
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
} else {
|
} else {
|
||||||
return html`
|
return html`
|
||||||
<label ?for=${'gs_' + key}>${key}: </label>
|
<label ?for=${'gs_' + key} style="grid-column: 1">${key}: </label>
|
||||||
<input type="text" value="${description.value}" ?id=${'gs_' + key}></input>
|
<input type="text" value="${description.value}" ?id=${'gs_' + key}></input>
|
||||||
<button @click=${(e) => global_settings_set(key, e.srcElement.previousElementSibling.value)}>Set</button>
|
<div style="grid-column: 3">
|
||||||
<span>${description.description}</span>
|
<button @click=${(e) => global_settings_set(key, e.srcElement.parentElement.previousElementSibling.value)}>Set</button>
|
||||||
|
<span>${description.description}</span>
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -56,7 +69,9 @@ window.addEventListener('load', function() {
|
|||||||
const page_template = (data) =>
|
const page_template = (data) =>
|
||||||
html`<div>
|
html`<div>
|
||||||
<h2>Global Settings</h2>
|
<h2>Global Settings</h2>
|
||||||
${Object.keys(data.settings).sort().map(x => html`<div>${input_template(x, data.settings[x])}</div>`)}
|
<div style="display: grid">
|
||||||
|
${Object.keys(data.settings).sort().map(x => html`${input_template(x, data.settings[x])}`)}
|
||||||
|
</div>
|
||||||
${users_template(data.users)}
|
${users_template(data.users)}
|
||||||
</div>`;
|
</div>`;
|
||||||
render(page_template(g_data), document.body);
|
render(page_template(g_data), document.body);
|
||||||
|
@ -300,7 +300,7 @@ static int _tf_command_export(const char* file, int argc, char* argv[])
|
|||||||
"db",
|
"db",
|
||||||
"docs",
|
"docs",
|
||||||
"follow",
|
"follow",
|
||||||
"ssblit",
|
"ssb",
|
||||||
"todo",
|
"todo",
|
||||||
};
|
};
|
||||||
for (int i = 0; i < (int)_countof(k_export); i++)
|
for (int i = 0; i < (int)_countof(k_export); i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user