forked from AkkomaGang/akkoma-fe
change defaults
This commit is contained in:
parent
0ae3985a52
commit
7ae85c8318
10 changed files with 74 additions and 59 deletions
|
@ -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) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<span
|
||||
class="MentionLink"
|
||||
:class="{ '-oldPlace': oldPlace }"
|
||||
>
|
||||
<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>
|
||||
|
|
|
@ -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 () {
|
||||
|
|
|
@ -1,42 +1,45 @@
|
|||
<template>
|
||||
<span class="MentionsLine">
|
||||
<MentionLink
|
||||
v-for="mention in mentions"
|
||||
class="mention-link"
|
||||
:key="mention.statusnet_profile_url"
|
||||
:content="mention.statusnet_profile_url"
|
||||
:url="mention.statusnet_profile_url"
|
||||
:first-mention="false"
|
||||
/><span v-if="manyMentions" class="extraMentions">
|
||||
<span
|
||||
v-if="expanded"
|
||||
class="fullExtraMentions"
|
||||
<span class="MentionsLine">
|
||||
<MentionLink
|
||||
v-for="mention in mentions"
|
||||
: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"
|
||||
>
|
||||
<MentionLink
|
||||
v-for="mention in extraMentions"
|
||||
class="mention-link"
|
||||
:key="mention.statusnet_profile_url"
|
||||
:content="mention.statusnet_profile_url"
|
||||
:url="mention.statusnet_profile_url"
|
||||
:first-mention="false"
|
||||
/>
|
||||
</span><button
|
||||
v-if="!expanded"
|
||||
class="showMoreLess"
|
||||
:class="buttonClasses"
|
||||
@click="toggleShowMore"
|
||||
>
|
||||
{{ $t('status.plus_more', { number: extraMentions.length })}}
|
||||
</button><button
|
||||
v-if="expanded"
|
||||
class="showMoreLess"
|
||||
:class="buttonClasses"
|
||||
@click="toggleShowMore"
|
||||
>
|
||||
{{ $t('general.show_less')}}
|
||||
</button>
|
||||
<span
|
||||
v-if="expanded"
|
||||
class="fullExtraMentions"
|
||||
>
|
||||
<MentionLink
|
||||
v-for="mention in extraMentions"
|
||||
:key="mention.statusnet_profile_url"
|
||||
class="mention-link"
|
||||
:content="mention.statusnet_profile_url"
|
||||
:url="mention.statusnet_profile_url"
|
||||
:first-mention="false"
|
||||
/>
|
||||
</span><button
|
||||
v-if="!expanded"
|
||||
class="showMoreLess"
|
||||
:class="buttonClasses"
|
||||
@click="toggleShowMore"
|
||||
>
|
||||
{{ $t('status.plus_more', { number: extraMentions.length }) }}
|
||||
</button><button
|
||||
v-if="expanded"
|
||||
class="showMoreLess"
|
||||
:class="buttonClasses"
|
||||
@click="toggleShowMore"
|
||||
>
|
||||
{{ $t('general.show_less') }}
|
||||
</button>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
<script src="./mentions_line.js" ></script>
|
||||
<style lang="scss" src="./mentions_line.scss" />
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -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"
|
||||
>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
v-if="!hideSubjectStatus && !(singleLine && status.summary_html)"
|
||||
>
|
||||
<MentionsLine
|
||||
v-if="mentionsOldPlace"
|
||||
v-if="!mentionsOwnLine"
|
||||
:attentions="status.attentions"
|
||||
class="mentions-line"
|
||||
/>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue