diff --git a/ui/app.js b/ui/app.js index 1bbfa38..77be587 100644 --- a/ui/app.js +++ b/ui/app.js @@ -1,6 +1,5 @@ /* ============================================================ - Driver Booster Pro - Application Logic - Driver Navigator Style: tabs, driver rows, action buttons + Driver Booster Pro - PNG Icons Edition ============================================================ */ var App = { @@ -10,16 +9,9 @@ var App = { this.setupTabs(); this.setupFilters(); this.refreshSysInfo(); - this.refreshIcons(); }, - refreshIcons: function() { - if (window.lucide) lucide.createIcons(); - }, - - // ---- Tab Navigation ---- setupTabs: function() { - var self = this; document.querySelectorAll('.toolbar-tab').forEach(function(tab) { tab.addEventListener('click', function() { var id = tab.dataset.tab; @@ -32,7 +24,6 @@ var App = { }); }, - // ---- Filter Pills ---- setupFilters: function() { var self = this; document.querySelectorAll('.pill').forEach(function(btn) { @@ -54,17 +45,15 @@ var App = { }); }, - // ---- Loading ---- showLoading: function(text) { document.getElementById('loading-text').textContent = text; document.getElementById('loading-overlay').style.display = 'flex'; - this.refreshIcons(); }, hideLoading: function() { document.getElementById('loading-overlay').style.display = 'none'; }, - // ---- System Info ---- + // System Info refreshSysInfo: function() { var self = this; this.showLoading('Collecting system information...'); @@ -72,10 +61,7 @@ var App = { self.state.sysInfo = info; self.renderSysInfo(info); self.hideLoading(); - }).catch(function(e) { - console.error(e); - self.hideLoading(); - }); + }).catch(function(e) { console.error(e); self.hideLoading(); }); }, renderSysInfo: function(d) { @@ -100,17 +86,15 @@ var App = { if(db) db.style.width = (d.diskPercent||0)+'%'; }, - // ---- Driver Scan ---- + // Driver Scan scanDrivers: function() { var self = this; - this.showLoading('Scanning drivers... This may take a moment.'); + this.showLoading('Scanning drivers...'); // Switch to drivers tab document.querySelectorAll('.toolbar-tab').forEach(function(t){ t.classList.remove('active'); }); document.querySelector('[data-tab="drivers"]').classList.add('active'); document.querySelectorAll('.tab-page').forEach(function(p){ p.classList.remove('active'); }); document.getElementById('tab-drivers').classList.add('active'); - - // Update steps this.setStep(2); fetch('/api/drivers/scan').then(function(r){ return r.json(); }).then(function(result) { @@ -118,10 +102,7 @@ var App = { self.renderDrivers(result); self.updateScanStats(result); self.hideLoading(); - }).catch(function(e) { - console.error(e); - self.hideLoading(); - }); + }).catch(function(e) { console.error(e); self.hideLoading(); }); }, updateScanStats: function(r) { @@ -139,8 +120,7 @@ var App = { var list = document.getElementById('driver-list'); if (!result.drivers || result.drivers.length === 0) { - list.innerHTML = '

No drivers found

'; - this.refreshIcons(); + list.innerHTML = '

No drivers found

'; return; } @@ -150,32 +130,31 @@ var App = { if (d.needsUpdate) cls.push('outdated'); if (d.status === 'Error' || d.status === 'Degraded') cls.push('error'); - var icon = self.driverIcon(d.deviceClass); + var iconFile = self.driverIconFile(d.deviceClass); var barClass = d.needsUpdate ? 'warn' : (d.status === 'Error' ? 'err' : 'ok'); var signBadge = d.isSigned - ? ' Signed' - : ''; + ? ' Signed' + : 'Unsigned'; var actionBtn = d.needsUpdate - ? '' + - '' - : ''; + ? '' + + '' + : ''; return '
' + - '
' + + '
' + '
' + '
' + self.esc(d.deviceName) + '
' + - '
' + self.esc(d.manufacturer||'Unknown') + ' · v' + self.esc(d.driverVersion||'?') + ' · ' + self.esc(d.driverDate) + ' ' + signBadge + '
' + - '
' + - '
' + - '
' + + '
' + self.esc(d.manufacturer||'Unknown') + + ' · v' + self.esc(d.driverVersion||'?') + + ' · ' + self.esc(d.driverDate) + ' ' + signBadge + '
' + '
' + + '
' + '
' + actionBtn + '
' + '
'; }).join(''); - // Show CTA if there are outdated drivers var cta = document.getElementById('cta-update-all'); if (result.outdatedCount > 0) { cta.style.display = 'flex'; @@ -183,30 +162,27 @@ var App = { } else { cta.style.display = 'none'; } - - this.refreshIcons(); }, - driverIcon: function(cls) { - if (!cls) return 'package'; + driverIconFile: function(cls) { + if (!cls) return 'package.png'; var u = cls.toUpperCase(); var m = { - 'DISPLAY':'monitor','MEDIA':'volume-2','AUDIO':'volume-2','SOUND':'volume-2', - 'NET':'wifi','NETWORK':'wifi','USB':'usb','HID':'mouse','KEYBOARD':'keyboard', - 'DISK':'hard-drive','STORAGE':'hard-drive','PROCESSOR':'cpu','SYSTEM':'settings', - 'BLUETOOTH':'bluetooth','CAMERA':'camera','IMAGE':'camera','PRINT':'printer', - 'BATTERY':'battery-charging','FIRMWARE':'circuit-board','SECURITY':'shield', - 'SENSOR':'thermometer' + 'DISPLAY':'monitor.png','MEDIA':'speaker.png','AUDIO':'speaker.png','SOUND':'speaker.png', + 'NET':'wifi.png','NETWORK':'wifi.png','USB':'usb.png','HID':'mouse.png', + 'KEYBOARD':'keyboard.png','DISK':'harddrive.png','STORAGE':'harddrive.png', + 'PROCESSOR':'cpu.png','SYSTEM':'settings.png','BLUETOOTH':'bluetooth.png', + 'CAMERA':'camera.png','IMAGE':'camera.png','PRINT':'printer.png', + 'BATTERY':'battery.png' }; for (var k in m) { if (u.indexOf(k) !== -1) return m[k]; } - return 'package'; + return 'package.png'; }, - // ---- Windows Update ---- + // Windows Update checkUpdates: function() { var self = this; this.showLoading('Checking for Windows updates...'); - // Switch to updates tab document.querySelectorAll('.toolbar-tab').forEach(function(t){ t.classList.remove('active'); }); document.querySelector('[data-tab="updates"]').classList.add('active'); document.querySelectorAll('.tab-page').forEach(function(p){ p.classList.remove('active'); }); @@ -216,24 +192,18 @@ var App = { self.state.updates = result; self.renderUpdates(result); self.hideLoading(); - }).catch(function(e) { - console.error(e); - self.hideLoading(); - }); + }).catch(function(e) { console.error(e); self.hideLoading(); }); }, renderUpdates: function(result) { var list = document.getElementById('update-list'); if (result.error) { - list.innerHTML = '

' + this.esc(result.error) + '

'; - this.refreshIcons(); + list.innerHTML = '

' + this.esc(result.error) + '

'; return; } - if (!result.updates || result.updates.length === 0) { - list.innerHTML = '

Your system is fully up to date!

'; - this.refreshIcons(); + list.innerHTML = '

Your system is fully up to date!

'; return; } @@ -243,32 +213,28 @@ var App = { var html = ''; if (pending.length > 0) { - html += '
Pending (' + pending.length + ')
'; + html += '
Pending (' + pending.length + ')
'; html += pending.map(function(u) { return '
' + '
' + self.esc(u.title) + '
' + '
' + - (u.kbArticle ? ' '+self.esc(u.kbArticle)+'' : '') + - (u.category ? ' '+self.esc(u.category)+'' : '') + - (u.size ? ' '+self.esc(u.size)+'' : '') + - (u.severity && u.severity !== 'Unspecified' ? ' '+self.esc(u.severity)+'' : '') + - '
' + - '
'; + (u.kbArticle ? ' '+self.esc(u.kbArticle)+'' : '') + + (u.category ? ' '+self.esc(u.category)+'' : '') + + (u.size ? ' '+self.esc(u.size)+'' : '') + + (u.severity && u.severity !== 'Unspecified' ? ' '+self.esc(u.severity)+'' : '') + + ''; }).join(''); } if (installed.length > 0) { - html += '
Recently Installed (' + installed.length + ')
'; + html += '
Recently Installed (' + installed.length + ')
'; html += installed.map(function(u) { return '
' + self.esc(u.title) + '
'; }).join(''); } - list.innerHTML = html; - this.refreshIcons(); }, - // ---- Step bar ---- setStep: function(n) { for (var i = 1; i <= 3; i++) { var el = document.getElementById('step-' + i); @@ -279,7 +245,6 @@ var App = { } }, - // ---- Helpers ---- set: function(id, val) { var el = document.getElementById(id); if (el) el.textContent = (val != null && val !== '') ? val : '--'; diff --git a/ui/icon-battery.png b/ui/icon-battery.png new file mode 100644 index 0000000..b1bae70 Binary files /dev/null and b/ui/icon-battery.png differ diff --git a/ui/icon-bluetooth.png b/ui/icon-bluetooth.png new file mode 100644 index 0000000..18e8e4a Binary files /dev/null and b/ui/icon-bluetooth.png differ diff --git a/ui/icon-camera.png b/ui/icon-camera.png new file mode 100644 index 0000000..411bac8 Binary files /dev/null and b/ui/icon-camera.png differ diff --git a/ui/icon-checkmark.png b/ui/icon-checkmark.png new file mode 100644 index 0000000..7ca088a Binary files /dev/null and b/ui/icon-checkmark.png differ diff --git a/ui/icon-cloud.png b/ui/icon-cloud.png new file mode 100644 index 0000000..19d7f75 Binary files /dev/null and b/ui/icon-cloud.png differ diff --git a/ui/icon-cpu.png b/ui/icon-cpu.png new file mode 100644 index 0000000..80628c2 Binary files /dev/null and b/ui/icon-cpu.png differ diff --git a/ui/icon-download.png b/ui/icon-download.png new file mode 100644 index 0000000..5b90e12 Binary files /dev/null and b/ui/icon-download.png differ diff --git a/ui/icon-error.png b/ui/icon-error.png new file mode 100644 index 0000000..fc00b23 Binary files /dev/null and b/ui/icon-error.png differ diff --git a/ui/icon-harddrive.png b/ui/icon-harddrive.png new file mode 100644 index 0000000..d4b03ee Binary files /dev/null and b/ui/icon-harddrive.png differ diff --git a/ui/icon-help.png b/ui/icon-help.png new file mode 100644 index 0000000..c18cf86 Binary files /dev/null and b/ui/icon-help.png differ diff --git a/ui/icon-info.png b/ui/icon-info.png new file mode 100644 index 0000000..75ffe11 Binary files /dev/null and b/ui/icon-info.png differ diff --git a/ui/icon-install.png b/ui/icon-install.png new file mode 100644 index 0000000..25bd613 Binary files /dev/null and b/ui/icon-install.png differ diff --git a/ui/icon-keyboard.png b/ui/icon-keyboard.png new file mode 100644 index 0000000..836a6ef Binary files /dev/null and b/ui/icon-keyboard.png differ diff --git a/ui/icon-laptop.png b/ui/icon-laptop.png new file mode 100644 index 0000000..4467d95 Binary files /dev/null and b/ui/icon-laptop.png differ diff --git a/ui/icon-monitor.png b/ui/icon-monitor.png new file mode 100644 index 0000000..7e564b4 Binary files /dev/null and b/ui/icon-monitor.png differ diff --git a/ui/icon-mouse.png b/ui/icon-mouse.png new file mode 100644 index 0000000..75d0178 Binary files /dev/null and b/ui/icon-mouse.png differ diff --git a/ui/icon-package.png b/ui/icon-package.png new file mode 100644 index 0000000..d768706 Binary files /dev/null and b/ui/icon-package.png differ diff --git a/ui/icon-printer.png b/ui/icon-printer.png new file mode 100644 index 0000000..d3cc846 Binary files /dev/null and b/ui/icon-printer.png differ diff --git a/ui/icon-ram.png b/ui/icon-ram.png new file mode 100644 index 0000000..97d13c8 Binary files /dev/null and b/ui/icon-ram.png differ diff --git a/ui/icon-refresh.png b/ui/icon-refresh.png new file mode 100644 index 0000000..890b888 Binary files /dev/null and b/ui/icon-refresh.png differ diff --git a/ui/icon-scan.png b/ui/icon-scan.png new file mode 100644 index 0000000..7e38cb6 Binary files /dev/null and b/ui/icon-scan.png differ diff --git a/ui/icon-settings.png b/ui/icon-settings.png new file mode 100644 index 0000000..06fc5cb Binary files /dev/null and b/ui/icon-settings.png differ diff --git a/ui/icon-shield.png b/ui/icon-shield.png new file mode 100644 index 0000000..f8db22f Binary files /dev/null and b/ui/icon-shield.png differ diff --git a/ui/icon-speaker.png b/ui/icon-speaker.png new file mode 100644 index 0000000..f06db17 Binary files /dev/null and b/ui/icon-speaker.png differ diff --git a/ui/icon-usb.png b/ui/icon-usb.png new file mode 100644 index 0000000..17bd668 Binary files /dev/null and b/ui/icon-usb.png differ diff --git a/ui/icon-warning.png b/ui/icon-warning.png new file mode 100644 index 0000000..2baa822 Binary files /dev/null and b/ui/icon-warning.png differ diff --git a/ui/icon-wifi.png b/ui/icon-wifi.png new file mode 100644 index 0000000..2526e57 Binary files /dev/null and b/ui/icon-wifi.png differ diff --git a/ui/index.html b/ui/index.html index 6636d5f..bc1c08f 100644 --- a/ui/index.html +++ b/ui/index.html @@ -5,23 +5,20 @@ Driver Booster Pro -
- +
DRIVER BOOSTER PRO
-
+
System Protected
@@ -31,27 +28,19 @@
@@ -63,72 +52,35 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +

Scan Your System

Detect outdated, missing, and faulty drivers. Keep your PC running at peak performance.

-
+
- + --
- + --
- + --
-
-
@@ -152,7 +104,7 @@
-

Installed Drivers

+

Installed Drivers

- +

Click Scan to detect your drivers