From ba9495eb654c97411734b87fd988f91183bf2274 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Sat, 18 Nov 2023 07:32:40 -0800 Subject: [PATCH] File explorer CSS, avoid modified/size being cut --- frontend/src/assets/main.css | 3 +- frontend/src/components/FileExplorer.vue | 35 ++++++++++++---------- frontend/src/components/HeaderSelected.vue | 2 +- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/frontend/src/assets/main.css b/frontend/src/assets/main.css index 5af8f6c..0da5cb3 100644 --- a/frontend/src/assets/main.css +++ b/frontend/src/assets/main.css @@ -92,7 +92,7 @@ nav, .menu, .rename-button { - display: none; + display: none !important; } .breadcrumb > a { color: black !important; @@ -113,6 +113,7 @@ padding-bottom: 0 !important; } thead tr { + font-size: 1rem !important; position: static !important; background: none !important; border-bottom: 1pt solid black !important; diff --git a/frontend/src/components/FileExplorer.vue b/frontend/src/components/FileExplorer.vue index 16d2132..1d69ddf 100644 --- a/frontend/src/components/FileExplorer.vue +++ b/frontend/src/components/FileExplorer.vue @@ -137,10 +137,6 @@ defineExpose({ console.log('Select') allSelected.value = !allSelected.value }, - toggleSortColumn(column: number) { - const order = ['', 'name', 'modified', 'size', ''][column] - if (order) store.toggleSort(order as SortOrder) - }, isCursor() { return store.cursor && editing.value === null }, @@ -309,29 +305,36 @@ tbody tr { position: relative; z-index: auto; } -table thead input[type='checkbox'] { +table thead .selection input[type='checkbox'] { position: inherit; - width: 1em; - height: 1em; - padding: 0.5rem 0.5em; + width: 1rem; + height: 1rem; + padding: 0; + margin: auto; } -table tbody input[type='checkbox'] { +table tbody .selection input[type='checkbox'] { width: 2rem; height: 2rem; } table .selection { - width: 2rem; + width: 3rem; text-align: center; text-overflow: clip; + padding: 0; +} +table .selection input { + margin: auto; } table .modified { - width: 9em; + width: 10rem; + text-overflow: clip; } table .size { - width: 5em; + width: 7rem; + text-overflow: clip; } table .menu { - width: 1rem; + width: 2rem; } tbody td { font-size: 1.2rem; @@ -366,7 +369,7 @@ table td { } } thead tr { - font-size: var(--header-font-size); + font-size: 0.8rem; background: linear-gradient(to bottom, #eee, #fff 30%, #ddd); color: #000; box-shadow: 0 0 .2rem black; @@ -387,9 +390,11 @@ tbody tr.cursor { padding-right: 1.5rem; } .sortcolumn::after { + font-size: 1rem; content: '▸'; color: #888; - margin-left: 0.5em; + margin-left: 0.5rem; + margin-top: -.2rem; position: absolute; transition: all var(--transition-time) linear; } diff --git a/frontend/src/components/HeaderSelected.vue b/frontend/src/components/HeaderSelected.vue index 56b2c9d..998c71d 100644 --- a/frontend/src/components/HeaderSelected.vue +++ b/frontend/src/components/HeaderSelected.vue @@ -150,6 +150,6 @@ const download = async () => { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + margin: 0; } -@/stores/main