Merge branch 'collateral-damage-control' into 'develop'
Collateral damage control See merge request pleroma/pleroma-fe!418
This commit is contained in:
commit
ad56c8e5bd
|
@ -28,6 +28,10 @@ const afterStoreSetup = ({ store, i18n }) => {
|
||||||
store.dispatch('setInstanceOption', { name: 'textlimit', value: parseInt(textlimit) })
|
store.dispatch('setInstanceOption', { name: 'textlimit', value: parseInt(textlimit) })
|
||||||
store.dispatch('setInstanceOption', { name: 'server', value: server })
|
store.dispatch('setInstanceOption', { name: 'server', value: server })
|
||||||
|
|
||||||
|
if (data.nsfwCensorImage) {
|
||||||
|
store.dispatch('setInstanceOption', { name: 'nsfwCensorImage', value: data.nsfwCensorImage })
|
||||||
|
}
|
||||||
|
|
||||||
if (vapidPublicKey) {
|
if (vapidPublicKey) {
|
||||||
store.dispatch('setInstanceOption', { name: 'vapidPublicKey', value: vapidPublicKey })
|
store.dispatch('setInstanceOption', { name: 'vapidPublicKey', value: vapidPublicKey })
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,10 +20,20 @@ export default {
|
||||||
if (color) {
|
if (color) {
|
||||||
const rgb = (typeof color === 'string') ? hex2rgb(color) : 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)`
|
const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .5)`
|
||||||
|
|
||||||
|
const gradient = [
|
||||||
|
[tintColor, this.hideBio ? '60%' : ''],
|
||||||
|
this.hideBio ? [
|
||||||
|
color, '100%'
|
||||||
|
] : [
|
||||||
|
tintColor, ''
|
||||||
|
]
|
||||||
|
].map(_ => _.join(' ')).join(', ')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
backgroundColor: `rgb(${Math.floor(rgb.r * 0.53)}, ${Math.floor(rgb.g * 0.56)}, ${Math.floor(rgb.b * 0.59)})`,
|
backgroundColor: `rgb(${Math.floor(rgb.r * 0.53)}, ${Math.floor(rgb.g * 0.56)}, ${Math.floor(rgb.b * 0.59)})`,
|
||||||
backgroundImage: [
|
backgroundImage: [
|
||||||
`linear-gradient(to bottom, ${tintColor}, ${tintColor})`,
|
`linear-gradient(to bottom, ${gradient})`,
|
||||||
`url(${this.user.cover_photo})`
|
`url(${this.user.cover_photo})`
|
||||||
].join(', ')
|
].join(', ')
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body profile-panel-body" v-if="switcher">
|
<div class="panel-body profile-panel-body" v-if="!hideBio">
|
||||||
<div v-if="!hideUserStatsLocal || switcher" class="user-counts" :class="{clickable: switcher}">
|
<div v-if="!hideUserStatsLocal || switcher" class="user-counts" :class="{clickable: switcher}">
|
||||||
<div class="user-count" v-on:click.prevent="setProfileView('statuses')" :class="{selected: selected === 'statuses'}">
|
<div class="user-count" v-on:click.prevent="setProfileView('statuses')" :class="{selected: selected === 'statuses'}">
|
||||||
<h5>{{ $t('user_card.statuses') }}</h5>
|
<h5>{{ $t('user_card.statuses') }}</h5>
|
||||||
|
@ -122,6 +122,9 @@
|
||||||
border-radius: var(--panelRadius, $fallback--panelRadius);
|
border-radius: var(--panelRadius, $fallback--panelRadius);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
|
||||||
.panel-heading {
|
.panel-heading {
|
||||||
padding: 0.6em 0em;
|
padding: 0.6em 0em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -60,9 +60,6 @@ const registerPushNotifications = store => {
|
||||||
if (isUserMutation && vapidPublicKey && permission) {
|
if (isUserMutation && vapidPublicKey && permission) {
|
||||||
return store.dispatch('registerPushNotifications')
|
return store.dispatch('registerPushNotifications')
|
||||||
}
|
}
|
||||||
if (data['nsfwCensorImage']) {
|
|
||||||
store.dispatch('setOption', { name: 'nsfwCensorImage', value: data['nsfwCensorImage'] })
|
|
||||||
}
|
|
||||||
|
|
||||||
const user = state.users.currentUser
|
const user = state.users.currentUser
|
||||||
const isVapidMutation = mutation.type === 'setInstanceOption' && mutation.payload.name === 'vapidPublicKey'
|
const isVapidMutation = mutation.type === 'setInstanceOption' && mutation.payload.name === 'vapidPublicKey'
|
||||||
|
|
|
@ -25,6 +25,8 @@ const defaultState = {
|
||||||
scopeCopy: true,
|
scopeCopy: true,
|
||||||
subjectLineBehavior: 'email',
|
subjectLineBehavior: 'email',
|
||||||
loginMethod: 'password',
|
loginMethod: 'password',
|
||||||
|
nsfwCensorImage: undefined,
|
||||||
|
vapidPublicKey: undefined,
|
||||||
|
|
||||||
// Nasty stuff
|
// Nasty stuff
|
||||||
pleromaBackend: true,
|
pleromaBackend: true,
|
||||||
|
|
Loading…
Reference in New Issue