Merge branch 'develop' into 'scrobbles-age'

# Conflicts:
#   src/i18n/en.json
This commit is contained in:
HJ 2024-04-28 19:05:18 +00:00
commit 51709ad318
208 changed files with 5530 additions and 2338 deletions

View file

@ -0,0 +1,33 @@
export default {
name: 'Post',
selector: '.Status',
states: {
selected: '.-focused'
},
validInnerComponents: [
'Text',
'Link',
'Icon',
'Border',
'Button',
'ButtonUnstyled',
'RichContent',
'Input',
'Avatar',
'Attachment',
'PollGraph'
],
defaultRules: [
{
directives: {
background: '--bg'
}
},
{
state: ['selected'],
directives: {
background: '--inheritedBackground, 10'
}
}
]
}

View file

@ -238,6 +238,9 @@ const Status = {
showActorTypeIndicator () {
return !this.hideBotIndication
},
sensitiveStatus () {
return this.status.nsfw
},
mentionsLine () {
if (!this.headTailLinks) return []
const writtenSet = new Set(this.headTailLinks.writtenMentions.map(_ => _.url))
@ -265,7 +268,9 @@ const Status = {
// Wordfiltered
this.muteWordHits.length > 0 ||
// bot status
(this.muteBotStatuses && this.botStatus && !this.compact)
(this.muteBotStatuses && this.botStatus && !this.compact) ||
// sensitive status
(this.muteSensitiveStatuses && this.sensitiveStatus && !this.compact)
return !this.unmuted && !this.shouldNotMute && reasonsToMute
},
userIsMuted () {
@ -371,6 +376,9 @@ const Status = {
muteBotStatuses () {
return this.mergedConfig.muteBotStatuses
},
muteSensitiveStatuses () {
return this.mergedConfig.muteSensitiveStatuses
},
hideBotIndication () {
return this.mergedConfig.hideBotIndication
},

View file

@ -1,5 +1,3 @@
@import "../../variables";
.Status {
min-width: 0;
white-space: normal;
@ -12,24 +10,8 @@
--_still-image-label-visibility: hidden;
}
&.-focused {
background-color: $fallback--lightBg;
background-color: var(--selectedPost, $fallback--lightBg);
color: $fallback--text;
color: var(--selectedPostText, $fallback--text);
--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);
}
.gravestone {
padding: var(--status-margin, $status-margin);
color: $fallback--faint;
color: var(--faint, $fallback--faint);
padding: var(--status-margin);
display: flex;
.deleted-text {
@ -40,7 +22,7 @@
.status-container {
display: flex;
padding: var(--status-margin, $status-margin);
padding: var(--status-margin);
> * {
min-width: 0;
@ -52,7 +34,7 @@
}
.pin {
padding: var(--status-margin, $status-margin) var(--status-margin, $status-margin) 0;
padding: var(--status-margin) var(--status-margin) 0;
display: flex;
align-items: center;
justify-content: flex-end;
@ -68,7 +50,7 @@
}
.left-side {
margin-right: var(--status-margin, $status-margin);
margin-right: var(--status-margin);
}
.right-side {
@ -77,7 +59,7 @@
}
.usercard {
margin-bottom: var(--status-margin, $status-margin);
margin-bottom: var(--status-margin);
}
.status-username {
@ -135,11 +117,6 @@
.button-unstyled {
padding: 5px;
margin: -5px;
&:hover svg {
color: $fallback--lightText;
color: var(--lightText, $fallback--lightText);
}
}
.svg-inline--fa {
@ -243,16 +220,15 @@
}
.repeat-info {
padding: 0.4em var(--status-margin, $status-margin);
padding: 0.4em var(--status-margin);
.repeat-icon {
color: $fallback--cGreen;
color: var(--cGreen, $fallback--cGreen);
color: var(--cGreen);
}
}
.repeater-avatar {
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
border-radius: var(--roundness);
margin-left: 28px;
width: 20px;
height: 20px;
@ -289,7 +265,7 @@
position: relative;
width: 100%;
display: flex;
margin-top: var(--status-margin, $status-margin);
margin-top: var(--status-margin);
> * {
max-width: 4em;
@ -357,7 +333,7 @@
}
.favs-repeated-users {
margin-top: var(--status-margin, $status-margin);
margin-top: var(--status-margin);
}
.stats {
@ -368,10 +344,10 @@
.avatar-row {
flex: 1;
overflow: hidden;
position: relative;
display: flex;
align-items: center;
overflow: hidden;
&::before {
content: "";
@ -379,16 +355,16 @@
height: 100%;
width: 1px;
left: 0;
background-color: var(--faint, $fallback--faint);
background-color: var(--textFaint);
}
}
.stat-count {
margin-right: var(--status-margin, $status-margin);
margin-right: var(--status-margin);
user-select: none;
.stat-title {
color: var(--faint, $fallback--faint);
color: var(--textFaint);
font-size: 0.85em;
text-transform: uppercase;
position: relative;
@ -425,8 +401,8 @@
.quoted-status {
margin-top: 0.5em;
border: 1px solid var(--border, $fallback--border);
border-radius: var(--attachmentRadius, $fallback--attachmentRadius);
border: 1px solid var(--border);
border-radius: var(--roundness);
&.-unavailable-prompt {
padding: 0.5em;

View file

@ -30,6 +30,12 @@
:at="false"
/>
</small>
<small
v-if="muteSensitiveStatuses && status.nsfw"
class="mute-thread"
>
{{ $t('status.sensitive_muted') }}
</small>
<small
v-if="showReasonMutedThread"
class="mute-thread"
@ -180,7 +186,7 @@
<span class="heading-right">
<router-link
class="timeago faint-link"
class="timeago faint"
:to="{ name: 'conversation', params: { id: status.id } }"
>
<Timeago
@ -450,7 +456,7 @@
>
<button
v-if="showOtherRepliesAsButton && replies.length > 1"
class="button-unstyled -link faint"
class="button-unstyled -link"
:title="$tc('status.ancestor_follow', replies.length - 1, { numReplies: replies.length - 1 })"
@click.prevent="dive"
>