diff --git a/package.json b/package.json index 58113d9..e3caeb8 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@astrojs/tailwind": "^5.0.2", "@astropub/icons": "^0.2.0", "@types/color": "^3.0.5", + "@types/crypto-js": "^4.1.3", "@types/node": "^20.8.10", "cssnano": "^6.0.1", "esbuild": "^0.19.5", @@ -34,6 +35,7 @@ "astro": "^3.4.3", "astro-i18n": "^2.1.18", "color": "^4.2.3", + "crypto-js": "^4.2.0", "flowbite": "^1.8.1", "flowbite-svelte": "^0.44.19", "flowbite-svelte-icons": "^0.4.5", diff --git a/src/components/Dashboard.svelte b/src/components/Dashboard.svelte new file mode 100644 index 0000000..4e1ab37 --- /dev/null +++ b/src/components/Dashboard.svelte @@ -0,0 +1,227 @@ + + +{#await userFetch} +
loading...
+{:then user} +Rang: {t("home.prefix." + user.prefix)}
+Permissions:
+Loading...
+ {:then schematics} +Type | +Name | +Owner | ++ | Updated | +
+ |
+
+ |
+
---|---|---|---|---|---|---|
+ |
+ ../ | ++ | Directory | ++ | + | + |
+ {#if schem.type == null}
+ |
+ + {schem.name}{#if schem.type == null}/{/if} + | +{schematics.players[schem.owner].name} | +{schem.type ?? "Directory"} | +{new Intl.DateTimeFormat(astroI18n.locale, { + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + day: "2-digit", + month: "2-digit", + year: "numeric" + }).format(moment(schem.lastUpdate).utc(false).toDate())} | +
+ {#if schem.replaceColor}
+ |
+
+ {#if schem.allowReplay}
+ |
+
error: {error.message}
+ {/await} +error: {error.message}
+{/await} + +Path: {info.path}
+
+ Replace Color:
+ {#if info.schem.replaceColor}
+
+ Allow Replay: {#if info.schem.allowReplay}
+
Type: {info.schem.type ?? "Directory"}
+Updated: {new Intl.DateTimeFormat(astroI18n.locale, { + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + day: "2-digit", + month: "2-digit", + year: "numeric" + }).format(moment(info.schem.lastUpdate).utc(false).toDate())}
+Item: {info.schem.item ?? (info.schem.type == null ? "CHEST" : "CAULDRON_ITEM")}
+ {#if info.members.length !== 0} +Member: {info.members.join(", ")}
+ {/if} + +{e.message}
+ +