UNPKG

1.38 kBJavaScriptView Raw
1import React from "react";
2import { DownloadOutlined, CheckOutlined } from "@ant-design/icons";
3import HeaderPopAction from "@comps/HeaderPopAction";
4import styles from "./Software.scss";
5import { Button } from "@comps/Buttons";
6/**
7 * ----------------------------------------
8 * 软件下载提示
9 * @param {String} link 下载链接
10 * @param {Object} style Header样式
11 * ----------------------------------------
12 */
13export default function Software({ link, style }) {
14 const Item = ({ children }) => {
15 return (
16 <li>
17 <CheckOutlined className={styles.check} />
18 {children}
19 </li>
20 );
21 };
22
23 const Content = () => {
24 return (
25 <div className={styles.container}>
26 <Button onClick={() => (window.location.href = link)}>
27 下载Windows客户端
28 </Button>
29 <ul className={styles.info}>
30 <Item>软件一键安装,自动更新升级</Item>
31 <Item>双击桌面图标,快速进入使用</Item>
32 <Item>内核更优化,无兼容性问题</Item>
33 <Item>支持Win7及以上系统</Item>
34 </ul>
35 </div>
36 );
37 };
38
39 if (navigator.userAgent.match(/electron/i)) {
40 return null;
41 }
42 return (
43 <HeaderPopAction text="客户端下载" Content={Content} style={style}>
44 <DownloadOutlined style={{ color: "white" }} />
45 </HeaderPopAction>
46 );
47}