mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Initial commit
This commit is contained in:
16
web-app/src/lib/components/DateTime.svelte
Normal file
16
web-app/src/lib/components/DateTime.svelte
Normal file
@@ -0,0 +1,16 @@
|
||||
<script lang="ts">
|
||||
const { date } = $props<{ date: string }>();
|
||||
|
||||
const options: Intl.DateTimeFormatOptions = {
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
second: "2-digit"
|
||||
};
|
||||
</script>
|
||||
|
||||
<time datetime={new Date(date).toLocaleString("sv").replace(" ", "T")}>
|
||||
{new Date(date).toLocaleString("en-us", { ...options })}
|
||||
</time>
|
||||
8
web-app/src/lib/utils.ts
Normal file
8
web-app/src/lib/utils.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export const sortOptions = [
|
||||
{ value: "creation-time", text: "Creation time" },
|
||||
{ value: "last-modified", text: "Last modified" },
|
||||
{ value: "title-a-to-z", text: "Title - A to Z" },
|
||||
{ value: "title-z-to-a", text: "Title - Z to A" }
|
||||
];
|
||||
|
||||
export const ALLOWED_MIME_TYPES = ["image/jpeg", "image/png", "image/svg+xml", "image/webp"];
|
||||
Reference in New Issue
Block a user