From f3b2e02168e77ea8cc9bc68d151aba56e279f9c4 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 1 Jun 2022 10:56:46 -0500 Subject: show empty row in tables --- .../src/components/System/Shares/ExclusionTable.js | 20 +++++++++------ src/web/src/components/System/Shares/ShareTable.js | 29 ++++++++++++++-------- src/web/src/components/System/Shares/index.js | 7 ------ 3 files changed, 32 insertions(+), 24 deletions(-) (limited to 'src/web') diff --git a/src/web/src/components/System/Shares/ExclusionTable.js b/src/web/src/components/System/Shares/ExclusionTable.js index 90ee2eff..5e010e30 100644 --- a/src/web/src/components/System/Shares/ExclusionTable.js +++ b/src/web/src/components/System/Shares/ExclusionTable.js @@ -5,11 +5,9 @@ import { Icon, } from 'semantic-ui-react'; -const ExclusionTable = ({ exclusions = [] } = {}) => { - if (exclusions.length === 0) { - return <>; - } +import { Switch } from '../../Shared'; +const ExclusionTable = ({ exclusions = [] } = {}) => { return ( @@ -18,9 +16,17 @@ const ExclusionTable = ({ exclusions = [] } = {}) => { - {exclusions.map((share, index) => ( - {share.localPath} - ))} + + + No exclusions configured + + } + > + {exclusions.map((share, index) => ( + {share.localPath} + ))} +
); diff --git a/src/web/src/components/System/Shares/ShareTable.js b/src/web/src/components/System/Shares/ShareTable.js index ecd83e3f..d264fc8f 100644 --- a/src/web/src/components/System/Shares/ShareTable.js +++ b/src/web/src/components/System/Shares/ShareTable.js @@ -6,6 +6,7 @@ import { } from 'semantic-ui-react'; import { Link } from 'react-router-dom'; +import { Switch } from '../../Shared'; const ShareTable = ({ shares, onClick }) => { return ( @@ -20,16 +21,24 @@ const ShareTable = ({ shares, onClick }) => { - {shares.map((share, index) => ( - onClick(share)}> - - {share.localPath} - - {share.directories} - {share.files} - {share.alias} - {share.remotePath} - ))} + + + No shares configured + + } + > + {shares.map((share, index) => ( + onClick(share)}> + + {share.localPath} + + {share.directories} + {share.files} + {share.alias} + {share.remotePath} + ))} + ); diff --git a/src/web/src/components/System/Shares/index.js b/src/web/src/components/System/Shares/index.js index 53018b45..5fe59cb2 100644 --- a/src/web/src/components/System/Shares/index.js +++ b/src/web/src/components/System/Shares/index.js @@ -4,7 +4,6 @@ import { toast } from 'react-toastify'; import * as sharesLib from '../../../lib/shares'; import { LoaderSegment, - PlaceholderSegment, ShrinkableButton, Switch, } from '../../Shared'; @@ -65,12 +64,6 @@ const Index = ({ state = {} } = {}) => { } - empty={shared.length === 0 && - } > -- cgit v1.2.3