user content general layout

This commit is contained in:
Ginger Wong
2020-06-21 01:31:08 -07:00
parent 1ecf39c2f1
commit 1a44a4bd2f
6 changed files with 121 additions and 33 deletions

View File

@@ -9,10 +9,16 @@ async function setupApp() {
sessionMaxViewerCount: 0,
overallMaxViewerCount: 0,
messages: [],
description: "",
title: "",
extraUserContent: "",
isOnline: false,
// from config
logo: null,
socialHandles: [],
streamerName: "",
summary: "",
tags: [],
title: "",
},
watch: {
messages: {
@@ -33,8 +39,12 @@ async function setupApp() {
appMessaging.init();
const config = await new Config().init();
app.title = config.title;
app.logo = config.logo;
app.socialHandles = config.socialHandles;
app.streamerName = config.name;
app.summary = config.summary && addNewlines(config.summary);
app.tags = config.tags;
app.title = config.title;
// const configFileLocation = "../js/config.json";
@@ -43,7 +53,7 @@ async function setupApp() {
const response = await fetch(pageContentFile);
const descriptionMarkdown = await response.text()
const descriptionHTML = new showdown.Converter().makeHtml(descriptionMarkdown);
app.description = descriptionHTML;
app.extraUserContent = descriptionHTML;
return this;
} catch (error) {
console.log(error);