tested everything so far, fixed identation, fixed some bugs and added i18n entries
This commit is contained in:
parent
fee857e6b2
commit
42236b0c76
12 changed files with 506 additions and 238 deletions
|
|
@ -17,14 +17,18 @@ const PageList = {
|
|||
fetchPage: {
|
||||
type: Function,
|
||||
default: async () => []
|
||||
},
|
||||
singlePage: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
pageIndex: 1,
|
||||
items: [],
|
||||
selected: [],
|
||||
canLoadMore: true
|
||||
canLoadMore: true,
|
||||
gliter: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -35,12 +39,21 @@ const PageList = {
|
|||
this.loadMore() // load one page
|
||||
},
|
||||
loadMore () {
|
||||
this.gliter++
|
||||
const iter = this.gliter
|
||||
this.fetchPage(this.$store, {
|
||||
page: this.pageIndex++,
|
||||
pageSize: this.pageSize
|
||||
}).then((items) => this.items = [...this.items, ...items])
|
||||
// fetch page, add to items
|
||||
//this.$forceUpdate()
|
||||
}).then((items) => {
|
||||
// ignore if another request was already dispatched
|
||||
if (iter == this.gliter) {
|
||||
console.log('items', items)
|
||||
this.items = [...this.items, ...items]
|
||||
}
|
||||
})
|
||||
},
|
||||
selected () {
|
||||
return this.$refs.list.selected
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
|
|
|||
|
|
@ -1,26 +1,35 @@
|
|||
<template>
|
||||
<div class="page-list">
|
||||
<SelectableList
|
||||
:box-only="true"
|
||||
:get-key="i => i"
|
||||
:items="items"
|
||||
ref="list"
|
||||
:box-only="true"
|
||||
:get-key="i => i"
|
||||
:items="items"
|
||||
>
|
||||
<template v-slot:header="slotProps">
|
||||
<slot name="header" v-bind="slotProps"/>
|
||||
</template>
|
||||
<template v-slot:item="slotProps">
|
||||
<slot name="item" v-bind="slotProps"/>
|
||||
<template #header="slotProps">
|
||||
<slot
|
||||
name="header"
|
||||
v-bind="slotProps"
|
||||
/>
|
||||
</template>
|
||||
<template #item="slotProps">
|
||||
<slot
|
||||
name="item"
|
||||
v-bind="slotProps"
|
||||
/>
|
||||
</template>
|
||||
</SelectableList>
|
||||
<button
|
||||
v-if="canLoadMore"
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="loadMore"
|
||||
>
|
||||
{{ $t('page_list.load_more') }}
|
||||
</button>
|
||||
<p> prev first next </p>
|
||||
<div v-if="!singlePage">
|
||||
<button
|
||||
v-if="canLoadMore"
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="loadMore"
|
||||
>
|
||||
{{ $t('page_list.load_more') }}
|
||||
</button>
|
||||
<p> prev first next </p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import BasicUserCard from '../../basic_user_card/basic_user_card.vue'
|
||||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||
import PageList from 'src/components/page_list/page_list.vue'
|
||||
import AdminStatusCard from 'src/components/settings_modal/admin_tabs/admin_status_card.vue'
|
||||
|
||||
const AdminCard = {
|
||||
props: ['userDetails'],
|
||||
|
|
@ -8,6 +10,7 @@ const AdminCard = {
|
|||
progress: false,
|
||||
top_level_expanded: false,
|
||||
json_expanded: false,
|
||||
timeline_expanded: false,
|
||||
just_approved: false,
|
||||
just_confirmed: false,
|
||||
just_deleted: false,
|
||||
|
|
@ -55,16 +58,17 @@ const AdminCard = {
|
|||
},
|
||||
is_confirmed () {
|
||||
const u = this.$store.getters.findUser(this.userDetails.id)
|
||||
return (u._original.pleroma.is_confirmed === false) || (this.just_confirmed === true)
|
||||
return (u._original.pleroma.is_confirmed === true) || (this.just_confirmed === true)
|
||||
},
|
||||
is_approved () {
|
||||
const u = this.$store.getters.findUser(this.userDetails.id)
|
||||
return (u._original.pleroma.is_approved === false) || (this.just_approved === true)
|
||||
return (this.userDetails._original.is_approved === true) || (this.just_approved === true)
|
||||
}
|
||||
},
|
||||
components: {
|
||||
BasicUserCard,
|
||||
Checkbox
|
||||
Checkbox,
|
||||
PageList,
|
||||
AdminStatusCard,
|
||||
},
|
||||
methods: {
|
||||
toggle_admin (v) {
|
||||
|
|
@ -101,7 +105,10 @@ const AdminCard = {
|
|||
const u = this.$store.getters.findUser(this.userDetails.id)
|
||||
this.$store.dispatch('adminResendConfirmationEmail', u)
|
||||
},
|
||||
toggle_approval () {},
|
||||
toggle_approval () {
|
||||
const u = this.$store.getters.findUser(this.userDetails.id)
|
||||
this.$store.dispatch('adminApproveUser', u)
|
||||
},
|
||||
force_update_user () {
|
||||
this.$store.dispatch('fetchUser', this.userDetails.id)
|
||||
},
|
||||
|
|
@ -111,6 +118,11 @@ const AdminCard = {
|
|||
this.$store.dispatch('adminDeleteUser', u)
|
||||
this.just_deleted = true
|
||||
}
|
||||
},
|
||||
fetch_statuses (store, opts) {
|
||||
const u = this.$store.getters.findUser(this.userDetails.id)
|
||||
const res = store.dispatch('adminListStatuses', { user: u, opts: { page_size: opts.pageSize, godmode: true, with_reblogs: true}})
|
||||
return Promise.resolve(res.then(r => r.activities))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,106 +4,115 @@
|
|||
<div
|
||||
v-if="!isLoaded"
|
||||
>
|
||||
loading user...
|
||||
{{ $t('admin_dash.users.loading_user') }}
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
>
|
||||
<div v-if="userDetails.id !== this.$store.state.users.currentUser.id">
|
||||
<BasicUserCard :user="user">
|
||||
<div class="admin-card-content-container">
|
||||
<!--<button
|
||||
v-if="muted"
|
||||
class="btn button-default"
|
||||
:disabled="progress"
|
||||
@click="unmuteUser"
|
||||
>
|
||||
<template v-if="progress">
|
||||
{{ $t('user_card.unmute_progress') }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ $t('user_card.unmute') }}
|
||||
</template>
|
||||
</button>
|
||||
<button
|
||||
v-else
|
||||
class="btn button-default"
|
||||
:disabled="progress"
|
||||
@click="muteUser"
|
||||
>
|
||||
<template v-if="progress">
|
||||
{{ $t('user_card.mute_progress') }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ $t('user_card.mute') }}
|
||||
</template>
|
||||
</button>-->
|
||||
</div>
|
||||
</BasicUserCard>
|
||||
<BasicUserCard :user="user" />
|
||||
<div v-if="!top_level_expanded">
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="top_level_expanded = true"
|
||||
>
|
||||
expand user
|
||||
{{ $t('admin_dash.users.expand_user') }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div
|
||||
class="setting-item"
|
||||
v-else
|
||||
>
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="top_level_expanded = false"
|
||||
>
|
||||
collapse user
|
||||
{{ $t('admin_dash.users.collapse_user') }}
|
||||
</button><br>
|
||||
<div v-if="is_local">
|
||||
<Checkbox
|
||||
:model-value="is_admin"
|
||||
@update:model-value="v => toggle_admin(v)"
|
||||
>
|
||||
is admin
|
||||
{{ $t('admin_dash.users.is_admin') }}
|
||||
</Checkbox><br>
|
||||
<Checkbox
|
||||
:model-value="is_moderator"
|
||||
@update:model-value="v => toggle_moderator(v)"
|
||||
>
|
||||
is moderator
|
||||
{{ $t('admin_dash.users.is_moderator') }}
|
||||
</Checkbox><br>
|
||||
<div v-if="!just_confirmed && !is_confirmed">
|
||||
<button class="button button-default btn"
|
||||
type="button"
|
||||
@click="confirm_user()"
|
||||
>
|
||||
is confirmed
|
||||
{{ $t('admin_dash.users.is_confirmed') }}
|
||||
</button><br>
|
||||
<button class="button button-default btn"
|
||||
type="button"
|
||||
@click="resend_confirmation_email()"
|
||||
>
|
||||
resend confirmation email
|
||||
{{ $t('admin_dash.users.resend_confirmation_email') }}
|
||||
</button><br>
|
||||
</div>
|
||||
<Checkbox
|
||||
:model-value="is_approved"
|
||||
@update:model-value="v => toggle_approval(v)"
|
||||
<div v-if="!is_approved">
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="toggle_approval(true)"
|
||||
>
|
||||
is approved
|
||||
</Checkbox><br>
|
||||
{{ $t('admin_dash.users.approve') }}
|
||||
</button><br>
|
||||
</div>
|
||||
</div>
|
||||
<Checkbox
|
||||
:model-value="is_activated"
|
||||
@update:model-value="v => toggle_activation(v)"
|
||||
>
|
||||
is active
|
||||
{{ $t('admin_dash.users.is_active') }}
|
||||
</Checkbox><br>
|
||||
<button class="button button-default btn"
|
||||
type="button"
|
||||
@click="delete_user()"
|
||||
>
|
||||
delete user
|
||||
{{ $t('admin_dash.users.delete_user') }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="!timeline_expanded">
|
||||
<button class="button button-default btn"
|
||||
type="button"
|
||||
@click="timeline_expanded = true"
|
||||
>
|
||||
{{ $t('admin_dash.users.expand_timeline') }}
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="setting-item"
|
||||
v-else
|
||||
>
|
||||
<button class="button button-default btn"
|
||||
type="button"
|
||||
@click="timeline_expanded = false"
|
||||
>
|
||||
{{ $t('admin_dash.users.collapse_timeline') }}
|
||||
</button>
|
||||
<PageList
|
||||
ref="timelineList"
|
||||
:refresh="true"
|
||||
:get-key="i => i"
|
||||
:box-only="true"
|
||||
:page-size="20"
|
||||
:single-page="true"
|
||||
:fetch-page="(store, opts) => this.fetch_statuses(store, opts)"
|
||||
>
|
||||
<template #item="{item}">
|
||||
<AdminStatusCard :status-details="item" />
|
||||
</template>
|
||||
</PageList>
|
||||
</div>
|
||||
<div v-if="!json_expanded"
|
||||
>
|
||||
<button
|
||||
|
|
@ -111,16 +120,19 @@
|
|||
type="button"
|
||||
@click="json_expanded = true"
|
||||
>
|
||||
expand raw info
|
||||
{{ $t('admin_dash.users.expand_raw_info') }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div
|
||||
class="setting-item"
|
||||
v-else
|
||||
>
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="json_expanded = false"
|
||||
>
|
||||
collapse raw info
|
||||
{{ $t('admin_dash.users.collapse_raw_info') }}
|
||||
</button>
|
||||
<h2> database </h2>
|
||||
<pre> {{ JSON.stringify(user, null, 2) }} </pre>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||
import Select from 'src/components/select/select.vue'
|
||||
import StatusBody from 'src/components/status_body/status_body.vue'
|
||||
import { parseStatus } from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
||||
|
||||
const AdminStatusCard = {
|
||||
props: ['statusDetails'],
|
||||
data () {
|
||||
return {
|
||||
json_expanded: false,
|
||||
statusCache: undefined,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
is_sensitive () {
|
||||
return this.statusDetails.sensitive === true
|
||||
},
|
||||
visibility () {
|
||||
return this.statusDetails.visibility
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change_sensitivity (v) {
|
||||
this.$store.dispatch('adminChangeStatusScope', { opts: { id: this.statusDetails.id, sensitive: v }}).then(res => parseStatus(res)).then(p => p).then(s => this.statusCache = s)
|
||||
},
|
||||
change_visibility (v) {
|
||||
this.$store.dispatch('adminChangeStatusScope', { opts: { id: this.statusDetails.id, visibility: v }}).then(res => parseStatus(res)).then(p => p).then(s => this.statusCache = s)
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Checkbox,
|
||||
Select,
|
||||
StatusBody,
|
||||
},
|
||||
mounted () {
|
||||
this.$store.dispatch('adminChangeStatusScope', { opts: { id: this.statusDetails.id }}).then(res => parseStatus(res)).then(p => p).then(s => this.statusCache = s)
|
||||
}
|
||||
}
|
||||
|
||||
export default AdminStatusCard
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<template>
|
||||
<div class="setting-item">
|
||||
<h2> {{ $t('admin_dash.users.title_info') }}: </h2>
|
||||
<span> {{ $t('admin_dash.users.status_id') }}: {{ statusDetails.id }} </span>
|
||||
<span> {{ $t('admin_dash.users.created_at') }}: {{ statusDetails.created_at }} </span>
|
||||
<span v-if="typeof(statusDetails.edited_at) !== 'undefined'"> {{ $t('admin_dash.users.edited_at') }}: {{ statusDetails.edited_at }} </span>
|
||||
<h2> {{ $t('admin_dash.users.title_content') }}: </h2>
|
||||
<div>
|
||||
<StatusBody
|
||||
v-if="typeof(statusCache) !== 'undefined'"
|
||||
:status="statusCache"
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="delete_status(status.id)"
|
||||
>
|
||||
{{ $t('admin_dash.users.delete_status') }}
|
||||
</button><br>
|
||||
<Checkbox
|
||||
:model-value="is_sensitive"
|
||||
@update:model-value="v => change_sensitivity(v)"
|
||||
>
|
||||
{{ $t('admin_dash.users.content_nsfw') }}
|
||||
</Checkbox>
|
||||
<Select
|
||||
:model-value="visibility"
|
||||
@update:model-value="v => change_visibility(v)"
|
||||
>
|
||||
<option
|
||||
value="public"
|
||||
>
|
||||
{{ $t('admin_dash.users.scope_public') }}
|
||||
</option>
|
||||
<option
|
||||
value="unlisted"
|
||||
>
|
||||
{{ $t('admin_dash.users.scope_unlisted') }}
|
||||
</option>
|
||||
<option
|
||||
value="private"
|
||||
>
|
||||
{{ $t('admin_dash.users.scope_private') }}
|
||||
</option>
|
||||
<option
|
||||
value="direct"
|
||||
>
|
||||
{{ $t('admin_dash.users.scope_direct') }}
|
||||
</option>
|
||||
</Select><br>
|
||||
<a :href="statusDetails.url"> {{ $t('admin_dash.users.link_source') }} </a>
|
||||
<div v-if="!json_expanded">
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="json_expanded = !json_expanded"
|
||||
>
|
||||
{{ $t('admin_dash.users.expand_raw_info') }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="json_expanded = !json_expanded"
|
||||
>
|
||||
{{ $t('admin_dash.users.collapse_raw_info') }}
|
||||
</button>
|
||||
<h2> details </h2>
|
||||
<pre> {{ JSON.stringify(statusDetails, null, 2) }} </pre>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="./admin_status_card.js"></script>
|
||||
|
|
@ -19,14 +19,14 @@ const UsersTab = {
|
|||
/* filters must match the filter options below initially, or the ui is gonna have a computer moment
|
||||
* no, i won't fix this
|
||||
* */
|
||||
filters_origin: "local",
|
||||
filters_origin: "all",
|
||||
filters_activity: "all",
|
||||
filters_permission: "all",
|
||||
filters_query: '',
|
||||
filters_name: '',
|
||||
filters_email: '',
|
||||
filters_query: "",
|
||||
filters_name: "",
|
||||
filters_email: "",
|
||||
filters: {
|
||||
local: true,
|
||||
local: false,
|
||||
external: false,
|
||||
active: false,
|
||||
need_approval: false,
|
||||
|
|
@ -121,8 +121,6 @@ const UsersTab = {
|
|||
this.filters_email = v
|
||||
this.reset()
|
||||
},
|
||||
delete_selection () {
|
||||
},
|
||||
delete_user () {},
|
||||
fetch_page (store, opts) {
|
||||
opts.query = this.filters_query
|
||||
|
|
@ -138,9 +136,21 @@ const UsersTab = {
|
|||
toggleLocal () {
|
||||
this.filters.local = !this.filters.local
|
||||
this.reset()
|
||||
},
|
||||
activate_selection () {
|
||||
const s = this.$refs.userList.selected()
|
||||
s.forEach(u => this.$store.dispatch('adminActivateUser', this.$store.getters.findUser(u.id)))
|
||||
},
|
||||
deactivate_selection () {
|
||||
const s = this.$refs.userList.selected()
|
||||
s.forEach(u => this.$store.dispatch('adminDeactivateUser', this.$store.getters.findUser(u.id)))
|
||||
},
|
||||
delete_selection () {
|
||||
const s = this.$refs.userList.selected()
|
||||
console.log(s)
|
||||
s.forEach(u => this.$store.dispatch('adminDeleteUser', this.$store.getters.findUser(u.id)))
|
||||
this.reset()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,145 +1,144 @@
|
|||
<!-- eslint-disable -->
|
||||
<template>
|
||||
<TabSwitcher
|
||||
:scrollable-tabs="false"
|
||||
class="user-tab"
|
||||
<div :label="$t('admin_dash.users.management')">
|
||||
<div class="setting-item">
|
||||
<h2> filter user search </h2>
|
||||
<input
|
||||
v-model="filters_query"
|
||||
:placeholder="$t('admin_dash.users.placeholder_query')"
|
||||
class="input string-input"
|
||||
@input="v => update_query(v.target.value)"
|
||||
><br>
|
||||
<input
|
||||
v-model="filters_name"
|
||||
:placeholder="$t('admin_dash.users.placeholder_name')"
|
||||
class="input string-input"
|
||||
@input="v => update_name(v.target.value)"
|
||||
><br>
|
||||
<input
|
||||
v-model="filters_email"
|
||||
:placeholder="$t('admin_dash.users.placeholder_email')"
|
||||
class="input string-input"
|
||||
@input="v => update_email(v.target.value)"
|
||||
><br>
|
||||
<Select
|
||||
:model-value="filters_origin"
|
||||
@update:model-value="v => update_origin(v)"
|
||||
>
|
||||
<div :label="$t('admin_dash.users.management')">
|
||||
<div class="setting-item">
|
||||
<h2> filter user search </h2>
|
||||
todo: query, name and email input<br>
|
||||
<input
|
||||
:model-value="filters_query"
|
||||
placeholder="query"
|
||||
@input="v => update_query(v.target.value)"
|
||||
/><br>
|
||||
<input
|
||||
:model-value="filters_name"
|
||||
placeholder="name"
|
||||
@input="v => update_name(v.target.value)"
|
||||
/><br>
|
||||
<input
|
||||
:model-value="filters_email"
|
||||
placeholder="email"
|
||||
@input="v => update_email(v.target.value)"
|
||||
/><br>
|
||||
<Select
|
||||
:model-value="filters_origin"
|
||||
@update:model-value="v => update_origin(v)"
|
||||
>
|
||||
<option
|
||||
value="all"
|
||||
>
|
||||
all
|
||||
</option>
|
||||
<option
|
||||
value="local"
|
||||
>
|
||||
local only
|
||||
</option>
|
||||
<option
|
||||
value="external"
|
||||
>
|
||||
external only
|
||||
</option>
|
||||
</Select>
|
||||
<Select
|
||||
:model-value="filters_activity"
|
||||
@update:model-value="v => update_activity(v)"
|
||||
>
|
||||
<option
|
||||
value="all"
|
||||
>
|
||||
all
|
||||
</option>
|
||||
<option
|
||||
value="active"
|
||||
>
|
||||
active only
|
||||
</option>
|
||||
<option
|
||||
value="deactivated"
|
||||
>
|
||||
deactivated only
|
||||
</option>
|
||||
</Select>
|
||||
<Select
|
||||
:model-value="filters_permission"
|
||||
@update:model-value="v => update_permission(v)"
|
||||
>
|
||||
<option
|
||||
value="all"
|
||||
>
|
||||
all
|
||||
</option>
|
||||
<option
|
||||
value="admin"
|
||||
>
|
||||
admin only
|
||||
</option>
|
||||
<option
|
||||
value="modsnadmins"
|
||||
>
|
||||
all privileged
|
||||
</option>
|
||||
<option
|
||||
value="moderator"
|
||||
>
|
||||
moderator only
|
||||
</option>
|
||||
</Select>
|
||||
<Checkbox
|
||||
@update:model-value="v => {filters.need_approval = v; reset();}"
|
||||
>
|
||||
only unapproved
|
||||
</Checkbox>
|
||||
<Checkbox
|
||||
@update:model-value="v => {filters.unconfirmed = v; reset();}"
|
||||
>
|
||||
only unconfirmed
|
||||
</Checkbox>
|
||||
</div>
|
||||
<PageList
|
||||
ref="userList"
|
||||
:refresh="true"
|
||||
:get-key="i => i"
|
||||
:box-only="true"
|
||||
:page-size="50"
|
||||
:fetch-page="(store, opts) => this.fetch_page(store, opts)"
|
||||
>
|
||||
<template #header>
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="delete_selection"
|
||||
>
|
||||
{{ $t('admin_dash.users.activate') }}
|
||||
</button>
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="activate_selection"
|
||||
>
|
||||
{{ $t('admin_dash.users.deactivate') }}
|
||||
</button>
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="deactivate_selection"
|
||||
>
|
||||
{{ $t('admin_dash.users.delete') }}
|
||||
</button>
|
||||
</template>
|
||||
<template #item="{item}">
|
||||
<AdminCard :user-details="item" />
|
||||
</template>
|
||||
</PageList>
|
||||
</div>
|
||||
|
||||
<div :label="$t('admin_dash.users.invitations')">
|
||||
TBC
|
||||
</div>
|
||||
</TabSwitcher>
|
||||
<option
|
||||
value="all"
|
||||
>
|
||||
{{ $t('admin_dash.users.all') }}
|
||||
</option>
|
||||
<option
|
||||
value="local"
|
||||
>
|
||||
{{ $t('admin_dash.users.only_local') }}
|
||||
</option>
|
||||
<option
|
||||
value="external"
|
||||
>
|
||||
{{ $t('admin_dash.users.only_external') }}
|
||||
</option>
|
||||
</Select>
|
||||
<Select
|
||||
:model-value="filters_activity"
|
||||
@update:model-value="v => update_activity(v)"
|
||||
>
|
||||
<option
|
||||
value="all"
|
||||
>
|
||||
{{ $t('admin_dash.users.all') }}
|
||||
</option>
|
||||
<option
|
||||
value="active"
|
||||
>
|
||||
{{ $t('admin_dash.users.only_active') }}
|
||||
</option>
|
||||
<option
|
||||
value="deactivated"
|
||||
>
|
||||
{{ $t('admin_dash.users.only_deactivated') }}
|
||||
</option>
|
||||
</Select>
|
||||
<Select
|
||||
:model-value="filters_permission"
|
||||
@update:model-value="v => update_permission(v)"
|
||||
>
|
||||
<option
|
||||
value="all"
|
||||
>
|
||||
{{ $t('admin_dash.users.all') }}
|
||||
</option>
|
||||
<option
|
||||
value="admin"
|
||||
>
|
||||
{{ $t('admin_dash.users.only_administrators') }}
|
||||
</option>
|
||||
<option
|
||||
value="modsnadmins"
|
||||
>
|
||||
{{ $t('admin_dash.users.all_privileged') }}
|
||||
</option>
|
||||
<option
|
||||
value="moderator"
|
||||
>
|
||||
{{ $t('admin_dash.users.only_moderators') }}
|
||||
</option>
|
||||
</Select>
|
||||
<Checkbox
|
||||
@update:model-value="v => {filters.need_approval = v; reset();}"
|
||||
>
|
||||
{{ $t('admin_dash.users.only_unapproved') }}
|
||||
</Checkbox>
|
||||
<Checkbox
|
||||
@update:model-value="v => {filters.unconfirmed = v; reset();}"
|
||||
>
|
||||
{{ $t('admin_dash.users.only_unconfirmed') }}
|
||||
</Checkbox><br>
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="reset"
|
||||
>
|
||||
{{ $t('admin_dash.users.refresh') }}
|
||||
</button>
|
||||
</div>
|
||||
<PageList
|
||||
ref="userList"
|
||||
:refresh="true"
|
||||
:get-key="i => i"
|
||||
:box-only="true"
|
||||
:page-size="50"
|
||||
:fetch-page="(store, opts) => fetch_page(store, opts)"
|
||||
>
|
||||
<template #header>
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="activate_selection"
|
||||
>
|
||||
{{ $t('admin_dash.users.activate') }}
|
||||
</button>
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="deactivate_selection"
|
||||
>
|
||||
{{ $t('admin_dash.users.deactivate') }}
|
||||
</button>
|
||||
<button
|
||||
class="button button-default btn"
|
||||
type="button"
|
||||
@click="delete_selection"
|
||||
>
|
||||
{{ $t('admin_dash.users.delete') }}
|
||||
</button>
|
||||
</template>
|
||||
<template #item="{item}">
|
||||
<AdminCard :user-details="item" />
|
||||
</template>
|
||||
</PageList>
|
||||
</div>
|
||||
</template>
|
||||
<script src="./users_tab.js"></script>
|
||||
<style lang="scss" src="./users_tab.scss"></style>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ const StatusContent = {
|
|||
'toggleShowingLongSubject'
|
||||
],
|
||||
data () {
|
||||
//console.log('status_content', this.status)
|
||||
return {
|
||||
postLength: this.status.text.length,
|
||||
parseReadyDone: false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue