Fix admin message update in frontend

This commit is contained in:
Alban Bruder 2021-12-21 13:03:24 +01:00
parent e220bf56db
commit 85c07e3723
2 changed files with 9 additions and 3 deletions

View File

@ -3,7 +3,10 @@
import { banMessageVisibleStore, banMessageContentStore } from "../../Stores/TypeMessageStore/BanMessageStore"; import { banMessageVisibleStore, banMessageContentStore } from "../../Stores/TypeMessageStore/BanMessageStore";
import { onMount } from "svelte"; import { onMount } from "svelte";
const text = $banMessageContentStore; let text: string;
$: {
text = $banMessageContentStore;
}
const NAME_BUTTON = "Ok"; const NAME_BUTTON = "Ok";
let nbSeconds = 10; let nbSeconds = 10;
let nameButton = ""; let nameButton = "";

View File

@ -3,8 +3,11 @@
import { textMessageContentStore, textMessageVisibleStore } from "../../Stores/TypeMessageStore/TextMessageStore"; import { textMessageContentStore, textMessageVisibleStore } from "../../Stores/TypeMessageStore/TextMessageStore";
import { QuillDeltaToHtmlConverter } from "quill-delta-to-html"; import { QuillDeltaToHtmlConverter } from "quill-delta-to-html";
const content = JSON.parse($textMessageContentStore); let converter: QuillDeltaToHtmlConverter;
const converter = new QuillDeltaToHtmlConverter(content.ops, { inlineStyles: true }); $: {
const content = JSON.parse($textMessageContentStore);
converter = new QuillDeltaToHtmlConverter(content.ops, { inlineStyles: true });
}
const NAME_BUTTON = "Ok"; const NAME_BUTTON = "Ok";
function closeTextMessage() { function closeTextMessage() {