From e3da156162ce04d987935eeb4649f0aa51590cf2 Mon Sep 17 00:00:00 2001
From: dev92341
Date: Tue, 5 Feb 2019 06:12:14 -0800
Subject: Add option to hide features panel (About page)
---
src/components/about/about.js | 3 +++
src/components/about/about.vue | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
(limited to 'src/components')
diff --git a/src/components/about/about.js b/src/components/about/about.js
index b4433b4e..b1ce3c7d 100644
--- a/src/components/about/about.js
+++ b/src/components/about/about.js
@@ -7,6 +7,9 @@ const About = {
InstanceSpecificPanel,
FeaturesPanel,
TermsOfServicePanel
+ },
+ computed: {
+ showFeaturesPanel () { return this.$store.state.config.showFeaturesPanel }
}
}
diff --git a/src/components/about/about.vue b/src/components/about/about.vue
index bf87e0b8..13dec87c 100644
--- a/src/components/about/about.vue
+++ b/src/components/about/about.vue
@@ -1,7 +1,7 @@
--
cgit v1.2.3-70-g09d2
From 18594569bd0fe77507ee700ddcc1cc2589f925dd Mon Sep 17 00:00:00 2001
From: Maxim Filippov
Date: Wed, 30 Jan 2019 01:11:40 +0300
Subject: Split hide_network into hide_followers & hide_followings
---
src/components/user_settings/user_settings.js | 9 ++++++---
src/components/user_settings/user_settings.vue | 8 ++++++--
src/i18n/de.json | 3 ++-
src/i18n/en.json | 3 ++-
src/i18n/ja.json | 3 ++-
src/i18n/ko.json | 3 ++-
src/i18n/ru.json | 3 ++-
src/services/api/api.service.js | 2 +-
src/services/entity_normalizer/entity_normalizer.service.js | 3 ++-
9 files changed, 25 insertions(+), 12 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index df757dfb..64f18373 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -12,7 +12,8 @@ const UserSettings = {
newLocked: this.$store.state.users.currentUser.locked,
newNoRichText: this.$store.state.users.currentUser.no_rich_text,
newDefaultScope: this.$store.state.users.currentUser.default_scope,
- newHideNetwork: this.$store.state.users.currentUser.hide_network,
+ hideFollowings: this.$store.state.users.currentUser.hide_followings,
+ hideFollowers: this.$store.state.users.currentUser.hide_followers,
followList: null,
followImportError: false,
followsImported: false,
@@ -68,7 +69,8 @@ const UserSettings = {
/* eslint-disable camelcase */
const default_scope = this.newDefaultScope
const no_rich_text = this.newNoRichText
- const hide_network = this.newHideNetwork
+ const hide_followings = this.hideFollowings
+ const hide_followers = this.hideFollowers
/* eslint-enable camelcase */
this.$store.state.api.backendInteractor
.updateProfile({
@@ -80,7 +82,8 @@ const UserSettings = {
/* eslint-disable camelcase */
default_scope,
no_rich_text,
- hide_network
+ hide_followings,
+ hide_followers
/* eslint-enable camelcase */
}}).then((user) => {
if (!user.error) {
diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index d0743ef0..af8a1208 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -30,8 +30,12 @@
Date: Wed, 6 Feb 2019 14:21:13 +0300
Subject: Rename "hide_following" to "hide_follows"
---
src/components/user_settings/user_settings.js | 6 +++---
src/components/user_settings/user_settings.vue | 4 ++--
src/i18n/de.json | 2 +-
src/i18n/en.json | 2 +-
src/i18n/ja.json | 2 +-
src/i18n/ko.json | 2 +-
src/i18n/ru.json | 2 +-
src/services/api/api.service.js | 2 +-
src/services/entity_normalizer/entity_normalizer.service.js | 2 +-
9 files changed, 12 insertions(+), 12 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index 64f18373..ef9398f6 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -12,7 +12,7 @@ const UserSettings = {
newLocked: this.$store.state.users.currentUser.locked,
newNoRichText: this.$store.state.users.currentUser.no_rich_text,
newDefaultScope: this.$store.state.users.currentUser.default_scope,
- hideFollowings: this.$store.state.users.currentUser.hide_followings,
+ hideFollows: this.$store.state.users.currentUser.hide_follows,
hideFollowers: this.$store.state.users.currentUser.hide_followers,
followList: null,
followImportError: false,
@@ -69,7 +69,7 @@ const UserSettings = {
/* eslint-disable camelcase */
const default_scope = this.newDefaultScope
const no_rich_text = this.newNoRichText
- const hide_followings = this.hideFollowings
+ const hide_follows = this.hideFollows
const hide_followers = this.hideFollowers
/* eslint-enable camelcase */
this.$store.state.api.backendInteractor
@@ -82,7 +82,7 @@ const UserSettings = {
/* eslint-disable camelcase */
default_scope,
no_rich_text,
- hide_followings,
+ hide_follows,
hide_followers
/* eslint-enable camelcase */
}}).then((user) => {
diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index af8a1208..19b7bdbd 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -30,8 +30,8 @@
-
-
+
+
diff --git a/src/i18n/de.json b/src/i18n/de.json
index 82860e9e..59449e33 100644
--- a/src/i18n/de.json
+++ b/src/i18n/de.json
@@ -155,7 +155,7 @@
"notification_visibility_mentions": "Erwähnungen",
"notification_visibility_repeats": "Wiederholungen",
"no_rich_text_description": "Rich-Text Formatierungen von allen Beiträgen entfernen",
- "hide_followings_description": "Zeige nicht, wem ich folge",
+ "hide_follows_description": "Zeige nicht, wem ich folge",
"hide_followers_description": "Zeige nicht, wer mir folgt",
"nsfw_clickthrough": "Aktiviere ausblendbares Overlay für Anhänge, die als NSFW markiert sind",
"panelRadius": "Panel",
diff --git a/src/i18n/en.json b/src/i18n/en.json
index dc10fa7f..ac7cc2a7 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -164,7 +164,7 @@
"notification_visibility_mentions": "Mentions",
"notification_visibility_repeats": "Repeats",
"no_rich_text_description": "Strip rich text formatting from all posts",
- "hide_followings_description": "Don't show who I'm following",
+ "hide_follows_description": "Don't show who I'm following",
"hide_followers_description": "Don't show who's following me",
"nsfw_clickthrough": "Enable clickthrough NSFW attachment hiding",
"panelRadius": "Panels",
diff --git a/src/i18n/ja.json b/src/i18n/ja.json
index 37e96f6c..afce03a4 100644
--- a/src/i18n/ja.json
+++ b/src/i18n/ja.json
@@ -157,7 +157,7 @@
"notification_visibility_mentions": "メンション",
"notification_visibility_repeats": "リピート",
"no_rich_text_description": "リッチテキストをつかわない",
- "hide_followings_description": "フォローしている人を表示しない",
+ "hide_follows_description": "フォローしている人を表示しない",
"hide_followers_description": "フォローしている人を表示しない",
"nsfw_clickthrough": "NSFWなファイルをかくす",
"panelRadius": "パネル",
diff --git a/src/i18n/ko.json b/src/i18n/ko.json
index 9f40be51..f9e4dfa3 100644
--- a/src/i18n/ko.json
+++ b/src/i18n/ko.json
@@ -156,7 +156,7 @@
"notification_visibility_mentions": "멘션",
"notification_visibility_repeats": "반복",
"no_rich_text_description": "모든 게시물의 서식을 지우기",
- "hide_followings_description": "내가 팔로우하는 사람을 표시하지 않음",
+ "hide_follows_description": "내가 팔로우하는 사람을 표시하지 않음",
"hide_followers_description": "나를 따르는 사람을 보여주지 마라.",
"nsfw_clickthrough": "NSFW 이미지 \"클릭해서 보이기\"를 활성화",
"panelRadius": "패널",
diff --git a/src/i18n/ru.json b/src/i18n/ru.json
index bf1e319f..e86eaff9 100644
--- a/src/i18n/ru.json
+++ b/src/i18n/ru.json
@@ -127,7 +127,7 @@
"notification_visibility_mentions": "Упоминания",
"notification_visibility_repeats": "Повторы",
"no_rich_text_description": "Убрать форматирование из всех постов",
- "hide_followings_description": "Не показывать кого я читаю",
+ "hide_follows_description": "Не показывать кого я читаю",
"hide_followers_description": "Не показывать кто читает меня",
"nsfw_clickthrough": "Включить скрытие NSFW вложений",
"panelRadius": "Панели",
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 1d4790a0..d4d52ab1 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -130,7 +130,7 @@ const updateBanner = ({credentials, params}) => {
// description
const updateProfile = ({credentials, params}) => {
// Always include these fields, because they might be empty or false
- const fields = ['description', 'locked', 'no_rich_text', 'hide_followings', 'hide_followers']
+ const fields = ['description', 'locked', 'no_rich_text', 'hide_follows', 'hide_followers']
let url = PROFILE_UPDATE_URL
const form = new FormData()
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index af774675..bba6b363 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -100,7 +100,7 @@ export const parseUser = (data) => {
output.rights = data.rights
output.no_rich_text = data.no_rich_text
output.default_scope = data.default_scope
- output.hide_followings = data.hide_followings
+ output.hide_follows = data.hide_follows
output.hide_followers = data.hide_followers
output.background_image = data.background_image
// on mastoapi this info is contained in a "relationship"
--
cgit v1.2.3-70-g09d2
From c714eb26002b1343a64d664ad7c1282f838f39aa Mon Sep 17 00:00:00 2001
From: eugenijm
Date: Mon, 4 Feb 2019 05:23:10 +0300
Subject: Add admin and moderator indicators to the user card
---
src/_variables.scss | 4 ++++
src/components/user_card_content/user_card_content.vue | 16 +++++++++++++++-
.../entity_normalizer/entity_normalizer.service.js | 2 ++
3 files changed, 21 insertions(+), 1 deletion(-)
(limited to 'src/components')
diff --git a/src/_variables.scss b/src/_variables.scss
index 150e4fb5..4869b721 100644
--- a/src/_variables.scss
+++ b/src/_variables.scss
@@ -2,6 +2,10 @@ $main-color: #f58d2c;
$main-background: white;
$darkened-background: whitesmoke;
+$admin-color: #e87487;
+$admin-border-color: rgba(232,116,135,.5);
+$admin-background-color: rgba(232,116,135,.1);
+
$fallback--bg: #121a24;
$fallback--fg: #182230;
$fallback--faint: rgba(185, 185, 186, .5);
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index ce65ec2f..3c0e160c 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -19,7 +19,10 @@
- @{{user.screen_name}}
+ @{{user.screen_name}}
+ Admin
+ Moderator
+
{{dailyAvg}} {{ $t('user_card.per_day') }}
@@ -247,6 +250,17 @@
text-overflow: ellipsis;
overflow: hidden;
}
+
+ .staff {
+ border: 1px solid $admin-border-color;
+ color: $admin-color;
+ background-color: $admin-background-color;
+ line-height: 12px;
+ border-radius: 3px;
+ font-size: 12px;
+ padding: 4px 6px;
+ margin-left: 5px;
+ }
}
.user-meta {
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index bba6b363..bbf20b64 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -90,6 +90,8 @@ export const parseUser = (data) => {
output.statusnet_blocking = data.statusnet_blocking
output.is_local = data.is_local
+ output.is_admin = data.is_admin
+ output.is_moderator = data.is_moderator
output.follows_you = data.follows_you
--
cgit v1.2.3-70-g09d2
From 648f635429da929e7090b103b9c8d354a1d3860a Mon Sep 17 00:00:00 2001
From: eugenijm
Date: Mon, 4 Feb 2019 17:03:35 +0300
Subject: Allow to configure visibility for admin and moderator badges
---
src/components/user_card_content/user_card_content.js | 15 +++++++++++++++
src/components/user_card_content/user_card_content.vue | 4 ++--
src/components/user_settings/user_settings.js | 7 ++++++-
src/components/user_settings/user_settings.vue | 5 +++++
src/i18n/en.json | 2 ++
src/i18n/ru.json | 2 ++
src/services/api/api.service.js | 2 +-
.../entity_normalizer/entity_normalizer.service.js | 4 ++--
8 files changed, 35 insertions(+), 6 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js
index 6f6d04a7..427cb32d 100644
--- a/src/components/user_card_content/user_card_content.js
+++ b/src/components/user_card_content/user_card_content.js
@@ -79,6 +79,21 @@ export default {
set (color) {
this.$store.dispatch('setHighlight', { user: this.user.screen_name, color })
}
+ },
+ visibleRole () {
+ const user = this.user
+
+ if (!(user.role === 'admin' || user.role === 'moderator')) {
+ return undefined
+ }
+
+ if (this.isOtherUser) {
+ return user.role
+ }
+
+ if (user.show_role) {
+ return user.role
+ }
}
},
components: {
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index 3c0e160c..0b4d0d21 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -20,8 +20,7 @@
@{{user.screen_name}}
- Admin
- Moderator
+ {{visibleRole}}
{{dailyAvg}} {{ $t('user_card.per_day') }}
@@ -254,6 +253,7 @@
.staff {
border: 1px solid $admin-border-color;
color: $admin-color;
+ text-transform: capitalize;
background-color: $admin-background-color;
line-height: 12px;
border-radius: 3px;
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index ef9398f6..4f991370 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -14,6 +14,8 @@ const UserSettings = {
newDefaultScope: this.$store.state.users.currentUser.default_scope,
hideFollows: this.$store.state.users.currentUser.hide_follows,
hideFollowers: this.$store.state.users.currentUser.hide_followers,
+ showRole: this.$store.state.users.currentUser.show_role,
+ role: this.$store.state.users.currentUser.role,
followList: null,
followImportError: false,
followsImported: false,
@@ -71,6 +73,8 @@ const UserSettings = {
const no_rich_text = this.newNoRichText
const hide_follows = this.hideFollows
const hide_followers = this.hideFollowers
+ const show_role = this.showRole
+
/* eslint-enable camelcase */
this.$store.state.api.backendInteractor
.updateProfile({
@@ -83,7 +87,8 @@ const UserSettings = {
default_scope,
no_rich_text,
hide_follows,
- hide_followers
+ hide_followers,
+ show_role
/* eslint-enable camelcase */
}}).then((user) => {
if (!user.error) {
diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index 19b7bdbd..ea5b3de5 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -37,6 +37,11 @@
+
+
+
+
+
diff --git a/src/i18n/en.json b/src/i18n/en.json
index ac7cc2a7..30bbe214 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -166,6 +166,8 @@
"no_rich_text_description": "Strip rich text formatting from all posts",
"hide_follows_description": "Don't show who I'm following",
"hide_followers_description": "Don't show who's following me",
+ "show_admin_badge": "Show Admin badge on my user card",
+ "show_moderator_badge": "Show Moderator badge on my user card",
"nsfw_clickthrough": "Enable clickthrough NSFW attachment hiding",
"panelRadius": "Panels",
"pause_on_unfocused": "Pause streaming when tab is not focused",
diff --git a/src/i18n/ru.json b/src/i18n/ru.json
index e86eaff9..b5686a5c 100644
--- a/src/i18n/ru.json
+++ b/src/i18n/ru.json
@@ -129,6 +129,8 @@
"no_rich_text_description": "Убрать форматирование из всех постов",
"hide_follows_description": "Не показывать кого я читаю",
"hide_followers_description": "Не показывать кто читает меня",
+ "show_admin_badge": "Показывать значок администратора на моей карточке пользователя",
+ "show_moderator_badge": "Показывать значок модератора на моей карточке пользователя",
"nsfw_clickthrough": "Включить скрытие NSFW вложений",
"panelRadius": "Панели",
"pause_on_unfocused": "Приостановить загрузку когда вкладка не в фокусе",
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index d4d52ab1..f2365b7e 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -130,7 +130,7 @@ const updateBanner = ({credentials, params}) => {
// description
const updateProfile = ({credentials, params}) => {
// Always include these fields, because they might be empty or false
- const fields = ['description', 'locked', 'no_rich_text', 'hide_follows', 'hide_followers']
+ const fields = ['description', 'locked', 'no_rich_text', 'hide_follows', 'hide_followers', 'show_role']
let url = PROFILE_UPDATE_URL
const form = new FormData()
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index bbf20b64..828c48f9 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -90,8 +90,8 @@ export const parseUser = (data) => {
output.statusnet_blocking = data.statusnet_blocking
output.is_local = data.is_local
- output.is_admin = data.is_admin
- output.is_moderator = data.is_moderator
+ output.role = data.role
+ output.show_role = data.show_role
output.follows_you = data.follows_you
--
cgit v1.2.3-70-g09d2
From d00b74b607f5bf77a7c695262d9690c2f5d31023 Mon Sep 17 00:00:00 2001
From: eugenijm
Date: Mon, 4 Feb 2019 18:05:56 +0300
Subject: Refactor visibleRole for better readability
Improve translation
---
src/components/user_card_content/user_card_content.js | 15 +++------------
src/i18n/ru.json | 4 ++--
2 files changed, 5 insertions(+), 14 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js
index 427cb32d..1888f8c6 100644
--- a/src/components/user_card_content/user_card_content.js
+++ b/src/components/user_card_content/user_card_content.js
@@ -81,19 +81,10 @@ export default {
}
},
visibleRole () {
- const user = this.user
+ const validRole = (this.user.role === 'admin' || this.user.role === 'moderator')
+ const showRole = this.isOtherUser || this.user.show_role
- if (!(user.role === 'admin' || user.role === 'moderator')) {
- return undefined
- }
-
- if (this.isOtherUser) {
- return user.role
- }
-
- if (user.show_role) {
- return user.role
- }
+ return validRole && showRole && this.user.role
}
},
components: {
diff --git a/src/i18n/ru.json b/src/i18n/ru.json
index b5686a5c..4b0bd4b4 100644
--- a/src/i18n/ru.json
+++ b/src/i18n/ru.json
@@ -129,8 +129,8 @@
"no_rich_text_description": "Убрать форматирование из всех постов",
"hide_follows_description": "Не показывать кого я читаю",
"hide_followers_description": "Не показывать кто читает меня",
- "show_admin_badge": "Показывать значок администратора на моей карточке пользователя",
- "show_moderator_badge": "Показывать значок модератора на моей карточке пользователя",
+ "show_admin_badge": "Показывать значок администратора в моем профиле",
+ "show_moderator_badge": "Показывать значок модератора в моем профиле",
"nsfw_clickthrough": "Включить скрытие NSFW вложений",
"panelRadius": "Панели",
"pause_on_unfocused": "Приостановить загрузку когда вкладка не в фокусе",
--
cgit v1.2.3-70-g09d2
From 676e6da3a539a3a537fa1060c63ea11568e39973 Mon Sep 17 00:00:00 2001
From: eugenijm
Date: Tue, 5 Feb 2019 03:28:44 +0300
Subject: Add theming support for admin/moderator badges
---
src/components/user_card_content/user_card_content.vue | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index 0b4d0d21..af9941e6 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -20,7 +20,7 @@
@{{user.screen_name}}
- {{visibleRole}}
+ {{visibleRole}}
{{dailyAvg}} {{ $t('user_card.per_day') }}
@@ -251,15 +251,10 @@
}
.staff {
- border: 1px solid $admin-border-color;
- color: $admin-color;
- text-transform: capitalize;
- background-color: $admin-background-color;
- line-height: 12px;
- border-radius: 3px;
- font-size: 12px;
- padding: 4px 6px;
- margin-left: 5px;
+ color: $fallback--text;
+ color: var(--btnText, $fallback--text);
+ background-color: $fallback--fg;
+ background-color: var(--btn, $fallback--fg);
}
}
--
cgit v1.2.3-70-g09d2
From fd4cd2e10a544d2ee03f1c834cf08eeb5993a648 Mon Sep 17 00:00:00 2001
From: eugenijm
Date: Tue, 5 Feb 2019 04:17:27 +0300
Subject: Make role badge visible only on user profile page
---
src/_variables.scss | 4 ----
src/components/user_card_content/user_card_content.vue | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
(limited to 'src/components')
diff --git a/src/_variables.scss b/src/_variables.scss
index 4869b721..150e4fb5 100644
--- a/src/_variables.scss
+++ b/src/_variables.scss
@@ -2,10 +2,6 @@ $main-color: #f58d2c;
$main-background: white;
$darkened-background: whitesmoke;
-$admin-color: #e87487;
-$admin-border-color: rgba(232,116,135,.5);
-$admin-background-color: rgba(232,116,135,.1);
-
$fallback--bg: #121a24;
$fallback--fg: #182230;
$fallback--faint: rgba(185, 185, 186, .5);
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index af9941e6..12068d7d 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -20,7 +20,7 @@
@{{user.screen_name}}
- {{visibleRole}}
+ {{visibleRole}}
{{dailyAvg}} {{ $t('user_card.per_day') }}
--
cgit v1.2.3-70-g09d2
From 2f12ac7ea4ab96ba3af8a9d1d0941e13f5fb16b8 Mon Sep 17 00:00:00 2001
From: dave
Date: Wed, 6 Feb 2019 11:17:23 -0500
Subject: #315 - export all follows as CSV
---
src/components/user_settings/user_settings.js | 5 ++++-
src/services/api/api.service.js | 5 ++++-
.../backend_interactor_service/backend_interactor_service.js | 4 ++--
3 files changed, 10 insertions(+), 4 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index ef9398f6..cb0ad9f3 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -238,7 +238,10 @@ const UserSettings = {
exportFollows () {
this.enableFollowsExport = false
this.$store.state.api.backendInteractor
- .fetchFriends({id: this.$store.state.users.currentUser.id})
+ .fetchFriends({
+ id: this.$store.state.users.currentUser.id,
+ isExport: true
+ })
.then((friendList) => {
this.exportPeople(friendList, 'friends.csv')
setTimeout(() => { this.enableFollowsExport = true }, 2000)
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index d4d52ab1..cf0c2eb2 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -247,11 +247,14 @@ const fetchUser = ({id, credentials}) => {
.then((data) => parseUser(data))
}
-const fetchFriends = ({id, page, credentials}) => {
+const fetchFriends = ({id, page, isExport, credentials}) => {
let url = `${FRIENDS_URL}?user_id=${id}`
if (page) {
url = url + `&page=${page}`
}
+ if (isExport !== undefined) {
+ url = url + `&export=${isExport}`
+ }
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => data.json())
.then((data) => data.map(parseUser))
diff --git a/src/services/backend_interactor_service/backend_interactor_service.js b/src/services/backend_interactor_service/backend_interactor_service.js
index ed7d4b49..423aeba5 100644
--- a/src/services/backend_interactor_service/backend_interactor_service.js
+++ b/src/services/backend_interactor_service/backend_interactor_service.js
@@ -10,8 +10,8 @@ const backendInteractorService = (credentials) => {
return apiService.fetchConversation({id, credentials})
}
- const fetchFriends = ({id, page}) => {
- return apiService.fetchFriends({id, page, credentials})
+ const fetchFriends = ({id, page, isExport = false}) => {
+ return apiService.fetchFriends({id, page, isExport, credentials})
}
const fetchFollowers = ({id, page}) => {
--
cgit v1.2.3-70-g09d2
From a57f8bdd68ae52b4e5725fe0358dc8c7567c81ac Mon Sep 17 00:00:00 2001
From: jasper
Date: Wed, 6 Feb 2019 10:18:13 -0800
Subject: Add option to hide filtered statuses
---
src/boot/after_store.js | 1 +
src/components/settings/settings.js | 8 ++++++++
src/components/settings/settings.vue | 14 ++++++++++----
src/components/status/status.js | 5 +++++
src/components/status/status.vue | 2 +-
src/i18n/en.json | 1 +
src/modules/instance.js | 1 +
7 files changed, 27 insertions(+), 5 deletions(-)
(limited to 'src/components')
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index 5693dcc6..c4126e4c 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -59,6 +59,7 @@ const afterStoreSetup = ({ store, i18n }) => {
copyInstanceOption('background')
copyInstanceOption('hidePostStats')
copyInstanceOption('hideUserStats')
+ copyInstanceOption('hideFilteredStatuses')
copyInstanceOption('logo')
store.dispatch('setInstanceOption', {
diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js
index 8d138485..257eb691 100644
--- a/src/components/settings/settings.js
+++ b/src/components/settings/settings.js
@@ -27,6 +27,11 @@ const settings = {
: user.hideUserStats,
hideUserStatsDefault: this.$t('settings.values.' + instance.hideUserStats),
+ hideFilteredStatusesLocal: typeof user.hideFilteredStatuses === 'undefined'
+ ? instance.hideFilteredStatuses
+ : user.hideFilteredStatuses,
+ hideFilteredStatusesDefault: this.$t('settings.values.' + instance.hideFilteredStatuses),
+
notificationVisibilityLocal: user.notificationVisibility,
replyVisibilityLocal: user.replyVisibility,
loopVideoLocal: user.loopVideo,
@@ -96,6 +101,9 @@ const settings = {
hideUserStatsLocal (value) {
this.$store.dispatch('setOption', { name: 'hideUserStats', value })
},
+ hideFilteredStatusesLocal (value) {
+ this.$store.dispatch('setOption', { name: 'hideFilteredStatuses', value })
+ },
hideNsfwLocal (value) {
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
},
diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue
index 9953780f..2fa2c89c 100644
--- a/src/components/settings/settings.vue
+++ b/src/components/settings/settings.vue
@@ -205,7 +205,6 @@
-
{{$t('settings.replies_in_timeline')}}
@@ -232,11 +231,18 @@
-
{{$t('settings.filtering_explanation')}}
-
+
+
{{$t('settings.filtering_explanation')}}
+
+
+
+
+
+
-
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 65ddcb9f..3403fd12 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -110,6 +110,11 @@ const Status = {
return hits
},
muted () { return !this.unmuted && (this.status.user.muted || this.muteWordHits.length > 0) },
+ hideFilteredStatuses () {
+ return typeof this.$store.state.config.hideFilteredStatuses === 'undefined'
+ ? this.$store.state.instance.hideFilteredStatuses
+ : this.$store.state.config.hideFilteredStatuses
+ },
isFocused () {
// retweet or root of an expanded conversation
if (this.focused) {
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 9986107f..5e7fa6c5 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/i18n/en.json b/src/i18n/en.json
index ac7cc2a7..87849e4c 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -192,6 +192,8 @@
"subject_line_email": "Like email: \"re: subject\"",
"subject_line_mastodon": "Like mastodon: copy as is",
"subject_line_noop": "Do not copy",
+ "post_status_content_type": "Post status content type",
+ "status_content_type_plain": "Plain text",
"stop_gifs": "Play-on-hover GIFs",
"streaming": "Enable automatic streaming of new posts when scrolled to the top",
"text": "Text",
diff --git a/src/modules/config.js b/src/modules/config.js
index 526a7021..2a70fbe2 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -31,7 +31,8 @@ const defaultState = {
scopeCopy: undefined, // instance default
subjectLineBehavior: undefined, // instance default
alwaysShowSubjectInput: undefined, // instance default
- showFeaturesPanel: true
+ showFeaturesPanel: true,
+ postContentType: undefined // instance default
}
const config = {
diff --git a/src/modules/instance.js b/src/modules/instance.js
index 4ad41873..475da92e 100644
--- a/src/modules/instance.js
+++ b/src/modules/instance.js
@@ -24,6 +24,7 @@ const defaultState = {
disableChat: false,
scopeCopy: true,
subjectLineBehavior: 'email',
+ postContentType: 'text/plain',
loginMethod: 'password',
nsfwCensorImage: undefined,
vapidPublicKey: undefined,
diff --git a/static/config.json b/static/config.json
index 24e26696..685846b9 100644
--- a/static/config.json
+++ b/static/config.json
@@ -13,6 +13,7 @@
"collapseMessageWithSubject": false,
"scopeCopy": true,
"subjectLineBehavior": "email",
+ "postContentType": "text/plain",
"alwaysShowSubjectInput": true,
"hidePostStats": false,
"hideUserStats": false,
--
cgit v1.2.3-70-g09d2
From 4dbc6a3c56c8f8b929bccb4c7bd95c178f64dccd Mon Sep 17 00:00:00 2001
From: shpuld
Date: Wed, 6 Feb 2019 22:17:06 +0200
Subject: Fix repeater html not showing properly
---
src/components/status/status.vue | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
(limited to 'src/components')
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 9986107f..21eb4d56 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -16,9 +16,8 @@
-
- {{retweeterHtml || retweeter}}
-
+
+ {{retweeter}}
{{$t('timeline.repeated')}}
--
cgit v1.2.3-70-g09d2
From fafe258f2b94cc2faf516ea2722c01e17ab8e2d8 Mon Sep 17 00:00:00 2001
From: Edijs
Date: Wed, 6 Feb 2019 19:19:14 -0700
Subject: Typo
---
.../public_and_external_timeline/public_and_external_timeline.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/components')
diff --git a/src/components/public_and_external_timeline/public_and_external_timeline.vue b/src/components/public_and_external_timeline/public_and_external_timeline.vue
index aded2ead..6be9f955 100644
--- a/src/components/public_and_external_timeline/public_and_external_timeline.vue
+++ b/src/components/public_and_external_timeline/public_and_external_timeline.vue
@@ -1,5 +1,5 @@
-
+
--
cgit v1.2.3-70-g09d2
From 312841717619e397c7cb3255c1cc3e66c0a1044e Mon Sep 17 00:00:00 2001
From: dave
Date: Thu, 7 Feb 2019 09:57:16 -0500
Subject: #315 - separate export and fetch follows logic
---
src/components/user_settings/user_settings.js | 5 ++---
src/services/api/api.service.js | 13 +++++++++----
.../backend_interactor_service.js | 5 +++++
3 files changed, 16 insertions(+), 7 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index cb0ad9f3..a2a23c6f 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -238,9 +238,8 @@ const UserSettings = {
exportFollows () {
this.enableFollowsExport = false
this.$store.state.api.backendInteractor
- .fetchFriends({
- id: this.$store.state.users.currentUser.id,
- isExport: true
+ .exportFriends({
+ id: this.$store.state.users.currentUser.id
})
.then((friendList) => {
this.exportPeople(friendList, 'friends.csv')
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index df920573..24ff0f74 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -247,14 +247,18 @@ const fetchUser = ({id, credentials}) => {
.then((data) => parseUser(data))
}
-const fetchFriends = ({id, page, isExport, credentials}) => {
+const fetchFriends = ({id, page, credentials}) => {
let url = `${FRIENDS_URL}?user_id=${id}`
if (page) {
url = url + `&page=${page}`
}
- if (isExport) {
- url = url + `&export=${isExport}`
- }
+ return fetch(url, { headers: authHeaders(credentials) })
+ .then((data) => data.json())
+ .then((data) => data.map(parseUser))
+}
+
+const exportFriends = ({id, credentials}) => {
+ let url = `${FRIENDS_URL}?user_id=${id}&export=true`
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => data.json())
.then((data) => data.map(parseUser))
@@ -539,6 +543,7 @@ const apiService = {
fetchConversation,
fetchStatus,
fetchFriends,
+ exportFriends,
fetchFollowers,
followUser,
unfollowUser,
diff --git a/src/services/backend_interactor_service/backend_interactor_service.js b/src/services/backend_interactor_service/backend_interactor_service.js
index 423aeba5..c2d1617e 100644
--- a/src/services/backend_interactor_service/backend_interactor_service.js
+++ b/src/services/backend_interactor_service/backend_interactor_service.js
@@ -14,6 +14,10 @@ const backendInteractorService = (credentials) => {
return apiService.fetchFriends({id, page, isExport, credentials})
}
+ const exportFriends = ({id}) => {
+ return apiService.exportFriends({id, credentials})
+ }
+
const fetchFollowers = ({id, page}) => {
return apiService.fetchFollowers({id, page, credentials})
}
@@ -78,6 +82,7 @@ const backendInteractorService = (credentials) => {
fetchStatus,
fetchConversation,
fetchFriends,
+ exportFriends,
fetchFollowers,
followUser,
unfollowUser,
--
cgit v1.2.3-70-g09d2
From 55fc31ea4d3ecde4693a346de51d6cf27e6d9e49 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Sun, 3 Feb 2019 12:39:49 -0500
Subject: Hide followers and followees tabs when they are disabled
---
src/components/user_card_content/user_card_content.vue | 4 ++--
src/components/user_profile/user_profile.vue | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index ce65ec2f..e80dc72b 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -112,11 +112,11 @@
{{ $t('user_card.statuses') }}
{{user.statuses_count}}
-
+
{{ $t('user_card.followees') }}
{{user.friends_count}}
-
+
{{ $t('user_card.followers') }}
{{user.followers_count}}
diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue
index 6d5b00d1..e981f208 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -15,13 +15,13 @@
:timeline-name="'user'"
:user-id="fetchBy"
/>
-
+
-
+
--
cgit v1.2.3-70-g09d2
From ea1d7f46b5743a1493a8cfaf7b64dcc240fc3769 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Sun, 3 Feb 2019 12:52:04 -0500
Subject: Always show my own followees/followers
---
src/components/user_card_content/user_card_content.js | 6 ++++++
src/components/user_card_content/user_card_content.vue | 4 ++--
src/components/user_profile/user_profile.js | 6 ++++++
src/components/user_profile/user_profile.vue | 4 ++--
4 files changed, 16 insertions(+), 4 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js
index 6f6d04a7..d256fc5d 100644
--- a/src/components/user_card_content/user_card_content.js
+++ b/src/components/user_card_content/user_card_content.js
@@ -79,6 +79,12 @@ export default {
set (color) {
this.$store.dispatch('setHighlight', { user: this.user.screen_name, color })
}
+ },
+ followeesCountVisible () {
+ return !this.isOtherUser || !this.user.hide_followings
+ },
+ followersCountVisible () {
+ return !this.isOtherUser || !this.user.hide_followers
}
},
components: {
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index e80dc72b..7a087bdf 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -112,11 +112,11 @@
{{ $t('user_card.statuses') }}
{{user.statuses_count}}
-
+
{{ $t('user_card.followees') }}
{{user.friends_count}}
-
+
{{ $t('user_card.followers') }}
{{user.followers_count}}
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 7b0ab705..4039fd35 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -58,6 +58,12 @@ const UserProfile = {
},
isExternal () {
return this.$route.name === 'external-user-profile'
+ },
+ followeesTabVisible () {
+ return this.isUs || !this.user.hide_followings
+ },
+ followersTabVisible () {
+ return this.isUs || !this.user.hide_followers
}
},
methods: {
diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue
index e981f208..11943660 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -15,13 +15,13 @@
:timeline-name="'user'"
:user-id="fetchBy"
/>
-
+
-
+
--
cgit v1.2.3-70-g09d2
From fae93217b8b23b8042eaba2e5d1a076a0cec5cc8 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Sun, 3 Feb 2019 12:57:25 -0500
Subject: Show back followees/followers counts
---
src/components/user_card_content/user_card_content.js | 6 ------
src/components/user_card_content/user_card_content.vue | 4 ++--
2 files changed, 2 insertions(+), 8 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js
index d256fc5d..6f6d04a7 100644
--- a/src/components/user_card_content/user_card_content.js
+++ b/src/components/user_card_content/user_card_content.js
@@ -79,12 +79,6 @@ export default {
set (color) {
this.$store.dispatch('setHighlight', { user: this.user.screen_name, color })
}
- },
- followeesCountVisible () {
- return !this.isOtherUser || !this.user.hide_followings
- },
- followersCountVisible () {
- return !this.isOtherUser || !this.user.hide_followers
}
},
components: {
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index 7a087bdf..ce65ec2f 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -112,11 +112,11 @@
{{ $t('user_card.statuses') }}
{{user.statuses_count}}
-
+
{{ $t('user_card.followees') }}
{{user.friends_count}}
-
+
{{ $t('user_card.followers') }}
{{user.followers_count}}
--
cgit v1.2.3-70-g09d2
From 55da7dbfde84aa78ab54efe51b41d9f09646ed03 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Thu, 7 Feb 2019 10:53:36 -0500
Subject: Fix naming
---
src/components/user_profile/user_profile.js | 4 ++--
src/components/user_profile/user_profile.vue | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 4039fd35..e50048fa 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -59,8 +59,8 @@ const UserProfile = {
isExternal () {
return this.$route.name === 'external-user-profile'
},
- followeesTabVisible () {
- return this.isUs || !this.user.hide_followings
+ followsTabVisible () {
+ return this.isUs || !this.user.hide_follows
},
followersTabVisible () {
return this.isUs || !this.user.hide_followers
diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue
index 11943660..9001ed00 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -15,7 +15,7 @@
:timeline-name="'user'"
:user-id="fetchBy"
/>
-
+
--
cgit v1.2.3-70-g09d2
From 19dbdd24b41122ebcda71bcdf91ea61abfc123dd Mon Sep 17 00:00:00 2001
From: eugenijm
Date: Tue, 5 Feb 2019 20:22:49 +0300
Subject: Update user settings text: staff badges are only visible in user
profile
Use capitalized text in badges
---
src/components/user_card_content/user_card_content.vue | 2 ++
src/i18n/en.json | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
(limited to 'src/components')
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index 12068d7d..7f9909c4 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -250,7 +250,9 @@
overflow: hidden;
}
+ // TODO use proper colors
.staff {
+ text-transform: capitalize;
color: $fallback--text;
color: var(--btnText, $fallback--text);
background-color: $fallback--fg;
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 30bbe214..0d8553de 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -166,8 +166,8 @@
"no_rich_text_description": "Strip rich text formatting from all posts",
"hide_follows_description": "Don't show who I'm following",
"hide_followers_description": "Don't show who's following me",
- "show_admin_badge": "Show Admin badge on my user card",
- "show_moderator_badge": "Show Moderator badge on my user card",
+ "show_admin_badge": "Show Admin badge in my profile",
+ "show_moderator_badge": "Show Moderator badge in my profile",
"nsfw_clickthrough": "Enable clickthrough NSFW attachment hiding",
"panelRadius": "Panels",
"pause_on_unfocused": "Pause streaming when tab is not focused",
--
cgit v1.2.3-70-g09d2
From 0dc7c45f324c246cc74c6ed55c006c67742c4139 Mon Sep 17 00:00:00 2001
From: Edijs
Date: Thu, 7 Feb 2019 16:23:18 -0700
Subject: Code refactoring
---
.../public_and_external_timeline.js | 2 +-
src/components/public_timeline/public_timeline.js | 2 +-
src/components/tag_timeline/tag_timeline.js | 4 ++--
src/components/user_profile/user_profile.js | 10 ++++-----
src/modules/api.js | 25 +++++-----------------
src/modules/users.js | 2 +-
6 files changed, 15 insertions(+), 30 deletions(-)
(limited to 'src/components')
diff --git a/src/components/public_and_external_timeline/public_and_external_timeline.js b/src/components/public_and_external_timeline/public_and_external_timeline.js
index 0db6efae..d45677e0 100644
--- a/src/components/public_and_external_timeline/public_and_external_timeline.js
+++ b/src/components/public_and_external_timeline/public_and_external_timeline.js
@@ -7,7 +7,7 @@ const PublicAndExternalTimeline = {
timeline () { return this.$store.state.statuses.timelines.publicAndExternal }
},
created () {
- this.$store.dispatch('startFetching', 'publicAndExternal')
+ this.$store.dispatch('startFetching', { timeline: 'publicAndExternal' })
},
destroyed () {
this.$store.dispatch('stopFetching', 'publicAndExternal')
diff --git a/src/components/public_timeline/public_timeline.js b/src/components/public_timeline/public_timeline.js
index 9b866be8..64c951ac 100644
--- a/src/components/public_timeline/public_timeline.js
+++ b/src/components/public_timeline/public_timeline.js
@@ -7,7 +7,7 @@ const PublicTimeline = {
timeline () { return this.$store.state.statuses.timelines.public }
},
created () {
- this.$store.dispatch('startFetching', 'public')
+ this.$store.dispatch('startFetching', { timeline: 'public' })
},
destroyed () {
this.$store.dispatch('stopFetching', 'public')
diff --git a/src/components/tag_timeline/tag_timeline.js b/src/components/tag_timeline/tag_timeline.js
index 43de4f49..41b09706 100644
--- a/src/components/tag_timeline/tag_timeline.js
+++ b/src/components/tag_timeline/tag_timeline.js
@@ -3,7 +3,7 @@ import Timeline from '../timeline/timeline.vue'
const TagTimeline = {
created () {
this.$store.commit('clearTimeline', { timeline: 'tag' })
- this.$store.dispatch('startFetching', { 'tag': this.tag })
+ this.$store.dispatch('startFetching', { timeline: 'tag', tag: this.tag })
},
components: {
Timeline
@@ -15,7 +15,7 @@ const TagTimeline = {
watch: {
tag () {
this.$store.commit('clearTimeline', { timeline: 'tag' })
- this.$store.dispatch('startFetching', { 'tag': this.tag })
+ this.$store.dispatch('startFetching', { timeline: 'tag', tag: this.tag })
}
},
destroyed () {
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 7b0ab705..8b5571bd 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -8,8 +8,8 @@ const UserProfile = {
this.$store.commit('clearTimeline', { timeline: 'user' })
this.$store.commit('clearTimeline', { timeline: 'favorites' })
this.$store.commit('clearTimeline', { timeline: 'media' })
- this.$store.dispatch('startFetching', ['user', this.fetchBy])
- this.$store.dispatch('startFetching', ['media', this.fetchBy])
+ this.$store.dispatch('startFetching', { timeline: 'user', userId: this.fetchBy })
+ this.$store.dispatch('startFetching', { timeline: 'media', userId: this.fetchBy })
this.startFetchFavorites()
if (!this.user.id) {
this.$store.dispatch('fetchUser', this.fetchBy)
@@ -63,12 +63,12 @@ const UserProfile = {
methods: {
startFetchFavorites () {
if (this.isUs) {
- this.$store.dispatch('startFetching', ['favorites', this.fetchBy])
+ this.$store.dispatch('startFetching', { timeline: 'favorites', userId: this.fetchBy })
}
},
startUp () {
- this.$store.dispatch('startFetching', ['user', this.fetchBy])
- this.$store.dispatch('startFetching', ['media', this.fetchBy])
+ this.$store.dispatch('startFetching', { timeline: 'user', userId: this.fetchBy })
+ this.$store.dispatch('startFetching', { timeline: 'media', userId: this.fetchBy })
this.startFetchFavorites()
},
diff --git a/src/modules/api.js b/src/modules/api.js
index 95782e38..31cb55c6 100644
--- a/src/modules/api.js
+++ b/src/modules/api.js
@@ -1,5 +1,4 @@
import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js'
-import { isArray } from 'lodash'
import { Socket } from 'phoenix'
const api = {
@@ -34,26 +33,12 @@ const api = {
}
},
actions: {
- startFetching (store, payload) {
- let userId = false
- let timeline = 'friends'
- let tag = false
-
- if (isArray(payload)) {
- // For user timelines
- timeline = payload[0]
- userId = payload[1]
- } else if (payload.tag) {
- // For tag timelines
- timeline = 'tag'
- tag = payload.tag
- }
-
+ startFetching (store, {timeline = 'friends', tag = false, userId = false}) {
// Don't start fetching if we already are.
- if (!store.state.fetchers[timeline]) {
- const fetcher = store.state.backendInteractor.startFetching({timeline, store, userId, tag})
- store.commit('addFetcher', {timeline, fetcher})
- }
+ if (store.state.fetchers[timeline]) return
+
+ const fetcher = store.state.backendInteractor.startFetching({ timeline, store, userId, tag })
+ store.commit('addFetcher', { timeline, fetcher })
},
stopFetching (store, timeline) {
const fetcher = store.state.fetchers[timeline]
diff --git a/src/modules/users.js b/src/modules/users.js
index ca2e0f31..4d56ec6f 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -271,7 +271,7 @@ const users = {
}
// Start getting fresh posts.
- store.dispatch('startFetching', 'friends')
+ store.dispatch('startFetching', { timeline: 'friends' })
// Get user mutes and follower info
store.rootState.api.backendInteractor.fetchMutes().then((mutedUsers) => {
--
cgit v1.2.3-70-g09d2
From b57b4c6e45ca612a890e594942e86faab5a946e0 Mon Sep 17 00:00:00 2001
From: dave
Date: Fri, 8 Feb 2019 05:31:06 -0500
Subject: #291 - disable empty tabs in user profile panel
---
src/components/tab_switcher/tab_switcher.js | 2 +-
src/components/user_profile/user_profile.vue | 7 +++++--
src/services/entity_normalizer/entity_normalizer.service.js | 2 ++
3 files changed, 8 insertions(+), 3 deletions(-)
(limited to 'src/components')
diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js
index f9c3f927..423df258 100644
--- a/src/components/tab_switcher/tab_switcher.js
+++ b/src/components/tab_switcher/tab_switcher.js
@@ -37,7 +37,7 @@ export default Vue.component('tab-switcher', {
return (
-
+
)
})
diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue
index 9001ed00..7a1e6a18 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -9,19 +9,20 @@
-
+
-
+
@@ -29,6 +30,7 @@
{
output.locked = data.locked
output.followers_count = data.followers_count
output.statuses_count = data.statuses_count
+ output.favourites_count = data.favourites_count
+ output.media_count = data.media_count
output.friends = []
output.followers = []
--
cgit v1.2.3-70-g09d2
From 10c7365451c7820482def600ed84580c76f6b2ac Mon Sep 17 00:00:00 2001
From: jasper
Date: Fri, 8 Feb 2019 04:25:56 -0800
Subject: Add option to hide filtered statuses
---
src/components/status/status.js | 3 +++
src/components/status/status.vue | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
(limited to 'src/components')
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 3403fd12..4a1fcfdf 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -115,6 +115,9 @@ const Status = {
? this.$store.state.instance.hideFilteredStatuses
: this.$store.state.config.hideFilteredStatuses
},
+ hideStatus () {
+ return (!this.hideReply && !this.deleted) && !(this.muted && this.hideFilteredStatuses)
+ },
isFocused () {
// retweet or root of an expanded conversation
if (this.focused) {
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 5e7fa6c5..83d7b25a 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -1,5 +1,5 @@
-