diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-07-26 01:42:31 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-08-01 01:54:42 +0200 |
commit | a39f13e94e3b943f2b073e0aa2dfd9d4e3b5f6b8 (patch) | |
tree | 09482793f3753158d83991f781eb3eb0a5b76b55 /apps/files/src/components/FilesListVirtual.vue | |
parent | bfde05340a22fbb97eec6645eb74e7e0372eada2 (diff) | |
download | nextcloud-server-a39f13e94e3b943f2b073e0aa2dfd9d4e3b5f6b8.tar.gz nextcloud-server-a39f13e94e3b943f2b073e0aa2dfd9d4e3b5f6b8.zip |
fix(files): Provide file actions from list entry to make it reactive
This fixes non reactive default action text of the name component.
Also use download action as default action so that only one place
is needed to define how to download a file.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files/src/components/FilesListVirtual.vue')
-rw-r--r-- | apps/files/src/components/FilesListVirtual.vue | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/files/src/components/FilesListVirtual.vue b/apps/files/src/components/FilesListVirtual.vue index 1b9475333ab..37638aeabe6 100644 --- a/apps/files/src/components/FilesListVirtual.vue +++ b/apps/files/src/components/FilesListVirtual.vue @@ -600,24 +600,26 @@ export default defineComponent({ // Take as much space as possible flex: 1 1 auto; - a { + button.files-list__row-name-link { display: flex; align-items: center; + text-align: start; // Fill cell height and width width: 100%; height: 100%; // Necessary for flex grow to work min-width: 0; + margin: 0; // Already added to the inner text, see rule below &:focus-visible { - outline: none; + outline: none !important; } // Keyboard indicator a11y &:focus .files-list__row-name-text { - outline: 2px solid var(--color-main-text) !important; - border-radius: 20px; + outline: var(--border-width-input-focused) solid var(--color-main-text) !important; + border-radius: var(--border-radius-element); } &:focus:not(:focus-visible) .files-list__row-name-text { outline: none !important; @@ -627,7 +629,7 @@ export default defineComponent({ .files-list__row-name-text { color: var(--color-main-text); // Make some space for the outline - padding: 5px 10px; + padding: var(--default-grid-baseline) calc(2 * var(--default-grid-baseline)); margin-left: -10px; // Align two name and ext display: inline-flex; @@ -791,10 +793,6 @@ tbody.files-list__tbody.files-list__tbody--grid { height: var(--icon-preview-size); } - a.files-list__row-name-link { - height: var(--name-height); - } - .files-list__row-name-text { margin: 0; // Ensure that the outline is not too close to the text. |