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

View file

@ -1,11 +1,11 @@
{ {
"name": "space_flow", "name": "langflow",
"version": "0.1.1", "version": "0.1.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "space_flow", "name": "langflow",
"version": "0.1.1", "version": "0.1.1",
"dependencies": { "dependencies": {
"@emotion/react": "^11.10.5", "@emotion/react": "^11.10.5",

View file

@ -1,20 +1,30 @@
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({
value,
onChange,
disabled,
password,
}: InputComponentType) {
const [myValue, setMyValue] = useState(value ?? ""); const [myValue, setMyValue] = useState(value ?? "");
useEffect(() => { useEffect(() => {
if (disabled) { if (disabled) {
setMyValue(""); setMyValue("");
onChange(""); onChange("");
} }
}, [disabled, onChange]) }, [disabled, onChange]);
return ( return (
<div className={disabled ? "pointer-events-none cursor-not-allowed" : ""}> <div className={disabled ? "pointer-events-none cursor-not-allowed" : ""}>
<input <input
type={password ? "password" : "text"} type="text"
value={myValue} value={myValue}
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" : "")} 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",
disabled ? " bg-gray-200 dark:bg-gray-700" : "",
password?"password":""
)}
placeholder="Type a text" placeholder="Type a text"
onChange={(e) => { onChange={(e) => {
setMyValue(e.target.value); setMyValue(e.target.value);

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"
} }
} }
) )