mirror of
https://github.com/langgenius/dify.git
synced 2026-04-15 01:21:22 +08:00
fix: improve schedule trigger and quick settings app-operation btns ui (#24843)
This commit is contained in:
parent
c138f4c3a6
commit
9ed45594c6
@ -62,7 +62,7 @@ const AppOperations = ({ primaryOperations, secondaryOperations, gap }: {
|
||||
key={operation.id}
|
||||
size={'small'}
|
||||
variant={'secondary'}
|
||||
className="gap-[1px]"
|
||||
className="gap-[1px] px-1.5"
|
||||
onClick={operation.onClick}>
|
||||
{cloneElement(operation.icon, { className: 'h-3.5 w-3.5 text-components-button-secondary-text' })}
|
||||
<span className="system-xs-medium text-components-button-secondary-text">
|
||||
@ -85,7 +85,7 @@ const AppOperations = ({ primaryOperations, secondaryOperations, gap }: {
|
||||
<Button
|
||||
size={'small'}
|
||||
variant={'secondary'}
|
||||
className='gap-1'
|
||||
className='gap-1 px-1.5'
|
||||
>
|
||||
<RiMoreFill className='h-3.5 w-3.5 text-components-button-secondary-text' />
|
||||
<span className='system-xs-medium text-components-button-secondary-text'>{t('common.operation.more')}</span>
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
type ExecuteNowButtonProps = {
|
||||
onClick: () => void
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
const ExecuteNowButton = ({ onClick, disabled = false }: ExecuteNowButtonProps) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
className="w-full rounded-lg border-[0.5px] border-components-button-secondary-border bg-components-button-secondary-bg py-1.5 text-xs font-medium text-components-button-secondary-text shadow-xs hover:bg-components-button-secondary-bg-hover disabled:cursor-not-allowed disabled:opacity-50"
|
||||
>
|
||||
{t('workflow.nodes.triggerSchedule.executeNow')}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
export default ExecuteNowButton
|
||||
@ -23,13 +23,15 @@ const NextExecutionTimes = ({ data }: NextExecutionTimesProps) => {
|
||||
<label className="block text-xs font-medium text-gray-500">
|
||||
{t('workflow.nodes.triggerSchedule.nextExecutionTimes')}
|
||||
</label>
|
||||
<div className="space-y-2 rounded-lg bg-components-input-bg-normal p-3">
|
||||
<div className="flex min-h-[80px] flex-col rounded-xl bg-components-input-bg-normal py-2">
|
||||
{executionTimes.map((time, index) => (
|
||||
<div key={index} className="flex items-baseline gap-3 text-xs text-text-secondary">
|
||||
<span className="select-none font-mono leading-none text-text-quaternary">
|
||||
<div key={index} className="flex items-baseline text-xs">
|
||||
<span className="w-6 select-none text-right font-mono font-normal leading-[150%] tracking-wider text-text-quaternary">
|
||||
{String(index + 1).padStart(2, '0')}
|
||||
</span>
|
||||
<span className="leading-none">{time}</span>
|
||||
<span className="pl-2 pr-3 font-mono font-normal leading-[150%] tracking-wider text-text-secondary">
|
||||
{time}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@ -10,7 +10,6 @@ import WeekdaySelector from './components/weekday-selector'
|
||||
import TimePicker from '@/app/components/base/date-and-time-picker/time-picker'
|
||||
import dayjs from 'dayjs'
|
||||
import NextExecutionTimes from './components/next-execution-times'
|
||||
import ExecuteNowButton from './components/execute-now-button'
|
||||
import MonthlyDaysSelector from './components/monthly-days-selector'
|
||||
import OnMinuteSelector from './components/on-minute-selector'
|
||||
import Input from '@/app/components/base/input'
|
||||
@ -34,11 +33,6 @@ const Panel: FC<NodePanelProps<ScheduleTriggerNodeType>> = ({
|
||||
handleOnMinuteChange,
|
||||
} = useConfig(id, data)
|
||||
|
||||
const handleExecuteNow = () => {
|
||||
// TODO: Implement execute now functionality
|
||||
console.log('Execute now clicked')
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='mt-2'>
|
||||
<div className='space-y-4 px-4 pb-3 pt-2'>
|
||||
@ -146,9 +140,6 @@ const Panel: FC<NodePanelProps<ScheduleTriggerNodeType>> = ({
|
||||
|
||||
<NextExecutionTimes data={inputs} />
|
||||
|
||||
<div className="pt-2">
|
||||
<ExecuteNowButton onClick={handleExecuteNow} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user