mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-06 23:21:00 +08:00
feat: better readable text when no resources
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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("名称")),
|
||||
|
||||
Reference in New Issue
Block a user