From 616cccf2511337fc181d0b6aa693b7091c7ba57b Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sun, 2 Mar 2025 20:06:20 +0900 Subject: enhance(backend): refine system account (#15530) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * wip * wip * wip * Update SystemAccountService.ts * Update 1740121393164-system-accounts.js * Update DeleteAccountService.ts * wip * wip * wip * wip * Update 1740121393164-system-accounts.js * Update RepositoryModule.ts * wip * wip * wip * Update ApRendererService.ts * wip * wip * Update SystemAccountService.ts * fix tests * fix tests * fix tests * fix tests * fix tests * fix tests * add print logs * ログが長すぎて出てないかもしれない * fix migration * refactor * fix fed-tests * Update RelayService.ts * merge * Update user.test.ts * chore: emit log * fix: tweak sleep duration * fix: exit 1 * fix: wait for misskey processes to become healthy * fix: longer sleep for user deletion * fix: make sleep longer again * デッドロック解消の試み https://github.com/misskey-dev/misskey/issues/15005 * Revert "デッドロック解消の試み" This reverts commit 266141f66fb584371bbb56ef7eba04e14bcff94d. * wip * Update SystemAccountService.ts --------- Co-authored-by: おさむのひと <46447427+samunohito@users.noreply.github.com> Co-authored-by: zyoshoka <107108195+zyoshoka@users.noreply.github.com> --- packages/frontend/src/pages/admin-user.vue | 44 ++++++++++++++-------- .../frontend/src/pages/admin/modlog.ModLog.vue | 5 +++ packages/frontend/src/pages/admin/settings.vue | 32 ++++++++-------- packages/frontend/src/pages/user/home.vue | 3 +- 4 files changed, 51 insertions(+), 33 deletions(-) (limited to 'packages/frontend/src') diff --git a/packages/frontend/src/pages/admin-user.vue b/packages/frontend/src/pages/admin-user.vue index fa08c213e2..578945bf07 100644 --- a/packages/frontend/src/pages/admin-user.vue +++ b/packages/frontend/src/pages/admin-user.vue @@ -22,7 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only - {{ i18n.ts.isSystemAccount }} + {{ i18n.ts.isSystemAccount }} {{ i18n.ts.instanceInfo }} @@ -37,21 +37,23 @@ SPDX-License-Identifier: AGPL-3.0-only --> - - - - - - - - - - - - + - + @@ -92,7 +94,7 @@ SPDX-License-Identifier: AGPL-3.0-only --> - +
{{ i18n.ts.suspend }} @@ -252,6 +254,7 @@ const ap = ref(null); const moderator = ref(false); const silenced = ref(false); const suspended = ref(false); +const isSystem = ref(false); const moderationNote = ref(''); const filesPagination = { endpoint: 'admin/drive/files' as const, @@ -288,6 +291,7 @@ function createFetcher() { silenced.value = info.value.isSilenced; suspended.value = info.value.isSuspended; moderationNote.value = info.value.moderationNote; + isSystem.value = user.value.host == null && user.value.username.includes('.'); watch(moderationNote, async () => { await misskeyApi('admin/update-user-note', { userId: user.value.id, text: moderationNote.value }); @@ -507,7 +511,15 @@ watch(user, () => { const headerActions = computed(() => []); -const headerTabs = computed(() => [{ +const headerTabs = computed(() => isSystem.value ? [{ + key: 'overview', + title: i18n.ts.overview, + icon: 'ti ti-info-circle', +}, { + key: 'raw', + title: 'Raw', + icon: 'ti ti-code', +}] : [{ key: 'overview', title: i18n.ts.overview, icon: 'ti ti-info-circle', diff --git a/packages/frontend/src/pages/admin/modlog.ModLog.vue b/packages/frontend/src/pages/admin/modlog.ModLog.vue index 1e144394fb..9bbe5f2e42 100644 --- a/packages/frontend/src/pages/admin/modlog.ModLog.vue +++ b/packages/frontend/src/pages/admin/modlog.ModLog.vue @@ -170,6 +170,11 @@ SPDX-License-Identifier: AGPL-3.0-only
+
raw diff --git a/packages/frontend/src/pages/admin/settings.vue b/packages/frontend/src/pages/admin/settings.vue index ea7603a45a..aed593fc54 100644 --- a/packages/frontend/src/pages/admin/settings.vue +++ b/packages/frontend/src/pages/admin/settings.vue @@ -238,15 +238,17 @@ SPDX-License-Identifier: AGPL-3.0-only +
{{ i18n.ts.proxyAccountDescription }} - - - - - {{ i18n.ts.selectAccount }} + + + +
@@ -256,7 +258,7 @@ SPDX-License-Identifier: AGPL-3.0-only