web: port library page to clientside, router performance improvements
This commit is contained in:
		| @ -1,4 +1,4 @@ | ||||
| import { DefaultClient } from "./client"; | ||||
| import { DefaultClient, PBResponse } from "./client"; | ||||
|  | ||||
| export class Application { | ||||
|     pk?: string; | ||||
| @ -6,6 +6,7 @@ export class Application { | ||||
|     slug?: string; | ||||
|     provider?: number; | ||||
|  | ||||
|     launch_url?: string; | ||||
|     meta_launch_url?: string; | ||||
|     meta_icon?: string; | ||||
|     meta_description?: string; | ||||
| @ -15,4 +16,8 @@ export class Application { | ||||
|     static get(slug: string): Promise<Application> { | ||||
|         return DefaultClient.fetch<Application>(["core", "applications", slug]); | ||||
|     } | ||||
|  | ||||
|     static list(filter?: { [key: string]: string }): Promise<PBResponse<Application>> { | ||||
|         return DefaultClient.fetch<PBResponse<Application>>(["core", "applications"], filter); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -47,8 +47,8 @@ export interface PBPagination { | ||||
|     end_index: number; | ||||
| } | ||||
|  | ||||
| export interface PBResponse { | ||||
| export interface PBResponse<T> { | ||||
|     pagination: PBPagination; | ||||
|  | ||||
|     results: Array<any>; | ||||
|     results: Array<T>; | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer