Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #188 from tipisai/Release/tipis
Browse files Browse the repository at this point in the history
Release/tipis
  • Loading branch information
Wangtaofeng authored May 7, 2024
2 parents 9533267 + 1e57b0b commit aa8e7af
Show file tree
Hide file tree
Showing 427 changed files with 17,232 additions and 9,308 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
'beta' }}
env:
ILLA_API_BASE_URL: ${{ vars.ILLA_API_BASE_URL }}
ILLA_PERIPHERAL_API_BASE_URL: ${{ vars.ILLA_PERIPHERAL_API_BASE_URL }}
ILLA_APP_ENV: ${{ vars.ILLA_APP_ENV }}
ILLA_CLOUD_URL: tauri://localhost
ILLA_MARKET_URL: ${{ vars.ILLA_MARKET_URL }}
Expand Down Expand Up @@ -85,6 +86,12 @@ jobs:
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: "App v__VERSION__"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
ILLA_APP_ENV: ${{ vars.ILLA_APP_ENV }}
ILLA_CLOUD_URL: ${{ vars.ILLA_CLOUD_URL }}
ILLA_MARKET_URL: ${{ vars.ILLA_MARKET_URL }}
ILLA_PERIPHERAL_API_BASE_URL: ${{ vars.ILLA_PERIPHERAL_API_BASE_URL }}

steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
engine-strict = true
engine-strict=true
1 change: 1 addition & 0 deletions apps/agent/.env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ILLA_API_BASE_URL=CLOUD_API_PATH
ILLA_PERIPHERAL_API_BASE_URL=PERIPHERAL_API_PATH
ILLA_MARKET_URL=MARKET_PATH
ILLA_CLOUD_URL=CLOUD_PATH
ILLA_INSTANCE_ID=CLOUD
Expand Down
25 changes: 7 additions & 18 deletions apps/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,23 @@
"terser": "^5.30.3"
},
"dependencies": {
"@ant-design/icons": "^5.3.1",
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
"@atlaskit/tokens": "^1.43.0",
"@codemirror/autocomplete": "^6.4.0",
"@codemirror/commands": "^6.1.3",
"@codemirror/lang-javascript": "^6.2.1",
"@codemirror/lang-sql": "^6.5.4",
"@codemirror/language": "^6.3.2",
"@codemirror/lint": "^6.4.2",
"@codemirror/search": "^6.5.5",
"@codemirror/state": "^6.2.0",
"@codemirror/view": "^6.7.2",
"@illa-public/auth-shown": "workspace:^",
"@illa-public/avatar": "workspace:^",
"@illa-public/code-editor": "workspace:^",
"@illa-public/code-editor-new": "workspace:^",
"@illa-public/color-scheme": "workspace:^",
"@illa-public/draggable-modal": "workspace:*",
"@illa-public/dynamic-string": "workspace:^",
"@illa-public/icon": "workspace:^",
"@illa-public/icon-hot-spot": "workspace:^",
"@illa-public/illa-net": "workspace:^",
"@illa-public/illa-storage": "workspace:^",
"@illa-public/illa-web-socket": "workspace:^",
"@illa-public/invite-modal": "workspace:^",
"@illa-public/layout-auto-change": "workspace:^",
"@illa-public/market-share": "workspace:^",
"@illa-public/new-invite-modal": "workspace:^",
"@illa-public/public-configs": "workspace:^",
"@illa-public/public-types": "workspace:^",
Expand All @@ -63,18 +56,13 @@
"@illa-public/user-data": "workspace:^",
"@illa-public/user-role-utils": "workspace:^",
"@illa-public/utils": "workspace:^",
"@illa-public/invite-modal": "workspace:^",
"@illa-public/market-share": "workspace:^",
"@lezer/common": "^1.2.1",
"@lezer/highlight": "^1.2.0",
"@mui/material": "^5.15.3",
"@mui/x-data-grid-premium": "^6.19.6",
"@reduxjs/toolkit": "^2.2.1",
"@sentry/react": "^7.110.1",
"@sentry/vite-plugin": "^2.16.1",
"@tauri-apps/api": "^1.5.3",
"@types/tern": "^0.23.9",
"antd": "^5.15.2",
"antd-img-crop": "^4.21.0",
"axios": "^1.6.2",
"chart.js": "^4.4.2",
Expand All @@ -94,15 +82,16 @@
"pdfjs-dist": "2.16.105",
"posthog-js": "^1.116.6",
"qs": "^6.12.0",
"re-resizable": "^6.9.16",
"react-chartjs-2": "^5.2.0",
"react-helmet-async": "^2.0.4",
"react-hook-form": "^7.51.0",
"react-markdown": "^8.0.5",
"react-redux": "^9.1.0",
"react-rnd": "^10.4.1",
"react-rnd": "^10.4.10",
"react-router-dom": "^6.22.2",
"react-syntax-highlighter": "^15.5.0",
"react-use": "^17.4.0",
"react-use": "^17.5.0",
"react-use-intercom": "^5.3.0",
"react-use-measure": "^2.1.1",
"remark-breaks": "^4.0.0",
Expand Down
5 changes: 2 additions & 3 deletions apps/agent/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import { App as AntdContextProvider, ConfigProvider, ThemeConfig } from "antd"
import { HelmetProvider } from "react-helmet-async"
import { IntercomProvider } from "react-use-intercom"
import tipisThemConfig from "@/config/them/theme-tipis.json"
import { illaCodeMirrorTooltipStyle } from "./components/CodeEditor/CodeMirror/theme"
import { ILLARouterProvider } from "./router/config"
import { globalStyle } from "./style"
import { globalStyle, globalTooltipContainerStyle } from "./style"
import AntdStore from "./utils/antdStore"

function App() {
Expand All @@ -23,7 +22,7 @@ function App() {
</IntercomProvider>
<div
className="illaCodeMirrorWrapper"
css={illaCodeMirrorTooltipStyle}
css={globalTooltipContainerStyle}
/>
</HelmetProvider>
</AntdContextProvider>
Expand Down
8 changes: 4 additions & 4 deletions apps/agent/src/Layout/Form/ErrorText/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { WarningCircleIcon } from "@illa-public/icon"
import { errorMsgStyle } from "./style"

interface ErrorTextProps {
errorMessage: string
message: string | null | undefined
}

export const ErrorText: FC<ErrorTextProps> = ({ errorMessage }) => {
if (!errorMessage) return null
export const ErrorText: FC<ErrorTextProps> = ({ message }) => {
if (!message) return null
return (
<div css={errorMsgStyle}>
<Icon component={WarningCircleIcon} size={16} />
{errorMessage}
{message}
</div>
)
}
44 changes: 28 additions & 16 deletions apps/agent/src/Layout/Form/LayoutBlock/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ import {
blockTItleAndRequireContainerStyle,
blockTitleContainer,
childrenAndErrorMessageContainerStyle,
descriptionStyle,
titleAndDescriptionContainerStyle,
} from "./style"

export const LayoutBlock: FC<ILayoutBlock> = (props) => {
const {
title,
description,
tips,
children,
subtitle,
Expand All @@ -23,30 +26,39 @@ export const LayoutBlock: FC<ILayoutBlock> = (props) => {
scrollId,
isMobile = false,
errorMessage,
customRenderSubtitle,
} = props

return (
<div css={agentBlockStyle(isMobile)} data-scroll-id={scrollId}>
<div css={blockTitleContainer}>
<div css={blockTItleAndRequireContainerStyle}>
{title && (
<Tooltip title={tips} trigger="hover" placement="top">
<div css={applyBlockTextStyle(tips !== undefined)}>{title}</div>
</Tooltip>
)}
{required && <RequireIcon />}
<div css={titleAndDescriptionContainerStyle}>
<div css={blockTitleContainer}>
<div css={blockTItleAndRequireContainerStyle}>
{title && (
<Tooltip title={tips} trigger="hover" placement="top">
<div css={applyBlockTextStyle(tips !== undefined)}>{title}</div>
</Tooltip>
)}
{required && <RequireIcon />}
</div>
{customRenderSubtitle
? customRenderSubtitle
: subtitle && (
<Tooltip title={subtitleTips} trigger="hover">
<div
css={applyBlockSubtitleStyle(subtitleTips !== undefined)}
>
{subtitle}
</div>
</Tooltip>
)}
</div>
{subtitle && (
<Tooltip title={subtitleTips} trigger="hover">
<div css={applyBlockSubtitleStyle(subtitleTips !== undefined)}>
{subtitle}
</div>
</Tooltip>
)}

{description && <div css={descriptionStyle}>{description}</div>}
</div>
<div css={childrenAndErrorMessageContainerStyle}>
{children}
{errorMessage && <ErrorText errorMessage={errorMessage} />}
{errorMessage && <ErrorText message={errorMessage} />}
</div>
</div>
)
Expand Down
2 changes: 2 additions & 0 deletions apps/agent/src/Layout/Form/LayoutBlock/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ReactNode } from "react"

export interface ILayoutBlock {
title: string
description?: ReactNode
tips?: string
subtitle?: string | ReactNode
children?: ReactNode
Expand All @@ -10,4 +11,5 @@ export interface ILayoutBlock {
scrollId?: string
isMobile?: boolean
errorMessage?: string
customRenderSubtitle?: ReactNode
}
15 changes: 15 additions & 0 deletions apps/agent/src/Layout/Form/LayoutBlock/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,18 @@ export const childrenAndErrorMessageContainerStyle = css`
flex-direction: column;
gap: 8px;
`

export const titleAndDescriptionContainerStyle = css`
width: 100%;
display: flex;
flex-direction: column;
gap: 4px;
`

export const descriptionStyle = css`
width: 100%;
color: ${getColor("grayBlue", "03")};
font-size: 12px;
font-weight: 400;
line-height: 130%;
`
25 changes: 25 additions & 0 deletions apps/agent/src/Layout/Function/Label/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { FC } from "react"
import RequireIcon from "@/assets/agent/require.svg?react"
import { ILabelProps } from "./interface"
import {
iconContainerStyle,
labelContainerStyle,
labelStyle,
requiredIconStyle,
} from "./style"

const Label: FC<ILabelProps> = (props) => {
const { title, required } = props
return (
<div css={labelContainerStyle}>
<p css={labelStyle}>{title}</p>
{required && (
<div css={iconContainerStyle}>
<RequireIcon css={requiredIconStyle} />
</div>
)}
</div>
)
}

export default Label
4 changes: 4 additions & 0 deletions apps/agent/src/Layout/Function/Label/interface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface ILabelProps {
title: string
required?: boolean
}
32 changes: 32 additions & 0 deletions apps/agent/src/Layout/Function/Label/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { css } from "@emotion/react"
import { getColor } from "@illa-public/color-scheme"

export const labelContainerStyle = css`
width: 160px;
flex: none;
display: flex;
padding: 9px 0;
gap: 4px;
`

export const labelStyle = css`
width: 100%;
color: ${getColor("grayBlue", "02")};
text-align: right;
font-weight: 500;
line-height: 22px;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
`

export const requiredIconStyle = css`
flex: none;
width: 8px;
height: 8px;
`

export const iconContainerStyle = css`
line-height: 22px;
`
30 changes: 30 additions & 0 deletions apps/agent/src/Layout/Function/LabelWithController/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { FC } from "react"
import ErrorMessage from "../../../components/InputErrorMessage"
import Label from "../Label"
import { ILabelWithControllerProps } from "./interface"
import {
controllerContainerStyle,
errorMessageContainerStyle,
labelWithContainerStyle,
outerContainerStyle,
} from "./style"

const LabelWithController: FC<ILabelWithControllerProps> = (props) => {
const { title, children, required, errorMessage } = props
return (
<div css={outerContainerStyle}>
<div css={labelWithContainerStyle}>
<Label title={title} required={required} />
<div css={controllerContainerStyle}>{children}</div>
</div>
{errorMessage && (
<div css={errorMessageContainerStyle}>
<Label title={""} />
<ErrorMessage message={errorMessage} />
</div>
)}
</div>
)
}

export default LabelWithController
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ReactNode } from "react"

export interface ILabelWithControllerProps {
title: string
required?: boolean
children: ReactNode
errorMessage?: string
}
25 changes: 25 additions & 0 deletions apps/agent/src/Layout/Function/LabelWithController/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { css } from "@emotion/react"

export const labelWithContainerStyle = css`
display: flex;
gap: 16px;
width: 100%;
padding: 8px 0;
`

export const controllerContainerStyle = css`
display: flex;
flex-direction: column;
width: 100%;
`

export const outerContainerStyle = css`
display: flex;
flex-direction: column;
`

export const errorMessageContainerStyle = css`
width: 100%;
display: flex;
gap: 16px;
`
Loading

0 comments on commit aa8e7af

Please sign in to comment.