mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 21:05:15 +00:00
feat(client): Renoteした人の一覧を表示するダイアログを追加 (#10647)
* (add) renote user dialog * (change) noteMenu order Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * (change) menu text * Update CHANGELOG.md * (change) dialog title text * (fix) grammar mistakes in CHANGELOG.md * (change) i18n keys --------- Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
This commit is contained in:
parent
5124db57d2
commit
8fbca63cec
5 changed files with 82 additions and 4 deletions
|
@ -36,6 +36,7 @@
|
||||||
- 1枚だけのメディアリストの画像のアスペクト比を画像に応じて縦長にするように
|
- 1枚だけのメディアリストの画像のアスペクト比を画像に応じて縦長にするように
|
||||||
- Fix: リアクションをホバーした時のユーザーリストで猫耳が切れてしまっていた問題を修正
|
- Fix: リアクションをホバーした時のユーザーリストで猫耳が切れてしまっていた問題を修正
|
||||||
- 新しい実績を追加
|
- 新しい実績を追加
|
||||||
|
- Renoteしたユーザーの一覧を見れるように
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
- 環境変数MISSKEY_CONFIG_YMLで設定ファイルをdefault.ymlから変更可能に
|
- 環境変数MISSKEY_CONFIG_YMLで設定ファイルをdefault.ymlから変更可能に
|
||||||
|
|
|
@ -1007,6 +1007,8 @@ accountMoved: "このユーザーは新しいアカウントに引っ越しま
|
||||||
forceShowAds: "常に広告を表示する"
|
forceShowAds: "常に広告を表示する"
|
||||||
addMemo: "メモを追加"
|
addMemo: "メモを追加"
|
||||||
editMemo: "メモを編集"
|
editMemo: "メモを編集"
|
||||||
|
reactionsList: "リアクション一覧"
|
||||||
|
renotesList: "Renote一覧"
|
||||||
notificationDisplay: "通知の表示"
|
notificationDisplay: "通知の表示"
|
||||||
leftTop: "左上"
|
leftTop: "左上"
|
||||||
rightTop: "右上"
|
rightTop: "右上"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
@close="dialog.close()"
|
@close="dialog.close()"
|
||||||
@closed="emit('closed')"
|
@closed="emit('closed')"
|
||||||
>
|
>
|
||||||
<template #header>{{ i18n.ts.reactions }}</template>
|
<template #header>{{ i18n.ts.reactionsList }}</template>
|
||||||
|
|
||||||
<MkSpacer :margin-min="20" :margin-max="28">
|
<MkSpacer :margin-min="20" :margin-max="28">
|
||||||
<div v-if="note" class="_gaps">
|
<div v-if="note" class="_gaps">
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
<span style="margin-left: 4px;">{{ note.reactions[reaction] }}</span>
|
<span style="margin-left: 4px;">{{ note.reactions[reaction] }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<MkA v-for="user in users" :key="user.id" :to="userPage(user)">
|
<MkA v-for="user in users" :key="user.id" :to="userPage(user)" @click="dialog.close()">
|
||||||
<MkUserCardMini :user="user" :with-chart="false"/>
|
<MkUserCardMini :user="user" :with-chart="false"/>
|
||||||
</MkA>
|
</MkA>
|
||||||
</template>
|
</template>
|
||||||
|
|
65
packages/frontend/src/components/MkRenotedUsersDialog.vue
Normal file
65
packages/frontend/src/components/MkRenotedUsersDialog.vue
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
<template>
|
||||||
|
<MkModalWindow
|
||||||
|
ref="dialog"
|
||||||
|
:width="400"
|
||||||
|
:height="450"
|
||||||
|
@close="dialog.close()"
|
||||||
|
@closed="emit('closed')"
|
||||||
|
>
|
||||||
|
<template #header>{{ i18n.ts.renotesList }}</template>
|
||||||
|
|
||||||
|
<MkSpacer :margin-min="20" :margin-max="28">
|
||||||
|
<div v-if="renotes" class="_gaps">
|
||||||
|
<div v-if="renotes.length === 0" class="_fullinfo">
|
||||||
|
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
|
||||||
|
<div>{{ i18n.ts.nothing }}</div>
|
||||||
|
</div>
|
||||||
|
<template v-else>
|
||||||
|
<MkA v-for="user in users" :key="user.id" :to="userPage(user)" @click="dialog.close()">
|
||||||
|
<MkUserCardMini :user="user" :with-chart="false"/>
|
||||||
|
</MkA>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<MkLoading/>
|
||||||
|
</div>
|
||||||
|
</MkSpacer>
|
||||||
|
</MkModalWindow>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
import * as misskey from 'misskey-js';
|
||||||
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
|
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||||
|
import { userPage } from '@/filters/user';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
import * as os from '@/os';
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(ev: 'closed'): void,
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
noteId: misskey.entities.Note['id'];
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const dialog = $shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||||
|
|
||||||
|
let note = $ref<misskey.entities.Note>();
|
||||||
|
let renotes = $ref();
|
||||||
|
let users = $ref();
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const res = await os.api('notes/renotes', {
|
||||||
|
noteId: props.noteId,
|
||||||
|
limit: 30,
|
||||||
|
});
|
||||||
|
|
||||||
|
renotes = res;
|
||||||
|
users = res.map(x => x.user);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" module>
|
||||||
|
</style>
|
|
@ -211,6 +211,12 @@ export function getNoteMenu(props: {
|
||||||
}, {}, 'closed');
|
}, {}, 'closed');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showRenotes(): void {
|
||||||
|
os.popup(defineAsyncComponent(() => import('@/components/MkRenotedUsersDialog.vue')), {
|
||||||
|
noteId: appearNote.id,
|
||||||
|
}, {}, 'closed');
|
||||||
|
}
|
||||||
|
|
||||||
async function translate(): Promise<void> {
|
async function translate(): Promise<void> {
|
||||||
if (props.translation.value != null) return;
|
if (props.translation.value != null) return;
|
||||||
props.translating.value = true;
|
props.translating.value = true;
|
||||||
|
@ -241,8 +247,12 @@ export function getNoteMenu(props: {
|
||||||
text: i18n.ts.details,
|
text: i18n.ts.details,
|
||||||
action: openDetail,
|
action: openDetail,
|
||||||
}, {
|
}, {
|
||||||
icon: 'ti ti-users',
|
icon: 'ti ti-repeat',
|
||||||
text: i18n.ts.reactions,
|
text: i18n.ts.renotesList,
|
||||||
|
action: showRenotes,
|
||||||
|
}, {
|
||||||
|
icon: 'ti ti-icons',
|
||||||
|
text: i18n.ts.reactionsList,
|
||||||
action: showReactions,
|
action: showReactions,
|
||||||
}, {
|
}, {
|
||||||
icon: 'ti ti-copy',
|
icon: 'ti ti-copy',
|
||||||
|
|
Loading…
Reference in a new issue