change defaults

This commit is contained in:
Henry Jameson 2021-06-08 14:51:42 +03:00
parent 0ae3985a52
commit 7ae85c8318
10 changed files with 74 additions and 59 deletions

View file

@ -52,10 +52,10 @@ const MentionLink = {
if (this.highlight) return highlightClass(this.user)
},
oldPlace () {
return this.mergedConfig.mentionsOldPlace
return !this.mergedConfig.mentionsOwnLine
},
oldStyle () {
return this.mergedConfig.mentionsOldStyle
return !this.mergedConfig.mentionsNewStyle
},
style () {
if (this.highlight) {

View file

@ -1,8 +1,8 @@
<template>
<span
<span
class="MentionLink"
:class="{ '-oldPlace': oldPlace }"
>
>
<!-- eslint-disable vue/no-v-html -->
<a
v-if="!user"
@ -23,8 +23,14 @@
@click.prevent="onClick"
>
<!-- eslint-disable vue/no-v-html -->
<span class="shortName"><span class="userName" v-html="userName" /></span>
<span class="you" v-if="isYou">{{ $t('status.you') }}</span>
<span class="shortName"><span
class="userName"
v-html="userName"
/></span>
<span
v-if="isYou"
class="you"
>{{ $t('status.you') }}</span>
<!-- eslint-enable vue/no-v-html -->
</button>
<span
@ -33,7 +39,10 @@
:class="[highlightType]"
>
<!-- eslint-disable vue/no-v-html -->
<span class="userNameFull" v-html="userNameFull" />
<span
class="userNameFull"
v-html="userNameFull"
/>
<!-- eslint-enable vue/no-v-html -->
</span>
</span>

View file

@ -15,7 +15,7 @@ const MentionsLine = {
},
computed: {
oldStyle () {
return this.mergedConfig.mentionsOldStyle
return !this.mergedConfig.mentionsNewStyle
},
limit () {
return 6
@ -39,7 +39,7 @@ const MentionsLine = {
: '-newStyle'
]
},
...mapGetters(['mergedConfig']),
...mapGetters(['mergedConfig'])
},
methods: {
toggleShowMore () {

View file

@ -1,21 +1,24 @@
<template>
<span class="MentionsLine">
<span class="MentionsLine">
<MentionLink
v-for="mention in mentions"
class="mention-link"
:key="mention.statusnet_profile_url"
class="mention-link"
:content="mention.statusnet_profile_url"
:url="mention.statusnet_profile_url"
:first-mention="false"
/><span v-if="manyMentions" class="extraMentions">
/><span
v-if="manyMentions"
class="extraMentions"
>
<span
v-if="expanded"
class="fullExtraMentions"
>
<MentionLink
v-for="mention in extraMentions"
class="mention-link"
:key="mention.statusnet_profile_url"
class="mention-link"
:content="mention.statusnet_profile_url"
:url="mention.statusnet_profile_url"
:first-mention="false"
@ -26,17 +29,17 @@
:class="buttonClasses"
@click="toggleShowMore"
>
{{ $t('status.plus_more', { number: extraMentions.length })}}
{{ $t('status.plus_more', { number: extraMentions.length }) }}
</button><button
v-if="expanded"
class="showMoreLess"
:class="buttonClasses"
@click="toggleShowMore"
>
{{ $t('general.show_less')}}
{{ $t('general.show_less') }}
</button>
</span>
</span>
</span>
</template>
<script src="./mentions_line.js" ></script>
<style lang="scss" src="./mentions_line.scss" />

View file

@ -37,13 +37,13 @@
</BooleanSetting>
</li>
<li>
<BooleanSetting path="mentionsOldPlace">
{{ $t('settings.mentions_old_place') }}
<BooleanSetting path="mentionsOwnLine">
{{ $t('settings.mentions_new_place') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting path="mentionsOldStyle">
{{ $t('settings.mentions_old_style') }}
<BooleanSetting path="mentionsNewStyle">
{{ $t('settings.mentions_new_style') }}
</BooleanSetting>
</li>
<li>

View file

@ -163,8 +163,8 @@ const Status = {
muteWordHits () {
return muteWordHits(this.status, this.muteWords)
},
mentionsOldPlace () {
return this.mergedConfig.mentionsOldPlace
mentionsOwnLine () {
return this.mergedConfig.mentionsOwnLine
},
mentions () {
return this.statusoid.attentions.filter(attn => {

View file

@ -291,7 +291,10 @@
</div>
</div>
<div v-if="hasMentions && !mentionsOldPlace" class="heading-mentions-row">
<div
v-if="hasMentions && mentionsOwnLine"
class="heading-mentions-row"
>
<div
class="mentions"
>

View file

@ -105,8 +105,8 @@ const StatusContent = {
attachmentTypes () {
return this.status.attachments.map(file => fileType.fileType(file.mimetype))
},
mentionsOldPlace () {
return this.mergedConfig.mentionsOldPlace
mentionsOwnLine () {
return this.mergedConfig.mentionsOwnLine
},
mentions () {
return this.status.attentions

View file

@ -43,7 +43,7 @@
v-if="!hideSubjectStatus && !(singleLine && status.summary_html)"
>
<MentionsLine
v-if="mentionsOldPlace"
v-if="!mentionsOwnLine"
:attentions="status.attentions"
class="mentions-line"
/>

View file

@ -54,8 +54,8 @@ export const defaultState = {
interfaceLanguage: browserLocale,
hideScopeNotice: false,
useStreamingApi: false,
mentionsOldPlace: false,
mentionsOldStyle: false,
mentionsOwnLine: false,
mentionsNewStyle: false,
sidebarRight: undefined, // instance default
scopeCopy: undefined, // instance default
subjectLineBehavior: undefined, // instance default