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