Skip to content

Commit 088434d

Browse files
feat(plugin-installer): enhance empty state handling and update filters
1 parent c76e09e commit 088434d

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

src/Resources/app/administration/src/module/nuonic-plugin-installer/page/nuonic-plugin-installer-list/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Component.register('nuonic-plugin-installer-list', {
3232
criteria.setTerm(this.term);
3333
criteria.addSorting(Criteria.sort(this.sortBy, this.sortDirection));
3434
criteria.addAssociation('plugin');
35-
criteria.addFilter(Criteria.range('lastSeenAt', { gte: new Date(Date.now() - 48 * 60 * 60 * 1000) }));
35+
criteria.addFilter(Criteria.range('lastSeenAt', { lte: new Date(Date.now() - 48 * 60 * 60 * 1000) }));
3636
return criteria;
3737
},
3838
},

src/Resources/app/administration/src/module/nuonic-plugin-installer/page/nuonic-plugin-installer-list/nuonic-plugin-installer-list.html.twig

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212
<div class="nuonic-plugin-installer-index">
1313
<sw-skeleton v-if="isLoading" :variant="skeletonVariant" />
1414
<div v-else class="nuonic-plugin-installer-index__listing-grid">
15-
<template v-for="entry in availablePlugins" :key="entry.id">
16-
<component :is="'nuonic-extension-card'" :extension="entry" />
15+
<template v-if="total > 0">
16+
<template v-for="entry in availablePlugins" :key="entry.id">
17+
<component :is="'nuonic-extension-card'" :extension="entry" />
18+
</template>
19+
<sw-pagination :total="total" :limit="limit" :page="page" @page-change="changePage" />
20+
</template>
21+
<template v-else>
22+
<sw-empty-state :title="$tc('nuonic-plugin-installer.list.emptyState.title')" :subline="$tc('nuonic-plugin-installer.list.emptyState.subline')" :icon="'regular-exclamation-triangle'" color="#ff8f00" class="nuonic-plugin-installer-index__empty-state" />
1723
</template>
18-
<sw-pagination :total="total" :limit="limit" :page="page" @page-change="changePage" />
1924
</div>
2025
</div>
2126
</template>

src/Resources/app/administration/src/snippet/de-DE.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
}
1414
},
1515
"list": {
16-
"title": "OpenSource Plugin Installer"
16+
"title": "OpenSource Plugin Installer",
17+
"emptyState": {
18+
"title": "Keine Plugins gefunden",
19+
"subline": "Überprüfe, ob die geplanten Aufgaben korrekt ausgeführt werden und dass eine korrekte Plugin-Liste in der Plugin-Konfiguration eingestellt ist."
20+
}
1721
},
1822
"cards": {
1923
"version": "Version:",

src/Resources/app/administration/src/snippet/en-GB.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
}
1414
},
1515
"list": {
16-
"title": "OpenSource Plugin Installer"
16+
"title": "OpenSource Plugin Installer",
17+
"emptyState": {
18+
"title": "No plugins found",
19+
"subline": "Please check if the scheduled tasks are running correctly and a correct plugin list is set in the plugin configuration."
20+
}
1721
},
1822
"cards": {
1923
"version": "Version:",

0 commit comments

Comments
 (0)