godmode implemented
This commit is contained in:
parent
19d8875196
commit
9fbc832de9
6 changed files with 34 additions and 9 deletions
|
|
@ -86,7 +86,7 @@ export default (store) => {
|
|||
},
|
||||
{
|
||||
name: 'user-profile-admin-view',
|
||||
path: '/admin/users/$:id',
|
||||
path: '/users/$:id/admin_view',
|
||||
component: defineAsyncComponent(
|
||||
() => import('src/components/user_profile/user_profile_admin_view.vue'),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -77,6 +77,13 @@ const ENTRIES = [
|
|||
{
|
||||
separator: true,
|
||||
},
|
||||
{
|
||||
check: 'action:statuses',
|
||||
label: 'user_card.admin_menu.show_statuses',
|
||||
},
|
||||
{
|
||||
separator: true,
|
||||
},
|
||||
{
|
||||
check: 'action:disable_mfa',
|
||||
label: 'user_card.admin_menu.disable_mfa',
|
||||
|
|
@ -217,6 +224,9 @@ const ModerationTools = {
|
|||
case 'disable_mfa': {
|
||||
return () => this.disableMFA()
|
||||
}
|
||||
case 'statuses': {
|
||||
return () => this.$router.push(`/users/\$${this.users[0].id}/admin_view`)
|
||||
}
|
||||
case 'require_password_change': {
|
||||
return () => this.requirePasswordChange()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,18 +26,22 @@
|
|||
}
|
||||
|
||||
&.-admin-view {
|
||||
.godmode {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
padding: 0;
|
||||
border-bottom: 1px solid var(--border);
|
||||
|
||||
.admin-actions {
|
||||
background: var(--background);
|
||||
}
|
||||
|
||||
.Status{
|
||||
width: 100%
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
background: var(--background);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { mapState } from 'pinia'
|
|||
|
||||
import List from 'src/components/list/list.vue'
|
||||
import Status from 'src/components/status/status.vue'
|
||||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||
import UserCard from 'src/components/user_card/user_card.vue'
|
||||
|
||||
import { useAdminSettingsStore } from 'src/stores/admin_settings.js'
|
||||
|
|
@ -22,6 +23,7 @@ const UserProfileAdminView = {
|
|||
},
|
||||
created() {
|
||||
this.userId = this.$route.params.id
|
||||
this.$store.dispatch('fetchUserIfMissing', this.userId)
|
||||
useInterfaceStore().setForeignProfileBackground(this.user?.background_image)
|
||||
},
|
||||
updated() {
|
||||
|
|
@ -55,7 +57,13 @@ const UserProfileAdminView = {
|
|||
UserCard,
|
||||
List,
|
||||
Status,
|
||||
Checkbox,
|
||||
},
|
||||
watch: {
|
||||
godmode() {
|
||||
this.$refs.list.reset()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default UserProfileAdminView
|
||||
|
|
|
|||
|
|
@ -7,20 +7,21 @@
|
|||
<UserCard
|
||||
:user-id="userId"
|
||||
:compact="true"
|
||||
avatar-action="zoom"
|
||||
hide-bio
|
||||
hide-buttons
|
||||
/>
|
||||
<Checkbox class="godmode" v-model="godmode">
|
||||
{{ $t('admin_dash.users.godmode') }}
|
||||
</Checkbox>
|
||||
</div>
|
||||
<List
|
||||
ref="list"
|
||||
:fetch-function="fetchStatuses"
|
||||
@select="onSelect"
|
||||
scrollable
|
||||
>
|
||||
<template #item="{item}">
|
||||
<Status
|
||||
:statusoid="item"
|
||||
/>
|
||||
<Status :statusoid="item" />
|
||||
</template>
|
||||
</List>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1298,6 +1298,7 @@
|
|||
"users": {
|
||||
"title": "Users",
|
||||
"local_id": "Local ID",
|
||||
"godmode": "Show direct messages",
|
||||
"labels": {
|
||||
"query": "Search",
|
||||
"name": "Name",
|
||||
|
|
@ -1798,6 +1799,7 @@
|
|||
"remove_suggested_account": "Remove from suggested",
|
||||
"approve_account": "Approve",
|
||||
"confirm_account": "Confirm",
|
||||
"show_statuses": "Show all posts",
|
||||
|
||||
"disable_mfa": "Disable MFA",
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue