From b45e0b6888abba764f3531aa27d6d18296999e57 Mon Sep 17 00:00:00 2001 From: rxdn <29165304+rxdn@users.noreply.github.com> Date: Thu, 17 Feb 2022 19:24:06 +0000 Subject: [PATCH] Use unix millis --- chatreplica/convert.go | 2 +- frontend/src/views/Forms.svelte | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/chatreplica/convert.go b/chatreplica/convert.go index be08539..5310fe8 100644 --- a/chatreplica/convert.go +++ b/chatreplica/convert.go @@ -20,7 +20,7 @@ func FromArchiveMessages(messages []message.Message, ticketId int) Payload { Id: msg.Id, Type: msg.Type, Author: msg.Author.Id, - Time: msg.Timestamp.Unix(), + Time: msg.Timestamp.UnixMilli(), Content: msg.Content, Embeds: msg.Embeds, Attachments: msg.Attachments, diff --git a/frontend/src/views/Forms.svelte b/frontend/src/views/Forms.svelte index ded64e5..afa3bf3 100644 --- a/frontend/src/views/Forms.svelte +++ b/frontend/src/views/Forms.svelte @@ -101,6 +101,8 @@ notifySuccess(`Form ${newTitle} has been created`); newTitle = ''; + + activeFormId = null; // Error thrown from {#each forms.find} if we don't temporarily set this to null? forms = [...forms, res.data]; activeFormId = res.data.form_id; } @@ -134,7 +136,7 @@ let form = getForm(res.data.form_id); form.inputs = [...form.inputs, res.data]; forms = forms; - inputCreationData = {}; + inputCreationData = {"style": "1"}; notifySuccess('Form input created successfully'); }