Migrate to dayjs and Astro 4.0
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {t} from "astro-i18n"
|
||||
import {createEventDispatcher} from "svelte";
|
||||
import {schemRepo} from "../repo/repo.ts";
|
||||
import {schemRepo} from "../repo/repo";
|
||||
import {Modal, Spinner} from "flowbite-svelte";
|
||||
import {astroI18n} from "astro-i18n";
|
||||
import moment from "moment/moment";
|
||||
import {CheckSolid, XCircleOutline} from "flowbite-svelte-icons";
|
||||
import SchematicInfoModal from "./SchematicInfoModal.svelte";
|
||||
import type {Player} from "../types/data.ts";
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<script lang="ts">
|
||||
import {astroI18n, t} from "astro-i18n";
|
||||
import moment from "moment";
|
||||
import {CheckSolid, XCircleOutline} from "flowbite-svelte-icons";
|
||||
import {Modal} from "flowbite-svelte";
|
||||
import type {SchematicInfo} from "../types/schem.ts";
|
||||
import {createEventDispatcher} from "svelte";
|
||||
import {schemRepo} from "../repo/repo.ts";
|
||||
import {schemRepo} from "../repo/repo";
|
||||
import type {Player} from "../types/data.ts";
|
||||
import * as dayjs from "dayjs";
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
day: "2-digit",
|
||||
month: "2-digit",
|
||||
year: "numeric"
|
||||
}).format(moment(info.schem.lastUpdate).utc(false).toDate())})}</p>
|
||||
}).format(dayjs(info.schem.lastUpdate).utc(false).toDate())})}</p>
|
||||
<p class="!mt-0">{t("dashboard.schematic.info.item", {item: info.schem.item ?? (info.schem.type == null ? "CHEST" : "CAULDRON_ITEM")})}</p>
|
||||
{#if info.members.length !== 0}
|
||||
<p class="!mt-0">{t("dashboard.schematic.info.members", {members: info.members.join(", ")})}</p>
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<script lang="ts">
|
||||
import {astroI18n, t} from "astro-i18n";
|
||||
import moment from "moment/moment.js";
|
||||
import {CheckSolid, FileOutline, FolderOutline, XCircleOutline} from "flowbite-svelte-icons";
|
||||
import type {Schematic} from "../types/schem.ts";
|
||||
import type {Player} from "../types/data.ts";
|
||||
import * as dayjs from "dayjs";
|
||||
import * as utc from "dayjs/plugin/utc";
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
export let schem: Schematic;
|
||||
export let players: Record<number, Player>;
|
||||
@@ -29,7 +32,7 @@
|
||||
day: "2-digit",
|
||||
month: "2-digit",
|
||||
year: "numeric"
|
||||
}).format(moment(schem.lastUpdate).utc(false).toDate())}</th>
|
||||
}).format(dayjs(schem.lastUpdate).utc(false).toDate())}</th>
|
||||
<th>
|
||||
{#if schem.replaceColor}
|
||||
<CheckSolid class="text-green-500" />
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
dispatch("reset")
|
||||
}
|
||||
|
||||
let uploadFile: File[] | null = null;
|
||||
let uploadFile: FileList | null = null;
|
||||
</script>
|
||||
|
||||
<Modal title="Upload Schematic" bind:open autoclose outsideclose>
|
||||
|
||||
Reference in New Issue
Block a user