Modernize icons and file previews; add bounded ZIP directory viewer
This commit is contained in:
1 parent
9110c8a9d5
commit
2366035c72
67 files changed
+1657
-658
No files matched your search
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<AppIcon v-if="directory" name="folder" class="file-icon" />
|
||||
<svg
|
||||
v-else
|
||||
class="app-icon file-icon"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.4"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path d="M5 2h9l5 5v15H5z M14 2v6h5" />
|
||||
<text
|
||||
v-if="extension"
|
||||
x="12"
|
||||
y="17"
|
||||
text-anchor="middle"
|
||||
fill="currentColor"
|
||||
stroke="none"
|
||||
font-size="3.8"
|
||||
font-weight="650"
|
||||
font-family="system-ui, sans-serif"
|
||||
>
|
||||
{{ extension }}
|
||||
</text>
|
||||
<path v-else d="M8 12h8 M8 16h6" />
|
||||
</svg>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import AppIcon from "../AppIcon.vue";
|
||||
const props = defineProps<{ name: string; directory?: boolean }>();
|
||||
const extension = computed(
|
||||
() =>
|
||||
props.name
|
||||
.match(/\.([^.]+)$/)?.[0]
|
||||
.slice(0, 5)
|
||||
.toLowerCase() || ""
|
||||
);
|
||||
</script>
|
||||
Reference in new issue
Block a user