- {{ scope.obj.username }}
+ {{ scope.obj.username }}
|
{{ scope.obj.email }}
@@ -168,17 +168,13 @@ export default {
},
permissions () {
return [
- {
- 'code': 'upload',
- 'label': this.$gettext('Upload')
- },
{
'code': 'library',
'label': this.$gettext('Library')
},
{
- 'code': 'federation',
- 'label': this.$gettext('Federation')
+ 'code': 'moderation',
+ 'label': this.$gettext('Moderation')
},
{
'code': 'settings',
diff --git a/front/src/components/mixins/SmartSearch.vue b/front/src/components/mixins/SmartSearch.vue
index 170436b7a..8b03becbb 100644
--- a/front/src/components/mixins/SmartSearch.vue
+++ b/front/src/components/mixins/SmartSearch.vue
@@ -4,7 +4,8 @@ import {normalizeQuery, parseTokens, compileTokens} from '@/search'
export default {
props: {
- defaultQuery: {type: String, default: '', required: false},
+ defaultQuery: {type: String, required: false},
+ updateUrl: {type: Boolean, required: false, default: false},
},
methods: {
getTokenValue (key, fallback) {
@@ -47,6 +48,15 @@ export default {
this.search.query = compileTokens(newValue)
this.page = 1
this.fetchData()
+ if (this.updateUrl) {
+ let params = {}
+ if (this.search.query) {
+ params.q = this.search.query
+ }
+ this.$router.replace({
+ query: params
+ })
+ }
},
deep: true
},
diff --git a/front/src/components/mixins/Translations.vue b/front/src/components/mixins/Translations.vue
index c982c9ad7..9d237c916 100644
--- a/front/src/components/mixins/Translations.vue
+++ b/front/src/components/mixins/Translations.vue
@@ -16,6 +16,7 @@ export default {
filters: {
creation_date: this.$gettext('Creation date'),
first_seen: this.$gettext('First seen date'),
+ last_seen: this.$gettext('Last seen date'),
accessed_date: this.$gettext('Accessed date'),
modification_date: this.$gettext('Modification date'),
imported_date: this.$gettext('Imported date'),
@@ -31,8 +32,11 @@ export default {
date_joined: this.$gettext('Sign-up date'),
last_activity: this.$gettext('Last activity'),
username: this.$gettext('Username'),
+ domain: this.$gettext('Domain'),
users: this.$gettext('Users'),
received_messages: this.$gettext('Received messages'),
+ uploads: this.$gettext('Uploads'),
+ followers: this.$gettext('Followers'),
}
}
}
diff --git a/front/src/router/index.js b/front/src/router/index.js
index 9d4b46917..492cbd617 100644
--- a/front/src/router/index.js
+++ b/front/src/router/index.js
@@ -27,12 +27,13 @@ import AdminSettings from '@/views/admin/Settings'
import AdminLibraryBase from '@/views/admin/library/Base'
import AdminLibraryFilesList from '@/views/admin/library/FilesList'
import AdminUsersBase from '@/views/admin/users/Base'
-import AdminUsersDetail from '@/views/admin/users/UsersDetail'
import AdminUsersList from '@/views/admin/users/UsersList'
import AdminInvitationsList from '@/views/admin/users/InvitationsList'
import AdminModerationBase from '@/views/admin/moderation/Base'
import AdminDomainsList from '@/views/admin/moderation/DomainsList'
import AdminDomainsDetail from '@/views/admin/moderation/DomainsDetail'
+import AdminAccountsList from '@/views/admin/moderation/AccountsList'
+import AdminAccountsDetail from '@/views/admin/moderation/AccountsDetail'
import ContentBase from '@/views/content/Base'
import ContentHome from '@/views/content/Home'
import LibrariesHome from '@/views/content/libraries/Home'
@@ -214,12 +215,6 @@ export default new Router({
name: 'manage.users.users.list',
component: AdminUsersList
},
- {
- path: 'users/:id',
- name: 'manage.users.users.detail',
- component: AdminUsersDetail,
- props: true
- },
{
path: 'invitations',
name: 'manage.users.invitations.list',
@@ -241,6 +236,23 @@ export default new Router({
name: 'manage.moderation.domains.detail',
component: AdminDomainsDetail,
props: true
+ },
+ {
+ path: 'accounts',
+ name: 'manage.moderation.accounts.list',
+ component: AdminAccountsList,
+ props: (route) => {
+ return {
+ defaultQuery: route.query.q,
+
+ }
+ }
+ },
+ {
+ path: 'accounts/:id',
+ name: 'manage.moderation.accounts.detail',
+ component: AdminAccountsDetail,
+ props: true
}
]
},
diff --git a/front/src/views/admin/moderation/AccountsDetail.vue b/front/src/views/admin/moderation/AccountsDetail.vue
new file mode 100644
index 000000000..abed7baad
--- /dev/null
+++ b/front/src/views/admin/moderation/AccountsDetail.vue
@@ -0,0 +1,426 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Emitted messages
+ |
+
+ {{ stats.outbox_activities}}
+ |
+
+
+
+ Received library follows
+ |
+
+ {{ stats.received_library_follows}}
+ |
+
+
+
+ Emitted library follows
+ |
+
+ {{ stats.emitted_library_follows}}
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cached size
+ |
+
+ {{ stats.media_downloaded_size | humanSize }}
+ |
+
+
+
+ Upload quota
+
+ |
+
+
+ |
+
+
+
+ Total size
+ |
+
+ {{ stats.media_total_size | humanSize }}
+ |
+
+
+
+
+ Libraries
+ |
+
+ {{ stats.libraries }}
+ |
+
+
+
+ Uploads
+ |
+
+ {{ stats.uploads }}
+ |
+
+
+
+ Artists
+ |
+
+ {{ stats.artists }}
+ |
+
+
+
+ Albums
+ |
+
+ {{ stats.albums}}
+ |
+
+
+
+ Tracks
+ |
+
+ {{ stats.tracks }}
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/front/src/views/admin/moderation/AccountsList.vue b/front/src/views/admin/moderation/AccountsList.vue
new file mode 100644
index 000000000..877c96c5e
--- /dev/null
+++ b/front/src/views/admin/moderation/AccountsList.vue
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/front/src/views/admin/moderation/Base.vue b/front/src/views/admin/moderation/Base.vue
index d4487339d..e0bf6c1ad 100644
--- a/front/src/views/admin/moderation/Base.vue
+++ b/front/src/views/admin/moderation/Base.vue
@@ -1,9 +1,13 @@
-
+
@@ -14,7 +18,7 @@ export default {
computed: {
labels() {
return {
- manageDomains: this.$gettext("Manage domains"),
+ moderation: this.$gettext("Moderation"),
secondaryMenu: this.$gettext("Secondary menu")
}
}
diff --git a/front/src/views/admin/moderation/DomainsDetail.vue b/front/src/views/admin/moderation/DomainsDetail.vue
index 71007a456..1adb1c305 100644
--- a/front/src/views/admin/moderation/DomainsDetail.vue
+++ b/front/src/views/admin/moderation/DomainsDetail.vue
@@ -115,7 +115,11 @@
- Known users
+
+ Known accounts
+
+
|
{{ stats.actors }}
@@ -169,26 +173,18 @@
|
- Artists
+ Cached size
|
- {{ stats.artists }}
+ {{ stats.media_downloaded_size | humanSize }}
|
- Albums
+ Total size
|
- {{ stats.albums}}
- |
-
-
-
- Tracks
- |
-
- {{ stats.tracks }}
+ {{ stats.media_total_size | humanSize }}
|
@@ -209,18 +205,26 @@
- Cached size
+ Artists
|
- {{ stats.media_downloaded_size | humanSize }}
+ {{ stats.artists }}
|
- Total size
+ Albums
|
- {{ stats.media_total_size | humanSize }}
+ {{ stats.albums}}
+ |
+
+
+
+ Tracks
+ |
+
+ {{ stats.tracks }}
|
diff --git a/front/src/views/admin/users/UsersDetail.vue b/front/src/views/admin/users/UsersDetail.vue
deleted file mode 100644
index 7eaafb6cb..000000000
--- a/front/src/views/admin/users/UsersDetail.vue
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
|