From ee616ee6dd57f2020552c7502e7f42408369baa0 Mon Sep 17 00:00:00 2001 From: StyleZhang Date: Thu, 22 Feb 2024 16:35:35 +0800 Subject: [PATCH] header --- .../assets/vender/line/time/clock-play.svg | 10 +++ .../icons/src/vender/line/time/ClockPlay.json | 66 +++++++++++++++++++ .../icons/src/vender/line/time/ClockPlay.tsx | 16 +++++ .../base/icons/src/vender/line/time/index.ts | 1 + web/app/components/workflow/header.tsx | 33 ---------- web/app/components/workflow/header/index.tsx | 61 +++++++++++++++++ .../workflow/header/run-and-history.tsx | 29 ++++++++ 7 files changed, 183 insertions(+), 33 deletions(-) create mode 100644 web/app/components/base/icons/assets/vender/line/time/clock-play.svg create mode 100644 web/app/components/base/icons/src/vender/line/time/ClockPlay.json create mode 100644 web/app/components/base/icons/src/vender/line/time/ClockPlay.tsx delete mode 100644 web/app/components/workflow/header.tsx create mode 100644 web/app/components/workflow/header/index.tsx create mode 100644 web/app/components/workflow/header/run-and-history.tsx diff --git a/web/app/components/base/icons/assets/vender/line/time/clock-play.svg b/web/app/components/base/icons/assets/vender/line/time/clock-play.svg new file mode 100644 index 0000000000..e6c79b18b9 --- /dev/null +++ b/web/app/components/base/icons/assets/vender/line/time/clock-play.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/web/app/components/base/icons/src/vender/line/time/ClockPlay.json b/web/app/components/base/icons/src/vender/line/time/ClockPlay.json new file mode 100644 index 0000000000..7d3cc48b09 --- /dev/null +++ b/web/app/components/base/icons/src/vender/line/time/ClockPlay.json @@ -0,0 +1,66 @@ +{ + "icon": { + "type": "element", + "isRootNode": true, + "name": "svg", + "attributes": { + "width": "16", + "height": "16", + "viewBox": "0 0 16 16", + "fill": "none", + "xmlns": "http://www.w3.org/2000/svg" + }, + "children": [ + { + "type": "element", + "name": "g", + "attributes": { + "id": "Icon", + "clip-path": "url(#clip0_635_10941)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "id": "Vector", + "d": "M14.6334 8.66683C14.6552 8.44756 14.6663 8.22516 14.6663 8.00016C14.6663 4.31826 11.6816 1.3335 7.99967 1.3335C4.31778 1.3335 1.33301 4.31826 1.33301 8.00016C1.33301 11.6821 4.31778 14.6668 7.99967 14.6668C8.11145 14.6668 8.22258 14.6641 8.33301 14.6586C8.44487 14.6531 8.556 14.6449 8.66634 14.6339M7.99967 4.00016V8.00016L5.42265 9.25534M11.853 9.97346L14.4308 11.9068C14.6238 12.0515 14.7203 12.1239 14.7548 12.2126C14.785 12.2904 14.785 12.3766 14.7548 12.4543C14.7203 12.543 14.6238 12.6154 14.4308 12.7601L11.853 14.6935C11.5784 14.8995 11.441 15.0024 11.3261 15.0001C11.226 14.998 11.1322 14.9511 11.0706 14.8723C10.9997 14.7818 10.9997 14.6101 10.9997 14.2668V10.4001C10.9997 10.0568 10.9997 9.88516 11.0706 9.79463C11.1322 9.71585 11.226 9.66895 11.3261 9.66687C11.441 9.66448 11.5784 9.76747 11.853 9.97346Z", + "stroke": "currentColor", + "stroke-width": "1.5", + "stroke-linecap": "round", + "stroke-linejoin": "round" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "defs", + "attributes": {}, + "children": [ + { + "type": "element", + "name": "clipPath", + "attributes": { + "id": "clip0_635_10941" + }, + "children": [ + { + "type": "element", + "name": "rect", + "attributes": { + "width": "16", + "height": "16", + "fill": "white" + }, + "children": [] + } + ] + } + ] + } + ] + }, + "name": "ClockPlay" +} \ No newline at end of file diff --git a/web/app/components/base/icons/src/vender/line/time/ClockPlay.tsx b/web/app/components/base/icons/src/vender/line/time/ClockPlay.tsx new file mode 100644 index 0000000000..f3ddfeee4d --- /dev/null +++ b/web/app/components/base/icons/src/vender/line/time/ClockPlay.tsx @@ -0,0 +1,16 @@ +// GENERATE BY script +// DON NOT EDIT IT MANUALLY + +import * as React from 'react' +import data from './ClockPlay.json' +import IconBase from '@/app/components/base/icons/IconBase' +import type { IconBaseProps, IconData } from '@/app/components/base/icons/IconBase' + +const Icon = React.forwardRef, Omit>(( + props, + ref, +) => ) + +Icon.displayName = 'ClockPlay' + +export default Icon diff --git a/web/app/components/base/icons/src/vender/line/time/index.ts b/web/app/components/base/icons/src/vender/line/time/index.ts index 74b1f565d2..2187814bbf 100644 --- a/web/app/components/base/icons/src/vender/line/time/index.ts +++ b/web/app/components/base/icons/src/vender/line/time/index.ts @@ -1 +1,2 @@ export { default as ClockFastForward } from './ClockFastForward' +export { default as ClockPlay } from './ClockPlay' diff --git a/web/app/components/workflow/header.tsx b/web/app/components/workflow/header.tsx deleted file mode 100644 index bb67bc0714..0000000000 --- a/web/app/components/workflow/header.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Edit03 } from '@/app/components/base/icons/src/vender/solid/general' -import Button from '@/app/components/base/button' - -const Header = () => { - return ( -
-
-
Fitness and Nutrition Expert
-
-
- - Editing -
-
-
-
- -
-
- ) -} - -export default Header diff --git a/web/app/components/workflow/header/index.tsx b/web/app/components/workflow/header/index.tsx new file mode 100644 index 0000000000..f180ef17bb --- /dev/null +++ b/web/app/components/workflow/header/index.tsx @@ -0,0 +1,61 @@ +import type { FC } from 'react' +import { memo } from 'react' +import { useWorkflowContext } from '../context' +import RunAndHistory from './run-and-history' +import { Edit03 } from '@/app/components/base/icons/src/vender/solid/general' +import { Grid01 } from '@/app/components/base/icons/src/vender/line/layout' +import Button from '@/app/components/base/button' +import { ArrowNarrowLeft } from '@/app/components/base/icons/src/vender/line/arrows' + +const Header: FC = () => { + const { mode } = useWorkflowContext() + + return ( +
+
+
Fitness and Nutrition Expert
+
+
+ + Editing +
+
+
+
+ + +
+ { + mode === 'workflow' && ( + + ) + } + +
+
+ ) +} + +export default memo(Header) diff --git a/web/app/components/workflow/header/run-and-history.tsx b/web/app/components/workflow/header/run-and-history.tsx new file mode 100644 index 0000000000..e50271505a --- /dev/null +++ b/web/app/components/workflow/header/run-and-history.tsx @@ -0,0 +1,29 @@ +import type { FC } from 'react' +import { memo } from 'react' +import { Play } from '@/app/components/base/icons/src/vender/line/mediaAndDevices' +import { ClockPlay } from '@/app/components/base/icons/src/vender/line/time' +import TooltipPlus from '@/app/components/base/tooltip-plus' + +const RunAndHistory: FC = () => { + return ( +
+
+ + Run +
+
+ +
+ +
+
+
+ ) +} + +export default memo(RunAndHistory)