Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
@close="dialog.close()"
|
||||
@closed="emit('closed')"
|
||||
>
|
||||
<template #header>{{ i18n.ts.reactions }}</template>
|
||||
<template #header>{{ i18n.ts.reactionsList }}</template>
|
||||
|
||||
<MkSpacer :margin-min="20" :margin-max="28">
|
||||
<div v-if="note" class="_gaps">
|
||||
@@ -21,7 +21,7 @@
|
||||
<span style="margin-left: 4px;">{{ note.reactions[reaction] }}</span>
|
||||
</button>
|
||||
</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"/>
|
||||
</MkA>
|
||||
</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>
|
@@ -35,6 +35,11 @@ export const FILE_TYPE_BROWSERSAFE = [
|
||||
'audio/webm',
|
||||
|
||||
'audio/aac',
|
||||
|
||||
// see https://github.com/misskey-dev/misskey/pull/10686
|
||||
'audio/flac',
|
||||
'audio/wav',
|
||||
// backward compatibility
|
||||
'audio/x-flac',
|
||||
'audio/vnd.wave',
|
||||
];
|
||||
|
@@ -96,7 +96,9 @@ async function testEmail() {
|
||||
const { canceled, result: destination } = await os.inputText({
|
||||
title: i18n.ts.destination,
|
||||
type: 'email',
|
||||
placeholder: instance.maintainerEmail,
|
||||
default: instance.maintainerEmail ?? '',
|
||||
placeholder: 'test@example.com',
|
||||
minLength: 1,
|
||||
});
|
||||
if (canceled) return;
|
||||
os.apiWithDialog('admin/send-email', {
|
||||
|
@@ -305,6 +305,11 @@ const PRESET_TIMELINE = `/// @ 0.13.1
|
||||
// それぞれのノートごとにUI要素作成
|
||||
let noteEls = []
|
||||
each (let note, notes) {
|
||||
// 表示名を設定していないアカウントはidを表示
|
||||
let userName = if Core:type(note.user.name) == "str" note.user.name else note.user.username
|
||||
// リノートもしくはメディア・投票のみで本文が無いノートに代替表示文を設定
|
||||
let noteText = if Core:type(note.text) == "str" note.text else "(リノートもしくはメディア・投票のみのノート)"
|
||||
|
||||
let el = Ui:C:container({
|
||||
bgColor: "#444"
|
||||
fgColor: "#fff"
|
||||
@@ -312,11 +317,11 @@ const PRESET_TIMELINE = `/// @ 0.13.1
|
||||
rounded: true
|
||||
children: [
|
||||
Ui:C:mfm({
|
||||
text: note.user.name
|
||||
text: userName
|
||||
bold: true
|
||||
})
|
||||
Ui:C:mfm({
|
||||
text: note.text
|
||||
text: noteText
|
||||
})
|
||||
]
|
||||
})
|
||||
|
@@ -211,6 +211,12 @@ export function getNoteMenu(props: {
|
||||
}, {}, 'closed');
|
||||
}
|
||||
|
||||
function showRenotes(): void {
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkRenotedUsersDialog.vue')), {
|
||||
noteId: appearNote.id,
|
||||
}, {}, 'closed');
|
||||
}
|
||||
|
||||
async function translate(): Promise<void> {
|
||||
if (props.translation.value != null) return;
|
||||
props.translating.value = true;
|
||||
@@ -241,8 +247,12 @@ export function getNoteMenu(props: {
|
||||
text: i18n.ts.details,
|
||||
action: openDetail,
|
||||
}, {
|
||||
icon: 'ti ti-users',
|
||||
text: i18n.ts.reactions,
|
||||
icon: 'ti ti-repeat',
|
||||
text: i18n.ts.renotesList,
|
||||
action: showRenotes,
|
||||
}, {
|
||||
icon: 'ti ti-icons',
|
||||
text: i18n.ts.reactionsList,
|
||||
action: showReactions,
|
||||
}, {
|
||||
icon: 'ti ti-copy',
|
||||
|
Reference in New Issue
Block a user