Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getUniqName, ViewType } from '@teable/core';
import { File, FileCsv, FileExcel } from '@teable/icons';
import { File, FileCsv, FileExcel, Slack } from '@teable/icons';
import { BaseNodeResourceType, SUPPORTEDTYPE } from '@teable/openapi';
import { useTables } from '@teable/sdk';
import {
Expand Down Expand Up @@ -87,12 +87,14 @@ export const BaseNodeAddResourceButton = (props: BaseNodeAddResourceButtonProps)
| BaseNodeResourceType.Dashboard
| BaseNodeResourceType.Folder;
label: string;
trailingIcon?: React.ReactNode;
}> = [];

if (canCreateWorkflow) {
list.push({
resourceType: BaseNodeResourceType.Workflow,
label: t('common:noun.newAutomation'),
trailingIcon: <Slack className="size-4" />,
});
}
if (canCreateApp) {
Expand Down Expand Up @@ -120,12 +122,12 @@ export const BaseNodeAddResourceButton = (props: BaseNodeAddResourceButtonProps)
}

return list.map((item) => {
const { resourceType, label } = item;
const { resourceType, label, trailingIcon } = item;
const IconComponent = BaseNodeResourceIconMap[resourceType];
return (
<DropdownMenuItem
key={resourceType}
className="cursor-pointer"
className="flex cursor-pointer items-center"
onClick={() => {
curdHooks.createNode?.({
resourceType,
Expand All @@ -138,6 +140,7 @@ export const BaseNodeAddResourceButton = (props: BaseNodeAddResourceButtonProps)
<IconComponent className="size-4" />
{label}
</Button>
{trailingIcon}
</DropdownMenuItem>
);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/common-i18n/src/locales/en/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@
"searchEmpty": "No matching context found",
"emptyContext": "No context to add"
},
"inputPlaceholder": "Build your business app with Teable",
"inputPlaceholder": "Describe what you want to do",
"thought": "Thinking",
"meta": {
"timeCostUnit": "s",
Expand Down
2 changes: 1 addition & 1 deletion packages/common-i18n/src/locales/zh/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@
"searchEmpty": "暂无匹配的上下文",
"emptyContext": "暂无可添加的上下文"
},
"inputPlaceholder": "用 Teable 构建您的商业应用",
"inputPlaceholder": "描述你想要做什么",
"thought": "深度思考",
"meta": {
"timeCostUnit": "秒",
Expand Down
19 changes: 13 additions & 6 deletions packages/icons/src/components/AiAction.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import * as React from 'react';
import type { SVGProps } from 'react';
const AiAction = (props: SVGProps<SVGSVGElement>) => (

interface AiActionProps extends SVGProps<SVGSVGElement> {
withBackground?: boolean;
}

const AiAction = ({ withBackground = true, ...props }: AiActionProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
Expand All @@ -9,11 +14,13 @@ const AiAction = (props: SVGProps<SVGSVGElement>) => (
viewBox="0 0 24 24"
{...props}
>
<rect width="24" height="24" rx="3" fill="#FDE68A" />
<path
d="M20.942 0H3.058C2.24729 0.00105836 1.47009 0.323579 0.896836 0.896836C0.323579 1.47009 0.00105836 2.24729 0 3.058L0 20.942C0.00105836 21.7527 0.323579 22.5299 0.896836 23.1032C1.47009 23.6764 2.24729 23.9989 3.058 24H20.942C21.7527 23.9989 22.5299 23.6764 23.1032 23.1032C23.6764 22.5299 23.9989 21.7527 24 20.942V3.058C23.9984 2.24746 23.6757 1.47056 23.1026 0.897419C22.5294 0.324276 21.7525 0.00158568 20.942 0ZM22.014 20.942C22.014 21.534 21.531 22.017 20.939 22.017H3.058C2.77314 22.0162 2.50016 21.9027 2.29873 21.7013C2.0973 21.4998 1.98379 21.2269 1.983 20.942V3.058C1.983 2.466 2.466 1.983 3.058 1.983H20.942C21.534 1.983 22.017 2.466 22.017 3.058V20.942H22.014Z"
fill="#FDE68A"
/>
{withBackground && <rect width="24" height="24" rx="3" fill="#FDE68A" />}
{withBackground && (
<path
d="M20.942 0H3.058C2.24729 0.00105836 1.47009 0.323579 0.896836 0.896836C0.323579 1.47009 0.00105836 2.24729 0 3.058L0 20.942C0.00105836 21.7527 0.323579 22.5299 0.896836 23.1032C1.47009 23.6764 2.24729 23.9989 3.058 24H20.942C21.7527 23.9989 22.5299 23.6764 23.1032 23.1032C23.6764 22.5299 23.9989 21.7527 24 20.942V3.058C23.9984 2.24746 23.6757 1.47056 23.1026 0.897419C22.5294 0.324276 21.7525 0.00158568 20.942 0ZM22.014 20.942C22.014 21.534 21.531 22.017 20.939 22.017H3.058C2.77314 22.0162 2.50016 21.9027 2.29873 21.7013C2.0973 21.4998 1.98379 21.2269 1.983 20.942V3.058C1.983 2.466 2.466 1.983 3.058 1.983H20.942C21.534 1.983 22.017 2.466 22.017 3.058V20.942H22.014Z"
fill="#FDE68A"
/>
)}
<path
d="M10.1417 15.1499C10.0614 14.8385 9.89905 14.5542 9.67161 14.3268C9.44417 14.0993 9.15993 13.937 8.84847 13.8567L3.32712 12.4329C3.23292 12.4062 3.15001 12.3494 3.09098 12.2713C3.03194 12.1932 3 12.0979 3 12C3 11.9021 3.03194 11.8068 3.09098 11.7287C3.15001 11.6506 3.23292 11.5938 3.32712 11.5671L8.84847 10.1424C9.15982 10.0622 9.44398 9.89997 9.67141 9.67269C9.89885 9.44542 10.0613 9.16137 10.1417 8.85008L11.5655 3.32872C11.592 3.23414 11.6486 3.15083 11.7269 3.09148C11.8051 3.03213 11.9006 3 11.9988 3C12.097 3 12.1926 3.03213 12.2708 3.09148C12.349 3.15083 12.4057 3.23414 12.4322 3.32872L13.855 8.85008C13.9354 9.16153 14.0977 9.44577 14.3252 9.67321C14.5526 9.90066 14.8369 10.063 15.1483 10.1433L20.6697 11.5662C20.7646 11.5924 20.8483 11.649 20.908 11.7274C20.9677 11.8057 21 11.9015 21 12C21 12.0985 20.9677 12.1943 20.908 12.2726C20.8483 12.351 20.7646 12.4076 20.6697 12.4338L15.1483 13.8567C14.8369 13.937 14.5526 14.0993 14.3252 14.3268C14.0977 14.5542 13.9354 14.8385 13.855 15.1499L12.4313 20.6713C12.4048 20.7659 12.3481 20.8492 12.2699 20.9085C12.1917 20.9679 12.0961 21 11.9979 21C11.8997 21 11.8042 20.9679 11.726 20.9085C11.6477 20.8492 11.5911 20.7659 11.5646 20.6713L10.1417 15.1499Z"
fill="#FBBF24"
Expand Down
32 changes: 23 additions & 9 deletions packages/icons/src/components/CreateRecord.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import * as React from 'react';
import type { SVGProps } from 'react';
const CreateRecord = (props: SVGProps<SVGSVGElement>) => (

interface CreateRecordProps extends SVGProps<SVGSVGElement> {
withBackground?: boolean;
}

const CreateRecord = ({ withBackground = true, ...props }: CreateRecordProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
Expand All @@ -9,18 +14,27 @@ const CreateRecord = (props: SVGProps<SVGSVGElement>) => (
viewBox="0 0 24 24"
{...props}
>
<g clipPath="url(#prefix_create-record)">
<rect width={24} height={24} fill="#C4B5FD" rx={3} />
{withBackground ? (
<g clipPath="url(#prefix_create-record)">
<rect width={24} height={24} fill="#C4B5FD" rx={3} />
<path
fill="#A855F7"
d="M17.01 11.01h-4.02V6.99a.99.99 0 1 0-1.98 0v4.02H6.99a.99.99 0 1 0 0 1.98h4.02v4.02a.99.99 0 1 0 1.98 0v-4.02h4.02a.99.99 0 1 0 0-1.98"
/>
</g>
) : (
<path
fill="#A855F7"
d="M17.01 11.01h-4.02V6.99a.99.99 0 1 0-1.98 0v4.02H6.99a.99.99 0 1 0 0 1.98h4.02v4.02a.99.99 0 1 0 1.98 0v-4.02h4.02a.99.99 0 1 0 0-1.98"
/>
</g>
<defs>
<clipPath id="prefix_create-record">
<rect width={24} height={24} fill="#fff" rx={3} />
</clipPath>
</defs>
)}
{withBackground && (
<defs>
<clipPath id="prefix_create-record">
<rect width={24} height={24} fill="#fff" rx={3} />
</clipPath>
</defs>
)}
</svg>
);
export default CreateRecord;
19 changes: 13 additions & 6 deletions packages/icons/src/components/GetRecord.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import * as React from 'react';
import type { SVGProps } from 'react';
const GetRecord = (props: SVGProps<SVGSVGElement>) => (

interface GetRecordProps extends SVGProps<SVGSVGElement> {
withBackground?: boolean;
}

const GetRecord = ({ withBackground = true, ...props }: GetRecordProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
Expand All @@ -9,11 +14,13 @@ const GetRecord = (props: SVGProps<SVGSVGElement>) => (
viewBox="0 0 24 24"
{...props}
>
<rect width={24} height={24} fill="#FDE68A" rx={3} />
<path
fill="#FDE68A"
d="M20.942 0H3.058A3.06 3.06 0 0 0 0 3.058v17.884A3.06 3.06 0 0 0 3.058 24h17.884A3.063 3.063 0 0 0 24 20.942V3.058A3.064 3.064 0 0 0 20.942 0m1.072 20.942c0 .592-.483 1.075-1.075 1.075H3.058a1.08 1.08 0 0 1-1.075-1.075V3.058c0-.592.483-1.075 1.075-1.075h17.884c.592 0 1.075.483 1.075 1.075v17.884z"
/>
{withBackground && <rect width={24} height={24} fill="#FDE68A" rx={3} />}
{withBackground && (
<path
fill="#FDE68A"
d="M20.942 0H3.058A3.06 3.06 0 0 0 0 3.058v17.884A3.06 3.06 0 0 0 3.058 24h17.884A3.063 3.063 0 0 0 24 20.942V3.058A3.064 3.064 0 0 0 20.942 0m1.072 20.942c0 .592-.483 1.075-1.075 1.075H3.058a1.08 1.08 0 0 1-1.075-1.075V3.058c0-.592.483-1.075 1.075-1.075h17.884c.592 0 1.075.483 1.075 1.075v17.884z"
/>
)}
<path
stroke="#FBBF24"
strokeLinecap="round"
Expand Down
19 changes: 13 additions & 6 deletions packages/icons/src/components/HttpRequest.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import * as React from 'react';
import type { SVGProps } from 'react';
const HttpRequest = (props: SVGProps<SVGSVGElement>) => (

interface HttpRequestProps extends SVGProps<SVGSVGElement> {
withBackground?: boolean;
}

const HttpRequest = ({ withBackground = true, ...props }: HttpRequestProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
Expand All @@ -9,11 +14,13 @@ const HttpRequest = (props: SVGProps<SVGSVGElement>) => (
viewBox="0 0 24 24"
{...props}
>
<rect width={24} height={24} fill="#FECDD3" rx={3} />
<path
fill="#FECDD3"
d="M20.942 0H3.058A3.06 3.06 0 0 0 0 3.058v17.884A3.06 3.06 0 0 0 3.058 24h17.884A3.063 3.063 0 0 0 24 20.942V3.058A3.064 3.064 0 0 0 20.942 0m1.072 20.942c0 .592-.483 1.075-1.075 1.075H3.058a1.08 1.08 0 0 1-1.075-1.075V3.058c0-.592.483-1.075 1.075-1.075h17.884c.592 0 1.075.483 1.075 1.075v17.884z"
/>
{withBackground && <rect width={24} height={24} fill="#FECDD3" rx={3} />}
{withBackground && (
<path
fill="#FECDD3"
d="M20.942 0H3.058A3.06 3.06 0 0 0 0 3.058v17.884A3.06 3.06 0 0 0 3.058 24h17.884A3.063 3.063 0 0 0 24 20.942V3.058A3.064 3.064 0 0 0 20.942 0m1.072 20.942c0 .592-.483 1.075-1.075 1.075H3.058a1.08 1.08 0 0 1-1.075-1.075V3.058c0-.592.483-1.075 1.075-1.075h17.884c.592 0 1.075.483 1.075 1.075v17.884z"
/>
)}
<path
fill="#F472B6"
d="M5.915 10.01a.33.33 0 0 1 .204.152l.995 1.666c.074.124.074.22 0 .343l-.995 1.667a.332.332 0 1 1-.569-.343l.665-1.112a.4.4 0 0 1-.115.017H4.4a.4.4 0 1 1 0-.8h1.7a.4.4 0 0 1 .116.017l-.22-.365-.446-.747a.334.334 0 0 1 .365-.495M14.948 14.81h-.93c-.466 2.048-1.304 3.258-2.048 3.258-.745 0-1.583-1.21-2.048-3.258H8.99c.186 1.21.558 2.234 1.117 2.979-1.582-.559-2.793-1.583-3.537-2.979H5.547c1.117 2.42 3.537 4.189 6.423 4.189 2.885 0 5.306-1.769 6.423-4.189h-1.024c-.745 1.396-1.955 2.42-3.538 2.979.466-.745.838-1.769 1.117-2.979m-4.84-8.6c-.56.745-.93 1.769-1.117 2.979h.93c.466-2.048 1.304-3.258 2.049-3.258s1.582 1.21 2.048 3.258h.93c-.186-1.21-.558-2.234-1.117-2.979 1.583.559 2.793 1.583 3.538 2.979h1.024C17.276 6.769 14.855 5 11.97 5S6.664 6.769 5.547 9.189H6.57c.744-1.396 1.955-2.42 3.537-2.979M10.167 11.567H9.1V10.9c0-.219-.18-.4-.4-.4-.219 0-.4.181-.4.4v2.4c0 .219.181.4.4.4s.4-.181.4-.4v-.933h1.067v.933c0 .219.181.4.4.4.218 0 .4-.181.4-.4v-2.4c0-.219-.182-.4-.4-.4s-.4.181-.4.4zM11.7 11.3h.502v2c0 .219.181.4.4.4s.4-.181.4-.4v-2h.498c.219 0 .4-.181.4-.4s-.181-.4-.4-.4h-1.8c-.219 0-.4.181-.4.4s.283.4.502.4zm3 0h.502v2c0 .219.181.4.4.4s.4-.181.4-.4v-2h.498c.219 0 .4-.181.4-.4s-.181-.4-.4-.4h-1.8c-.219 0-.4.181-.4.4s.283.4.502.4zm4.467-.8h-1.334a.535.535 0 0 0-.533.533V13.3c0 .219.181.4.4.4s.4-.181.4-.4v-.667h1.067c.442 0 .8-.362.8-.8V11.3c0-.437-.358-.8-.8-.8m-.001 1.333h-1.067V11.3h1.067z"
Expand Down
85 changes: 85 additions & 0 deletions packages/icons/src/components/MicrosoftTeams.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import * as React from 'react';
import type { SVGProps } from 'react';

const MicrosoftTeams = (props: SVGProps<SVGSVGElement>) => {
return (
<svg
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
fill="#5059C9"
d="M10.765 6.875h3.616c.342 0 .619.276.619.617v3.288a2.272 2.272 0 01-2.274 2.27h-.01a2.272 2.272 0 01-2.274-2.27V7.199c0-.179.145-.323.323-.323zM13.21 6.225c.808 0 1.464-.655 1.464-1.462 0-.808-.656-1.463-1.465-1.463s-1.465.655-1.465 1.463c0 .807.656 1.462 1.465 1.462z"
/>
<path
fill="#7B83EB"
d="M8.651 6.225a2.114 2.114 0 002.117-2.112A2.114 2.114 0 008.65 2a2.114 2.114 0 00-2.116 2.112c0 1.167.947 2.113 2.116 2.113zM11.473 6.875h-5.97a.611.611 0 00-.596.625v3.75A3.669 3.669 0 008.488 15a3.669 3.669 0 003.582-3.75V7.5a.611.611 0 00-.597-.625z"
/>
<path
fill="#000000"
d="M8.814 6.875v5.255a.598.598 0 01-.596.595H5.193a3.951 3.951 0 01-.287-1.476V7.5a.61.61 0 01.597-.624h3.31z"
opacity=".1"
/>
<path
fill="#000000"
d="M8.488 6.875v5.58a.6.6 0 01-.596.595H5.347a3.22 3.22 0 01-.267-.65 3.951 3.951 0 01-.172-1.15V7.498a.61.61 0 01.596-.624h2.985z"
opacity=".2"
/>
<path
fill="#000000"
d="M8.488 6.875v4.93a.6.6 0 01-.596.595H5.08a3.951 3.951 0 01-.172-1.15V7.498a.61.61 0 01.596-.624h2.985z"
opacity=".2"
/>
<path
fill="#000000"
d="M8.163 6.875v4.93a.6.6 0 01-.596.595H5.079a3.951 3.951 0 01-.172-1.15V7.498a.61.61 0 01.596-.624h2.66z"
opacity=".2"
/>
<path
fill="#000000"
d="M8.814 5.195v1.024c-.055.003-.107.006-.163.006-.055 0-.107-.003-.163-.006A2.115 2.115 0 016.593 4.6h1.625a.598.598 0 01.596.594z"
opacity=".1"
/>
<path
fill="#000000"
d="M8.488 5.52v.699a2.115 2.115 0 01-1.79-1.293h1.195a.598.598 0 01.595.594z"
opacity=".2"
/>
<path
fill="#000000"
d="M8.488 5.52v.699a2.115 2.115 0 01-1.79-1.293h1.195a.598.598 0 01.595.594z"
opacity=".2"
/>
<path
fill="#000000"
d="M8.163 5.52v.647a2.115 2.115 0 01-1.465-1.242h.87a.598.598 0 01.595.595z"
opacity=".2"
/>
<path
fill="url(#microsoft-teams-color-16__paint0_linear_2372_494)"
d="M1.597 4.925h5.969c.33 0 .597.267.597.596v5.958a.596.596 0 01-.597.596h-5.97A.596.596 0 011 11.479V5.521c0-.33.267-.596.597-.596z"
/>
<path fill="#ffffff" d="M6.152 7.193H4.959v3.243h-.76V7.193H3.01v-.63h3.141v.63z" />
<defs>
<linearGradient
id="microsoft-teams-color-16__paint0_linear_2372_494"
x1="2.244"
x2="6.906"
y1="4.46"
y2="12.548"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#5A62C3" />
<stop offset=".5" stopColor="#4D55BD" />
<stop offset="1" stopColor="#3940AB" />
</linearGradient>
</defs>
</svg>
);
};

export default MicrosoftTeams;
9 changes: 7 additions & 2 deletions packages/icons/src/components/ScriptAction.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import * as React from 'react';
import type { SVGProps } from 'react';
const ScriptAction = (props: SVGProps<SVGSVGElement>) => (

interface ScriptActionProps extends SVGProps<SVGSVGElement> {
withBackground?: boolean;
}

const ScriptAction = ({ withBackground = true, ...props }: ScriptActionProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
Expand All @@ -9,7 +14,7 @@ const ScriptAction = (props: SVGProps<SVGSVGElement>) => (
viewBox="0 0 24 24"
{...props}
>
<rect width="24" height="24" rx="4" fill="#99FBD5" />
{withBackground && <rect width="24" height="24" rx="4" fill="#99FBD5" />}
<path
d="M16.407 12.2419C16.4438 12.2143 16.4738 12.178 16.4944 12.1361C16.5151 12.0941 16.5258 12.0477 16.5258 12.0006C16.5258 11.9535 16.5151 11.9071 16.4944 11.8651C16.4738 11.8232 16.4438 11.7869 16.407 11.7593L9.17828 6.34396C9.13537 6.31194 9.08477 6.29283 9.03206 6.28872C8.97934 6.28461 8.92656 6.29567 8.87952 6.32068C8.83248 6.34569 8.793 6.38368 8.76544 6.43046C8.73789 6.47725 8.72331 6.53101 8.72332 6.58583V17.4142C8.72331 17.469 8.73789 17.5228 8.76544 17.5695C8.793 17.6163 8.83248 17.6543 8.87952 17.6793C8.92656 17.7043 8.97934 17.7154 9.03206 17.7113C9.08477 17.7072 9.13537 17.6881 9.17828 17.656L16.407 12.2419ZM17.4169 13.6907L10.1881 19.1049C9.88792 19.3299 9.5336 19.4645 9.16427 19.4939C8.79495 19.5233 8.42498 19.4463 8.09518 19.2714C7.76539 19.0965 7.48859 18.8305 7.29533 18.5028C7.10208 18.175 6.99987 17.7983 7 17.4142V6.58583C6.99987 6.20168 7.10208 5.82496 7.29533 5.49724C7.48859 5.16952 7.76539 4.90353 8.09518 4.72864C8.42498 4.55374 8.79495 4.47673 9.16427 4.50611C9.5336 4.53548 9.88792 4.67009 10.1881 4.89509L17.4169 10.3105C17.6748 10.5037 17.8848 10.7577 18.0297 11.0515C18.1745 11.3453 18.25 11.6706 18.25 12.0006C18.25 12.3306 18.1745 12.6559 18.0297 12.9497C17.8848 13.2435 17.6748 13.4975 17.4169 13.6907Z"
fill="#3EAA7A"
Expand Down
Loading