"example/36_permute/permute_HxWx2_fp16.cpp" did not exist on "5f50ed89099af43929fc291130d34f47258ef302"
index.tsx 1.48 KB
Newer Older
dechen lin's avatar
dechen lin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import LoadingAnimation from "@/components/loading-animation";
import { ExclamationCircleFilled } from "@ant-design/icons";
import cls from "classnames";

export const IframeLoading = ({
  filename,
  type,
  text,
  errorElement,
  classNameTitle = "",
  showHeader,
}: {
  filename?: string;
  type: "loading" | "error";
  text?: string;
  errorElement?: React.ReactElement;
  classNameTitle?: string;
  showHeader?: boolean;
}) => {
  return (
    <div className="flex flex-col h-full text-sm text-[#121316]/[0.8] whitespace-nowrap ">
      {showHeader && (
        <div
          className={cls(
            "h-[47px] border-0 border-solid border-b-[1px] border-[#EBECF0] w-full pl-[24px]",
            classNameTitle
          )}
        >
          {filename}
        </div>
      )}

      <div className="flex-1 flex justify-center items-center">
        {type === "error" ? (
          errorElement ? (
            errorElement
          ) : (
            <>
              <ExclamationCircleFilled
                style={{ color: "#FF8800" }}
                rotate={180}
              />
              <span className="ml-2.5">上传失败,请</span>
              <span className="text-[#0D53DE] ml-1 cursor-pointer">
                重新上传
              </span>
            </>
          )
        ) : (
          <>
            <LoadingAnimation />
            <span className="ml-2.5">{text || "PDF 上传中,请稍等..."}</span>
          </>
        )}
      </div>
    </div>
  );
};