Skip to content

Commit

Permalink
feat:新UI上线测试,问题可能比较多,稳定用户不建议用beta,请使用latest
Browse files Browse the repository at this point in the history
  • Loading branch information
vastsa committed Nov 23, 2024
1 parent a50753e commit 0196847
Show file tree
Hide file tree
Showing 117 changed files with 313 additions and 14 deletions.
6 changes: 3 additions & 3 deletions apps/admin/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ async def delete_file(self, file_id: int):
await self.file_storage.delete_file(file_code)
await file_code.delete()

async def list_files(self, page: int, size: int):
async def list_files(self, page: int, size: int, keyword: str = ''):
offset = (page - 1) * size
files = await FileCodes.all().limit(size).offset(offset)
total = await FileCodes.all().count()
files = await FileCodes.filter(prefix__icontains=keyword).limit(size).offset(offset)
total = await FileCodes.filter(prefix__icontains=keyword).count()
return files, total

async def download_file(self, file_id: int):
Expand Down
3 changes: 2 additions & 1 deletion apps/admin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ async def file_delete(
async def file_list(
page: int = 1,
size: int = 10,
keyword: str = '',
file_service: FileService = Depends(get_file_service),
admin: bool = Depends(admin_required)
):
files, total = await file_service.list_files(page, size)
files, total = await file_service.list_files(page, size, keyword)
return APIResponse(detail={
'page': page,
'size': size,
Expand Down
1 change: 1 addition & 0 deletions fcb-fronted/dist/assets/AdminLayout-CEJ6vCgl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions fcb-fronted/dist/assets/AdminLayout-d3YAPOCs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions fcb-fronted/dist/assets/DashboardView-DkTcGLlK.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added fcb-fronted/dist/assets/DingTalk-CT5a5scH.ttf
Binary file not shown.
Loading

0 comments on commit 0196847

Please sign in to comment.