feat: add system creation date field to system card

This commit is contained in:
Spectralitree 2021-12-11 16:25:40 +01:00
parent cd81c62371
commit 4c7869ae1d
3 changed files with 21 additions and 1 deletions

View File

@ -22,6 +22,8 @@
"dependencies": { "dependencies": {
"axios": "^0.24.0", "axios": "^0.24.0",
"discord-markdown": "^2.5.1", "discord-markdown": "^2.5.1",
"moment": "^2.29.1",
"moment-timezone": "^0.5.34",
"svelte-icons": "^2.1.0", "svelte-icons": "^2.1.0",
"svelte-navigator": "^3.1.5", "svelte-navigator": "^3.1.5",
"sveltestrap": "^5.6.3" "sveltestrap": "^5.6.3"

View File

@ -1,11 +1,14 @@
<script lang="ts"> <script lang="ts">
import { Row, Col, Modal, Image, Button } from 'sveltestrap'; import { Row, Col, Modal, Image, Button } from 'sveltestrap';
import moment from 'moment';
import { toHTML } from 'discord-markdown';
export let user; export let user;
export let editMode: boolean; export let editMode: boolean;
$: htmlDescription = toHTML(user.description, {embed: true}); $: htmlDescription = toHTML(user.description, {embed: true});
import { toHTML } from 'discord-markdown';
let created = moment(user.created).format("MMM D, YYYY");
let bannerOpen = false; let bannerOpen = false;
const toggleBannerModal = () => (bannerOpen = !bannerOpen); const toggleBannerModal = () => (bannerOpen = !bannerOpen);
@ -22,6 +25,9 @@
<Col xs={12} lg={4} class="mb-2"> <Col xs={12} lg={4} class="mb-2">
<b>Tag:</b> {user.tag} <b>Tag:</b> {user.tag}
</Col> </Col>
<Col xs={12} lg={4} class="mb-2">
<b>Created:</b> {created}
</Col>
{/if} {/if}
<Col xs={12} lg={4} class="mb-2"> <Col xs={12} lg={4} class="mb-2">
<b>Timezone:</b> {user.timezone} <b>Timezone:</b> {user.timezone}

View File

@ -528,6 +528,18 @@ mkdirp@^0.5.1:
dependencies: dependencies:
minimist "^1.2.5" minimist "^1.2.5"
moment-timezone@^0.5.34:
version "0.5.34"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.34.tgz#a75938f7476b88f155d3504a9343f7519d9a405c"
integrity sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg==
dependencies:
moment ">= 2.9.0"
"moment@>= 2.9.0", moment@^2.29.1:
version "2.29.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
mri@^1.1.0: mri@^1.1.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b"