「既にフォローしている場合、通知欄にフォローボタンを表示しない」をオプショナルに
This commit is contained in:
parent
c702ac56a5
commit
80976114e3
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<button
|
||||
v-if="!disableIfFollowing || !isFollowing"
|
||||
class="_button"
|
||||
:class="[$style.root, { [$style.wait]: wait, [$style.active]: isFollowing || hasPendingFollowRequestFromYou, [$style.full]: full, [$style.large]: large }]"
|
||||
:disabled="wait"
|
||||
|
@ -43,9 +44,15 @@ const props = withDefaults(defineProps<{
|
|||
user: Misskey.entities.UserDetailed,
|
||||
full?: boolean,
|
||||
large?: boolean,
|
||||
|
||||
// CherryPick
|
||||
disableIfFollowing?: boolean,
|
||||
}>(), {
|
||||
full: false,
|
||||
large: false,
|
||||
|
||||
// CherryPick
|
||||
disableIfFollowing: false,
|
||||
});
|
||||
|
||||
let isFollowing = $ref(props.user.isFollowing);
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
</MkA>
|
||||
<template v-else-if="notification.type === 'follow'">
|
||||
<span :class="$style.text" style="opacity: 0.6;">{{ i18n.ts.youGotNewFollower }}</span>
|
||||
<div v-if="full"><MkFollowButton :user="notification.user" :full="true"/></div>
|
||||
<div v-if="full"><MkFollowButton :user="notification.user" :full="true" :disableIfFollowing="defaultStore.reactiveState.showFollowingMessageInsteadOfButtonEnabled.value"/></div>
|
||||
</template>
|
||||
<span v-else-if="notification.type === 'followRequestAccepted'" :class="$style.text" style="opacity: 0.6;">{{ i18n.ts.followRequestAccepted }}</span>
|
||||
<template v-else-if="notification.type === 'receiveFollowRequest'">
|
||||
|
@ -121,6 +121,7 @@ import { i18n } from '@/i18n';
|
|||
import * as os from '@/os';
|
||||
import { useTooltip } from '@/scripts/use-tooltip';
|
||||
import { $i } from '@/account';
|
||||
import { defaultStore } from '@/store';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
notification: misskey.entities.Notification;
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
</MkSwitch>
|
||||
<MkSwitch v-model="rememberPostFormToggleStateEnabled">{{ i18n.ts._cherrypick.rememberPostFormToggleState }}</MkSwitch>
|
||||
<MkSwitch v-model="reactableRemoteReactionEnabled">{{ i18n.ts._cherrypick.reactableRemoteReaction }}</MkSwitch>
|
||||
<MkSwitch v-model="showFollowingMessageInsteadOfButtonEnabled">
|
||||
既にフォローしている場合、通知欄にフォローボタンを表示しない
|
||||
</MkSwitch>
|
||||
</div>
|
||||
</FormSection>
|
||||
<!--
|
||||
|
@ -74,6 +77,7 @@ const reactableRemoteReactionEnabled = computed(defaultStore.makeGetterSetter('r
|
|||
const rememberPostFormToggleStateEnabled = computed(defaultStore.makeGetterSetter('rememberPostFormToggleStateEnabled'));
|
||||
const usePostFormWindow = computed(defaultStore.makeGetterSetter('usePostFormWindow'));
|
||||
const ebiNoteViewEnabled = computed(defaultStore.makeGetterSetter('ebiNoteViewEnabledLab'));
|
||||
const showFollowingMessageInsteadOfButtonEnabled = computed(defaultStore.makeGetterSetter('showFollowingMessageInsteadOfButtonEnabled'));
|
||||
|
||||
const noteMock: Note = {
|
||||
id: 'abc',
|
||||
|
@ -92,7 +96,6 @@ const noteMock: Note = {
|
|||
repliesCount: 10,
|
||||
emojis: [],
|
||||
localOnly: true,
|
||||
|
||||
};
|
||||
|
||||
watch([
|
||||
|
|
|
@ -398,6 +398,10 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
where: 'account',
|
||||
default: true,
|
||||
},
|
||||
showFollowingMessageInsteadOfButtonEnabled: {
|
||||
where: 'account',
|
||||
default: true,
|
||||
},
|
||||
// #endregion
|
||||
}));
|
||||
|
||||
|
|
Loading…
Reference in a new issue