Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(frontend): 投稿フォームでのユーザー変更がプレビューに反映されるように修正 #12022

Merged
merged 4 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- Feat: プラグイン・テーマを外部サイトから直接インストールできるようになりました
- 外部サイトでの実装が必要です。詳細は Misskey Hub をご覧ください
https://misskey-hub.net/docs/advanced/publish-on-your-website.html
- Fix: 投稿フォームでのユーザー変更がプレビューに反映されない問題を修正

### Server
-
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
Loading