-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
10 changed files
with
181 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 35 additions & 9 deletions
44
...ular-frontend-new/src/components/tabs/fileTree/fileList/fileListElements/fileListFile.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
...-new/src/components/tabs/fileTree/fileTreeElementInfoDialog/fileTreeElementInfoDialog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import { useSelector } from 'react-redux'; | ||
import { RootState } from '../../../../redux'; | ||
import { FileTreeElementType, FileTreeElementTypeType } from '../../../../types/data/fileListType.ts'; | ||
import FileListFolder from '../fileList/fileListElements/fileListFolder.tsx'; | ||
import { filterFileTree } from '../fileList/fileListUtilities/fileTreeUtilities.tsx'; | ||
import FileSearch from '../fileSearch/fileSearch.tsx'; | ||
import { useState } from 'react'; | ||
|
||
function FileTreeElementInfoDialog() { | ||
const selectedFileTreeElement: FileTreeElementType | undefined = useSelector((state: RootState) => state.files.selectedFileTreeElement); | ||
const [fileSearch, setFileSearch] = useState(''); | ||
|
||
return ( | ||
<dialog id={'fileTreeElementInfoDialog'} className={'modal'}> | ||
<div className={'modal-box'}> | ||
{selectedFileTreeElement && ( | ||
<> | ||
<h3 id={'informationDialogHeadline'} className={'font-bold text-lg mb-2 underline'}> | ||
{selectedFileTreeElement.name} | ||
</h3> | ||
<h2>Type</h2> | ||
<div>{selectedFileTreeElement.type}</div> | ||
{selectedFileTreeElement.type === FileTreeElementTypeType.File && selectedFileTreeElement.element && ( | ||
<> | ||
<h2>Path</h2> | ||
<div>{selectedFileTreeElement.element.path}</div> | ||
<h2>Max Length</h2> | ||
<div>{selectedFileTreeElement.element.maxLength}</div> | ||
<h2>Url</h2> | ||
<div> | ||
<a href={selectedFileTreeElement.element.webUrl}>{selectedFileTreeElement.element.webUrl}</a> | ||
</div> | ||
</> | ||
)} | ||
<h2>File Tree State</h2> | ||
<div> | ||
<span className={'mr-2'}> | ||
{selectedFileTreeElement.foldedOut ? ( | ||
<div className="badge badge-accent">folded out</div> | ||
) : ( | ||
<div className="badge badge-accent badge-outline">folded in</div> | ||
)} | ||
</span> | ||
<span className={'mr-2'}> | ||
{selectedFileTreeElement.checked ? ( | ||
<div className="badge badge-accent">checked</div> | ||
) : ( | ||
<div className="badge badge-accent badge-outline">unchecked</div> | ||
)} | ||
</span> | ||
</div> | ||
|
||
{selectedFileTreeElement.type === FileTreeElementTypeType.Folder && ( | ||
<> | ||
<h2>Folder Content</h2> | ||
<FileSearch setFileSearch={setFileSearch}></FileSearch> | ||
<FileListFolder | ||
folder={filterFileTree(selectedFileTreeElement, fileSearch)} | ||
foldedOut={true} | ||
listOnly={true}></FileListFolder> | ||
</> | ||
)} | ||
</> | ||
)} | ||
|
||
<div className={'modal-action'}> | ||
<form method={'dialog'}> | ||
<button className={'btn btn-sm btn-accent'}>Close</button> | ||
</form> | ||
</div> | ||
</div> | ||
<form method="dialog" className="modal-backdrop"> | ||
<button>close</button> | ||
</form> | ||
</dialog> | ||
); | ||
} | ||
|
||
export default FileTreeElementInfoDialog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters