Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
8e11a1b3
Verified
Commit
8e11a1b3
authored
Apr 08, 2020
by
Chocobozzz
Browse files
Fix sort in admin tables
parent
14f83c68
Changes
14
Hide whitespace changes
Inline
Side-by-side
client/src/app/+admin/follows/followers-list/followers-list.component.ts
View file @
8e11a1b3
...
...
@@ -31,6 +31,10 @@ export class FollowersListComponent extends RestTable implements OnInit {
this
.
initialize
()
}
getIdentifier
()
{
return
'
FollowersListComponent
'
}
acceptFollower
(
follow
:
ActorFollow
)
{
follow
.
state
=
'
accepted
'
...
...
client/src/app/+admin/follows/following-list/following-list.component.ts
View file @
8e11a1b3
...
...
@@ -32,6 +32,10 @@ export class FollowingListComponent extends RestTable implements OnInit {
this
.
initialize
()
}
getIdentifier
()
{
return
'
FollowingListComponent
'
}
async
removeFollowing
(
follow
:
ActorFollow
)
{
const
res
=
await
this
.
confirmService
.
confirm
(
this
.
i18n
(
'
Do you really want to unfollow {{host}}?
'
,
{
host
:
follow
.
following
.
host
}),
...
...
client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
View file @
8e11a1b3
...
...
@@ -44,6 +44,10 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
this
.
bytesPipe
=
new
BytesPipe
()
}
getIdentifier
()
{
return
'
VideoRedundanciesListComponent
'
}
ngOnInit
()
{
this
.
loadSelectLocalStorage
()
...
...
client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts
View file @
8e11a1b3
...
...
@@ -29,6 +29,10 @@ export class InstanceAccountBlocklistComponent extends RestTable implements OnIn
this
.
initialize
()
}
getIdentifier
()
{
return
'
InstanceAccountBlocklistComponent
'
}
unblockAccount
(
accountBlock
:
AccountBlock
)
{
const
blockedAccount
=
accountBlock
.
blockedAccount
...
...
client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts
View file @
8e11a1b3
...
...
@@ -30,6 +30,10 @@ export class InstanceServerBlocklistComponent extends RestTable implements OnIni
this
.
initialize
()
}
getIdentifier
()
{
return
'
InstanceServerBlocklistComponent
'
}
unblockServer
(
serverBlock
:
ServerBlock
)
{
const
host
=
serverBlock
.
blockedServer
.
host
...
...
client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts
View file @
8e11a1b3
...
...
@@ -62,6 +62,10 @@ export class VideoAbuseListComponent extends RestTable implements OnInit {
this
.
initialize
()
}
getIdentifier
()
{
return
'
VideoAbuseListComponent
'
}
openModerationCommentModal
(
videoAbuse
:
VideoAbuse
)
{
this
.
moderationCommentModal
.
openModal
(
videoAbuse
)
}
...
...
client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts
View file @
8e11a1b3
...
...
@@ -54,6 +54,10 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit {
]
}
getIdentifier
()
{
return
'
VideoBlacklistListComponent
'
}
getVideoUrl
(
videoBlacklist
:
VideoBlacklist
)
{
return
Video
.
buildClientUrl
(
videoBlacklist
.
video
.
uuid
)
}
...
...
client/src/app/+admin/system/jobs/jobs.component.ts
View file @
8e11a1b3
...
...
@@ -57,6 +57,10 @@ export class JobsComponent extends RestTable implements OnInit {
this
.
initialize
()
}
getIdentifier
()
{
return
'
JobsComponent
'
}
onJobStateOrTypeChanged
()
{
this
.
pagination
.
start
=
0
...
...
client/src/app/+admin/users/user-list/user-list.component.ts
View file @
8e11a1b3
...
...
@@ -86,6 +86,10 @@ export class UserListComponent extends RestTable implements OnInit {
]
}
getIdentifier
()
{
return
'
UserListComponent
'
}
openBanUserModal
(
users
:
User
[])
{
for
(
const
user
of
users
)
{
if
(
user
.
username
===
'
root
'
)
{
...
...
client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts
View file @
8e11a1b3
...
...
@@ -29,6 +29,10 @@ export class MyAccountBlocklistComponent extends RestTable implements OnInit {
this
.
initialize
()
}
getIdentifier
()
{
return
'
MyAccountBlocklistComponent
'
}
unblockAccount
(
accountBlock
:
AccountBlock
)
{
const
blockedAccount
=
accountBlock
.
blockedAccount
...
...
client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts
View file @
8e11a1b3
...
...
@@ -30,6 +30,10 @@ export class MyAccountServerBlocklistComponent extends RestTable implements OnIn
this
.
initialize
()
}
getIdentifier
()
{
return
'
MyAccountServerBlocklistComponent
'
}
unblockServer
(
serverBlock
:
ServerBlock
)
{
const
host
=
serverBlock
.
blockedServer
.
host
...
...
client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts
View file @
8e11a1b3
...
...
@@ -31,6 +31,10 @@ export class MyAccountOwnershipComponent extends RestTable implements OnInit {
this
.
initialize
()
}
getIdentifier
()
{
return
'
MyAccountOwnershipComponent
'
}
createByString
(
account
:
Account
)
{
return
Account
.
CREATE_BY_STRING
(
account
.
name
,
account
.
host
)
}
...
...
client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts
View file @
8e11a1b3
...
...
@@ -20,8 +20,7 @@ export class MyAccountVideoImportsComponent extends RestTable implements OnInit
constructor
(
private
notifier
:
Notifier
,
private
videoImportService
:
VideoImportService
,
private
i18n
:
I18n
private
videoImportService
:
VideoImportService
)
{
super
()
}
...
...
@@ -30,6 +29,10 @@ export class MyAccountVideoImportsComponent extends RestTable implements OnInit
this
.
initialize
()
}
getIdentifier
()
{
return
'
MyAccountVideoImportsComponent
'
}
isVideoImportSuccess
(
videoImport
:
VideoImport
)
{
return
videoImport
.
state
.
id
===
VideoImportState
.
SUCCESS
}
...
...
client/src/app/shared/rest/rest-table.ts
View file @
8e11a1b3
...
...
@@ -13,7 +13,8 @@ export abstract class RestTable {
protected
search
:
string
private
searchStream
:
Subject
<
string
>
private
sortLocalStorageKey
=
'
rest-table-sort-
'
+
this
.
constructor
.
name
abstract
getIdentifier
():
string
initialize
()
{
this
.
loadSort
()
...
...
@@ -21,13 +22,13 @@ export abstract class RestTable {
}
loadSort
()
{
const
result
=
peertubeLocalStorage
.
getItem
(
this
.
s
ortLocalStorageKey
)
const
result
=
peertubeLocalStorage
.
getItem
(
this
.
getS
ortLocalStorageKey
()
)
if
(
result
)
{
try
{
this
.
sort
=
JSON
.
parse
(
result
)
}
catch
(
err
)
{
console
.
error
(
'
Cannot load sort of local storage key
'
+
this
.
s
ortLocalStorageKey
,
err
)
console
.
error
(
'
Cannot load sort of local storage key
'
+
this
.
getS
ortLocalStorageKey
()
,
err
)
}
}
}
...
...
@@ -48,7 +49,7 @@ export abstract class RestTable {
}
saveSort
()
{
peertubeLocalStorage
.
setItem
(
this
.
s
ortLocalStorageKey
,
JSON
.
stringify
(
this
.
sort
))
peertubeLocalStorage
.
setItem
(
this
.
getS
ortLocalStorageKey
()
,
JSON
.
stringify
(
this
.
sort
))
}
initSearch
()
{
...
...
@@ -71,4 +72,8 @@ export abstract class RestTable {
}
protected
abstract
loadData
():
void
private
getSortLocalStorageKey
()
{
return
'
rest-table-sort-
'
+
this
.
getIdentifier
()
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment