-   Notifications  You must be signed in to change notification settings 
- Fork 179
Added the ability to delete a datasource #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
(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; | 
There was a problem hiding this comment.
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 | 
There was a problem hiding this comment.
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"> | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| !this.state.isAdding && ( | ||
| <div> | ||
| <h1 className="text-2xl block text-white mb-4"> | ||
| {/* h1 tag specifies whether there are active data sources */} | 
There was a problem hiding this comment.
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> | 
There was a problem hiding this comment.
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> } } | } | ||
| } | ||
| } | ||
|  | 
There was a problem hiding this comment.
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
hide inactive sources in edit mode

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