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
|
|
@ -294,7 +294,14 @@ class AccessoriesSelectorDialog(QDialog):
|
||||||
"""Populate rings tree."""
|
"""Populate rings tree."""
|
||||||
tree = self.tab_rings["tree"]
|
tree = self.tab_rings["tree"]
|
||||||
tree.clear()
|
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:
|
for ring in self.all_rings:
|
||||||
item = QTreeWidgetItem()
|
item = QTreeWidgetItem()
|
||||||
item.setText(0, ring.name)
|
item.setText(0, ring.name)
|
||||||
|
|
@ -318,7 +325,14 @@ class AccessoriesSelectorDialog(QDialog):
|
||||||
"""Populate clothing tree."""
|
"""Populate clothing tree."""
|
||||||
tree = self.tab_clothing["tree"]
|
tree = self.tab_clothing["tree"]
|
||||||
tree.clear()
|
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:
|
for item_data in self.all_clothing:
|
||||||
item = QTreeWidgetItem()
|
item = QTreeWidgetItem()
|
||||||
item.setText(0, item_data.name)
|
item.setText(0, item_data.name)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue