Add AboutPage component and integrate sorting options in resource retrieval

This commit is contained in:
2025-05-25 11:27:24 +08:00
parent b610a5db9d
commit 6e78707d9e
11 changed files with 139 additions and 27 deletions

View File

@@ -14,7 +14,7 @@ import {
UserWithToken,
Comment,
CommentWithResource,
ServerConfig
ServerConfig, RSort
} from "./models.ts";
class Network {
@@ -409,11 +409,12 @@ class Network {
}
}
async getResources(page: number): Promise<PageResponse<Resource>> {
async getResources(page: number, sort: RSort): Promise<PageResponse<Resource>> {
try {
const response = await axios.get(`${this.apiBaseUrl}/resource`, {
params: {
page
page,
sort,
}
})
return response.data