v1.8.13: fix applyBrandingColors not defined in admin.html

This commit is contained in:
2026-05-28 21:07:10 +00:00
parent 8b88fed23f
commit 21ae2b4749
6 changed files with 23 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+23
View File
@@ -926,6 +926,29 @@ curl -X POST https://rag.afaqzaid.com/ingest-url \
</div>
<script>
// -- Branding color override --------------------------------------------------
function applyBrandingColors(p, s) {
p = p || '#4edea3'; s = s || '#95d3ba';
const hr = (hex) => { const r=parseInt(hex.slice(1,3),16),g=parseInt(hex.slice(3,5),16),b=parseInt(hex.slice(5,7),16); return r+','+g+','+b; };
const pr = hr(p), sr = hr(s);
const old = document.getElementById('_bco'); if(old) old.remove();
const st = document.createElement('style'); st.id='_bco';
st.textContent=
'.text-primary{color:'+p+'!important}.bg-primary{background-color:'+p+'!important}.border-primary{border-color:'+p+'!important}'+
'.text-secondary{color:'+s+'!important}.bg-secondary{background-color:'+s+'!important}'+
'.glass{border-color:rgba('+pr+',0.12)!important}'+
'.glass-hover:hover{background:rgba('+pr+',0.06)!important;border-color:rgba('+pr+',0.25)!important}'+
'.glow{box-shadow:0 0 20px rgba('+pr+',0.15)!important}'+
'.glow-sm{box-shadow:0 0 10px rgba('+pr+',0.1)!important}'+
'.glass.glow{box-shadow:inset 0 1px 0 rgba(255,255,255,0.06),0 0 20px rgba('+pr+',0.18),0 4px 24px rgba(0,0,0,0.15)!important}'+
'.upload-zone{border-color:rgba('+pr+',0.2)!important}'+
'.scrollbar::-webkit-scrollbar-thumb{background:rgba('+pr+',0.2)!important}';
document.head.appendChild(st);
document.documentElement.style.setProperty('--primary',p);
document.documentElement.style.setProperty('--secondary',s);
}
// ADMIN_KEY removed - JWT-only auth
let JWT_TOKEN = localStorage.getItem('admin_jwt') || '';
const RAG_KEY = 'zRf77E_brSEnA2BUi40uxLxT4uofAk661WMZb-cdv4M';