From 6329ac33d133664464099d80a1460ef39ca88488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Sun, 20 Sep 2026 16:21:52 +0200 Subject: [PATCH] fixed buttons --- static/css/styles.css | 20 +++++++++++++++----- static/editor.html | 2 +- static/js/note-files.js | 30 +++++++++++++++--------------- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 018753c..114d555 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -2854,7 +2854,9 @@ dialog::backdrop { flex: 0 0 auto; } -.files-head-actions .action-button { +.files-head-actions .primary-button, +.files-head-actions .secondary-button, +.files-head-actions .danger-button { width: auto; } @@ -2959,6 +2961,10 @@ dialog::backdrop { gap: 7px; } +.file-actions .primary-button { + width: auto; +} + .file-actions button, .file-secondary-actions__buttons button { white-space: nowrap; @@ -3074,7 +3080,9 @@ dialog::backdrop { line-height: 1.5; } -.files-state .action-button { +.files-state .primary-button, +.files-state .secondary-button, +.files-state .danger-button { margin-top: 14px; } @@ -3177,7 +3185,9 @@ dialog::backdrop { gap: 6px; } - .files-head-actions .action-button { + .files-head-actions .primary-button, + .files-head-actions .secondary-button, + .files-head-actions .danger-button { padding-inline: 9px; } @@ -3264,11 +3274,11 @@ dialog::backdrop { line-height: 1.4; } -.video-choice-actions>.action-button--primary span { +.video-choice-actions>.primary-button span { color: var(--on-accent); } -.video-choice-actions>.action-button--secondary span { +.video-choice-actions>.secondary-button span { color: var(--text-secondary); } diff --git a/static/editor.html b/static/editor.html index 3144c5f..458f159 100644 --- a/static/editor.html +++ b/static/editor.html @@ -332,7 +332,7 @@

Copy a direct link or ready Markdown/Alias code.

-
diff --git a/static/js/note-files.js b/static/js/note-files.js index 114620a..a0e18ba 100644 --- a/static/js/note-files.js +++ b/static/js/note-files.js @@ -103,10 +103,10 @@ function createVideoInsertDialog() {

- -
@@ -156,23 +156,23 @@ export function bindNoteFiles({ editor, endpoints, getAccessToken, getUploadMaxS function fileActionButtons(file) { const attributes = `data-url="${escapeHtml(file.url)}" data-name="${escapeHtml(file.filename)}" data-mime="${escapeHtml(file.mime_type)}"`; const primaryInsert = isVideo(file.mime_type) - ? `` - : ``; + ? `` + : ``; const secondaryInsert = isVideo(file.mime_type) - ? `` + ? `` : ""; const codeButtons = isVideo(file.mime_type) - ? ` - - ` - : ` - - `; + ? ` + + ` + : ` + + `; const deleteButton = canDelete() - ? `` + ? `` : ""; return { - primary: `${primaryInsert}`, + primary: `${primaryInsert}`, secondary: `${secondaryInsert}${codeButtons}${deleteButton}`, }; } @@ -218,7 +218,7 @@ export function bindNoteFiles({ editor, endpoints, getAccessToken, getUploadMaxS
${actions.secondary}
`; @@ -263,7 +263,7 @@ export function bindNoteFiles({ editor, endpoints, getAccessToken, getUploadMaxS if (search && !filesLoaded) search.disabled = true; if (summary) summary.textContent = t("files.loadFailed", {}, "Could not load files"); if (filesLoaded) return; - list.innerHTML = `
${escapeHtml(t("files.loadFailed", {}, "Could not load files"))}${escapeHtml(error?.message || "")}
`; + list.innerHTML = `
${escapeHtml(t("files.loadFailed", {}, "Could not load files"))}${escapeHtml(error?.message || "")}
`; } async function loadFiles({ open = false } = {}) {