web: make table pagination size user-configurable
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -9,7 +9,7 @@ import { CoreApi, IntentEnum, Token } from "@goauthentik/api";
|
||||
|
||||
import { AKResponse } from "../../../api/Client";
|
||||
import { DEFAULT_CONFIG } from "../../../api/Config";
|
||||
import { PAGE_SIZE } from "../../../constants";
|
||||
import { uiConfig } from "../../../common/config";
|
||||
import "../../../elements/buttons/Dropdown";
|
||||
import "../../../elements/buttons/ModalButton";
|
||||
import "../../../elements/buttons/TokenCopyButton";
|
||||
@ -31,11 +31,11 @@ export class UserTokenList extends Table<Token> {
|
||||
@property()
|
||||
order = "expires";
|
||||
|
||||
apiEndpoint(page: number): Promise<AKResponse<Token>> {
|
||||
async apiEndpoint(page: number): Promise<AKResponse<Token>> {
|
||||
return new CoreApi(DEFAULT_CONFIG).coreTokensList({
|
||||
ordering: this.order,
|
||||
page: page,
|
||||
pageSize: PAGE_SIZE,
|
||||
pageSize: (await uiConfig()).pagination.perPage,
|
||||
search: this.search || "",
|
||||
managed: "",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user