Skip to content

Commit

Permalink
feat: change icons
Browse files Browse the repository at this point in the history
  • Loading branch information
lideming committed Nov 29, 2023
1 parent cfb28d1 commit b4c9eaa
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions neetbox/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"vite-plugin-semi-theme": "^0.5.0"
},
"devDependencies": {
"@douyinfe/semi-icons": "^2.47.1",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@typescript-eslint/eslint-plugin": "^6.10.0",
Expand Down
14 changes: 11 additions & 3 deletions neetbox/frontend/src/components/dashboard/project/actions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button, Checkbox, Col, Input, Popover, Row, Space, Typography } from "@douyinfe/semi-ui";
import { memo, useContext, useState } from "react";
import { IconChevronDown, IconPlay } from "@douyinfe/semi-icons";
import { ProjectStatus, getProject } from "../../../services/projects";
import { ProjectContext } from "../../../pages/console/proejctDashboard";
import { useMemoJSON } from "../../../hooks/useMemoJSON";
Expand Down Expand Up @@ -105,15 +106,22 @@ export const ActionItem = memo(({ name, actionOptions: options, blocking, setBlo
</Col>
</Row>
))}
<Button style={{ width: "100px" }} onClick={handleRun} type="warning" theme="solid" disabled={blocking}>
<Button
style={{ width: "100px" }}
onClick={handleRun}
type="warning"
theme="solid"
disabled={blocking}
icon={<IconPlay />}
>
Run
</Button>
{result && <div style={{ margin: 0, whiteSpace: "pre-wrap" }}>{result}</div>}
</Space>
);
return (
<Popover trigger="click" content={renderContent}>
<Button disabled={blocking && !running} loading={running}>
<Popover trigger="click" content={renderContent} showArrow autoAdjustOverflow>
<Button disabled={blocking && !running} icon={<IconChevronDown />} loading={running}>
{name}
</Button>
</Popover>
Expand Down
6 changes: 3 additions & 3 deletions neetbox/frontend/src/pages/console/sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Nav } from "@douyinfe/semi-ui";
import React from "react";
import { IconStar, IconSetting } from "@douyinfe/semi-icons";
import { IconHome, IconListView } from "@douyinfe/semi-icons";
import { Link, useLocation } from "react-router-dom";
import { useAPI } from "../../services/api";
import Loading from "../../components/loading";
Expand All @@ -21,10 +21,10 @@ export default function ConsoleNavBar() {
}}
style={{ height: "100%", overflowY: "auto" }}
items={[
{ itemKey: "/console/overview", text: "Overview", icon: <IconStar /> },
{ itemKey: "/console/overview", text: "Overview", icon: <IconHome /> },
{
text: "Projects",
icon: <IconSetting />,
icon: <IconListView />,
itemKey: "projects",
items: data?.names.map((name: string) => ({
text: name,
Expand Down
7 changes: 7 additions & 0 deletions neetbox/frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@
dependencies:
classnames "^2.2.6"

"@douyinfe/semi-icons@^2.47.1":
version "2.47.1"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-icons/-/semi-icons-2.47.1.tgz#100883e71a7eab9ca2abb91110f48a348b9ad895"
integrity sha512-+gC22MWuOCKSRwB5Yxq55+NUgoO9b7stYvIkuCmPuD3kYgjFhhGRR+o9dscQmDa8Wjd98wY05zI01S4BV/ptLw==
dependencies:
classnames "^2.2.6"

"@douyinfe/[email protected]":
version "2.47.0"
resolved "https://mirrors.huaweicloud.com/repository/npm/@douyinfe/semi-illustrations/-/semi-illustrations-2.47.0.tgz#8d63af6f943eaf830a1df77fc7c5fa84a5a5d434"
Expand Down

0 comments on commit b4c9eaa

Please sign in to comment.