feat(ui): switch logo dynamically based on device_type
Topbar logo now loads from config: NebuleAir Pro or ModuleAir Pro. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,8 +2,18 @@
|
||||
<nav class="navbar navbar-dark fixed-top" style="background-color: #8d8d8f;" id="topbar">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#">
|
||||
<img src="assets/img/LogoNebuleAir.png" alt="Logo" height="30" class="d-inline-block align-text-top">
|
||||
</a>
|
||||
<img src="assets/img/LogoNebuleAir.png" alt="Logo" height="30" class="d-inline-block align-text-top" id="topbar-logo">
|
||||
</a>
|
||||
<script>
|
||||
fetch('launcher.php?type=get_config_sqlite')
|
||||
.then(r => r.json())
|
||||
.then(config => {
|
||||
if (config.device_type === 'moduleair_pro') {
|
||||
document.getElementById('topbar-logo').src = 'assets/img/logoModuleAir.png';
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
</script>
|
||||
<div class="d-flex">
|
||||
<button class="btn btn-outline-light d-md-none me-2" type="button" data-bs-toggle="offcanvas" data-bs-target="#sidebarOffcanvas" aria-controls="sidebarOffcanvas" aria-label="Toggle Sidebar">☰</button>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user