feat(plugin-workflow): show workflow key as tooltip on title (#4178)

This commit is contained in:
Junyi 2024-04-28 17:03:44 +08:00 committed by GitHub
parent bcf6c1b677
commit 05c5acd8b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 3 deletions

View File

@ -275,7 +275,13 @@ export function ExecutionCanvas() {
<Breadcrumb
items={[
{ title: <Link to={app.pluginSettingsManager.getRoutePath('workflow')}>{lang('Workflow')}</Link> },
{ title: <Link to={getWorkflowDetailPath(workflow.id)}>{workflow.title}</Link> },
{
title: (
<Tooltip title={`Key: ${workflow.key}`}>
<Link to={getWorkflowDetailPath(workflow.id)}>{workflow.title}</Link>
</Tooltip>
),
},
{ title: <ExecutionsDropdown /> },
]}
/>

View File

@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Link, useNavigate } from 'react-router-dom';
import { App, Breadcrumb, Button, Dropdown, Result, Spin, Switch, message } from 'antd';
import { App, Breadcrumb, Button, Dropdown, Result, Spin, Switch, Tooltip, message } from 'antd';
import { DownOutlined, EllipsisOutlined, RightOutlined } from '@ant-design/icons';
import {
ActionContextProvider,
@ -157,7 +157,13 @@ export function WorkflowCanvas() {
<Breadcrumb
items={[
{ title: <Link to={app.pluginSettingsManager.getRoutePath('workflow')}>{lang('Workflow')}</Link> },
{ title: <strong>{workflow.title}</strong> },
{
title: (
<Tooltip title={`Key: ${workflow.key}`}>
<strong>{workflow.title}</strong>
</Tooltip>
),
},
]}
/>
</header>