Add chat embed HTML ids (#1514)

This commit is contained in:
Timothy Carambat 2024-05-23 12:54:07 -05:00 committed by GitHub
parent 318025baee
commit c7e9240801
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 3 deletions

View File

@ -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"
@ -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

View File

@ -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"

File diff suppressed because one or more lines are too long

View File

@ -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 {