removed save password prompt

This commit is contained in:
anovazzi1 2023-03-10 18:54:55 -03:00
commit 600f6aedda
4 changed files with 18010 additions and 17997 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,36 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { InputComponentType } from "../../types/components"; import { InputComponentType } from "../../types/components";
import { classNames } from "../../utils";
export default function InputComponent({value, onChange, disabled, password}: InputComponentType){ export default function InputComponent({
const [myValue, setMyValue] = useState(value ?? ""); value,
useEffect(()=> { onChange,
if(disabled){ disabled,
setMyValue(""); password,
onChange(""); }: InputComponentType) {
} const [myValue, setMyValue] = useState(value ?? "");
}, [disabled, onChange]) useEffect(() => {
return ( if (disabled) {
<div className={disabled ? "pointer-events-none cursor-not-allowed" : ""}> setMyValue("");
<input onChange("");
type={password ? "password" : "text"} }
value={myValue} }, [disabled, onChange]);
className={"block w-full form-input dark:bg-gray-900 dark:border-gray-600 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" + (disabled ? " bg-gray-200 dark:bg-gray-700" : "")} return (
placeholder="Type a text" <div className={disabled ? "pointer-events-none cursor-not-allowed" : ""}>
onChange={(e) => { <input
setMyValue(e.target.value); type="text"
onChange(e.target.value); value={myValue}
}} className={classNames(
/> "block w-full form-input dark:bg-gray-900 dark:border-gray-600 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",
</div> disabled ? " bg-gray-200 dark:bg-gray-700" : "",
); password?"password":""
)}
placeholder="Type a text"
onChange={(e) => {
setMyValue(e.target.value);
onChange(e.target.value);
}}
/>
</div>
);
} }

View file

@ -128,7 +128,7 @@ export function TabsProvider({ children }: { children: ReactNode }) {
// Create a new flow with a default name if no flow is provided. // Create a new flow with a default name if no flow is provided.
let newFlow: FlowType = { let newFlow: FlowType = {
name: flow ? flow.name : "New Flow " + id, name: flow ? flow.name : "New Flow " + (flows.length===0?"":flows.length),
id: id.toString(), id: id.toString(),
data, data,
chat: flow ? flow.chat : [], chat: flow ? flow.chat : [],

View file

@ -32,6 +32,9 @@ module.exports = {
'-webkit-appearance': 'none', '-webkit-appearance': 'none',
'margin': 0 'margin': 0
}, },
},
'.password':{
"-webkit-text-security":"disc"
} }
} }
) )