From c7eda356c7999e955947c72fcbe600382ca0009e Mon Sep 17 00:00:00 2001 From: unimatrixgit <95320811+unimatrixgit@users.noreply.github.com> Date: Sun, 15 Nov 2026 14:50:14 +0100 Subject: [PATCH] Keep Clan CP authentication bar when outer page owns banner --- website/control-panel/public/cp-v2/cp-v2-auth.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/control-panel/public/cp-v2/cp-v2-auth.mjs b/website/control-panel/public/cp-v2/cp-v2-auth.mjs index d5272f50..dc875d9d 100644 --- a/website/control-panel/public/cp-v2/cp-v2-auth.mjs +++ b/website/control-panel/public/cp-v2/cp-v2-auth.mjs @@ -3,7 +3,7 @@ import {mountSecurity} from './cp-v2-security.mjs'; export function safeCPReturn(value){return typeof value==='string'&&!/[\\\r\n]/.test(value)&&(/^\/sso\/authorize\?/.test(value)||/^\/(?:memorial-login\?slug|profile-login\?username)=[a-z0-9_\-]{3,64}$/.test(value))?value:null;} export async function startCPAuthentication(onReady,{fetcher=fetch,locationTarget=location}={}){ const layout=document.querySelector('.layout'),portals=document.querySelector('#portals'),mobile=document.querySelector('.mobile-tools'); - const host=el('section',undefined,'cp-v2-auth'),bar=el('div',undefined,'cp-v2-account-bar');document.querySelector('.command-banner').after(bar,host); + const host=el('section',undefined,'cp-v2-auth'),bar=el('div',undefined,'cp-v2-account-bar');const banner=document.querySelector('.command-banner');if(banner)banner.after(bar,host);else document.body.prepend(bar,host); const hideWorkspaces=hidden=>{layout.hidden=portals.hidden=mobile.hidden=hidden;};hideWorkspaces(true); const request=async(path,payload)=>{const r=await fetcher('/api/'+path,{credentials:'same-origin',cache:'no-store',signal:AbortSignal.timeout(20000),...(payload===undefined?{}:{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(payload)})});const d=await r.json();if(!r.ok)throw Error(d.message||'Your request could not be completed.');return d;}; const status=el('p','Opening your account…');status.setAttribute('role','status');host.append(status);