From 049e2397b156534add9472d3c16cf92ca5a88326 Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Mon, 3 Sep 2018 15:23:09 +0900 Subject: update --- src/main.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index debd8703..64b223aa 100644 --- a/src/main.js +++ b/src/main.js @@ -225,4 +225,6 @@ window.fetch('/nodeinfo/2.0.json') const suggestions = data.metadata.suggestions store.dispatch('setOption', { name: 'suggestionsEnabled', value: suggestions.enabled }) store.dispatch('setOption', { name: 'suggestionsWeb', value: suggestions.web }) + + store.dispatch('setOption', { name: 'mediaProxyAvailable', value: data.metadata.mediaProxy }) }) -- cgit v1.2.3-70-g09d2 From 65115bfc7f991b9203724eab67f73a34259cf6b2 Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Tue, 4 Sep 2018 10:44:25 +0900 Subject: features panes supports chat & gopher --- src/components/features_panel/features_panel.js | 6 +++++- src/components/features_panel/features_panel.vue | 4 +++- src/main.js | 9 ++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'src/main.js') diff --git a/src/components/features_panel/features_panel.js b/src/components/features_panel/features_panel.js index 75a671f2..21d78e19 100644 --- a/src/components/features_panel/features_panel.js +++ b/src/components/features_panel/features_panel.js @@ -1,7 +1,11 @@ const FeaturesPanel = { computed: { - mediaProxy: function () { return this.$store.state.config.mediaProxyAvailable }, + chat: function () { + return this.$store.state.config.chatAvailable && (!this.$store.state.chatDisabled) + }, + gopher: function () { return this.$store.state.config.gopherAvailable }, whoToFollow: function () { return this.$store.state.config.suggestionsEnabled }, + mediaProxy: function () { return this.$store.state.config.mediaProxyAvailable }, scopeOptions: function () { return this.$store.state.config.scopeOptionsEnabled }, formattingOptions: function () { return this.$store.state.config.formattingOptionsEnabled }, textlimit: function () { return this.$store.state.config.textlimit } diff --git a/src/components/features_panel/features_panel.vue b/src/components/features_panel/features_panel.vue index 5ec4d255..5c532f1a 100644 --- a/src/components/features_panel/features_panel.vue +++ b/src/components/features_panel/features_panel.vue @@ -8,8 +8,10 @@
    -
  • Media proxy
  • +
  • Chat
  • +
  • Gopher
  • Who to follow
  • +
  • Media proxy
  • Scope options
  • Formatting options
  • Text limit = {{textlimit}}
  • diff --git a/src/main.js b/src/main.js index 64b223aa..58f520db 100644 --- a/src/main.js +++ b/src/main.js @@ -222,9 +222,12 @@ window.fetch('/instance/panel.html') window.fetch('/nodeinfo/2.0.json') .then((res) => res.json()) .then((data) => { - const suggestions = data.metadata.suggestions + const metadata = data.metadata + store.dispatch('setOption', { name: 'mediaProxyAvailable', value: data.metadata.mediaProxy }) + store.dispatch('setOption', { name: 'chatAvailable', value: data.metadata.chat }) + store.dispatch('setOption', { name: 'gopherAvailable', value: data.metadata.gopher }) + + const suggestions = metadata.suggestions store.dispatch('setOption', { name: 'suggestionsEnabled', value: suggestions.enabled }) store.dispatch('setOption', { name: 'suggestionsWeb', value: suggestions.web }) - - store.dispatch('setOption', { name: 'mediaProxyAvailable', value: data.metadata.mediaProxy }) }) -- cgit v1.2.3-70-g09d2 From dbf24e1fbf3dde87e89ff0cee94323a23df72067 Mon Sep 17 00:00:00 2001 From: hakabahitoyo Date: Tue, 4 Sep 2018 11:15:00 +0900 Subject: Remove outdated settings --- src/main.js | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index debd8703..289cd857 100644 --- a/src/main.js +++ b/src/main.js @@ -114,9 +114,6 @@ window.fetch('/api/statusnet/config.json') var redirectRootNoLogin = (config.redirectRootNoLogin) var redirectRootLogin = (config.redirectRootLogin) var chatDisabled = (config.chatDisabled) - var showWhoToFollowPanel = (config.showWhoToFollowPanel) - var whoToFollowProvider = (config.whoToFollowProvider) - var whoToFollowLink = (config.whoToFollowLink) var showInstanceSpecificPanel = (config.showInstanceSpecificPanel) var scopeOptionsEnabled = (config.scopeOptionsEnabled) var formattingOptionsEnabled = (config.formattingOptionsEnabled) @@ -127,9 +124,6 @@ window.fetch('/api/statusnet/config.json') store.dispatch('setOption', { name: 'logo', value: logo }) store.dispatch('setOption', { name: 'logoMask', value: logoMask }) store.dispatch('setOption', { name: 'logoMargin', value: logoMargin }) - store.dispatch('setOption', { name: 'showWhoToFollowPanel', value: showWhoToFollowPanel }) - store.dispatch('setOption', { name: 'whoToFollowProvider', value: whoToFollowProvider }) - store.dispatch('setOption', { name: 'whoToFollowLink', value: whoToFollowLink }) store.dispatch('setOption', { name: 'showInstanceSpecificPanel', value: showInstanceSpecificPanel }) store.dispatch('setOption', { name: 'scopeOptionsEnabled', value: scopeOptionsEnabled }) store.dispatch('setOption', { name: 'formattingOptionsEnabled', value: formattingOptionsEnabled }) -- cgit v1.2.3-70-g09d2 From 5726be68307f0215470d2e5baea105718b5039fe Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 8 Sep 2018 05:16:25 +0300 Subject: fix --- src/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index debd8703..068563fd 100644 --- a/src/main.js +++ b/src/main.js @@ -120,7 +120,7 @@ window.fetch('/api/statusnet/config.json') var showInstanceSpecificPanel = (config.showInstanceSpecificPanel) var scopeOptionsEnabled = (config.scopeOptionsEnabled) var formattingOptionsEnabled = (config.formattingOptionsEnabled) - var collapseMessageWithSubject = (config.collapseMessageWithSubject) + var defaultCollapseMessageWithSubject = (config.collapseMessageWithSubject) store.dispatch('setOption', { name: 'theme', value: theme }) store.dispatch('setOption', { name: 'background', value: background }) @@ -133,7 +133,7 @@ window.fetch('/api/statusnet/config.json') store.dispatch('setOption', { name: 'showInstanceSpecificPanel', value: showInstanceSpecificPanel }) store.dispatch('setOption', { name: 'scopeOptionsEnabled', value: scopeOptionsEnabled }) store.dispatch('setOption', { name: 'formattingOptionsEnabled', value: formattingOptionsEnabled }) - store.dispatch('setOption', { name: 'collapseMessageWithSubject', value: collapseMessageWithSubject }) + store.dispatch('setOption', { name: 'defaultCollapseMessageWithSubject', value: defaultCollapseMessageWithSubject }) if (chatDisabled) { store.dispatch('disableChat') } -- cgit v1.2.3-70-g09d2 From 2db991fc7fb1eda11b94d585d3b56f9d94c81286 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 9 Sep 2018 19:36:13 +0300 Subject: some recategorization of options... --- src/App.js | 6 ++-- src/components/login_form/login_form.js | 2 +- src/components/registration/registration.js | 4 +-- src/components/settings/settings.js | 3 +- src/components/settings/settings.vue | 16 +++++---- src/main.js | 13 ++++--- src/modules/config.js | 28 +-------------- src/modules/interface.js | 53 +++++++++++++++++++++++++++++ 8 files changed, 78 insertions(+), 47 deletions(-) create mode 100644 src/modules/interface.js (limited to 'src/main.js') diff --git a/src/App.js b/src/App.js index be6548f3..251fdfca 100644 --- a/src/App.js +++ b/src/App.js @@ -60,10 +60,10 @@ export default { }, logo () { return this.$store.state.config.logo }, style () { return { 'background-image': `url(${this.background})` } }, - sitename () { return this.$store.state.config.name }, + sitename () { return this.$store.state.interface.name }, chat () { return this.$store.state.chat.channel.state === 'joined' }, - suggestionsEnabled () { return this.$store.state.config.suggestionsEnabled }, - showInstanceSpecificPanel () { return this.$store.state.config.showInstanceSpecificPanel } + suggestionsEnabled () { return this.$store.state.interface.suggestionsEnabled }, + showInstanceSpecificPanel () { return this.$store.state.interface.showInstanceSpecificPanel } }, methods: { activatePanel (panelName) { diff --git a/src/components/login_form/login_form.js b/src/components/login_form/login_form.js index a117b76f..12144324 100644 --- a/src/components/login_form/login_form.js +++ b/src/components/login_form/login_form.js @@ -5,7 +5,7 @@ const LoginForm = { }), computed: { loggingIn () { return this.$store.state.users.loggingIn }, - registrationOpen () { return this.$store.state.config.registrationOpen } + registrationOpen () { return this.$store.state.interface.registrationOpen } }, methods: { submit () { diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js index 73840608..e53fa4e5 100644 --- a/src/components/registration/registration.js +++ b/src/components/registration/registration.js @@ -5,11 +5,11 @@ const registration = { registering: false }), created () { - if ((!this.$store.state.config.registrationOpen && !this.token) || !!this.$store.state.users.currentUser) { + if ((!this.$store.state.interface.registrationOpen && !this.token) || !!this.$store.state.users.currentUser) { this.$router.push('/main/all') } // Seems like this doesn't work at first page open for some reason - if (this.$store.state.config.registrationOpen && this.token) { + if (this.$store.state.interface.registrationOpen && this.token) { this.$router.push('/registration') } }, diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 5e28c1af..6d481820 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -44,8 +44,7 @@ const settings = { return this.$store.state.users.currentUser }, currentSaveStateNotice () { - console.log(this.$store.state.config._internal.currentSaveStateNotice && this.$store.state.config._internal.currentSaveStateNotice.error) - return this.$store.state.config._internal.currentSaveStateNotice + return this.$store.state.interface.settings.currentSaveStateNotice } }, watch: { diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index be7c64a7..481cdf09 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -5,15 +5,17 @@ {{$t('settings.settings')}}
-