From 949f47063b0114cd72630d3862df96429835f925 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Tue, 12 Nov 2019 10:40:36 -0500
Subject: show N/A when count is hidden
---
src/components/user_card/user_card.js | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'src/components/user_card/user_card.js')
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js
index cc8a1ed6..a9278200 100644
--- a/src/components/user_card/user_card.js
+++ b/src/components/user_card/user_card.js
@@ -93,6 +93,12 @@ export default {
const roleTitle = rights.admin ? 'admin' : 'moderator'
return validRole && roleTitle
},
+ hideFollowsCount () {
+ return this.isOtherUser && this.user.hide_follows_count
+ },
+ hideFollowersCount () {
+ return this.isOtherUser && this.user.hide_followers_count
+ },
...mapGetters(['mergedConfig'])
},
components: {
--
cgit v1.2.3-70-g09d2
From 7ebf3602d5d9a8630ffbe239bfe4431655046821 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Tue, 26 Nov 2019 19:57:27 -0500
Subject: move mention button right next to mute button
---
src/components/account_actions/account_actions.js | 3 ---
src/components/account_actions/account_actions.vue | 18 ++++--------------
src/components/user_card/user_card.js | 3 +++
src/components/user_card/user_card.vue | 8 ++++++++
4 files changed, 15 insertions(+), 17 deletions(-)
(limited to 'src/components/user_card/user_card.js')
diff --git a/src/components/account_actions/account_actions.js b/src/components/account_actions/account_actions.js
index 204d506a..d2153680 100644
--- a/src/components/account_actions/account_actions.js
+++ b/src/components/account_actions/account_actions.js
@@ -25,9 +25,6 @@ const AccountActions = {
},
reportUser () {
this.$store.dispatch('openUserReportingModal', this.user.id)
- },
- mentionUser () {
- this.$store.dispatch('openPostStatusModal', { replyTo: true, repliedUser: this.user })
}
}
}
diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue
index 046cba93..d3235be1 100644
--- a/src/components/account_actions/account_actions.vue
+++ b/src/components/account_actions/account_actions.vue
@@ -9,17 +9,7 @@
>
+
+
+
Date: Thu, 20 Feb 2020 18:13:40 +0200
Subject: stop using customTheme in user card, instead use color slots. fix for
opacity inheritance polluting inheritors
---
src/components/user_card/user_card.js | 21 +++++----------------
src/components/user_card/user_card.vue | 1 +
src/services/theme_data/pleromafe.js | 16 ++++++++++++++++
src/services/theme_data/theme_data.service.js | 3 ++-
4 files changed, 24 insertions(+), 17 deletions(-)
(limited to 'src/components/user_card/user_card.js')
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js
index 2f649910..1cdbd3fa 100644
--- a/src/components/user_card/user_card.js
+++ b/src/components/user_card/user_card.js
@@ -4,7 +4,6 @@ import ProgressButton from '../progress_button/progress_button.vue'
import FollowButton from '../follow_button/follow_button.vue'
import ModerationTools from '../moderation_tools/moderation_tools.vue'
import AccountActions from '../account_actions/account_actions.vue'
-import { hex2rgb } from '../../services/color_convert/color_convert.js'
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
import { mapGetters } from 'vuex'
@@ -30,21 +29,11 @@ export default {
}]
},
style () {
- const color = this.$store.getters.mergedConfig.customTheme.colors
- ? this.$store.getters.mergedConfig.customTheme.colors.bg // v2
- : this.$store.getters.mergedConfig.colors.bg // v1
-
- if (color) {
- const rgb = (typeof color === 'string') ? hex2rgb(color) : color
- const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .5)`
-
- return {
- backgroundColor: `rgb(${Math.floor(rgb.r * 0.53)}, ${Math.floor(rgb.g * 0.56)}, ${Math.floor(rgb.b * 0.59)})`,
- backgroundImage: [
- `linear-gradient(to bottom, ${tintColor}, ${tintColor})`,
- `url(${this.user.cover_photo})`
- ].join(', ')
- }
+ return {
+ backgroundImage: [
+ `linear-gradient(to bottom, var(--profileTint), var(--profileTint))`,
+ `url(${this.user.cover_photo})`
+ ].join(', ')
}
},
isOtherUser () {
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue
index 3988ff1c..4ee040e8 100644
--- a/src/components/user_card/user_card.vue
+++ b/src/components/user_card/user_card.vue
@@ -286,6 +286,7 @@
mask-size: 100% 60%;
border-top-left-radius: calc(var(--panelRadius) - 1px);
border-top-right-radius: calc(var(--panelRadius) - 1px);
+ background-color: var(--profileBg);
&.hide-bio {
mask-size: 100% 40px;
diff --git a/src/services/theme_data/pleromafe.js b/src/services/theme_data/pleromafe.js
index 33a2ed57..0c1fe543 100644
--- a/src/services/theme_data/pleromafe.js
+++ b/src/services/theme_data/pleromafe.js
@@ -8,6 +8,7 @@ export const LAYERS = {
undelay: null, // root
topBar: null, // no transparency support
badge: null, // no transparency support
+ profileTint: null, // doesn't matter
fg: null,
bg: 'underlay',
highlight: 'bg',
@@ -29,6 +30,7 @@ export const LAYERS = {
* this allows redefining it to something else
*/
export const DEFAULT_OPACITY = {
+ profileTint: 0.5,
alert: 0.5,
input: 0.5,
faint: 0.5,
@@ -119,6 +121,20 @@ export const SLOT_INHERITANCE = {
cGreen: '#00FF00',
cOrange: '#E3FF00',
+ profileBg: {
+ depends: ['bg'],
+ color: (mod, bg) => ({
+ r: Math.floor(bg.r * 0.53),
+ g: Math.floor(bg.g * 0.56),
+ b: Math.floor(bg.b * 0.59)
+ })
+ },
+ profileTint: {
+ depends: ['bg'],
+ layer: 'profileTint',
+ opacity: 'profileTint'
+ },
+
highlight: {
depends: ['bg'],
color: (mod, bg) => brightness(5 * mod, bg).rgb
diff --git a/src/services/theme_data/theme_data.service.js b/src/services/theme_data/theme_data.service.js
index 75768795..e6ff82e6 100644
--- a/src/services/theme_data/theme_data.service.js
+++ b/src/services/theme_data/theme_data.service.js
@@ -351,7 +351,8 @@ export const getColors = (sourceColors, sourceOpacity) => SLOT_ORDERED.reduce(({
throw new Error('Couldn\'t generate color for ' + key)
}
const opacitySlot = getOpacitySlot(key)
- if (opacitySlot && outputColor.a === undefined) {
+ const ownOpacitySlot = value.opacity
+ if (opacitySlot && (outputColor.a === undefined || ownOpacitySlot)) {
const dependencySlot = deps[0]
if (dependencySlot && colors[dependencySlot] === 'transparent') {
outputColor.a = 0
--
cgit v1.2.3-70-g09d2
From 6bb75a3a6d8452a3e1b88085fe87cf27386f222c Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson
Date: Tue, 21 Apr 2020 23:27:51 +0300
Subject: make relationships separate from users
---
src/boot/after_store.js | 3 ++
src/components/account_actions/account_actions.js | 2 +-
src/components/account_actions/account_actions.vue | 8 ++---
src/components/basic_user_card/basic_user_card.vue | 2 +-
src/components/block_card/block_card.js | 5 ++-
src/components/follow_button/follow_button.js | 14 ++++----
src/components/follow_card/follow_card.js | 3 ++
src/components/follow_card/follow_card.vue | 5 +--
src/components/mute_card/mute_card.js | 9 ++++--
src/components/notification/notification.js | 2 +-
src/components/notification/notification.vue | 2 +-
src/components/side_drawer/side_drawer.vue | 2 +-
src/components/status/status.js | 15 +++++++--
src/components/status/status.vue | 2 +-
src/components/user_card/user_card.js | 8 ++++-
src/components/user_card/user_card.vue | 15 +++++----
src/components/user_panel/user_panel.vue | 2 +-
src/components/user_profile/user_profile.vue | 2 +-
src/components/user_settings/user_settings.js | 8 ++---
src/modules/users.js | 37 ++++++++--------------
src/services/api/api.service.js | 4 ++-
.../entity_normalizer/entity_normalizer.service.js | 25 +++++++++------
.../follow_manipulate/follow_manipulate.js | 15 +++++----
.../notifications_fetcher.service.js | 1 -
.../timeline_fetcher/timeline_fetcher.service.js | 2 ++
25 files changed, 112 insertions(+), 81 deletions(-)
(limited to 'src/components/user_card/user_card.js')
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index d70e1058..1522d4f0 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -304,6 +304,9 @@ const afterStoreSetup = async ({ store, i18n }) => {
getNodeInfo({ store })
])
+ // Start fetching things that don't need to block the UI
+ store.dispatch('fetchMutes')
+
const router = new VueRouter({
mode: 'history',
routes: routes(store),
diff --git a/src/components/account_actions/account_actions.js b/src/components/account_actions/account_actions.js
index 5d7ecf7e..0826c275 100644
--- a/src/components/account_actions/account_actions.js
+++ b/src/components/account_actions/account_actions.js
@@ -3,7 +3,7 @@ import Popover from '../popover/popover.vue'
const AccountActions = {
props: [
- 'user'
+ 'user', 'relationship'
],
data () {
return { }
diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue
index 483783cf..744b77d5 100644
--- a/src/components/account_actions/account_actions.vue
+++ b/src/components/account_actions/account_actions.vue
@@ -9,16 +9,16 @@
class="account-tools-popover"
>