ExitPage.tsx 1.9 KB
Newer Older
R
Rongfeng Fu 已提交
1 2
import { intl } from '@/utils/intl';
import { message, Card, Empty } from 'antd';
R
Rongfeng Fu 已提交
3 4
import { CopyOutlined } from '@ant-design/icons';
import copy from 'copy-to-clipboard';
R
Rongfeng Fu 已提交
5 6 7 8 9 10
import { getLocale } from 'umi';
import EnStyles from './indexEn.less';
import ZhStyles from './indexZh.less';

const locale = getLocale();
const styles = locale === 'zh-CN' ? ZhStyles : EnStyles;
R
Rongfeng Fu 已提交
11 12 13 14 15 16

export default function ExitPage() {
  const command = 'obd web';

  const handleCopy = () => {
    copy(command);
R
Rongfeng Fu 已提交
17 18 19 20 21 22
    message.success(
      intl.formatMessage({
        id: 'OBD.pages.components.ExitPage.CopiedSuccessfully',
        defaultMessage: '复制成功',
      }),
    );
R
Rongfeng Fu 已提交
23 24 25 26
  };

  return (
    <Card className={styles.exitPage}>
R
Rongfeng Fu 已提交
27 28 29 30 31
      <Empty
        image="/assets/empty2.png"
        style={{ marginTop: '30px' }}
        description=""
      />
R
Rongfeng Fu 已提交
32
      <h1
R
Rongfeng Fu 已提交
33
        className="fw-500"
R
Rongfeng Fu 已提交
34
        data-aspm-click="c307511.d317289"
R
Rongfeng Fu 已提交
35 36 37 38
        data-aspm-desc={intl.formatMessage({
          id: 'OBD.pages.components.ExitPage.ExitTheDeploymentProgramHas',
          defaultMessage: '退出-部署程序已经退出',
        })}
R
Rongfeng Fu 已提交
39 40 41
        data-aspm-param={``}
        data-aspm-expo
      >
R
Rongfeng Fu 已提交
42 43 44 45
        {intl.formatMessage({
          id: 'OBD.pages.components.ExitPage.TheDeploymentProgramHasExited',
          defaultMessage: '部署程序已经退出!',
        })}
R
Rongfeng Fu 已提交
46 47 48 49
      </h1>
      <div
        className={styles.exitPageText}
        data-aspm-click="c307511.d317288"
R
Rongfeng Fu 已提交
50 51 52 53
        data-aspm-desc={intl.formatMessage({
          id: 'OBD.pages.components.ExitPage.ExitRestartPrompt',
          defaultMessage: '退出-再次启动提示',
        })}
R
Rongfeng Fu 已提交
54 55 56
        data-aspm-param={``}
        data-aspm-expo
      >
R
Rongfeng Fu 已提交
57 58 59 60 61
        {intl.formatMessage({
          id: 'OBD.pages.components.ExitPage.ToStartAgainGoTo',
          defaultMessage: '如需再次启动,请前往中控服务器执行',
        })}

R
Rongfeng Fu 已提交
62 63 64 65 66 67 68
        <a>
          {command} <CopyOutlined onClick={handleCopy} />
        </a>
      </div>
    </Card>
  );
}