Skip to content

Conversation

@NathanCrotty
Copy link
Contributor

As of now it isn't connected to the back-end, so deleting things isn't saved.
image

(not yet functional) edit button
 but I don't know why it works. It still doesn't affect storage, so deleting a data source is only until the page is reloaded.
I now underestand how it works.
}
}

// let editMode = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove line

render() {
return (
<div className="relative flex flex-col bg-[#221f2e] items-start px-8 pt-0 pb-4 min-h-[300px]">
<div className="relative flex flex-col bg-[#221f2e] items-start px-8 pt-0 pb-4 min-h-[300px]">1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove that 1?

<IoMdClose onClick={this.props.onClose} className='absolute right-4 top-3 text-2xl text-white hover:text-[#9875d4] hover:cursor-pointer'></IoMdClose>

{/* X and Edit in top right */}
<div className="absolute flex flex-col items-center right-4 top-3 text-2xl text-white gap-4">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the edit button to be in the same line with the title, and make it bigger + a little margin right
image

!this.state.isAdding && (
<div>
<h1 className="text-2xl block text-white mb-4">
{/* h1 tag specifies whether there are active data sources */}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

<div className="flex py-2 pl-5 pr-3 m-2 flex-row items-center justify-center bg-[#352C45] hover:shadow-inner shadow-blue-500/50 rounded-lg font-poppins leading-[28px] border-b-[#916CCD] border-b-2">
<img alt="data-source" className={"mr-2 h-[20px]"} src={this.props.dataSourceTypesDict[data_source].image_base64}></img>
<h1 className="text-white">{this.props.dataSourceTypesDict[data_source].display_name}</h1>
<AiFillCheckCircle className="ml-6 text-[#9875d4] text-2xl"> </AiFillCheckCircle>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do like that:

{ if(this.state.isEditMode) { return ...your_delete_thingy.... } else { return <AiFillCheckCircle className="ml-6 text-[#9875d4] text-2xl"> </AiFillCheckCircle> } } 
}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On edit mode, show only the connected data sources

NathanCrotty and others added 6 commits March 27, 2023 15:24
@Roey7 Roey7 merged commit 3a98b8b into GerevAI:main Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants