fix(style): add worker
This commit is contained in:
@@ -80,13 +80,15 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
|
||||
</Button>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>1. {intl.formatMessage({ id: 'resources.worker.add.step1' })}</h3>
|
||||
<h3 className="font-size-14 font-600">
|
||||
1. {intl.formatMessage({ id: 'resources.worker.add.step1' })}
|
||||
</h3>
|
||||
<HighlightCode
|
||||
code={addWorkerGuide.container.getToken}
|
||||
theme="dark"
|
||||
lang="bash"
|
||||
></HighlightCode>
|
||||
<h3 className="m-t-10">
|
||||
<h3 className="m-t-10 font-size-14 font-600">
|
||||
2. {intl.formatMessage({ id: 'resources.worker.add.step2' })}{' '}
|
||||
<span
|
||||
className="font-size-12"
|
||||
@@ -119,7 +121,7 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
|
||||
></div>
|
||||
)}
|
||||
<HighlightCode theme="dark" code={code} lang="bash"></HighlightCode>
|
||||
<h3 className="m-b-0 m-t-10">
|
||||
<h3 className="m-b-0 m-t-10 font-size-14 font-600">
|
||||
3. {intl.formatMessage({ id: 'resources.worker.add.step3' })}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@@ -417,7 +417,9 @@ const ModelFiles = () => {
|
||||
render: (text: string, record: ListItem) => (
|
||||
<span className="flex flex-column" style={{ width: '100%' }}>
|
||||
{record.source === modelSourceMap.local_path_value ? (
|
||||
intl.formatMessage({ id: 'models.form.localPath' })
|
||||
<AutoTooltip ghost>
|
||||
{intl.formatMessage({ id: 'models.form.localPath' })}
|
||||
</AutoTooltip>
|
||||
) : (
|
||||
<AutoTooltip ghost>{generateSource(record)}</AutoTooltip>
|
||||
)}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import HighlightCode from '@/components/highlight-code';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import React from 'react';
|
||||
import React, { useMemo } from 'react';
|
||||
import { addWorkerGuide } from '../config';
|
||||
|
||||
type ViewModalProps = { token: string };
|
||||
@@ -10,32 +10,41 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
|
||||
|
||||
const origin = window.location.origin;
|
||||
|
||||
const labels = useMemo(
|
||||
() => ({
|
||||
step1: intl.formatMessage({ id: 'resources.worker.add.step1' }),
|
||||
step2: intl.formatMessage({ id: 'resources.worker.add.step2' }),
|
||||
step2Tips: intl.formatMessage({ id: 'resources.worker.add.step2.tips' }),
|
||||
step3: intl.formatMessage({ id: 'resources.worker.add.step3' }),
|
||||
linuxOrMac: intl.formatMessage({ id: 'resources.worker.linuxormaxos' })
|
||||
}),
|
||||
[intl]
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="script-install">
|
||||
<h3>1. {intl.formatMessage({ id: 'resources.worker.add.step1' })}</h3>
|
||||
<h4>{intl.formatMessage({ id: 'resources.worker.linuxormaxos' })}</h4>
|
||||
<h3 className="font-size-14 font-600">1. {labels.step1}</h3>
|
||||
<h4 className="font-size-13">{labels.linuxOrMac}</h4>
|
||||
<HighlightCode
|
||||
code={addWorkerGuide.mac.getToken}
|
||||
theme="dark"
|
||||
></HighlightCode>
|
||||
<h4 className="m-t-6">Windows </h4>
|
||||
<h4 className="m-t-6 font-size-13">Windows </h4>
|
||||
<HighlightCode
|
||||
code={addWorkerGuide.win.getToken}
|
||||
theme="dark"
|
||||
></HighlightCode>
|
||||
<h3 className="m-t-10">
|
||||
2. {intl.formatMessage({ id: 'resources.worker.add.step2' })}{' '}
|
||||
<h3 className="m-t-10 font-size-14 font-600">
|
||||
2. {labels.step2}{' '}
|
||||
<span
|
||||
className="font-size-12"
|
||||
style={{ color: 'var(--ant-color-text-tertiary)' }}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `(${intl.formatMessage({
|
||||
id: 'resources.worker.add.step2.tips'
|
||||
})})`
|
||||
__html: `(${labels.step2Tips})`
|
||||
}}
|
||||
></span>
|
||||
</h3>
|
||||
<h4>{intl.formatMessage({ id: 'resources.worker.linuxormaxos' })}</h4>
|
||||
<h4 className="font-size-13">{labels.linuxOrMac}</h4>
|
||||
<HighlightCode
|
||||
code={addWorkerGuide.mac.registerWorker({
|
||||
server: origin,
|
||||
@@ -43,7 +52,7 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
|
||||
})}
|
||||
theme="dark"
|
||||
></HighlightCode>
|
||||
<h4 className="m-t-6">Windows </h4>
|
||||
<h4 className="m-t-6 font-size-13">Windows </h4>
|
||||
<HighlightCode
|
||||
theme="dark"
|
||||
code={addWorkerGuide.win.registerWorker({
|
||||
@@ -51,9 +60,7 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
|
||||
token: '${mytoken}'
|
||||
})}
|
||||
></HighlightCode>
|
||||
<h3 className="m-b-0 m-t-10">
|
||||
3. {intl.formatMessage({ id: 'resources.worker.add.step3' })}
|
||||
</h3>
|
||||
<h3 className="m-b-0 m-t-10 font-size-14 font-600">3. {labels.step3}</h3>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user