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 From 5dd4631860e2a8da730f134d9320470aed0d4516 Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Sun, 4 Feb 2018 08:43:31 +0900 Subject: debug --- src/main.js | 1 - 1 file changed, 1 deletion(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index a6f7e69f..9ee089d7 100644 --- a/src/main.js +++ b/src/main.js @@ -163,4 +163,3 @@ window.fetch('/instance/panel.html') store.dispatch('setOption', { name: 'instanceSpecificPanelContent', value: html }) }) - -- cgit v1.2.3-70-g09d2 From fe1044dfdfd565b0af7eed8e1f1b6ca02ca25e6a Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Sat, 10 Feb 2018 01:25:51 +0000 Subject: Update main.js --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index ca968539..6f8c00f0 100644 --- a/src/main.js +++ b/src/main.js @@ -88,7 +88,7 @@ window.fetch('/api/statusnet/config.json') window.fetch('/static/config.json') .then((res) => res.json()) .then((data) => { - const {theme, background, logo} = data + const {theme, background, logo, showInstanceSpecificPanel} = data store.dispatch('setOption', { name: 'theme', value: theme }) store.dispatch('setOption', { name: 'background', value: background }) store.dispatch('setOption', { name: 'logo', value: logo }) -- cgit v1.2.3-70-g09d2