cron button label
This commit is contained in:
@@ -224,8 +224,9 @@ export default function Bisync() {
|
|||||||
if (!dest) return 'Please select a destination path'
|
if (!dest) return 'Please select a destination path'
|
||||||
if (source === dest) return 'Source and destination cannot be the same'
|
if (source === dest) return 'Source and destination cannot be the same'
|
||||||
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
||||||
|
if (cronExpression) return 'START AND SCHEDULE BISYNC'
|
||||||
return 'START BISYNC'
|
return 'START BISYNC'
|
||||||
}, [startBisyncMutation.isPending, source, dest, jsonError])
|
}, [startBisyncMutation.isPending, source, dest, jsonError, cronExpression])
|
||||||
|
|
||||||
const buttonIcon = useMemo(() => {
|
const buttonIcon = useMemo(() => {
|
||||||
if (startBisyncMutation.isPending) return
|
if (startBisyncMutation.isPending) return
|
||||||
|
|||||||
+2
-1
@@ -268,8 +268,9 @@ export default function Copy() {
|
|||||||
if (!dest) return 'Please select a destination path'
|
if (!dest) return 'Please select a destination path'
|
||||||
if (sources[0] === dest) return 'Source and destination cannot be the same'
|
if (sources[0] === dest) return 'Source and destination cannot be the same'
|
||||||
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
||||||
|
if (cronExpression) return 'START AND SCHEDULE COPY'
|
||||||
return 'START COPY'
|
return 'START COPY'
|
||||||
}, [startCopyMutation.isPending, sources, dest, jsonError])
|
}, [startCopyMutation.isPending, sources, dest, jsonError, cronExpression])
|
||||||
|
|
||||||
const buttonIcon = useMemo(() => {
|
const buttonIcon = useMemo(() => {
|
||||||
if (startCopyMutation.isPending) return
|
if (startCopyMutation.isPending) return
|
||||||
|
|||||||
@@ -242,8 +242,9 @@ export default function Delete() {
|
|||||||
if (startDeleteMutation.isPending) return 'STARTING...'
|
if (startDeleteMutation.isPending) return 'STARTING...'
|
||||||
if (!sourceFs || sourceFs.length === 0) return 'Please select a source path'
|
if (!sourceFs || sourceFs.length === 0) return 'Please select a source path'
|
||||||
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
||||||
|
if (cronExpression) return 'START AND SCHEDULE DELETE'
|
||||||
return 'START DELETE'
|
return 'START DELETE'
|
||||||
}, [startDeleteMutation.isPending, sourceFs, jsonError])
|
}, [startDeleteMutation.isPending, sourceFs, jsonError, cronExpression])
|
||||||
|
|
||||||
const buttonIcon = useMemo(() => {
|
const buttonIcon = useMemo(() => {
|
||||||
if (startDeleteMutation.isPending) return
|
if (startDeleteMutation.isPending) return
|
||||||
|
|||||||
+2
-1
@@ -295,8 +295,9 @@ export default function Move() {
|
|||||||
if (!dest) return 'Please select a destination path'
|
if (!dest) return 'Please select a destination path'
|
||||||
if (sources[0] === dest) return 'Source and destination cannot be the same'
|
if (sources[0] === dest) return 'Source and destination cannot be the same'
|
||||||
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
||||||
|
if (cronExpression) return 'START AND SCHEDULE MOVE'
|
||||||
return 'START MOVE'
|
return 'START MOVE'
|
||||||
}, [startMoveMutation.isPending, sources, dest, jsonError])
|
}, [startMoveMutation.isPending, sources, dest, jsonError, cronExpression])
|
||||||
|
|
||||||
const buttonIcon = useMemo(() => {
|
const buttonIcon = useMemo(() => {
|
||||||
if (startMoveMutation.isPending) return
|
if (startMoveMutation.isPending) return
|
||||||
|
|||||||
+2
-1
@@ -137,8 +137,9 @@ export default function Purge() {
|
|||||||
if (startPurgeMutation.isPending) return 'STARTING...'
|
if (startPurgeMutation.isPending) return 'STARTING...'
|
||||||
if (!source) return 'Please select a source path'
|
if (!source) return 'Please select a source path'
|
||||||
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
||||||
|
if (cronExpression) return 'START AND SCHEDULE PURGE'
|
||||||
return 'START PURGE'
|
return 'START PURGE'
|
||||||
}, [startPurgeMutation.isPending, source, jsonError])
|
}, [startPurgeMutation.isPending, source, jsonError, cronExpression])
|
||||||
|
|
||||||
const buttonIcon = useMemo(() => {
|
const buttonIcon = useMemo(() => {
|
||||||
if (startPurgeMutation.isPending) return
|
if (startPurgeMutation.isPending) return
|
||||||
|
|||||||
+2
-1
@@ -220,8 +220,9 @@ export default function Sync() {
|
|||||||
if (!dest) return 'Please select a destination path'
|
if (!dest) return 'Please select a destination path'
|
||||||
if (source === dest) return 'Source and destination cannot be the same'
|
if (source === dest) return 'Source and destination cannot be the same'
|
||||||
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
if (jsonError) return 'Invalid JSON for ' + jsonError.toUpperCase() + ' options'
|
||||||
|
if (cronExpression) return 'START AND SCHEDULE SYNC'
|
||||||
return 'START SYNC'
|
return 'START SYNC'
|
||||||
}, [startSyncMutation.isPending, source, dest, jsonError])
|
}, [startSyncMutation.isPending, source, dest, jsonError, cronExpression])
|
||||||
|
|
||||||
const buttonIcon = useMemo(() => {
|
const buttonIcon = useMemo(() => {
|
||||||
if (startSyncMutation.isPending) return
|
if (startSyncMutation.isPending) return
|
||||||
|
|||||||
Reference in New Issue
Block a user