revisi: dokumen divisi
Deskripsi: - update on click pada flex selected file - file share boleh di unduh No Issues
This commit is contained in:
@@ -106,7 +106,7 @@ export default function NavbarDocumentDivision() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const cek = selectedFiles.some((i: any) => i?.category == "FOLDER");
|
const cek = selectedFiles.some((i: any) => i?.category == "FOLDER");
|
||||||
if (cek || shareSelected || selectedFiles.length > 1) {
|
if (cek || selectedFiles.length > 1) {
|
||||||
setCopyAllowed(false);
|
setCopyAllowed(false);
|
||||||
} else {
|
} else {
|
||||||
setCopyAllowed(true);
|
setCopyAllowed(true);
|
||||||
@@ -345,16 +345,14 @@ export default function NavbarDocumentDivision() {
|
|||||||
>
|
>
|
||||||
<Flex justify={"center"} align={"center"} h={"100%"} w={"100%"}>
|
<Flex justify={"center"} align={"center"} h={"100%"} w={"100%"}>
|
||||||
<SimpleGrid cols={{ base: 5, sm: 5, lg: 5 }} spacing="xs">
|
<SimpleGrid cols={{ base: 5, sm: 5, lg: 5 }} spacing="xs">
|
||||||
<Flex justify={"center"} align={"center"} direction={"column"} >
|
<Flex justify={"center"} align={"center"} direction={"column"}
|
||||||
<ActionIcon
|
|
||||||
variant="subtle"
|
|
||||||
aria-label="delete"
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (selectedFiles.length > 0 && copyAllowed) {
|
if (selectedFiles.length > 0 && copyAllowed) {
|
||||||
onDownload("selected");
|
onDownload("selected");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<ActionIcon variant="subtle" aria-label="delete" >
|
||||||
<BsDownload
|
<BsDownload
|
||||||
size={20}
|
size={20}
|
||||||
color={
|
color={
|
||||||
@@ -376,16 +374,14 @@ export default function NavbarDocumentDivision() {
|
|||||||
Unduh
|
Unduh
|
||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex justify={"center"} align={"center"} direction={"column"}>
|
<Flex justify={"center"} align={"center"} direction={"column"}
|
||||||
<ActionIcon
|
|
||||||
variant="subtle"
|
|
||||||
aria-label="delete"
|
|
||||||
onClick={
|
onClick={
|
||||||
selectedFiles.length > 0 && !shareSelected
|
selectedFiles.length > 0 && !shareSelected
|
||||||
? () => setIsDelete(true)
|
? () => setIsDelete(true)
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<ActionIcon variant="subtle" aria-label="delete" >
|
||||||
<AiOutlineDelete
|
<AiOutlineDelete
|
||||||
size={20}
|
size={20}
|
||||||
color={
|
color={
|
||||||
@@ -407,16 +403,14 @@ export default function NavbarDocumentDivision() {
|
|||||||
Hapus
|
Hapus
|
||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex justify={"center"} align={"center"} direction={"column"}>
|
<Flex justify={"center"} align={"center"} direction={"column"}
|
||||||
<ActionIcon
|
|
||||||
variant="subtle"
|
|
||||||
aria-label="rename"
|
|
||||||
onClick={
|
onClick={
|
||||||
selectedFiles.length == 1 && !shareSelected
|
selectedFiles.length == 1 && !shareSelected
|
||||||
? () => onChooseRename()
|
? () => onChooseRename()
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<ActionIcon variant="subtle" aria-label="rename" >
|
||||||
<CgRename
|
<CgRename
|
||||||
size={20}
|
size={20}
|
||||||
color={
|
color={
|
||||||
@@ -438,16 +432,14 @@ export default function NavbarDocumentDivision() {
|
|||||||
Ganti Nama
|
Ganti Nama
|
||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex justify={"center"} align={"center"} direction={"column"}>
|
<Flex justify={"center"} align={"center"} direction={"column"}
|
||||||
<ActionIcon
|
|
||||||
variant="subtle"
|
|
||||||
aria-label="share"
|
|
||||||
onClick={
|
onClick={
|
||||||
selectedFiles.length > 0 && !shareSelected
|
selectedFiles.length > 0 && !shareSelected
|
||||||
? () => setShare(true)
|
? () => setShare(true)
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<ActionIcon variant="subtle" aria-label="share" >
|
||||||
<LuShare2
|
<LuShare2
|
||||||
size={20}
|
size={20}
|
||||||
color={
|
color={
|
||||||
@@ -469,16 +461,14 @@ export default function NavbarDocumentDivision() {
|
|||||||
Bagikan
|
Bagikan
|
||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex justify={"center"} align={"center"} direction={"column"}>
|
<Flex justify={"center"} align={"center"} direction={"column"}
|
||||||
<ActionIcon
|
|
||||||
variant="subtle"
|
|
||||||
aria-label="share"
|
|
||||||
onClick={
|
onClick={
|
||||||
(selectedFiles.length == 1) || (selectedFiles.length > 0 && !shareSelected)
|
(selectedFiles.length == 1) || (selectedFiles.length > 0 && !shareSelected)
|
||||||
? () => setMore(true)
|
? () => setMore(true)
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<ActionIcon variant="subtle" aria-label="share" >
|
||||||
<MdOutlineMoreHoriz
|
<MdOutlineMoreHoriz
|
||||||
size={20}
|
size={20}
|
||||||
color={
|
color={
|
||||||
|
|||||||
Reference in New Issue
Block a user