@@ -162,7 +162,7 @@
{{ $t('user_card.muted') }}
@@ -538,12 +538,6 @@
button {
margin: 0;
-
- &.pressed {
- // TODO: This should be themed.
- border-bottom-color: rgba(255, 255, 255, 0.2);
- border-top-color: rgba(0, 0, 0, 0.2);
- }
}
}
}
diff --git a/src/services/theme_data/theme_data.service.js b/src/services/theme_data/theme_data.service.js
index c5dd8047..a345d996 100644
--- a/src/services/theme_data/theme_data.service.js
+++ b/src/services/theme_data/theme_data.service.js
@@ -219,6 +219,19 @@ export const SLOT_INHERITANCE = {
textColor: 'preserve'
},
+ // Tabs
+ tab: '--btn',
+ tabText: {
+ depends: ['btnText'],
+ layer: 'btn',
+ textColor: true
+ },
+ tabActiveText: {
+ depends: ['text'],
+ layer: 'bg',
+ textColor: true
+ },
+
// Buttons
btn: '--fg',
btnText: {
@@ -239,6 +252,7 @@ export const SLOT_INHERITANCE = {
textColor: true
},
+ // Buttons: pressed
btnPressed: '--btn',
btnPressedText: {
depends: ['btnText'],
@@ -259,6 +273,31 @@ export const SLOT_INHERITANCE = {
textColor: true
},
+ // Buttons: toggled
+ btnToggled: {
+ depends: ['btn'],
+ color: (mod, btn) => brightness(mod * 20, btn).rgb
+ },
+ btnToggledText: {
+ depends: ['btnText'],
+ layer: 'btn',
+ variant: 'btnToggled',
+ textColor: true
+ },
+ btnToggledPanelText: {
+ depends: ['btnPanelText'],
+ layer: 'btnPanel',
+ variant: 'btnToggled',
+ textColor: true
+ },
+ btnToggledTopBarText: {
+ depends: ['btnTopBarText'],
+ layer: 'btnTopBar',
+ variant: 'btnToggled',
+ textColor: true
+ },
+
+ // Buttons: disabled
btnDisabled: {
depends: ['btn', 'bg'],
color: (mod, btn, bg) => alphaBlend(btn, 0.5, bg)
--
cgit v1.2.3-70-g09d2
From 526b43eba66c597c78857da6ded3c7f672f96e49 Mon Sep 17 00:00:00 2001
From: Henry Jameson
Date: Tue, 28 Jan 2020 01:29:20 +0200
Subject: Kenomo (see: #624) theme. Ability to define link color for post
contents. Fixes
---
src/components/emoji_input/emoji_input.vue | 2 +
src/components/notifications/notifications.scss | 3 +
src/components/popper/popper.scss | 2 +
src/components/status/status.vue | 7 +++
src/components/style_switcher/style_switcher.vue | 17 ++++++
src/components/user_card/user_card.vue | 5 ++
src/services/theme_data/pleromafe.js | 34 ++++++++++++
static/themes/kenomo.json | 71 ++++++++++++++++++++++++
8 files changed, 141 insertions(+)
create mode 100644 static/themes/kenomo.json
(limited to 'src/components/user_card/user_card.vue')
diff --git a/src/components/emoji_input/emoji_input.vue b/src/components/emoji_input/emoji_input.vue
index 94eae560..e9ac09c3 100644
--- a/src/components/emoji_input/emoji_input.vue
+++ b/src/components/emoji_input/emoji_input.vue
@@ -116,6 +116,8 @@
--faint: var(--popoverFaintText, $fallback--faint);
--faintLink: var(--popoverFaintLink, $fallback--faint);
--lightText: var(--popoverLightText, $fallback--lightText);
+ --postLink: var(--popoverPostLink, $fallback--link);
+ --postFaintLink: var(--popoverPostFaintLink, $fallback--link);
--icon: var(--popoverIcon, $fallback--icon);
}
}
diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss
index 71876b14..ca762432 100644
--- a/src/components/notifications/notifications.scss
+++ b/src/components/notifications/notifications.scss
@@ -68,6 +68,9 @@
a {
color: var(--faintLink);
}
+ .status-content a {
+ color: var(--postFaintLink);
+ }
}
padding: 0;
.media-body {
diff --git a/src/components/popper/popper.scss b/src/components/popper/popper.scss
index 341416c1..8e2dcd55 100644
--- a/src/components/popper/popper.scss
+++ b/src/components/popper/popper.scss
@@ -15,6 +15,8 @@
--faint: var(--popoverFaintText, $fallback--faint);
--faintLink: var(--popoverFaintLink, $fallback--faint);
--lightText: var(--popoverLightText, $fallback--lightText);
+ --postLink: var(--popoverPostLink, $fallback--link);
+ --postFaintLink: var(--popoverPostFaintLink, $fallback--link);
--icon: var(--popoverIcon, $fallback--icon);
}
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 1997e187..b1048832 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -451,6 +451,8 @@ $status-margin: 0.75em;
--lightText: var(--selectedPostLightText, $fallback--light);
--faint: var(--selectedPostFaintText, $fallback--faint);
--faintLink: var(--selectedPostFaintLink, $fallback--faint);
+ --postLink: var(--selectedPostPostLink, $fallback--faint);
+ --postFaintLink: var(--selectedPostFaintPostLink, $fallback--faint);
--icon: var(--selectedPostIcon, $fallback--icon);
}
@@ -640,6 +642,11 @@ $status-margin: 0.75em;
line-height: 1.4em;
white-space: pre-wrap;
+ a {
+ color: $fallback--link;
+ color: var(--postLink, $fallback--link);
+ }
+
img, video {
max-width: 100%;
max-height: 400px;
diff --git a/src/components/style_switcher/style_switcher.vue b/src/components/style_switcher/style_switcher.vue
index 6e38bd8e..0b3b0fbf 100644
--- a/src/components/style_switcher/style_switcher.vue
+++ b/src/components/style_switcher/style_switcher.vue
@@ -248,6 +248,23 @@
+
{{ $t('settings.style.advanced_colors.post') }}
+
+
+
+
{{ $t('settings.style.advanced_colors.alert') }}
brightness(20 * mod, text).rgb
},
+ postLink: {
+ depends: ['link']
+ },
+
border: {
depends: ['fg'],
opacity: 'border',
diff --git a/static/themes/kenomo.json b/static/themes/kenomo.json
new file mode 100644
index 00000000..98ddf974
--- /dev/null
+++ b/static/themes/kenomo.json
@@ -0,0 +1,71 @@
+{
+ "_pleroma_theme_version": 2,
+ "name": "Kenomo",
+ "source": {
+ "themeEngineVersion": 3,
+ "fonts": {},
+ "shadows": {
+ "panel": [],
+ "topBar": [],
+ "button": [
+ {
+ "x": 0,
+ "y": 1,
+ "blur": 0,
+ "spread": 0,
+ "color": "#FFFFFF",
+ "alpha": 0.2,
+ "inset": true
+ },
+ {
+ "x": 0,
+ "y": -1,
+ "blur": 0,
+ "spread": 0,
+ "color": "#000000",
+ "alpha": 0.2,
+ "inset": true
+ }
+ ],
+ "input": [
+ {
+ "x": 0,
+ "y": "0",
+ "blur": 0,
+ "spread": "1",
+ "color": "#576574",
+ "alpha": "1",
+ "inset": true
+ }
+ ]
+ },
+ "opacity": {
+ "underlay": "1",
+ "border": "0"
+ },
+ "colors": {
+ "bg": "#ffffff",
+ "fg": "#f6f6f6",
+ "text": "#494949",
+ "underlay": "#ffffff",
+ "link": "#818181",
+ "accent": "#818181",
+ "cBlue": "#2e86de",
+ "cRed": "#c96248",
+ "cGreen": "#0fa00f",
+ "cOrange": "#aa7623",
+ "postLink": "#2e86de",
+ "border": "#ffffff",
+ "icon": "#8a8a8a",
+ "panel": "transparent",
+ "topBarText": "#4b4b4b",
+ "tab": "--btn,-30",
+ "btn": "#576574"
+ },
+ "radii": {
+ "panel": "0",
+ "avatar": "6",
+ "avatarAlt": "6"
+ }
+ }
+}
--
cgit v1.2.3-70-g09d2
From b63e679a31a573c30868477f17322d6ed040af58 Mon Sep 17 00:00:00 2001
From: Henry Jameson
Date: Tue, 28 Jan 2020 02:03:21 +0200
Subject: removed one color TODO
---
src/components/popper/popper.scss | 2 ++
src/components/style_switcher/style_switcher.vue | 29 +++++++++++++++++-------
src/components/user_card/user_card.vue | 5 ++--
src/i18n/en.json | 3 +++
src/services/theme_data/pleromafe.js | 20 +++++++++++++++-
5 files changed, 47 insertions(+), 12 deletions(-)
(limited to 'src/components/user_card/user_card.vue')
diff --git a/src/components/popper/popper.scss b/src/components/popper/popper.scss
index 8e2dcd55..99b7e6fc 100644
--- a/src/components/popper/popper.scss
+++ b/src/components/popper/popper.scss
@@ -137,6 +137,8 @@
width: 100%;
height: 100%;
+ --btnText: var(--popoverText, $fallback--text);
+
&-icon {
padding-left: 0.5rem;
diff --git a/src/components/style_switcher/style_switcher.vue b/src/components/style_switcher/style_switcher.vue
index 0b3b0fbf..9de3a96c 100644
--- a/src/components/style_switcher/style_switcher.vue
+++ b/src/components/style_switcher/style_switcher.vue
@@ -257,14 +257,6 @@
:show-optional-tickbox="typeof accentColorLocal !== 'undefined'"
/>
-
-
{{ $t('settings.style.advanced_colors.alert') }}
+
+
+
+
{{ $t('settings.style.advanced_colors.badge') }}
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue
index 72656435..3988ff1c 100644
--- a/src/components/user_card/user_card.vue
+++ b/src/components/user_card/user_card.vue
@@ -465,14 +465,13 @@
color: var(--text, $fallback--text);
}
- // TODO use proper colors
.staff {
flex: none;
text-transform: capitalize;
color: $fallback--text;
- color: var(--btnText, $fallback--text);
+ color: var(--alertNeutralText, $fallback--text);
background-color: $fallback--fg;
- background-color: var(--btn, $fallback--fg);
+ background-color: var(--alertNeutral, $fallback--fg);
}
}
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 81dde663..06cc12f0 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -441,7 +441,10 @@
"alert": "Alert background",
"alert_error": "Error",
"alert_warning": "Warning",
+ "alert_neutral": "Neutral",
+ "post": "Posts/User bios",
"badge": "Badge background",
+ "popover": "Tooltips, menus, popovers",
"badge_notification": "Notification",
"panel_header": "Panel header",
"top_bar": "Top bar",
diff --git a/src/services/theme_data/pleromafe.js b/src/services/theme_data/pleromafe.js
index 74e6fc1c..354009ee 100644
--- a/src/services/theme_data/pleromafe.js
+++ b/src/services/theme_data/pleromafe.js
@@ -1,4 +1,4 @@
-import { brightness } from 'chromatism'
+import { invertLightness, brightness } from 'chromatism'
import { alphaBlend, mixrgb } from '../color_convert/color_convert.js'
/* This is a definition of all layer combinations
* each key is a topmost layer, each value represents layer underneath
@@ -574,6 +574,24 @@ export const SLOT_INHERITANCE = {
textColor: true
},
+ alertNeutral: {
+ depends: ['text'],
+ opacity: 'alert'
+ },
+ alertNeutralText: {
+ depends: ['text'],
+ layer: 'alert',
+ variant: 'alertNeutral',
+ color: (mod, text) => invertLightness(text).rgb,
+ textColor: true
+ },
+ alertNeutralPanelText: {
+ depends: ['panelText'],
+ layer: 'alertPanel',
+ variant: 'alertNeutral',
+ textColor: true
+ },
+
badgeNotification: '--cRed',
badgeNotificationText: {
depends: ['text', 'badgeNotification'],
--
cgit v1.2.3-70-g09d2
From d19c64314ff08391a2649681e6b64d052e600059 Mon Sep 17 00:00:00 2001
From: Henry Jameson
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.vue')
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.vue')
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"
>