fix(ui): show message when rings/clothing API data unavailable
The Entropia Nexus API doesn't have /rings or /clothing endpoints (404). Added placeholder messages in the accessories selector instead of showing empty lists. Pets endpoint works correctly (84 pets loaded).
This commit is contained in:
parent
4d7d4e7545
commit
499c4c7383
|
|
@ -295,6 +295,13 @@ class AccessoriesSelectorDialog(QDialog):
|
|||
tree = self.tab_rings["tree"]
|
||||
tree.clear()
|
||||
|
||||
if not self.all_rings:
|
||||
item = QTreeWidgetItem()
|
||||
item.setText(0, "No ring data available from API")
|
||||
item.setForeground(0, QColor("#888888"))
|
||||
tree.addTopLevelItem(item)
|
||||
return
|
||||
|
||||
for ring in self.all_rings:
|
||||
item = QTreeWidgetItem()
|
||||
item.setText(0, ring.name)
|
||||
|
|
@ -319,6 +326,13 @@ class AccessoriesSelectorDialog(QDialog):
|
|||
tree = self.tab_clothing["tree"]
|
||||
tree.clear()
|
||||
|
||||
if not self.all_clothing:
|
||||
item = QTreeWidgetItem()
|
||||
item.setText(0, "No clothing data available from API")
|
||||
item.setForeground(0, QColor("#888888"))
|
||||
tree.addTopLevelItem(item)
|
||||
return
|
||||
|
||||
for item_data in self.all_clothing:
|
||||
item = QTreeWidgetItem()
|
||||
item.setText(0, item_data.name)
|
||||
|
|
|
|||
Loading…
Reference in New Issue