From: Plom Heller Date: Fri, 20 Mar 2026 06:14:35 +0000 (+0100) Subject: Improve /files table layout. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/index.html?a=commitdiff_plain;h=119a93799b52b04988168fdcd426ec3560a1ac12;p=ytplom Improve /files table layout. --- diff --git a/src/templates/files.html b/src/templates/files.html index 183301a..11fde03 100644 --- a/src/templates/files.html +++ b/src/templates/files.html @@ -4,6 +4,9 @@ {% block css %} {{ macros.css_sortable_table() }} +.nowrap { + text-wrap-mode: nowrap; +} {% endblock %} @@ -22,12 +25,12 @@ known files (shown: ?):

+ - - + + -
actionstags add as …tags
{% endblock %} diff --git a/src/templates/files.js b/src/templates/files.js index 7629481..15393c8 100644 --- a/src/templates/files.js +++ b/src/templates/files.js @@ -25,8 +25,6 @@ import { CMD_ADD_NEXT, CMD_ADD_PLAY, IDX_START, - LABEL_ADD_NEXT, - LABEL_ADD_PLAY, LEN_EMPTY, PARAM_TAG_NEEDED, PATH_FILES_JSON, @@ -85,6 +83,10 @@ sortableTableSetup.populateListItemRow = ( tr, file ) => { + addTdTo( + tr, + {"textContent": file.last_update} + ); addTdTo( tr, {"textContent": file.size} @@ -94,15 +96,16 @@ sortableTableSetup.populateListItemRow = ( {"textContent": file.duration} ); const tdInject = addTdTo(tr); + tdInject.classList.add("nowrap"); addPlayerBtnTo( tdInject, - LABEL_ADD_NEXT, + "next", `${CMD_ADD_NEXT}_${file.digest}`, !file.present ); addPlayerBtnTo( tdInject, - LABEL_ADD_PLAY, + "now", `${CMD_ADD_PLAY}_${file.digest}`, !file.present ); @@ -115,10 +118,6 @@ sortableTableSetup.populateListItemRow = ( file.rel_path, `${PATH_PREFIX_FILE}${file.digest}` ); - addTdTo( - tr, - {"textContent": file.last_update} - ); }; const updateFilesList = async ( // eslint-disable-line one-var