ui: simplify header with logo, auto-refresh on by default
- When company logo is set, show only "Hallintapaneeli" without company name (logo identifies the company) - Ticket auto-refresh checkbox is checked by default - Auto-refresh starts when switching to support tab Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -276,7 +276,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<button class="btn-secondary" id="btn-ticket-rules" style="padding:7px 14px;font-size:0.82rem;">⚙ Säännöt</button>
|
<button class="btn-secondary" id="btn-ticket-rules" style="padding:7px 14px;font-size:0.82rem;">⚙ Säännöt</button>
|
||||||
<label style="display:flex;align-items:center;gap:0.4rem;font-size:0.82rem;color:#777;cursor:pointer;white-space:nowrap;margin-left:auto;">
|
<label style="display:flex;align-items:center;gap:0.4rem;font-size:0.82rem;color:#777;cursor:pointer;white-space:nowrap;margin-left:auto;">
|
||||||
<input type="checkbox" id="ticket-auto-refresh"> Autopäivitys
|
<input type="checkbox" id="ticket-auto-refresh" checked> Autopäivitys
|
||||||
<select id="ticket-refresh-interval" style="padding:3px 6px;border:1px solid #ddd;border-radius:5px;font-size:0.8rem;">
|
<select id="ticket-refresh-interval" style="padding:3px 6px;border:1px solid #ddd;border-radius:5px;font-size:0.8rem;">
|
||||||
<option value="30">30s</option>
|
<option value="30">30s</option>
|
||||||
<option value="60" selected>1 min</option>
|
<option value="60" selected>1 min</option>
|
||||||
|
|||||||
10
script.js
10
script.js
@@ -235,7 +235,7 @@ function switchToTab(target) {
|
|||||||
if (target === 'leads') loadLeads();
|
if (target === 'leads') loadLeads();
|
||||||
if (target === 'archive') loadArchive();
|
if (target === 'archive') loadArchive();
|
||||||
if (target === 'changelog') loadChangelog();
|
if (target === 'changelog') loadChangelog();
|
||||||
if (target === 'support') { loadTickets(); showTicketListView(); }
|
if (target === 'support') { loadTickets(); showTicketListView(); if (document.getElementById('ticket-auto-refresh').checked) startTicketAutoRefresh(); }
|
||||||
if (target === 'users') loadUsers();
|
if (target === 'users') loadUsers();
|
||||||
if (target === 'settings') loadSettings();
|
if (target === 'settings') loadSettings();
|
||||||
if (target === 'companies') loadCompaniesTab();
|
if (target === 'companies') loadCompaniesTab();
|
||||||
@@ -2155,8 +2155,12 @@ function applyBranding(branding) {
|
|||||||
if (logoUrl) { headerLogo.src = logoUrl; headerLogo.style.display = ''; if (headerIcon) headerIcon.style.display = 'none'; }
|
if (logoUrl) { headerLogo.src = logoUrl; headerLogo.style.display = ''; if (headerIcon) headerIcon.style.display = 'none'; }
|
||||||
else { headerLogo.style.display = 'none'; if (headerIcon) headerIcon.style.display = ''; }
|
else { headerLogo.style.display = 'none'; if (headerIcon) headerIcon.style.display = ''; }
|
||||||
}
|
}
|
||||||
if (headerTitle) headerTitle.textContent = nimi;
|
// Kun logo on, näytetään vain "Hallintapaneeli" — logo kertoo yrityksen
|
||||||
if (headerSubtitle) headerSubtitle.textContent = subtitle || 'Hallintapaneeli';
|
if (headerTitle) headerTitle.textContent = logoUrl ? 'Hallintapaneeli' : nimi;
|
||||||
|
if (headerSubtitle) {
|
||||||
|
if (logoUrl) { headerSubtitle.style.display = 'none'; }
|
||||||
|
else { headerSubtitle.style.display = ''; headerSubtitle.textContent = subtitle || 'Hallintapaneeli'; }
|
||||||
|
}
|
||||||
|
|
||||||
// Sivun title
|
// Sivun title
|
||||||
document.title = nimi;
|
document.title = nimi;
|
||||||
|
|||||||
Reference in New Issue
Block a user