From 67fd4a65cab1c788a7c6db4263d07d498397c3c7 Mon Sep 17 00:00:00 2001 From: vshnosngh Date: Mon, 26 Oct 2026 13:00:12 +0530 Subject: [PATCH] style(khira): enlarge profile icons, widen static profile rings, remove revolving effect, and show upload button only on upload photo tab --- web/khira/app.js | 20 ++++++------ web/khira/styles.css | 76 +++++++++++++++++++++----------------------- 2 files changed, 47 insertions(+), 49 deletions(-) diff --git a/web/khira/app.js b/web/khira/app.js index 5d77051..97727c5 100644 --- a/web/khira/app.js +++ b/web/khira/app.js @@ -102,12 +102,12 @@ const avHtml=(rawU,size=36)=>{ const who=(u,alt)=>{ if(!u)return alt||'โ€”'; const obj=typeof u==='string'?resolveUser(u):u; - return `${avHtml(obj,22)} ${esc(obj?.name||obj?.username||alt||'โ€”')}`; + return `${avHtml(obj,28)} ${esc(obj?.name||obj?.username||alt||'โ€”')}`; }; function updateMe(u){ const el=$('#me');if(!el)return; - el.innerHTML=avHtml(u,36); + el.innerHTML=avHtml(u,44); } const usOpts=b=>[...(b?[['','Choose developer']]:[]),...S.us.map(u=>[u.username,`${u.name} ยท ${u.role_display}`])]; @@ -205,7 +205,7 @@ function renderT(anim){ const rows=f.filter(t=>st(t)===k||(!STAT[st(t)]&&k==='open')); return`

${STAT[k]}${rows.length}

${rows.map((t,i)=>{ const p=pri(t),n=(t.remarks||[]).length; - const avElem=avHtml(t.assignee||{avatar:t.assigned_to_avatar||'๐Ÿ‘ค'},20); + const avElem=avHtml(t.assignee||{avatar:t.assigned_to_avatar||'๐Ÿ‘ค',role:t.assigned_to_role,username:t.assigned_to},26); return`
${esc(t.id)}${t.ticket_type==='general'?'General':'App'}${p}

${esc(t.title)}

${esc(sub(t))}${n?`${ms('chat_bubble').replace('class="ms"','class="ms" style="font-size:16px"')}${n}`:''}${avElem}
`; }).join('')||'
No tickets
'}
`; }).join('')); @@ -526,7 +526,7 @@ function profile(){ profile_image:curImg, role:curRole, username:S.u.username - },56); + },76); }; let curRole=S.u.role; @@ -535,7 +535,7 @@ function profile(){ :ROLES; const adminOption=isAdmin - ?`` + ?`` :''; dlg({ @@ -550,12 +550,12 @@ function profile(){ -
+
${adminOption}${EMOJIS.map(em=>``).join('')}
-
+

${curImg?'Custom photo active':'PNG, JPG, WEBP or GIF'}

@@ -576,8 +576,10 @@ function profile(){ const t=btn.dataset.avt; curType=t; f.querySelectorAll('#avTabs button').forEach(b=>b.classList.toggle('on',b===btn)); - f.querySelector('#avEmojiBox').classList.toggle('hidden',t!=='emoji'); - f.querySelector('#avUploadBox').classList.toggle('hidden',t!=='image'); + const emojiBox=f.querySelector('#avEmojiBox'); + const uploadBox=f.querySelector('#avUploadBox'); + if(emojiBox){emojiBox.hidden=(t!=='emoji');emojiBox.classList.toggle('hidden',t!=='emoji')} + if(uploadBox){uploadBox.hidden=(t!=='image');uploadBox.classList.toggle('hidden',t!=='image')} f.querySelector('#avPrev').innerHTML=previewHtml(); }; }); diff --git a/web/khira/styles.css b/web/khira/styles.css index 4b4b260..dc48473 100644 --- a/web/khira/styles.css +++ b/web/khira/styles.css @@ -222,16 +222,14 @@ dt{font-size:12px;color:var(--on-sv)}dd{word-break:break-word} .upload-btn{height:36px;border-radius:18px;border:1px dashed var(--pri);background:var(--sc-hi);color:var(--pri);display:flex;align-items:center;justify-content:center;gap:8px;font-size:13px;font-weight:500;cursor:pointer} .upload-btn:hover{background:var(--sec-c)} -/* Special Admin Avatar "A" & Profile Rings */ -#me{width:44px;height:44px;overflow:visible;padding:0;display:grid;place-items:center} +.hidden{display:none!important} +.av-preview{width:88px;height:88px;border-radius:50%;margin:0 auto 16px;display:grid;place-items:center} -@keyframes av-revolve{ - 0%{transform:rotate(0deg)} - 100%{transform:rotate(360deg)} -} +/* Special Admin Avatar "A" & Profile Rings */ +#me{width:50px;height:50px;overflow:visible;padding:0;display:grid;place-items:center} .av-wrap{ - --sz:36px; + --sz:44px; position:relative; display:inline-grid; place-items:center; @@ -241,84 +239,82 @@ dt{font-size:12px;color:var(--on-sv)}dd{word-break:break-word} vertical-align:middle; } -/* Admin avatar is a little bigger than other profile avatars */ +/* Admin avatar is larger than other profile avatars */ .av-wrap.av-admin{ - --sz-admin:calc(var(--sz) * 1.18); + --sz-admin:calc(var(--sz) * 1.15); width:var(--sz-admin); height:var(--sz-admin); } -/* Floating revolving ring with gap around avatar boundary */ +/* Floating static wider ring (no revolving effect) with gap around avatar boundary */ .av-ring{ position:absolute; inset:0; border-radius:50%; pointer-events:none; - -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#fff calc(100% - 2px)); - mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#fff calc(100% - 2px)); - animation:av-revolve 3.5s linear infinite; + -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 4.2px),#fff calc(100% - 3.6px)); + mask:radial-gradient(farthest-side,transparent calc(100% - 4.2px),#fff calc(100% - 3.6px)); } -/* Inner avatar core, keeping a visible 2-3px gap from the ring */ +/* Inner avatar core, keeping a small floating gap from the wider ring */ .av-core{ position:relative; - width:calc(var(--sz) - 6px); - height:calc(var(--sz) - 6px); + width:calc(var(--sz) - 9px); + height:calc(var(--sz) - 9px); border-radius:50%; background:var(--sc-hi); display:grid; place-items:center; overflow:hidden; - font-size:calc(var(--sz) * 0.48); - box-shadow:0 1px 4px rgba(0,0,0,0.25); + font-size:calc(var(--sz) * 0.58); + box-shadow:0 2px 6px rgba(0,0,0,0.3); line-height:1; } .av-wrap.av-admin .av-core{ - width:calc(var(--sz-admin) - 6px); - height:calc(var(--sz-admin) - 6px); + width:calc(var(--sz-admin) - 9px); + height:calc(var(--sz-admin) - 9px); background:none; box-shadow:none; } .av-img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block} -/* Profile Ring Colors */ -/* 1. Tester: Bright red revolving ring */ +/* Profile Ring Colors (Clean, static, wider, vibrant) */ +/* 1. Tester: Bright red */ .av-wrap.av-tester .av-ring{ - background:conic-gradient(from 0deg,#FF2A2A 0%,#FF6B6B 20%,#FF2A2A 40%,rgba(255,42,42,0.2) 65%,rgba(255,42,42,0.05) 90%,#FF2A2A 100%); - filter:drop-shadow(0 0 3px rgba(255,42,42,0.6)); + background:#FF2A2A; + filter:drop-shadow(0 0 4px rgba(255,42,42,0.65)); } -/* 2. iOS Dev: Light green revolving ring */ +/* 2. iOS Dev: Light green */ .av-wrap.av-ios_dev .av-ring{ - background:conic-gradient(from 0deg,#34C759 0%,#7DFF9F 20%,#34C759 40%,rgba(52,199,89,0.2) 65%,rgba(52,199,89,0.05) 90%,#34C759 100%); - filter:drop-shadow(0 0 3px rgba(52,199,89,0.6)); + background:#34C759; + filter:drop-shadow(0 0 4px rgba(52,199,89,0.65)); } -/* 3. Android Dev: Light blue revolving ring */ +/* 3. Android Dev: Light blue */ .av-wrap.av-android_dev .av-ring{ - background:conic-gradient(from 0deg,#38BDF8 0%,#90E0EF 20%,#38BDF8 40%,rgba(56,189,248,0.2) 65%,rgba(56,189,248,0.05) 90%,#38BDF8 100%); - filter:drop-shadow(0 0 3px rgba(56,189,248,0.6)); + background:#38BDF8; + filter:drop-shadow(0 0 4px rgba(56,189,248,0.65)); } -/* 4. Backend Dev: Yellow revolving ring */ +/* 4. Backend Dev: Yellow */ .av-wrap.av-backend_dev .av-ring{ - background:conic-gradient(from 0deg,#FFD600 0%,#FFF385 20%,#FFD600 40%,rgba(255,214,0,0.2) 65%,rgba(255,214,0,0.05) 90%,#FFD600 100%); - filter:drop-shadow(0 0 3px rgba(255,214,0,0.6)); + background:#FFD600; + filter:drop-shadow(0 0 4px rgba(255,214,0,0.65)); } -/* 5. Designer: White revolving ring */ +/* 5. Designer: White */ .av-wrap.av-designer .av-ring{ - background:conic-gradient(from 0deg,#FFFFFF 0%,#E2E8F0 20%,#FFFFFF 40%,rgba(255,255,255,0.2) 65%,rgba(255,255,255,0.05) 90%,#FFFFFF 100%); - filter:drop-shadow(0 0 3px rgba(255,255,255,0.6)); + background:#FFFFFF; + filter:drop-shadow(0 0 4px rgba(255,255,255,0.7)); } -/* 6. Admin: Combined Google Pro gradient ring of all colors */ +/* 6. Admin: Combined Google Pro gradient ring of all colors (static) */ .av-wrap.av-admin .av-ring{ - background:conic-gradient(from 0deg,#FF2A2A 0%,#FFD600 20%,#34C759 40%,#38BDF8 60%,#FFFFFF 80%,#FF2A2A 100%); - filter:drop-shadow(0 0 4px rgba(255,214,0,0.7)); - animation-duration:2.8s; + background:conic-gradient(from 45deg,#FF2A2A 0%,#FFD600 22%,#34C759 45%,#38BDF8 68%,#FFFFFF 88%,#FF2A2A 100%); + filter:drop-shadow(0 0 5px rgba(255,214,0,0.7)); } .av-admin-svg{width:100%;height:100%;display:block}