Skip to content

Commit

Permalink
fix(frontend): 投稿フォームでのユーザー変更がプレビューに反映されるように修正 (#12022)
Browse files Browse the repository at this point in the history
* fix(frontend): 投稿フォームでのユーザー変更がプレビューに反映されるように修正

* Update CHANGELOG.md
  • Loading branch information
zyoshoka authored Oct 22, 2023
1 parent ce09a35 commit 983b1e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- Feat: プラグイン・テーマを外部サイトから直接インストールできるようになりました
- 外部サイトでの実装が必要です。詳細は Misskey Hub をご覧ください
https://misskey-hub.net/docs/advanced/publish-on-your-website.html
- Fix: 投稿フォームでのユーザー変更がプレビューに反映されない問題を修正

### Server
- Fix: リストTLに自分のフォロワー限定投稿が含まれない問題を修正
Expand Down
9 changes: 5 additions & 4 deletions packages/frontend/src/components/MkNotePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ SPDX-License-Identifier: AGPL-3.0-only

<template>
<div :class="$style.root">
<MkAvatar :class="$style.avatar" :user="$i" link preview/>
<MkAvatar :class="$style.avatar" :user="user" link preview/>
<div :class="$style.main">
<div :class="$style.header">
<MkUserName :user="$i" :nowrap="true"/>
<MkUserName :user="user" :nowrap="true"/>
</div>
<div>
<div>
<Mfm :text="text.trim()" :author="$i" :i="$i"/>
<Mfm :text="text.trim()" :author="user" :i="user"/>
</div>
</div>
</div>
Expand All @@ -21,10 +21,11 @@ SPDX-License-Identifier: AGPL-3.0-only

<script lang="ts" setup>
import { } from 'vue';
import { $i } from '@/account.js';
import * as Misskey from 'misskey-js';

const props = defineProps<{
text: string;
user: Misskey.entities.User;
}>();
</script>

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/MkPostForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<input v-show="withHashtags" ref="hashtagsInputEl" v-model="hashtags" :class="$style.hashtags" :placeholder="i18n.ts.hashtags" list="hashtags">
<XPostFormAttaches v-model="files" @detach="detachFile" @changeSensitive="updateFileSensitive" @changeName="updateFileName" @replaceFile="replaceFile"/>
<MkPollEditor v-if="poll" v-model="poll" @destroyed="poll = null"/>
<MkNotePreview v-if="showPreview" :class="$style.preview" :text="text"/>
<MkNotePreview v-if="showPreview" :class="$style.preview" :text="text" :user="postAccount ?? $i"/>
<div v-if="showingOptions" style="padding: 8px 16px;">
</div>
<footer :class="$style.footer">
Expand Down

0 comments on commit 983b1e6

Please sign in to comment.