Branding fix: inject custom.css via source patch and add auto‑load JS
This commit is contained in:
1 parent
20be88f6e7
commit
2e8002d6c2
3 files changed
+21
-5
No files matched your search
+7
-5
@@ -31,8 +31,10 @@ COPY assets/maskable-icon.png /app/code/librechat/client/dist/assets/maskable-ic
|
|||||||
|
|
||||||
# Copy custom branding CSS
|
# Copy custom branding CSS
|
||||||
COPY assets/custom.css /app/code/librechat/client/dist/assets/custom.css
|
COPY assets/custom.css /app/code/librechat/client/dist/assets/custom.css
|
||||||
# Insert the CSS link after the title tag
|
# Copy optional helper JS (auto‑load API key)
|
||||||
RUN sed -i '/<title>Inference Co-op<\/title>/a <link rel="stylesheet" href="assets/custom.css">' /app/code/librechat/client/dist/index.html
|
COPY assets/custom.js /app/code/librechat/client/dist/assets/custom.js
|
||||||
|
# Apply branding patch to the *source* index.html before the container copies it
|
||||||
# Insert custom CSS link before closing </head>
|
COPY client/index.html.patch /tmp/index.html.patch
|
||||||
RUN sed -i '/<\/head>/i <link rel="stylesheet" href="assets/custom.css">' /app/code/librechat/client/dist/index.html
|
RUN cd /app/code/librechat/client && \
|
||||||
|
patch -p0 < /tmp/index.html.patch && \
|
||||||
|
rm /tmp/index.html.patch
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Auto‑load saved image generation API key into the MCP input field
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
--- a/client/index.html
|
||||||
|
+++ b/client/index.html
|
||||||
|
@@
|
||||||
|
- <title>LibreChat</title>
|
||||||
|
+ <title>Inference Co‑op</title>
|
||||||
|
+ <link rel="stylesheet" href="assets/custom.css">
|
||||||
Reference in new issue
Block a user