1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-10-30 23:01:48 +09:00

enhance(frontend): プロフィール画面におけるモデレーションノートの表示を調整

Resolve #10807
This commit is contained in:
syuilo 2023-05-09 14:28:27 +09:00
parent 80619260c1
commit 1c0ec222b4
2 changed files with 7 additions and 1 deletions

View File

@ -18,6 +18,7 @@
-
### Client
- プロフィール画面におけるモデレーションノートの表示を調整
- Fix: ユーザー選択ダイアログが表示されない問題を修正
### Server

View File

@ -49,9 +49,12 @@
</span>
</div>
<div v-if="iAmModerator" class="moderationNote">
<MkTextarea v-model="moderationNote" manual-save>
<MkTextarea v-if="editModerationNote || (moderationNote != null && moderationNote !== '')" v-model="moderationNote" manual-save>
<template #label>Moderation note</template>
</MkTextarea>
<div v-else>
<MkButton small @click="editModerationNote = true">Add moderation note</MkButton>
</div>
</div>
<div v-if="isEditingMemo || memoDraft" class="memo" :class="{'no-memo': !memoDraft}">
<div class="heading" v-text="i18n.ts.memo"/>
@ -142,6 +145,7 @@ import MkRemoteCaution from '@/components/MkRemoteCaution.vue';
import MkTextarea from '@/components/MkTextarea.vue';
import MkOmit from '@/components/MkOmit.vue';
import MkInfo from '@/components/MkInfo.vue';
import MkButton from '@/components/MkButton.vue';
import { getScrollPosition } from '@/scripts/scroll';
import { getUserMenu } from '@/scripts/get-user-menu';
import number from '@/filters/number';
@ -176,6 +180,7 @@ let memoTextareaEl = $ref<null | HTMLElement>(null);
let memoDraft = $ref(props.user.memo);
let isEditingMemo = $ref(false);
let moderationNote = $ref(props.user.moderationNote);
let editModerationNote = $ref(false);
watch($$(moderationNote), async () => {
await os.api('admin/update-user-note', { userId: props.user.id, text: moderationNote });