Merge upstream

This commit is contained in:
무라쿠모 2024-09-18 00:11:23 +09:00
commit 4b6cbdab39
No known key found for this signature in database
GPG key ID: 139D6573F92DA9F7
73 changed files with 1199 additions and 356 deletions

View file

@ -13,6 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div class="profile _gaps">
<MkAccountMoved v-if="user.movedTo" :movedTo="user.movedTo"/>
<MkAccountMoved v-if="movedFromLog" :movedFrom="movedFromLog[0]?.movedFromId"/>
<MkRemoteCaution v-if="user.host != null" :href="user.url ?? user.uri!" class="warn"/>
<div :key="user.id" class="main _panel">
@ -281,6 +282,7 @@ const memoDraft = ref(props.user.memo);
const isEditingMemo = ref(false);
const moderationNote = ref(props.user.moderationNote);
const editModerationNote = ref(false);
const movedFromLog = ref<null | {movedFromId:string;}[]>(null);
const hideModerationNote = !iAmModerator || (defaultStore.state.privateMode && defaultStore.state.hideModerationLog);
const hideRoleList = defaultStore.state.privateMode && defaultStore.state.hideRoleList;
@ -307,6 +309,15 @@ function menu(ev: MouseEvent) {
os.popupMenu(menu, ev.currentTarget ?? ev.target).finally(cleanup);
}
async function fetchMovedFromLog() {
if (!props.user.id) {
movedFromLog.value = null;
return;
}
movedFromLog.value = await misskeyApi('admin/show-user-account-move-logs', { movedToId: props.user.id });
}
function parallaxLoop() {
parallaxAnimationId.value = window.requestAnimationFrame(parallaxLoop);
parallax();
@ -383,6 +394,9 @@ function buildSkebStatus(): string {
watch([props.user], () => {
memoDraft.value = props.user.memo;
fetchSkebStatus();
if ($i?.isModerator) {
fetchMovedFromLog();
}
});
onMounted(() => {
@ -401,6 +415,9 @@ onMounted(() => {
}
}
fetchSkebStatus();
if ($i?.isModerator) {
fetchMovedFromLog();
}
nextTick(() => {
adjustMemoTextarea();
});