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