From 52fe01e4d8c6b9c783f8606ac1ece6a66371508a Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Mon, 3 Sep 2018 14:43:10 +0900 Subject: mock features panel --- src/components/features_panel/features_panel.vue | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/components/features_panel/features_panel.vue (limited to 'src/components/features_panel/features_panel.vue') diff --git a/src/components/features_panel/features_panel.vue b/src/components/features_panel/features_panel.vue new file mode 100644 index 00000000..bcb700ed --- /dev/null +++ b/src/components/features_panel/features_panel.vue @@ -0,0 +1,26 @@ + + + + + -- cgit v1.2.3-70-g09d2 From 049e2397b156534add9472d3c16cf92ca5a88326 Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Mon, 3 Sep 2018 15:23:09 +0900 Subject: update --- src/components/features_panel/features_panel.js | 5 +++++ src/components/features_panel/features_panel.vue | 11 +++++------ src/main.js | 2 ++ 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src/components/features_panel/features_panel.vue') diff --git a/src/components/features_panel/features_panel.js b/src/components/features_panel/features_panel.js index 19018fb4..75a671f2 100644 --- a/src/components/features_panel/features_panel.js +++ b/src/components/features_panel/features_panel.js @@ -1,5 +1,10 @@ const FeaturesPanel = { computed: { + mediaProxy: function () { return this.$store.state.config.mediaProxyAvailable }, + whoToFollow: function () { return this.$store.state.config.suggestionsEnabled }, + 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 bcb700ed..92fdb1ff 100644 --- a/src/components/features_panel/features_panel.vue +++ b/src/components/features_panel/features_panel.vue @@ -8,12 +8,11 @@
    -
  • Media proxy
  • -
  • Local chat
  • -
  • Who to follow
  • -
  • Scope options
  • -
  • Formatting options
  • -
  • Text limit=
  • +
  • Media proxy
  • +
  • Who to follow
  • +
  • Scope options
  • +
  • Formatting options
  • +
  • Text limit={{textlimit}}
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 38b683b30cd8ffd2fc4ab444f1a4690dc1ed3808 Mon Sep 17 00:00:00 2001 From: hakabahitoyo Date: Mon, 3 Sep 2018 15:57:22 +0900 Subject: update --- src/App.js | 4 ++-- src/App.vue | 2 +- src/components/features_panel/features_panel.vue | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/components/features_panel/features_panel.vue') diff --git a/src/App.js b/src/App.js index bdd97b85..be6548f3 100644 --- a/src/App.js +++ b/src/App.js @@ -2,8 +2,8 @@ import UserPanel from './components/user_panel/user_panel.vue' import NavPanel from './components/nav_panel/nav_panel.vue' import Notifications from './components/notifications/notifications.vue' import UserFinder from './components/user_finder/user_finder.vue' -import FeaturesPanel from './components/features_panel/features_panel.vue' import InstanceSpecificPanel from './components/instance_specific_panel/instance_specific_panel.vue' +import FeaturesPanel from './components/features_panel/features_panel.vue' import WhoToFollowPanel from './components/who_to_follow_panel/who_to_follow_panel.vue' import ChatPanel from './components/chat_panel/chat_panel.vue' @@ -14,8 +14,8 @@ export default { NavPanel, Notifications, UserFinder, - FeaturesPanel, InstanceSpecificPanel, + FeaturesPanel, WhoToFollowPanel, ChatPanel }, diff --git a/src/App.vue b/src/App.vue index 8480d1b6..bfe1f760 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,8 +27,8 @@ diff --git a/src/components/features_panel/features_panel.vue b/src/components/features_panel/features_panel.vue index 92fdb1ff..5ec4d255 100644 --- a/src/components/features_panel/features_panel.vue +++ b/src/components/features_panel/features_panel.vue @@ -6,13 +6,13 @@ Features -
+
  • Media proxy
  • Who to follow
  • Scope options
  • Formatting options
  • -
  • Text limit={{textlimit}}
  • +
  • Text limit = {{textlimit}}
@@ -22,4 +22,7 @@ -- 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/components/features_panel/features_panel.vue') 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 49ab19c342701bc08f5674302c8aab50186a1d5b Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Tue, 4 Sep 2018 10:59:02 +0900 Subject: features panel i18n --- src/components/features_panel/features_panel.vue | 16 ++++++++-------- src/i18n/messages.js | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+), 8 deletions(-) (limited to 'src/components/features_panel/features_panel.vue') diff --git a/src/components/features_panel/features_panel.vue b/src/components/features_panel/features_panel.vue index 5c532f1a..c191d66b 100644 --- a/src/components/features_panel/features_panel.vue +++ b/src/components/features_panel/features_panel.vue @@ -3,18 +3,18 @@
    - Features + {{$t('features_panel.title')}}
      -
    • Chat
    • -
    • Gopher
    • -
    • Who to follow
    • -
    • Media proxy
    • -
    • Scope options
    • -
    • Formatting options
    • -
    • Text limit = {{textlimit}}
    • +
    • {{$t('features_panel.chat')}}
    • +
    • {{$t('features_panel.gopher')}}
    • +
    • {{$t('features_panel.who_to_follow')}}
    • +
    • {{$t('features_panel.media_proxy')}}
    • +
    • {{$t('features_panel.scope_options')}}
    • +
    • {{$t('features_panel.formatting_options')}}
    • +
    • {{$t('features_panel.text_limit')}} = {{textlimit}}
    diff --git a/src/i18n/messages.js b/src/i18n/messages.js index 42e7e9d4..76c093a3 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -419,6 +419,16 @@ const en = { who_to_follow: { who_to_follow: 'Who to follow', more: 'More' + }, + features_panel: { + title: 'Features', + chat: 'Chat', + gopher: 'Gopher', + who_to_follow: 'Who to follow', + media_proxy: 'Media proxy', + scope_options: 'Scope options', + formatting_options: 'Formatting options', + text_limit: 'Text limit' } } @@ -943,6 +953,16 @@ const ja = { who_to_follow: { who_to_follow: 'おすすめユーザー', more: 'くわしく' + }, + features_panel: { + title: 'ゆうこうなきのう', + chat: 'チャット', + gopher: 'Gopher', + who_to_follow: 'おすすめユーザー', + media_proxy: 'メディアプロクシ', + scope_options: 'こうかいはんい', + formatting_options: 'リッチテキスト', + text_limit: 'もじのかず' } } -- cgit v1.2.3-70-g09d2 From 8b94ea28eceb33e1f3f594f5d99ec0f4111b21ab Mon Sep 17 00:00:00 2001 From: hakabahitoyo Date: Tue, 4 Sep 2018 14:50:02 +0900 Subject: remove formatting options --- src/components/features_panel/features_panel.js | 1 - src/components/features_panel/features_panel.vue | 1 - src/i18n/messages.js | 2 -- 3 files changed, 4 deletions(-) (limited to 'src/components/features_panel/features_panel.vue') diff --git a/src/components/features_panel/features_panel.js b/src/components/features_panel/features_panel.js index 21d78e19..80f5c966 100644 --- a/src/components/features_panel/features_panel.js +++ b/src/components/features_panel/features_panel.js @@ -7,7 +7,6 @@ const FeaturesPanel = { 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 c191d66b..445143e9 100644 --- a/src/components/features_panel/features_panel.vue +++ b/src/components/features_panel/features_panel.vue @@ -13,7 +13,6 @@
  • {{$t('features_panel.who_to_follow')}}
  • {{$t('features_panel.media_proxy')}}
  • {{$t('features_panel.scope_options')}}
  • -
  • {{$t('features_panel.formatting_options')}}
  • {{$t('features_panel.text_limit')}} = {{textlimit}}
diff --git a/src/i18n/messages.js b/src/i18n/messages.js index 76c093a3..f1dcfa46 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -427,7 +427,6 @@ const en = { who_to_follow: 'Who to follow', media_proxy: 'Media proxy', scope_options: 'Scope options', - formatting_options: 'Formatting options', text_limit: 'Text limit' } } @@ -961,7 +960,6 @@ const ja = { who_to_follow: 'おすすめユーザー', media_proxy: 'メディアプロクシ', scope_options: 'こうかいはんい', - formatting_options: 'リッチテキスト', text_limit: 'もじのかず' } } -- cgit v1.2.3-70-g09d2