feat(ui): load the updates list as soon as the tab opens
Clicking the Updates tab already triggered the check but showed a bare empty table until it completed, and an "Update all" button that stayed disabled for ever. The tab now shows a searching hint, reports "system is up to date" on an empty result, reloads by itself when the core frees up, and enables "Update all" without a row selection. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
3 files changed
+59
No files matched your search
@@ -103,6 +103,13 @@ void showEmptyState(QStackedWidget* stack, bool empty) {
|
||||
if (stack) stack->setCurrentIndex(empty ? 1 : 0);
|
||||
}
|
||||
|
||||
void setEmptyStateText(QStackedWidget* stack, const QString& hint) {
|
||||
if (!stack) return;
|
||||
// withEmptyState() puts the hint label second in the placeholder's layout:
|
||||
// the only label of the stack, so this stays a safe lookup.
|
||||
if (QLabel* label = stack->findChild<QLabel*>()) label->setText(hint);
|
||||
}
|
||||
|
||||
QLabel* countLabel() {
|
||||
QLabel* label = new QLabel();
|
||||
label->setStyleSheet("font-size: 12px; color: #64748b; font-weight: 600;");
|
||||
|
||||
Reference in new issue
Block a user