From 95cba854f389ebdee200d0df147e4c26ed4949a0 Mon Sep 17 00:00:00 2001 From: hakabahitoyo Date: Sun, 4 Feb 2018 00:27:33 +0900 Subject: add instance specific panel --- src/main.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index de74511b..359dbf52 100644 --- a/src/main.js +++ b/src/main.js @@ -78,12 +78,13 @@ const i18n = new VueI18n({ window.fetch('/static/config.json') .then((res) => res.json()) .then((data) => { - const {name, theme, background, logo, registrationOpen} = data + const {name, theme, background, logo, registrationOpen, showInstanceSpecificPanel} = data store.dispatch('setOption', { name: 'name', value: name }) store.dispatch('setOption', { name: 'theme', value: theme }) store.dispatch('setOption', { name: 'background', value: background }) store.dispatch('setOption', { name: 'logo', value: logo }) store.dispatch('setOption', { name: 'registrationOpen', value: registrationOpen }) + store.dispatch('setOption', { name: 'showInstanceSpecificPanel', value: showInstanceSpecificPanel }) if (data['chatDisabled']) { store.dispatch('disableChat') } @@ -146,3 +147,10 @@ window.fetch('/api/pleroma/emoji.json') ), (error) => console.log(error) ) + +window.fetch('/instance/panel.html') + .then((res) => res.text()) + .then((html) => { + store.dispatch('setOption', { name: 'instanceSpecificPanelContent', value: html }) + }) + -- cgit v1.2.3-70-g09d2