aboutsummaryrefslogtreecommitdiffstats
path: root/src/web
diff options
context:
space:
mode:
authorinalone <me@inal.one>2022-11-12 22:18:46 +0000
committerinalone <me@inal.one>2022-11-12 22:19:46 +0000
commita17d6a9210a0714d91f9f5ccb108886053889137 (patch)
tree82ad88459d0130ac404a0784857321289656e1cb /src/web
parent0994fdcaaa50486d63859e07bfd019966b72a820 (diff)
downloadslskd-a17d6a9210a0714d91f9f5ccb108886053889137.tar.gz
Moved directory button to footer
Diffstat (limited to 'src/web')
-rw-r--r--src/web/src/components/App.css5
-rw-r--r--src/web/src/components/Search/Response.js7
-rw-r--r--src/web/src/components/Shared/FileList.js17
3 files changed, 13 insertions, 16 deletions
diff --git a/src/web/src/components/App.css b/src/web/src/components/App.css
index e5862c75..78b029b8 100644
--- a/src/web/src/components/App.css
+++ b/src/web/src/components/App.css
@@ -80,11 +80,6 @@ body {
width: 65px;
}
-.getfulldirectory-button {
- padding: 10px !important;
- margin-left: 5px !important;
-}
-
.showmore-button {
padding: 20px !important;
max-width: 1200px !important;
diff --git a/src/web/src/components/Search/Response.js b/src/web/src/components/Search/Response.js
index 239ab272..fc3cb400 100644
--- a/src/web/src/components/Search/Response.js
+++ b/src/web/src/components/Search/Response.js
@@ -120,8 +120,11 @@ class Response extends Component {
files={tree[dir]}
disabled={downloadRequest === 'inProgress'}
onSelectionChange={this.onFileSelectionChange}
- getFullDirectory={this.getFullDirectory}
- username={response.username}
+ footer={<button
+ onClick={() => this.getFullDirectory(response.username, dir)}
+ style={{ cursor: 'pointer', width: '100%', backgroundColor: 'transparent', border: 'none' }}>
+ <Icon name='folder'/>Get Full Directory Contents
+ </button>}
/>
)}
</Card.Content>
diff --git a/src/web/src/components/Shared/FileList.js b/src/web/src/components/Shared/FileList.js
index bcbebee9..3e171baf 100644
--- a/src/web/src/components/Shared/FileList.js
+++ b/src/web/src/components/Shared/FileList.js
@@ -3,7 +3,6 @@ import React, { useState } from 'react';
import { formatSeconds, formatBytes, getFileName, formatAttributes } from '../../lib/util';
import {
- Button,
Header,
Table,
Icon,
@@ -19,8 +18,7 @@ const FileList = ({
onSelectionChange,
disabled,
onClose,
- getFullDirectory,
- username,
+ footer,
}) => {
const [folded, setFolded] = useState(false);
@@ -38,12 +36,6 @@ const FileList = ({
onClick={() => !locked && setFolded(!folded)}/>
{directoryName}
- {onSelectionChange &&
- <Button
- onClick={() => getFullDirectory(username, directoryName)}
- className="getfulldirectory-button">Get Full Directory</Button>
- }
-
{!!onClose && <Icon
className='close-button'
name='close'
@@ -92,6 +84,13 @@ const FileList = ({
</Table.Row>
)}
</Table.Body>
+ {footer && <Table.Footer fullWidth>
+ <Table.Row>
+ <Table.HeaderCell colSpan='5'>
+ {footer}
+ </Table.HeaderCell>
+ </Table.Row>
+ </Table.Footer>}
</Table>
</List.Item>
</List>}