Skip to content

Commit

Permalink
Add chat embed HTML ids (Mintplex-Labs#1514)
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycarambat authored May 23, 2024
1 parent 318025b commit c7e9240
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion embed/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export default function App() {
return (
<>
<Head />
<div className={`fixed inset-0 z-50 ${isChatOpen ? "block" : "hidden"}`}>
<div
id="anything-llm-embed-chat-container"
className={`fixed inset-0 z-50 ${isChatOpen ? "block" : "hidden"}`}
>
<div
className={`${windowHeight} ${windowWidth} h-full w-full bg-white fixed bottom-0 right-0 mb-4 md:mr-4 rounded-2xl border border-gray-300 shadow-[0_4px_14px_rgba(0,0,0,0.25)] ${positionClasses[position]}`}
id="anything-llm-chat"
Expand All @@ -53,6 +56,7 @@ export default function App() {
</div>
{!isChatOpen && (
<div
id="anything-llm-embed-chat-button-container"
className={`fixed bottom-0 ${positionClasses[position]} mb-4 z-50`}
>
<OpenButton
Expand Down
1 change: 1 addition & 0 deletions embed/src/components/OpenButton/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default function OpenButton({ settings, isOpen, toggleOpen }) {
: CHAT_ICONS.plus;
return (
<button
id="anything-llm-embed-chat-button"
onClick={toggleOpen}
className={`flex items-center justify-center p-4 rounded-full bg-[${settings.buttonColor}] text-white text-2xl`}
aria-label="Toggle Menu"
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/embed/anythingllm-chat-widget.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion server/endpoints/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ function systemEndpoints(app) {

let error = null;
const { usePassword, newPassword } = reqBody(request);
if (!usePassword) { // Password is being disabled so directly unset everything to bypass validation.
if (!usePassword) {
// Password is being disabled so directly unset everything to bypass validation.
process.env.AUTH_TOKEN = "";
process.env.JWT_SECRET = "";
} else {
Expand Down

0 comments on commit c7e9240

Please sign in to comment.