feat: better readable text when no resources

This commit is contained in:
Simon Ding
2024-07-23 20:24:14 +08:00
parent fb638dff8b
commit 2c5e4d0530
2 changed files with 7 additions and 1 deletions

View File

@@ -269,7 +269,7 @@ func (s *Server) SearchAvailableMovies(c *gin.Context) (interface{}, error) {
})
}
if len(searchResults) == 0 {
return nil, errors.New("no resource found")
return []TorznabSearchResult{}, nil
}
return searchResults, nil
}

View File

@@ -225,6 +225,12 @@ class _NestedTabBarState extends ConsumerState<NestedTabBar>
} else {
return torrents.when(
data: (v) {
if (v.isEmpty) {
return const Center(
child: Text("无可用资源"),
);
}
return DataTable(
columns: const [
DataColumn(label: Text("名称")),