mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-15 13:03:00 +08:00
🌴 Sync 2026-11-10 18:25:40
This commit is contained in:
1 parent
2d7e7f3abc
commit
ad8b8b0fd1
39 files changed
+1297
-450
No files matched your search
@@ -127,10 +127,23 @@ return baseclass.extend({
|
||||
renderTable: function() {
|
||||
if (!this.tableBodyNode) return;
|
||||
dom.content(this.tableBodyNode, null);
|
||||
|
||||
const filtered = this.devices.filter(device =>
|
||||
(this.activeTab === 'all' || device.status === this.activeTab) &&
|
||||
model.matchesDevice(device, this.groups, this.activeGroup, this.filterText));
|
||||
const loading = this.initialLoading || this.listRefreshing || this.checkingOnline || (this.showingCache && !this.cacheRefreshFailed);
|
||||
if (!filtered.length && (loading || this.loadFailed)) {
|
||||
this.tableBodyNode.appendChild(E('tr', { 'class': 'tr' }, [
|
||||
E('td', { 'class': 'td', 'colspan': 8, 'style': 'text-align:center; padding:36px 16px;' }, [
|
||||
E('span', { 'class': loading ? 'spinning' : '', 'role': 'status' }, [
|
||||
loading ? _('Loading list...') : _('Could not load the device list.')
|
||||
]),
|
||||
...(loading ? [] : [ E('button', {
|
||||
'type': 'button', 'class': 'cbi-button', 'style': 'margin-left:12px;', 'click': () => this.refresh()
|
||||
}, [ _('Retry') ]) ])
|
||||
])
|
||||
]));
|
||||
return;
|
||||
}
|
||||
|
||||
if (filtered.length === 0) {
|
||||
let emptyMsg = _('No devices found. Refresh the list to try again.');
|
||||
|
||||
Reference in new issue
Block a user