Merge remote-tracking branch 'upstream/develop' into shigusegubu
* upstream/develop: Prevent overflow for long usernames/domains fix tests fix last issue prioritize disabled opacity over transparent keyword fix several issues related to opacity mention status preview fix in changelog fix trasparency problems in some cases (purple headers) add status unavailable message when status can't be loaded in status preview Fix captcha input and disable ALL the helpers
This commit is contained in:
commit
f881d6d2b5
10 changed files with 62 additions and 10 deletions
|
@ -28,6 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Notifications column now cleans itself up to optimize performance when tab is left open for a long time
|
- Notifications column now cleans itself up to optimize performance when tab is left open for a long time
|
||||||
- 403 messaging
|
- 403 messaging
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- Fixed loader-spinner not disappearing when a status preview fails to load
|
||||||
- anon viewers won't get theme data saved to local storage, so admin changing default theme will have an effect for users coming back to instance.
|
- anon viewers won't get theme data saved to local storage, so admin changing default theme will have an effect for users coming back to instance.
|
||||||
- Single notifications left unread when hitting read on another device/tab
|
- Single notifications left unread when hitting read on another device/tab
|
||||||
- Registration fixed
|
- Registration fixed
|
||||||
|
|
|
@ -81,6 +81,7 @@
|
||||||
|
|
||||||
.follow-text, .move-text {
|
.follow-text, .move-text {
|
||||||
padding: 0.5em 0;
|
padding: 0.5em 0;
|
||||||
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-el {
|
.status-el {
|
||||||
|
|
|
@ -187,6 +187,9 @@
|
||||||
class="form-control"
|
class="form-control"
|
||||||
type="text"
|
type="text"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
autocorrect="off"
|
||||||
|
autocapitalize="off"
|
||||||
|
spellcheck="false"
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,6 +5,11 @@ const StatusPopover = {
|
||||||
props: [
|
props: [
|
||||||
'statusId'
|
'statusId'
|
||||||
],
|
],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
error: false
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
status () {
|
status () {
|
||||||
return find(this.$store.state.statuses.allStatuses, { id: this.statusId })
|
return find(this.$store.state.statuses.allStatuses, { id: this.statusId })
|
||||||
|
@ -18,6 +23,8 @@ const StatusPopover = {
|
||||||
enter () {
|
enter () {
|
||||||
if (!this.status) {
|
if (!this.status) {
|
||||||
this.$store.dispatch('fetchStatus', this.statusId)
|
this.$store.dispatch('fetchStatus', this.statusId)
|
||||||
|
.then(data => (this.error = false))
|
||||||
|
.catch(e => (this.error = true))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,15 @@
|
||||||
:statusoid="status"
|
:statusoid="status"
|
||||||
:compact="true"
|
:compact="true"
|
||||||
/>
|
/>
|
||||||
|
<div
|
||||||
|
v-else-if="error"
|
||||||
|
class="status-preview-no-content faint"
|
||||||
|
>
|
||||||
|
{{ $t('status.status_unavailable') }}
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
class="status-preview-loading"
|
class="status-preview-no-content"
|
||||||
>
|
>
|
||||||
<i class="icon-spin4 animate-spin" />
|
<i class="icon-spin4 animate-spin" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,7 +56,7 @@
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-preview-loading {
|
.status-preview-no-content {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
|
|
@ -616,7 +616,8 @@
|
||||||
"reply_to": "Reply to",
|
"reply_to": "Reply to",
|
||||||
"replies_list": "Replies:",
|
"replies_list": "Replies:",
|
||||||
"mute_conversation": "Mute conversation",
|
"mute_conversation": "Mute conversation",
|
||||||
"unmute_conversation": "Unmute conversation"
|
"unmute_conversation": "Unmute conversation",
|
||||||
|
"status_unavailable": "Status unavailable"
|
||||||
},
|
},
|
||||||
"user_card": {
|
"user_card": {
|
||||||
"approve": "Approve",
|
"approve": "Approve",
|
||||||
|
|
|
@ -290,7 +290,8 @@
|
||||||
"reply_to": "Vastaus",
|
"reply_to": "Vastaus",
|
||||||
"replies_list": "Vastaukset:",
|
"replies_list": "Vastaukset:",
|
||||||
"mute_conversation": "Hiljennä keskustelu",
|
"mute_conversation": "Hiljennä keskustelu",
|
||||||
"unmute_conversation": "Poista hiljennys"
|
"unmute_conversation": "Poista hiljennys",
|
||||||
|
"status_unavailable": "Viesti ei saatavissa"
|
||||||
},
|
},
|
||||||
"user_card": {
|
"user_card": {
|
||||||
"approve": "Hyväksy",
|
"approve": "Hyväksy",
|
||||||
|
|
|
@ -103,6 +103,7 @@ const config = {
|
||||||
setPreset(value)
|
setPreset(value)
|
||||||
break
|
break
|
||||||
case 'customTheme':
|
case 'customTheme':
|
||||||
|
case 'customThemeSource':
|
||||||
applyTheme(value)
|
applyTheme(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -616,7 +616,7 @@ const statuses = {
|
||||||
commit('setNotificationsSilence', { value })
|
commit('setNotificationsSilence', { value })
|
||||||
},
|
},
|
||||||
fetchStatus ({ rootState, dispatch }, id) {
|
fetchStatus ({ rootState, dispatch }, id) {
|
||||||
rootState.api.backendInteractor.fetchStatus({ id })
|
return rootState.api.backendInteractor.fetchStatus({ id })
|
||||||
.then((status) => dispatch('addNewStatuses', { statuses: [status] }))
|
.then((status) => dispatch('addNewStatuses', { statuses: [status] }))
|
||||||
},
|
},
|
||||||
deleteStatus ({ rootState, commit }, status) {
|
deleteStatus ({ rootState, commit }, status) {
|
||||||
|
|
|
@ -350,16 +350,47 @@ export const getColors = (sourceColors, sourceOpacity) => SLOT_ORDERED.reduce(({
|
||||||
if (!outputColor) {
|
if (!outputColor) {
|
||||||
throw new Error('Couldn\'t generate color for ' + key)
|
throw new Error('Couldn\'t generate color for ' + key)
|
||||||
}
|
}
|
||||||
const opacitySlot = getOpacitySlot(key)
|
|
||||||
|
const opacitySlot = value.opacity || getOpacitySlot(key)
|
||||||
const ownOpacitySlot = value.opacity
|
const ownOpacitySlot = value.opacity
|
||||||
if (opacitySlot && (outputColor.a === undefined || ownOpacitySlot)) {
|
|
||||||
|
if (ownOpacitySlot === null) {
|
||||||
|
outputColor.a = 1
|
||||||
|
} else if (sourceColor === 'transparent') {
|
||||||
|
outputColor.a = 0
|
||||||
|
} else {
|
||||||
|
const opacityOverriden = ownOpacitySlot && sourceOpacity[opacitySlot] !== undefined
|
||||||
|
|
||||||
const dependencySlot = deps[0]
|
const dependencySlot = deps[0]
|
||||||
if (dependencySlot && colors[dependencySlot] === 'transparent') {
|
const dependencyColor = dependencySlot && colors[dependencySlot]
|
||||||
outputColor.a = 0
|
|
||||||
|
if (!ownOpacitySlot && dependencyColor && !value.textColor && ownOpacitySlot !== null) {
|
||||||
|
// Inheriting color from dependency (weird, i know)
|
||||||
|
// except if it's a text color or opacity slot is set to 'null'
|
||||||
|
outputColor.a = dependencyColor.a
|
||||||
|
} else if (!dependencyColor && !opacitySlot) {
|
||||||
|
// Remove any alpha channel if no dependency and no opacitySlot found
|
||||||
|
delete outputColor.a
|
||||||
} else {
|
} else {
|
||||||
outputColor.a = Number(sourceOpacity[opacitySlot]) || OPACITIES[opacitySlot].defaultValue || 1
|
// Otherwise try to assign opacity
|
||||||
|
if (dependencyColor && dependencyColor.a === 0) {
|
||||||
|
// transparent dependency shall make dependents transparent too
|
||||||
|
outputColor.a = 0
|
||||||
|
} else {
|
||||||
|
// Otherwise check if opacity is overriden and use that or default value instead
|
||||||
|
outputColor.a = Number(
|
||||||
|
opacityOverriden
|
||||||
|
? sourceOpacity[opacitySlot]
|
||||||
|
: (OPACITIES[opacitySlot] || {}).defaultValue
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Number.isNaN(outputColor.a) || outputColor.a === undefined) {
|
||||||
|
outputColor.a = 1
|
||||||
|
}
|
||||||
|
|
||||||
if (opacitySlot) {
|
if (opacitySlot) {
|
||||||
return {
|
return {
|
||||||
colors: { ...colors, [key]: outputColor },
|
colors: { ...colors, [key]: outputColor },
|
||||||
|
|
Loading…
Add table
Reference in a new issue