Skip to content

Commit

Permalink
enhance(frontend): プロフィール画面におけるモデレーションノートの表示を調整
Browse files Browse the repository at this point in the history
Resolve #10807
  • Loading branch information
syuilo committed May 9, 2023
1 parent 8061926 commit 1c0ec22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
-

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

### Server
Expand Down
7 changes: 6 additions & 1 deletion packages/frontend/src/pages/user/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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 });
Expand Down

0 comments on commit 1c0ec22

Please sign in to comment.