Frontend created and rewritten a few times, with some backend fixes #1

Merged
leo merged 110 commits from plaintable into main 2023-11-08 20:38:40 +00:00
4 changed files with 16 additions and 15 deletions
Showing only changes of commit feaa8e315e - Show all commits

View File

@ -121,6 +121,9 @@ button {
min-width: 1rem; min-width: 1rem;
min-height: 1rem; min-height: 1rem;
} }
input {
margin: 0;
}
:focus { :focus {
outline: none; outline: none;
} }
@ -133,6 +136,7 @@ a:hover {
} }
table { table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0;
border: 0; border: 0;
gap: 0; gap: 0;
} }

View File

@ -8,10 +8,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
//import home from '@/assets/svg/home.svg' import home from '@/assets/svg/home.svg'
import { defineProps, defineAsyncComponent } from 'vue'
const home = defineAsyncComponent(() => import(`@/assets/svg/home.svg`))
const props = defineProps<{ const props = defineProps<{
path: Array<string> path: Array<string>

View File

@ -337,7 +337,7 @@ table .selection {
width: 2rem; width: 2rem;
} }
table .modified { table .modified {
width: 10rem; width: 8rem;
} }
table .size { table .size {
width: 4rem; width: 4rem;
@ -378,9 +378,6 @@ tbody tr.cursor {
.right { .right {
text-align: right; text-align: right;
} }
.selection {
width: 2em;
}
.sortcolumn:hover { .sortcolumn:hover {
cursor: pointer; cursor: pointer;
} }
@ -404,16 +401,17 @@ tbody tr.cursor {
.name a { .name a {
text-decoration: none; text-decoration: none;
} }
tr {
height: 2.5rem;
}
tbody .selection input { tbody .selection input {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
opacity: 0; opacity: 0;
left: 0; left: 0.5rem;
top: 0; top: 0;
} }
.selection {
width: 2em;
height: 2em;
}
.selection input:checked { .selection input:checked {
opacity: .7; opacity: .7;
} }

View File

@ -42,13 +42,15 @@ export function formatUnixDate(t: number) {
return formatter.format(Math.round(diff / 86400000), 'day') return formatter.format(Math.round(diff / 86400000), 'day')
} }
const d = date.toLocaleDateString("us", { let d = date.toLocaleDateString(undefined, {
weekday: 'short', weekday: 'short',
year: 'numeric', year: 'numeric',
month: 'short', month: 'short',
day: 'numeric' day: 'numeric'
}).replace("Sept", "Sep") }).replace("Sept", "Sep").replaceAll(',', '')
return (d.length === 16 ? d : d.replace(', ', ',\u202F\u2007')).replaceAll(' ', '\u202F') d = (d.length === 15 ? d : d.replace(' ', ' \u2007')).replaceAll(' ', '\u202F').replace('\u202F', '\u00A0')
d = d.slice(0, -4) + d.slice(-2) // Two digit year is enough
return d
} }
export function getFileExtension(filename: string) { export function getFileExtension(filename: string) {