* refactor: plugin manager page * fix: bug * feat: addByNpm api * fix: improve the addByNpm * feat: improve applicationPlugins:list api * fix: re-download npm package when restart app * fix: plugin delete api * feat: plugin detail api * feat: zipUrl add api * fix: upload api bug * fix: plugin detail info * feat: upgrade api * fix: upload api * feat: handle plugin load error * feat: support authToken * feat: muti lang * fix: build error * fix: self review * Update plugin-manager.ts * fix: bug * fix: bug * fix: bug * fix: bug * fix: bug * fix: bugs * fix: detail click and remove isOfficial * fix: upgrade no refresh * fix: file size and type check * fix: bug * fix: upgrade error * fix: bug * fix: bug * fix: plugin card layout * fix: handling exceptional cases * fix: tgz file support * fix: macos compress file * fix: bug * fix: bug * fix: bug * fix: bug * fix: add upgrade npm type * fix: bugs * fix: bug * fix: change plugins static expose url * fix: api prefix * fix: bug * fix: add nginx `/static/plugin/` path * fix: bugs and pr docker build no dts * fix: bug * fix: build tools bug * fix: improve code * fix: build bug * feat: improve plugin info * fix: ui bug * fix: plugin document bug * feat: improve code * feat: improve code * feat: process dev deps check * feat: improve code * feat: process.env.IS_DEV_CMD * fix: do not delete the plugin package * feat: plugin symlink * fix: tsx watch --ignore=./storage/plugins/** * fix: test error * fix: improve code * fix: improve code * fix: emitStartedEvent * fix: improve code * fix: type error * fix: test error * test: console.log * fix: createStoragePluginSymLink * fix: clientStaticMiddleware rename to clientStaticUtils * feat: build tools support plugins folder * fix: 350px * fix: error * feat: client dev support plugin folder * fix: clear cli options * fix: typeError: Converting circular structure to JSON * fix: plugin name * chore: restart application after command * feat: upgrade error & docs * Update v14-changelog.md * Update v14-changelog.md * Update v14-changelog.md * fix: gateway test * refactor(plugin-workflow): add ready state for gracefully tearing down * Revert "chore: restart application after command" This reverts commit 5015274f8e4e06e506e15754b672330330e8c7f8. * chore: stop application whe restart * T 1218 change plugin folder (#2629) * feat: change folder name * feat: change `pm create` command * feat: revert plugin name change * fix: delete samples * feat: change plugins folder * fix: pm create * feat: update docs * fix: link package error * fix: docs * fix: create command * fix: pm add error * fix: create add build * fix: pm creatre + add * feat: add tar command * fix: docs * fix: bug * fix: docs --------- Co-authored-by: chenos <chenlinxh@gmail.com> * feat: docs * Update your-fisrt-plugin.md * Update your-fisrt-plugin.md * chore: application reload * chore: test * fix: pm add error * chore: preset install skip exists plugin * fix: createIfNotExists --------- Co-authored-by: chenos <chenlinxh@gmail.com> Co-authored-by: chareice <chareice@live.com> Co-authored-by: Zhou <zhou.working@gmail.com> Co-authored-by: mytharcher <mytharcher@gmail.com>
367 lines
7.1 KiB
TypeScript
367 lines
7.1 KiB
TypeScript
import { createStyles } from '@nocobase/client';
|
|
|
|
const useStyles = createStyles(({ css, token }) => {
|
|
return {
|
|
workflowPageClass: css`
|
|
flex-grow: 1;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
|
|
.workflow-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
position: relative;
|
|
padding: 0.5rem 1rem;
|
|
background: ${token.colorBgContainer};
|
|
border-bottom: 1px solid ${token.colorBorderSecondary};
|
|
|
|
header {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
aside {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5em;
|
|
}
|
|
|
|
.workflow-versions {
|
|
label {
|
|
margin-right: 0.5em;
|
|
}
|
|
}
|
|
}
|
|
|
|
.workflow-canvas {
|
|
flex-grow: 1;
|
|
overflow: auto;
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 2em;
|
|
|
|
.end {
|
|
cursor: default;
|
|
|
|
&:hover {
|
|
box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.1);
|
|
}
|
|
}
|
|
}
|
|
`,
|
|
|
|
dropdownClass: css`
|
|
.ant-dropdown-menu-item {
|
|
justify-content: flex-end;
|
|
.ant-dropdown-menu-title-content {
|
|
display: flex;
|
|
align-items: baseline;
|
|
justify-content: flex-end;
|
|
text-align: right;
|
|
|
|
time {
|
|
width: 14em;
|
|
font-size: 80%;
|
|
}
|
|
}
|
|
}
|
|
`,
|
|
|
|
workflowVersionDropdownClass: css`
|
|
.ant-dropdown-menu-item {
|
|
.ant-dropdown-menu-title-content {
|
|
strong {
|
|
font-weight: normal;
|
|
}
|
|
|
|
> .enabled {
|
|
strong {
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
|
|
> .unexecuted {
|
|
strong {
|
|
font-style: italic;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`,
|
|
|
|
executionsDropdownRowClass: css`
|
|
.ant-dropdown-menu-item {
|
|
.id {
|
|
flex-grow: 1;
|
|
text-align: right;
|
|
}
|
|
}
|
|
`,
|
|
|
|
branchBlockClass: css`
|
|
display: flex;
|
|
position: relative;
|
|
|
|
:before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: calc(50% - 0.5px);
|
|
width: 1px;
|
|
background-color: ${token.colorBgLayout};
|
|
}
|
|
`,
|
|
|
|
branchClass: css`
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
position: relative;
|
|
min-width: 20em;
|
|
padding: 0 2em;
|
|
|
|
.workflow-node-list {
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.workflow-branch-lines {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 1px;
|
|
background-color: ${token.colorBorder};
|
|
}
|
|
|
|
:before,
|
|
:after {
|
|
content: '';
|
|
position: absolute;
|
|
height: 1px;
|
|
background-color: ${token.colorBorder};
|
|
}
|
|
|
|
:before {
|
|
top: 0;
|
|
}
|
|
|
|
:after {
|
|
bottom: 0;
|
|
}
|
|
|
|
:not(:first-child):not(:last-child) {
|
|
:before,
|
|
:after {
|
|
left: 0;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
:last-child:not(:first-child) {
|
|
:before,
|
|
:after {
|
|
right: 50%;
|
|
width: 50%;
|
|
}
|
|
}
|
|
|
|
:first-child:not(:last-child) {
|
|
:before,
|
|
:after {
|
|
left: 50%;
|
|
width: 50%;
|
|
}
|
|
}
|
|
`,
|
|
|
|
nodeBlockClass: css`
|
|
flex-grow: 1;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
position: relative;
|
|
`,
|
|
|
|
nodeClass: css`
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
`,
|
|
|
|
nodeCardClass: css`
|
|
position: relative;
|
|
width: 20em;
|
|
background: ${token.colorBgContainer};
|
|
padding: 1em;
|
|
box-shadow: ${token.boxShadowTertiary};
|
|
border-radius: ${token.borderRadiusLG}px;
|
|
cursor: pointer;
|
|
transition: box-shadow 0.3s ease;
|
|
|
|
&:hover {
|
|
box-shadow: ${token.boxShadow};
|
|
|
|
.workflow-node-remove-button {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
&.configuring {
|
|
box-shadow: ${token.boxShadow};
|
|
}
|
|
|
|
.workflow-node-remove-button {
|
|
position: absolute;
|
|
right: 0.5em;
|
|
top: 0.5em;
|
|
color: ${token.colorText};
|
|
opacity: 0;
|
|
transition: opacity 0.3s ease;
|
|
|
|
&[disabled] {
|
|
display: none;
|
|
}
|
|
|
|
&:hover {
|
|
color: ${token.colorErrorHover};
|
|
}
|
|
}
|
|
|
|
.ant-input {
|
|
font-weight: bold;
|
|
|
|
&:not(:focus) {
|
|
transition:
|
|
background-color 0.3s ease,
|
|
border-color 0.3s ease;
|
|
border-color: ${token.colorBorderBg};
|
|
background-color: ${token.colorBgContainerDisabled};
|
|
|
|
&:not(:disabled):hover {
|
|
border-color: ${token.colorPrimaryBorderHover};
|
|
}
|
|
|
|
&:disabled:hover {
|
|
border-color: ${token.colorBorderBg};
|
|
}
|
|
}
|
|
}
|
|
|
|
.workflow-node-config-button {
|
|
padding: 0;
|
|
}
|
|
|
|
&:hover {
|
|
box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.25);
|
|
|
|
.workflow-node-remove-button {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
`,
|
|
|
|
nodeJobButtonClass: css`
|
|
display: flex;
|
|
position: absolute;
|
|
top: calc(1em - 1px);
|
|
right: 1em;
|
|
justify-content: center;
|
|
align-items: center;
|
|
color: ${token.colorTextLightSolid};
|
|
`,
|
|
|
|
nodeHeaderClass: css`
|
|
position: relative;
|
|
`,
|
|
|
|
nodeMetaClass: css`
|
|
margin-bottom: 0.5em;
|
|
|
|
.workflow-node-id {
|
|
color: ${token.colorTextDescription};
|
|
|
|
&:before {
|
|
content: '#';
|
|
}
|
|
}
|
|
`,
|
|
|
|
nodeTitleClass: css`
|
|
display: flex;
|
|
align-items: center;
|
|
font-weight: normal;
|
|
.workflow-node-id {
|
|
color: ${token.colorTextDescription};
|
|
}
|
|
`,
|
|
|
|
nodeSubtreeClass: css`
|
|
display: flex;
|
|
flex-direction: column-reverse;
|
|
align-items: center;
|
|
`,
|
|
|
|
nodeJobResultClass: css`
|
|
padding: 1em;
|
|
background-color: ${token.colorBgContainer};
|
|
`,
|
|
|
|
addButtonClass: css`
|
|
flex-shrink: 0;
|
|
padding: 2em 0;
|
|
|
|
> .ant-btn {
|
|
&:disabled {
|
|
visibility: hidden;
|
|
}
|
|
}
|
|
`,
|
|
|
|
conditionClass: css`
|
|
position: relative;
|
|
height: 2em;
|
|
overflow: visible;
|
|
|
|
> span {
|
|
position: absolute;
|
|
top: calc(1.5em - 1px);
|
|
line-height: 1em;
|
|
color: ${token.colorTextSecondary};
|
|
background-color: ${token.colorBgLayout};
|
|
padding: 1px;
|
|
}
|
|
`,
|
|
|
|
loopLineClass: css`
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
position: absolute;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 2em;
|
|
height: 6em;
|
|
`,
|
|
|
|
terminalClass: css`
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
width: 4em;
|
|
height: 4em;
|
|
border-radius: 50%;
|
|
background-color: ${token.colorText};
|
|
color: ${token.colorBgContainer};
|
|
`,
|
|
};
|
|
});
|
|
|
|
export default useStyles;
|