fix: align all workflow trigger docs link

This commit is contained in:
lyzno1 2025-10-23 12:17:27 +08:00
parent 13af48800b
commit a77aab96f5
No known key found for this signature in database
6 changed files with 10 additions and 8 deletions

View File

@ -221,7 +221,7 @@ function AppCard({
</div> </div>
<div <div
className="cursor-pointer text-xs font-normal text-text-accent hover:underline" className="cursor-pointer text-xs font-normal text-text-accent hover:underline"
onClick={() => window.open(docLink('/guides/workflow/node/start'), '_blank')} onClick={() => window.open(docLink('/guides/workflow/node/user-input'), '_blank')}
> >
{t('appOverview.overview.appInfo.enableTooltip.learnMore')} {t('appOverview.overview.appInfo.enableTooltip.learnMore')}
</div> </div>

View File

@ -18,6 +18,7 @@ import { canFindTool } from '@/utils'
import { useTriggerStatusStore } from '@/app/components/workflow/store/trigger-status' import { useTriggerStatusStore } from '@/app/components/workflow/store/trigger-status'
import BlockIcon from '@/app/components/workflow/block-icon' import BlockIcon from '@/app/components/workflow/block-icon'
import { BlockEnum } from '@/app/components/workflow/types' import { BlockEnum } from '@/app/components/workflow/types'
import { useDocLink } from '@/context/i18n'
export type ITriggerCardProps = { export type ITriggerCardProps = {
appInfo: AppDetailResponse & Partial<AppSSO> appInfo: AppDetailResponse & Partial<AppSSO>
@ -83,6 +84,7 @@ const getTriggerIcon = (trigger: AppTrigger, triggerPlugins: any[]) => {
function TriggerCard({ appInfo, onToggleResult }: ITriggerCardProps) { function TriggerCard({ appInfo, onToggleResult }: ITriggerCardProps) {
const { t } = useTranslation() const { t } = useTranslation()
const docLink = useDocLink()
const appId = appInfo.id const appId = appInfo.id
const { isCurrentWorkspaceEditor } = useAppContext() const { isCurrentWorkspaceEditor } = useAppContext()
const { data: triggersResponse, isLoading } = useAppTriggers(appId) const { data: triggersResponse, isLoading } = useAppTriggers(appId)
@ -136,10 +138,6 @@ function TriggerCard({ appInfo, onToggleResult }: ITriggerCardProps) {
} }
} }
const handleLearnMoreClick = () => {
console.log('Learn about Triggers clicked')
}
if (isLoading) { if (isLoading) {
return ( return (
<div className="w-full max-w-full rounded-xl border-l-[0.5px] border-t border-effects-highlight"> <div className="w-full max-w-full rounded-xl border-l-[0.5px] border-t border-effects-highlight">
@ -209,8 +207,9 @@ function TriggerCard({ appInfo, onToggleResult }: ITriggerCardProps) {
<div className="system-xs-regular leading-4 text-text-tertiary"> <div className="system-xs-regular leading-4 text-text-tertiary">
{t('appOverview.overview.triggerInfo.triggerStatusDescription')}{' '} {t('appOverview.overview.triggerInfo.triggerStatusDescription')}{' '}
<Link <Link
href="#" href={docLink('/guides/workflow/node/trigger')}
onClick={handleLearnMoreClick} target="_blank"
rel="noopener noreferrer"
className="text-text-accent hover:underline" className="text-text-accent hover:underline"
> >
{t('appOverview.overview.triggerInfo.learnAboutTriggers')} {t('appOverview.overview.triggerInfo.learnAboutTriggers')}

View File

@ -63,7 +63,7 @@ const WorkflowOnboardingModal: FC<WorkflowOnboardingModalProps> = ({
<div className="body-xs-regular leading-4 text-text-tertiary"> <div className="body-xs-regular leading-4 text-text-tertiary">
{t('workflow.onboarding.description')}{' '} {t('workflow.onboarding.description')}{' '}
<a <a
href={docLink('guides/workflow/node/start')} href={docLink('/guides/workflow/node/start')}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
className="hover:text-text-accent-hover cursor-pointer text-text-accent underline" className="hover:text-text-accent-hover cursor-pointer text-text-accent underline"

View File

@ -212,6 +212,7 @@ const buildOutputVars = (schema: Record<string, any>, schemaTypeDefinitions?: Sc
const metaData = genNodeMetaData({ const metaData = genNodeMetaData({
sort: 1, sort: 1,
type: BlockEnum.TriggerPlugin, type: BlockEnum.TriggerPlugin,
helpLinkUri: 'plugin-trigger',
isStart: true, isStart: true,
}) })

View File

@ -107,6 +107,7 @@ const validateVisualConfig = (payload: ScheduleTriggerNodeType, t: any): string
const metaData = genNodeMetaData({ const metaData = genNodeMetaData({
sort: 2, sort: 2,
type: BlockEnum.TriggerSchedule, type: BlockEnum.TriggerSchedule,
helpLinkUri: 'schedule-trigger',
isStart: true, isStart: true,
}) })

View File

@ -8,6 +8,7 @@ import { createWebhookRawVariable } from './utils/raw-variable'
const metaData = genNodeMetaData({ const metaData = genNodeMetaData({
sort: 3, sort: 3,
type: BlockEnum.TriggerWebhook, type: BlockEnum.TriggerWebhook,
helpLinkUri: 'webhook-trigger',
isStart: true, isStart: true,
}) })