aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/views/common
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2023-07-11 01:07:57 +0800
committerGitHub <noreply@github.com>2023-07-11 01:07:57 +0800
commita702dff4b62090a4e5453a8b9236824288df0c4f (patch)
tree0deae7f40692345c8e4b1473cdddbd13e0e5586d /FrontEnd/src/views/common
parent4cb87464fea217e1d0969747d6a17e88973982e7 (diff)
parentd46b1aed549938c9f5e3e658b4098e71b5e2acf7 (diff)
downloadtimeline-a702dff4b62090a4e5453a8b9236824288df0c4f.tar.gz
timeline-a702dff4b62090a4e5453a8b9236824288df0c4f.tar.bz2
timeline-a702dff4b62090a4e5453a8b9236824288df0c4f.zip
Merge pull request #1381 from crupest/front-dev
Re-bootstrap front end.
Diffstat (limited to 'FrontEnd/src/views/common')
-rw-r--r--FrontEnd/src/views/common/AppBar.tsx4
-rw-r--r--FrontEnd/src/views/common/BlobImage.tsx2
-rw-r--r--FrontEnd/src/views/common/Card.tsx2
-rw-r--r--FrontEnd/src/views/common/ImageCropper.tsx2
-rw-r--r--FrontEnd/src/views/common/LoadFailReload.tsx2
-rw-r--r--FrontEnd/src/views/common/LoadingPage.tsx2
-rw-r--r--FrontEnd/src/views/common/SearchInput.tsx3
-rw-r--r--FrontEnd/src/views/common/Skeleton.tsx2
-rw-r--r--FrontEnd/src/views/common/Spinner.tsx2
-rw-r--r--FrontEnd/src/views/common/TimelineLogo.tsx3
-rw-r--r--FrontEnd/src/views/common/alert/AlertHost.tsx2
-rw-r--r--FrontEnd/src/views/common/button/Button.tsx2
-rw-r--r--FrontEnd/src/views/common/button/FlatButton.tsx2
-rw-r--r--FrontEnd/src/views/common/button/IconButton.tsx8
-rw-r--r--FrontEnd/src/views/common/button/LoadingButton.tsx18
-rw-r--r--FrontEnd/src/views/common/dailog/ConfirmDialog.tsx2
-rw-r--r--FrontEnd/src/views/common/dailog/Dialog.tsx2
-rw-r--r--FrontEnd/src/views/common/dailog/FullPageDialog.tsx2
-rw-r--r--FrontEnd/src/views/common/dailog/OperationDialog.tsx3
-rw-r--r--FrontEnd/src/views/common/input/InputPanel.tsx2
-rw-r--r--FrontEnd/src/views/common/menu/Menu.tsx2
-rw-r--r--FrontEnd/src/views/common/menu/PopupMenu.tsx2
-rw-r--r--FrontEnd/src/views/common/tab/TabPages.tsx2
-rw-r--r--FrontEnd/src/views/common/tab/Tabs.tsx2
-rw-r--r--FrontEnd/src/views/common/user/UserAvatar.tsx2
25 files changed, 40 insertions, 37 deletions
diff --git a/FrontEnd/src/views/common/AppBar.tsx b/FrontEnd/src/views/common/AppBar.tsx
index 208da3f7..278c70fd 100644
--- a/FrontEnd/src/views/common/AppBar.tsx
+++ b/FrontEnd/src/views/common/AppBar.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import classnames from "classnames";
import { useTranslation } from "react-i18next";
import { Link, NavLink } from "react-router-dom";
@@ -11,7 +11,7 @@ import UserAvatar from "./user/UserAvatar";
import "./AppBar.css";
-const AppBar: React.FC = (_) => {
+const AppBar: React.FC = () => {
const { t } = useTranslation();
const user = useUser();
diff --git a/FrontEnd/src/views/common/BlobImage.tsx b/FrontEnd/src/views/common/BlobImage.tsx
index 0dd25c52..5e050ebe 100644
--- a/FrontEnd/src/views/common/BlobImage.tsx
+++ b/FrontEnd/src/views/common/BlobImage.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
const BlobImage: React.FC<
Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src"> & {
diff --git a/FrontEnd/src/views/common/Card.tsx b/FrontEnd/src/views/common/Card.tsx
index 7e2eb575..ebbce77e 100644
--- a/FrontEnd/src/views/common/Card.tsx
+++ b/FrontEnd/src/views/common/Card.tsx
@@ -1,5 +1,5 @@
import classNames from "classnames";
-import React from "react";
+import * as React from "react";
import "./Card.css";
diff --git a/FrontEnd/src/views/common/ImageCropper.tsx b/FrontEnd/src/views/common/ImageCropper.tsx
index 4262e18f..04e17415 100644
--- a/FrontEnd/src/views/common/ImageCropper.tsx
+++ b/FrontEnd/src/views/common/ImageCropper.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import classnames from "classnames";
import { UiLogicError } from "@/common";
diff --git a/FrontEnd/src/views/common/LoadFailReload.tsx b/FrontEnd/src/views/common/LoadFailReload.tsx
index a80e7b76..81ba1f67 100644
--- a/FrontEnd/src/views/common/LoadFailReload.tsx
+++ b/FrontEnd/src/views/common/LoadFailReload.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import { Trans } from "react-i18next";
export interface LoadFailReloadProps {
diff --git a/FrontEnd/src/views/common/LoadingPage.tsx b/FrontEnd/src/views/common/LoadingPage.tsx
index 8c1e681a..35ee1aa8 100644
--- a/FrontEnd/src/views/common/LoadingPage.tsx
+++ b/FrontEnd/src/views/common/LoadingPage.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import Spinner from "./Spinner";
diff --git a/FrontEnd/src/views/common/SearchInput.tsx b/FrontEnd/src/views/common/SearchInput.tsx
index 0b1eb8e1..9d644ab7 100644
--- a/FrontEnd/src/views/common/SearchInput.tsx
+++ b/FrontEnd/src/views/common/SearchInput.tsx
@@ -1,4 +1,5 @@
-import React, { useCallback } from "react";
+import { useCallback } from "react";
+import * as React from "react";
import classnames from "classnames";
import { useTranslation } from "react-i18next";
diff --git a/FrontEnd/src/views/common/Skeleton.tsx b/FrontEnd/src/views/common/Skeleton.tsx
index 58d34215..3b149db9 100644
--- a/FrontEnd/src/views/common/Skeleton.tsx
+++ b/FrontEnd/src/views/common/Skeleton.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import classnames from "classnames";
import range from "lodash/range";
diff --git a/FrontEnd/src/views/common/Spinner.tsx b/FrontEnd/src/views/common/Spinner.tsx
index 4c735fef..e99a9d1b 100644
--- a/FrontEnd/src/views/common/Spinner.tsx
+++ b/FrontEnd/src/views/common/Spinner.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import classnames from "classnames";
import { PaletteColorType } from "@/palette";
diff --git a/FrontEnd/src/views/common/TimelineLogo.tsx b/FrontEnd/src/views/common/TimelineLogo.tsx
index 27d188fc..e06ed0f5 100644
--- a/FrontEnd/src/views/common/TimelineLogo.tsx
+++ b/FrontEnd/src/views/common/TimelineLogo.tsx
@@ -1,4 +1,5 @@
-import React, { SVGAttributes } from "react";
+import { SVGAttributes } from "react";
+import * as React from "react";
export interface TimelineLogoProps extends SVGAttributes<SVGElement> {
color?: string;
diff --git a/FrontEnd/src/views/common/alert/AlertHost.tsx b/FrontEnd/src/views/common/alert/AlertHost.tsx
index 92db78fa..42074781 100644
--- a/FrontEnd/src/views/common/alert/AlertHost.tsx
+++ b/FrontEnd/src/views/common/alert/AlertHost.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import without from "lodash/without";
import { useTranslation } from "react-i18next";
import classNames from "classnames";
diff --git a/FrontEnd/src/views/common/button/Button.tsx b/FrontEnd/src/views/common/button/Button.tsx
index 1e4163ff..c5976909 100644
--- a/FrontEnd/src/views/common/button/Button.tsx
+++ b/FrontEnd/src/views/common/button/Button.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import classNames from "classnames";
import { useTranslation } from "react-i18next";
diff --git a/FrontEnd/src/views/common/button/FlatButton.tsx b/FrontEnd/src/views/common/button/FlatButton.tsx
index a6377708..b42c5b3a 100644
--- a/FrontEnd/src/views/common/button/FlatButton.tsx
+++ b/FrontEnd/src/views/common/button/FlatButton.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import { useTranslation } from "react-i18next";
import classNames from "classnames";
diff --git a/FrontEnd/src/views/common/button/IconButton.tsx b/FrontEnd/src/views/common/button/IconButton.tsx
index 74d7dd36..3ba56277 100644
--- a/FrontEnd/src/views/common/button/IconButton.tsx
+++ b/FrontEnd/src/views/common/button/IconButton.tsx
@@ -1,15 +1,15 @@
-import React from "react";
+import * as React from "react";
import classNames from "classnames";
import { PaletteColorType } from "@/palette";
import "./IconButton.css";
-export type IconButtonProps = {
+export interface IconButtonProps extends React.ComponentPropsWithRef<"i"> {
icon: string;
color?: PaletteColorType;
large?: boolean;
-} & React.ComponentPropsWithRef<"i">;
+}
export default function IconButton(props: IconButtonProps): JSX.Element {
const { icon, color, className, large, ...otherProps } = props;
@@ -21,7 +21,7 @@ export default function IconButton(props: IconButtonProps): JSX.Element {
large && "large",
"bi-" + icon,
color ? "cru-" + color : "cru-primary",
- className
+ className,
)}
{...otherProps}
/>
diff --git a/FrontEnd/src/views/common/button/LoadingButton.tsx b/FrontEnd/src/views/common/button/LoadingButton.tsx
index 2764f92e..fceaec27 100644
--- a/FrontEnd/src/views/common/button/LoadingButton.tsx
+++ b/FrontEnd/src/views/common/button/LoadingButton.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import classNames from "classnames";
import { useTranslation } from "react-i18next";
@@ -7,13 +7,13 @@ import { PaletteColorType } from "@/palette";
import Spinner from "../Spinner";
-function LoadingButton(
- props: {
- color?: PaletteColorType;
- text?: I18nText;
- loading?: boolean;
- } & React.ComponentPropsWithoutRef<"button">
-): JSX.Element {
+interface LoadingButtonProps extends React.ComponentPropsWithoutRef<"button"> {
+ color?: PaletteColorType;
+ text?: I18nText;
+ loading?: boolean;
+}
+
+function LoadingButton(props: LoadingButtonProps): JSX.Element {
const { t } = useTranslation();
const { color, text, loading, className, children, ...otherProps } = props;
@@ -27,7 +27,7 @@ function LoadingButton(
className={classNames(
"cru-" + (color ?? "primary"),
"cru-button outline",
- className
+ className,
)}
{...otherProps}
>
diff --git a/FrontEnd/src/views/common/dailog/ConfirmDialog.tsx b/FrontEnd/src/views/common/dailog/ConfirmDialog.tsx
index 3817ce1e..8c2cea5a 100644
--- a/FrontEnd/src/views/common/dailog/ConfirmDialog.tsx
+++ b/FrontEnd/src/views/common/dailog/ConfirmDialog.tsx
@@ -1,5 +1,5 @@
import { convertI18nText, I18nText } from "@/common";
-import React from "react";
+import * as React from "react";
import { useTranslation } from "react-i18next";
import Button from "../button/Button";
diff --git a/FrontEnd/src/views/common/dailog/Dialog.tsx b/FrontEnd/src/views/common/dailog/Dialog.tsx
index ca733e3d..c755950d 100644
--- a/FrontEnd/src/views/common/dailog/Dialog.tsx
+++ b/FrontEnd/src/views/common/dailog/Dialog.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import ReactDOM from "react-dom";
import { CSSTransition } from "react-transition-group";
diff --git a/FrontEnd/src/views/common/dailog/FullPageDialog.tsx b/FrontEnd/src/views/common/dailog/FullPageDialog.tsx
index ef76f2f2..6368fc0a 100644
--- a/FrontEnd/src/views/common/dailog/FullPageDialog.tsx
+++ b/FrontEnd/src/views/common/dailog/FullPageDialog.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import { createPortal } from "react-dom";
import classnames from "classnames";
import { CSSTransition } from "react-transition-group";
diff --git a/FrontEnd/src/views/common/dailog/OperationDialog.tsx b/FrontEnd/src/views/common/dailog/OperationDialog.tsx
index b0ffdac9..71be030a 100644
--- a/FrontEnd/src/views/common/dailog/OperationDialog.tsx
+++ b/FrontEnd/src/views/common/dailog/OperationDialog.tsx
@@ -1,4 +1,5 @@
-import React, { useState } from "react";
+import { useState } from "react";
+import * as React from "react";
import { useTranslation } from "react-i18next";
import { TwitterPicker } from "react-color";
import classNames from "classnames";
diff --git a/FrontEnd/src/views/common/input/InputPanel.tsx b/FrontEnd/src/views/common/input/InputPanel.tsx
index c76b8d45..234ed267 100644
--- a/FrontEnd/src/views/common/input/InputPanel.tsx
+++ b/FrontEnd/src/views/common/input/InputPanel.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import classNames from "classnames";
import { useTranslation } from "react-i18next";
import { TwitterPicker } from "react-color";
diff --git a/FrontEnd/src/views/common/menu/Menu.tsx b/FrontEnd/src/views/common/menu/Menu.tsx
index d2f65391..de3b1664 100644
--- a/FrontEnd/src/views/common/menu/Menu.tsx
+++ b/FrontEnd/src/views/common/menu/Menu.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import classnames from "classnames";
import { useTranslation } from "react-i18next";
diff --git a/FrontEnd/src/views/common/menu/PopupMenu.tsx b/FrontEnd/src/views/common/menu/PopupMenu.tsx
index b8f24978..74ca7aba 100644
--- a/FrontEnd/src/views/common/menu/PopupMenu.tsx
+++ b/FrontEnd/src/views/common/menu/PopupMenu.tsx
@@ -1,5 +1,5 @@
import classNames from "classnames";
-import React from "react";
+import * as React from "react";
import { createPortal } from "react-dom";
import { usePopper } from "react-popper";
diff --git a/FrontEnd/src/views/common/tab/TabPages.tsx b/FrontEnd/src/views/common/tab/TabPages.tsx
index 677f558a..cdb988e0 100644
--- a/FrontEnd/src/views/common/tab/TabPages.tsx
+++ b/FrontEnd/src/views/common/tab/TabPages.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import { I18nText, UiLogicError } from "@/common";
diff --git a/FrontEnd/src/views/common/tab/Tabs.tsx b/FrontEnd/src/views/common/tab/Tabs.tsx
index 701b4073..3e3ef6fa 100644
--- a/FrontEnd/src/views/common/tab/Tabs.tsx
+++ b/FrontEnd/src/views/common/tab/Tabs.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import { Link } from "react-router-dom";
import { useTranslation } from "react-i18next";
import classnames from "classnames";
diff --git a/FrontEnd/src/views/common/user/UserAvatar.tsx b/FrontEnd/src/views/common/user/UserAvatar.tsx
index 9e822528..fcff8c69 100644
--- a/FrontEnd/src/views/common/user/UserAvatar.tsx
+++ b/FrontEnd/src/views/common/user/UserAvatar.tsx
@@ -1,4 +1,4 @@
-import React from "react";
+import * as React from "react";
import { getHttpUserClient } from "@/http/user";