feat(dashboard): timestamp parsing (#461)

This commit is contained in:
pulchra mentis 2022-06-17 23:03:07 -04:00 committed by spiral
parent 62c5c3865a
commit 33b77470ee
No known key found for this signature in database
GPG key ID: 244A11E4B0BCF40E
4 changed files with 36 additions and 7 deletions

View file

@ -2,6 +2,7 @@
import { Row, Col, Modal, Image, Button } from 'sveltestrap';
import moment from 'moment';
import { toHTML } from 'discord-markdown';
import parseTimestamps from '../../api/parse-timestamps';
import twemoji from 'twemoji';
import { System } from '../../api/types';
@ -13,7 +14,7 @@
let htmlDescription: string;
let htmlName: string;
if (user.description) {
htmlDescription = toHTML(user.description, {embed: true});
htmlDescription = toHTML(parseTimestamps(user.description), {embed: true});
} else {
htmlDescription = "(no description)";
}
@ -91,4 +92,4 @@
{/if}
{#if !isPublic}
<Button style="flex: 0" color="primary" on:click={() => editMode = true} aria-label="edit system information">Edit</Button>
{/if}
{/if}