diff --git a/Dockerfile b/Dockerfile index 9331c2b..71a4c8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,12 +30,12 @@ COPY assets/icon-192x192.png /app/code/librechat/client/dist/assets/icon-192x192 COPY assets/maskable-icon.png /app/code/librechat/client/dist/assets/maskable-icon.png # Custom stylesheet and optional helper JS -COPY assets/custom_v2.css /app/code/librechat/client/dist/assets/custom_v2.css +COPY assets/custom.css /app/code/librechat/client/dist/assets/custom.css # rebuild trigger COPY assets/custom2.js /app/code/librechat/client/dist/assets/custom2.js # Inject branding into built HTML (dist) before image is packaged # rebuild marker 20261019-$(date +%s) RUN sed -i 's|
wraps the register link on auth pages. :has() hides the + whole paragraph (custom2.js is the MutationObserver fallback). */ +p:has(> a[href*="register"]) { + display: none !important; } - -/* Hide any registration / external‑account UI */ +/* Belt-and-braces: hide any residual register/signup links */ a[href*="register"], -a[href*="signup"], -.register-link, -.signup-link { +a[href*="signup"] { display: none !important; } -/* Ensure text on login page uses branding colors */ -.login-page, .login-page * { - color: rgb(36,48,32) !important; -} - +/* ---- Footer: simple centered link to the co-op homepage ---- */ footer { text-align: center; padding: 1rem; } footer::before { - content: "© Inference Co‑op – "; + content: "© Inference Co-op – "; } footer::after { content: "inference.coop"; - color: rgb(var(--brand-primary-rgb)); + color: rgb(var(--accent-primary)); cursor: pointer; } -footer::after:hover { - text-decoration: underline; -} \ No newline at end of file diff --git a/assets/custom2.js b/assets/custom2.js index bdb7d8d..cd05397 100644 --- a/assets/custom2.js +++ b/assets/custom2.js @@ -1,16 +1,28 @@ -// Auto-load saved image‑generation API key into the MCP input field. -// No prompt is shown; if a key is stored in localStorage it is auto‑filled. -window.addEventListener('load', () => { - const savedKey = localStorage.getItem('image_api_key'); - if (savedKey) { - const icInput = document.querySelector('input[name=\"IC_API_KEY\"]'); - if (icInput) icInput.value = savedKey; +// Co-op login-page polish. +// The auth form is client-rendered (React), so a plain `load` listener runs +// too early — a MutationObserver re-checks on every DOM change instead. +(function () { + function hideSignupPrompt() { + document.querySelectorAll('p').forEach(function (p) { + var link = p.querySelector('a[href*="register"]'); + var text = (p.textContent || ''); + if (link || text.indexOf("Don't have an account") !== -1) { + p.style.display = 'none'; + } + }); } - // Hide "Don't have an account?" text on the login page - const nodes = document.querySelectorAll('p, span, div'); - nodes.forEach(node => { - if (node.textContent && node.textContent.includes("Don't have an account")) { - node.style.display = 'none'; - } - }); -}); \ No newline at end of file + + function start() { + hideSignupPrompt(); + new MutationObserver(hideSignupPrompt).observe(document.body, { + childList: true, + subtree: true, + }); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', start); + } else { + start(); + } +})(); diff --git a/assets/custom_v2.css b/assets/custom_v2.css deleted file mode 100644 index 086ae7d..0000000 --- a/assets/custom_v2.css +++ /dev/null @@ -1,50 +0,0 @@ -/* Co‑op branding colors */ -:root { - --brand-primary-rgb: 91,140,90; /* green */ - --brand-surface-rgb: 250,248,245;/* cream */ -} - -/* Primary‑color UI */ -button, -.MuiButton-contained, -.ant-btn-primary { - background-color: rgb(var(--brand-primary-rgb)) !important; - border-color: rgb(var(--brand-primary-rgb)) !important; -} - -/* Surface background */ -body, -.appContainer, -.chatContainer, -.login-page { - background-color: rgb(var(--brand-surface-rgb)) !important; -} - -/* Hide any registration / external‑account UI */ -a[href*="register"], -a[href*="signup"], -.register-link, -.signup-link { - display: none !important; -} - -/* Ensure text on login page uses branding colors */ -.login-page, .login-page * { - color: rgb(36,48,32) !important; -} - -footer { - text-align: center; - padding: 1rem; -} -footer::before { - content: "© Inference Co‑op – "; -} -footer::after { - content: "inference.coop"; - color: rgb(var(--brand-primary-rgb)); - cursor: pointer; -} -footer::after:hover { - text-decoration: underline; -}