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:
Cory McWilliams 2022-12-28 17:16:50 +00:00
parent 577efb6b7a
commit 181b21080c
28 changed files with 25 additions and 10 deletions

View File

@ -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"}}

View File

@ -25,17 +25,30 @@ window.addEventListener('load', function() {
function input_template(key, description) {
if (description.type === 'boolean') {
return html`
<label ?for=${'gs_' + key}>${key}: </label>
<input type="checkbox" ?checked=${description.value} ?id=${'gs_' + key}></input>
<button @click=${(e) => global_settings_set(key, e.srcElement.previousElementSibling.checked)}>Set</button>
<span>${description.description}</span>
<label ?for=${'gs_' + key} style="grid-column: 1">${key}: </label>
<input type="checkbox" ?checked=${description.value} ?id=${'gs_' + key} style="grid-column: 2"></input>
<div style="grid-column: 3">
<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 {
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>
<button @click=${(e) => global_settings_set(key, e.srcElement.previousElementSibling.value)}>Set</button>
<span>${description.description}</span>
<div style="grid-column: 3">
<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) =>
html`<div>
<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)}
</div>`;
render(page_template(g_data), document.body);

View File

@ -300,7 +300,7 @@ static int _tf_command_export(const char* file, int argc, char* argv[])
"db",
"docs",
"follow",
"ssblit",
"ssb",
"todo",
};
for (int i = 0; i < (int)_countof(k_export); i++)