diff --git a/public/admin.css b/public/admin.css index dd12f7f..f3782d6 100644 --- a/public/admin.css +++ b/public/admin.css @@ -5,7 +5,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;b .layout{display:flex;min-height:100dvh} .sidebar{width:var(--sidebar);background:var(--card);border-right:1px solid var(--border);padding:24px 0;position:fixed;top:0;left:0;height:100dvh;display:flex;flex-direction:column} .sidebar .logo{font-size:1.1rem;font-weight:700;padding:0 20px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px;min-width:0} -.sidebar .logo-ic{height:28px;width:auto;min-width:28px;border-radius:8px;background:var(--bg);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0} +.sidebar .logo-ic{height:28px;width:auto;min-width:28px;background:var(--bg);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0} .sidebar .logo-ic img{max-width:100%;max-height:100%;object-fit:contain} .sidebar #sidebarName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0} .user-box{padding:14px 20px;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:2px} @@ -304,7 +304,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;b @media(max-width:640px){.save-bar{left:16px;right:16px}} .logo-picker{display:flex;align-items:flex-start;gap:20px;flex-wrap:wrap} -.logo-preview{min-width:96px;min-height:72px;max-height:96px;height:auto;border:1px dashed var(--border);border-radius:14px;background:var(--bg);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;font-size:1.4rem;font-weight:700;color:var(--muted)} +.logo-preview{min-width:96px;min-height:72px;max-height:96px;height:auto;border:1px dashed var(--border);background:var(--bg);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;font-size:1.4rem;font-weight:700;color:var(--muted)} .logo-preview img{max-width:100%;max-height:100%;object-fit:contain;display:none} .logo-picker-actions{display:flex;flex-direction:column;gap:10px;align-items:flex-start;min-width:0} .logo-picker-btns{display:flex;gap:10px;flex-wrap:wrap} diff --git a/public/js/report.js b/public/js/report.js index 5f73b3f..88f1b85 100644 --- a/public/js/report.js +++ b/public/js/report.js @@ -4,7 +4,20 @@ function loadBrand(){ return fetch('/api/public-settings').then(function(res){ return res.ok?res.json():null; }).then(function(s){ - if(s&&(s.system_name||'').trim())state.systemName=s.system_name; + if(!s)return; + if((s.system_name||'').trim())state.systemName=s.system_name; + var logo=document.getElementById('brandLogo'); + if(logo&&s.system_logo){ + logo.src=s.system_logo; + logo.hidden=false; + var mark=document.getElementById('brandMark'); + if(mark)mark.style.display='none'; + } + var name=document.getElementById('brandName'); + if(name&&(s.system_name||'').trim()){ + name.textContent=s.system_name; + name.hidden=false; + } }).catch(function(){}); } diff --git a/public/js/share.js b/public/js/share.js index 6854e8f..c7c4f18 100644 --- a/public/js/share.js +++ b/public/js/share.js @@ -309,3 +309,27 @@ document.addEventListener('click', e => { notice.classList.add('hidden'); }); })(); + +(async function(){ + try { + const res = await fetch('/api/public-settings'); + if (!res.ok) return; + const s = await res.json(); + const head = document.getElementById('brandHead'); + if (!head) return; + const logo = document.getElementById('brandLogo'); + const name = document.getElementById('brandName'); + let any = false; + if (name && (s.system_name || '').trim()) { + name.textContent = s.system_name; + name.hidden = false; + any = true; + } + if (logo && s.system_logo) { + logo.src = s.system_logo; + logo.hidden = false; + any = true; + } + if (any) head.hidden = false; + } catch (e) {} +})(); diff --git a/public/login.html b/public/login.html index 09d911a..a9474a2 100644 --- a/public/login.html +++ b/public/login.html @@ -10,7 +10,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--bg);color:var(--text);min-height:100dvh;display:flex;align-items:center;justify-content:center} .login{max-width:320px;width:100%;text-align:center;background:var(--card);border:1px solid var(--border);border-radius:16px;padding:40px 32px} .login .brand{display:flex;flex-direction:column;align-items:center;gap:14px;margin-bottom:24px} -.login .brand .logo{height:48px;width:auto;min-width:48px;border-radius:14px;background:var(--bg);border:1px solid var(--border);display:none;align-items:center;justify-content:center;overflow:hidden} +.login .brand .logo{height:48px;width:auto;min-width:48px;background:var(--bg);border:1px solid var(--border);display:none;align-items:center;justify-content:center;overflow:hidden} .login .brand .logo img{max-width:100%;max-height:100%;object-fit:contain} .login h1{font-size:1.3rem;font-weight:600;margin:0} .login input{width:100%;background:var(--bg);border:1px solid var(--border);color:var(--text);border-radius:var(--radius);padding:14px 16px;font-size:.95rem;outline:none;margin-bottom:12px;text-align:center} diff --git a/public/report.custom.css b/public/report.custom.css index 7f47159..8204b8c 100644 --- a/public/report.custom.css +++ b/public/report.custom.css @@ -50,6 +50,9 @@ button,a{-webkit-tap-highlight-color:transparent} .rep-logo-box{width:auto;min-width:44px;height:40px;align-items:center;justify-content:center;overflow:visible} .rep-logo{font-size:20px;font-weight:500;letter-spacing:-.05em;line-height:1;color:rgb(21,21,21);white-space:nowrap} +.rep-brand-logo{height:40px;width:auto;max-width:min(30vw,200px);object-fit:contain;display:block} +.rep-brand-name{font-size:18px;font-weight:500;letter-spacing:-.05em;line-height:1;color:rgb(21,21,21);white-space:nowrap;max-width:min(26vw,180px);overflow:hidden;text-overflow:ellipsis} +.rep-nav .link-block--u-ij7yf5mm2{column-gap:12px} .rep-logo-box--footer{height:20px;min-width:0} .rep-logo--white{font-size:18px;color:#fff} diff --git a/public/report.html b/public/report.html index 9a1f636..6c045f4 100644 --- a/public/report.html +++ b/public/report.html @@ -16,7 +16,11 @@
-
+
+ + +
+