feat(profile): 相互リンク機能の追加 (MisskeyIO#675)
This commit is contained in:
parent
b059162324
commit
b6a5a36eaa
37 changed files with 1130 additions and 20 deletions
|
@ -66,6 +66,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkButton v-if="user.host == null" @click="resetPassword"><i class="ti ti-key"></i> {{ i18n.ts.resetPassword }}</MkButton>
|
||||
<MkButton inline danger @click="unsetUserAvatar"><i class="ti ti-user-circle"></i> {{ i18n.ts.unsetUserAvatar }}</MkButton>
|
||||
<MkButton inline danger @click="unsetUserBanner"><i class="ti ti-photo"></i> {{ i18n.ts.unsetUserBanner }}</MkButton>
|
||||
<MkButton inline danger @click="unsetUserMutualBanner"><i class="ti ti-photo"></i> {{ i18n.ts.unsetUserMutualBanner }}</MkButton>
|
||||
</div>
|
||||
</MkFolder>
|
||||
|
||||
|
@ -292,7 +293,7 @@ function createFetcher() {
|
|||
|
||||
watch(moderationNote, async () => {
|
||||
await misskeyApi('admin/update-user-note', {
|
||||
userId: user.value.id, text: moderationNote.value
|
||||
userId: user.value.id, text: moderationNote.value,
|
||||
}).then(refreshUser);
|
||||
});
|
||||
});
|
||||
|
@ -304,7 +305,7 @@ function refreshUser() {
|
|||
|
||||
async function updateRemoteUser() {
|
||||
await os.apiWithDialog('federation/update-remote-user', {
|
||||
userId: user.value.id
|
||||
userId: user.value.id,
|
||||
}).then(refreshUser);
|
||||
}
|
||||
|
||||
|
@ -335,7 +336,7 @@ async function toggleSuspend(v) {
|
|||
suspended.value = !v;
|
||||
} else {
|
||||
await misskeyApi(v ? 'admin/suspend-user' : 'admin/unsuspend-user', {
|
||||
userId: user.value.id
|
||||
userId: user.value.id,
|
||||
}).then(refreshUser);
|
||||
}
|
||||
}
|
||||
|
@ -348,7 +349,7 @@ async function unsetUserAvatar() {
|
|||
if (confirm.canceled) return;
|
||||
|
||||
await os.apiWithDialog('admin/unset-user-avatar', {
|
||||
userId: user.value.id
|
||||
userId: user.value.id,
|
||||
}).then(refreshUser);
|
||||
}
|
||||
|
||||
|
@ -360,7 +361,19 @@ async function unsetUserBanner() {
|
|||
if (confirm.canceled) return;
|
||||
|
||||
await os.apiWithDialog('admin/unset-user-banner', {
|
||||
userId: user.value.id
|
||||
userId: user.value.id,
|
||||
}).then(refreshUser);
|
||||
}
|
||||
|
||||
async function unsetUserMutualBanner() {
|
||||
const confirm = await os.confirm({
|
||||
type: 'warning',
|
||||
text: i18n.ts.unsetUserMutualBannerConfirm,
|
||||
});
|
||||
if (confirm.canceled) return;
|
||||
|
||||
await os.apiWithDialog('admin/unset-user-mutual-banner', {
|
||||
userId: user.value.id,
|
||||
}).then(refreshUser);
|
||||
}
|
||||
|
||||
|
@ -378,7 +391,7 @@ async function deleteAllFiles() {
|
|||
|
||||
if (typed.result === user.value?.username) {
|
||||
await os.apiWithDialog('admin/drive/delete-all-files-of-a-user', {
|
||||
userId: user.value.id
|
||||
userId: user.value.id,
|
||||
}).then(refreshUser);
|
||||
} else {
|
||||
os.alert({
|
||||
|
@ -447,7 +460,7 @@ async function assignRole() {
|
|||
: null;
|
||||
|
||||
await os.apiWithDialog('admin/roles/assign', {
|
||||
roleId, userId: user.value.id, expiresAt
|
||||
roleId, userId: user.value.id, expiresAt,
|
||||
}).then(refreshUser);
|
||||
}
|
||||
|
||||
|
@ -458,7 +471,7 @@ async function unassignRole(role, ev) {
|
|||
danger: true,
|
||||
action: async () => {
|
||||
await os.apiWithDialog('admin/roles/unassign', {
|
||||
roleId: role.id, userId: user.value.id
|
||||
roleId: role.id, userId: user.value.id,
|
||||
}).then(refreshUser);
|
||||
},
|
||||
}], ev.currentTarget ?? ev.target);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue