From c3e95a6cd7322c644159eed6350a20dfd1a002ff Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 1 Sep 2020 01:34:41 +0800 Subject: Upgrade packages. --- Timeline/ClientApp/package.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'Timeline/ClientApp/package.json') diff --git a/Timeline/ClientApp/package.json b/Timeline/ClientApp/package.json index b633630b..6da643a8 100644 --- a/Timeline/ClientApp/package.json +++ b/Timeline/ClientApp/package.json @@ -8,7 +8,7 @@ "dependencies": { "axios": "^0.20.0", "bootstrap": "^4.5.2", - "bootstrap-icons": "^1.0.0-alpha5", + "bootstrap-icons": "^1.0.0", "classnames": "^2.2.6", "clsx": "^1.1.1", "core-js": "^3.6.5", @@ -20,7 +20,7 @@ "react": "^16.13.1", "react-dom": "^16.13.1", "react-hot-loader": "^4.12.21", - "react-i18next": "^11.7.1", + "react-i18next": "^11.7.2", "react-inlinesvg": "^2.0.0", "react-responsive": "^8.1.0", "react-router": "^5.2.0", @@ -65,9 +65,9 @@ "@hot-loader/react-dom": "^16.13.0", "@types/classnames": "^2.2.10", "@types/crypto-js": "^3.1.47", - "@types/lodash": "^4.14.159", - "@types/node": "^14.6.0", - "@types/react": "^16.9.46", + "@types/lodash": "^4.14.161", + "@types/node": "^14.6.2", + "@types/react": "^16.9.49", "@types/react-dom": "^16.9.8", "@types/react-responsive": "^8.0.2", "@types/react-router": "^5.1.8", @@ -75,15 +75,15 @@ "@types/reactstrap": "^8.5.1", "@types/webpack-env": "^1.15.2", "@types/xregexp": "^4.3.0", - "@typescript-eslint/eslint-plugin": "^3.9.1", - "@typescript-eslint/parser": "^3.9.1", - "@yarnpkg/pnpify": "^2.1.0", + "@typescript-eslint/eslint-plugin": "^4.0.0", + "@typescript-eslint/parser": "^4.0.0", + "@yarnpkg/pnpify": "^2.2.1", "babel-loader": "^8.1.0", "babel-plugin-transform-builtin-extend": "^1.1.2", "clean-webpack-plugin": "^3.0.0", - "copy-webpack-plugin": "^6.0.3", + "copy-webpack-plugin": "^6.1.0", "crypto-js": "^4.0.0", - "css-loader": "^4.2.1", + "css-loader": "^4.2.2", "eslint": "^7.7.0", "eslint-config-prettier": "^6.11.0", "eslint-import-resolver-webpack": "^0.12.2", @@ -91,16 +91,16 @@ "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-react": "^7.20.6", "eslint-plugin-react-hooks": "^4.1.0", - "file-loader": "^6.0.0", - "html-webpack-plugin": "^4.3.0", + "file-loader": "^6.1.0", + "html-webpack-plugin": "^4.4.1", "http-server": "^0.12.3", - "mini-css-extract-plugin": "^0.10.0", + "mini-css-extract-plugin": "^0.11.0", "pnp-webpack-plugin": "^1.6.4", "postcss-loader": "^3.0.0", "postcss-preset-env": "^6.7.0", - "prettier": "^2.1.0", + "prettier": "^2.1.1", "sass": "^1.26.10", - "sass-loader": "^9.0.3", + "sass-loader": "^10.0.1", "style-loader": "^1.2.1", "ts-loader": "^8.0.3", "typescript": "^4.0.2", -- cgit v1.2.3 From f70e638be0e1938be31a127fb93acf0be9e5c6c1 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 1 Sep 2020 02:34:40 +0800 Subject: Roll back typescipt-eslint. --- Timeline/ClientApp/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Timeline/ClientApp/package.json') diff --git a/Timeline/ClientApp/package.json b/Timeline/ClientApp/package.json index 6da643a8..144560e5 100644 --- a/Timeline/ClientApp/package.json +++ b/Timeline/ClientApp/package.json @@ -75,8 +75,8 @@ "@types/reactstrap": "^8.5.1", "@types/webpack-env": "^1.15.2", "@types/xregexp": "^4.3.0", - "@typescript-eslint/eslint-plugin": "^4.0.0", - "@typescript-eslint/parser": "^4.0.0", + "@typescript-eslint/eslint-plugin": "^3.10.1", + "@typescript-eslint/parser": "^3.10.1", "@yarnpkg/pnpify": "^2.2.1", "babel-loader": "^8.1.0", "babel-plugin-transform-builtin-extend": "^1.1.2", -- cgit v1.2.3 From 20d5614b6048873d5993ffa493f1b254fe8c73c1 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 2 Sep 2020 22:36:04 +0800 Subject: ... --- Timeline/ClientApp/package.json | 3 + Timeline/ClientApp/src/app/index.sass | 3 - Timeline/ClientApp/src/app/views/common/AppBar.tsx | 115 +++++++-------------- .../ClientApp/src/app/views/common/LoadingPage.tsx | 4 +- .../ClientApp/src/app/views/common/SearchInput.tsx | 8 +- 5 files changed, 45 insertions(+), 88 deletions(-) (limited to 'Timeline/ClientApp/package.json') diff --git a/Timeline/ClientApp/package.json b/Timeline/ClientApp/package.json index 144560e5..81232c71 100644 --- a/Timeline/ClientApp/package.json +++ b/Timeline/ClientApp/package.json @@ -18,12 +18,14 @@ "lodash": "^4.17.20", "pepjs": "^0.5.2", "react": "^16.13.1", + "react-bootstrap": "^1.3.0", "react-dom": "^16.13.1", "react-hot-loader": "^4.12.21", "react-i18next": "^11.7.2", "react-inlinesvg": "^2.0.0", "react-responsive": "^8.1.0", "react-router": "^5.2.0", + "react-router-bootstrap": "^0.25.0", "react-router-dom": "^5.2.0", "reactstrap": "^8.5.1", "regenerator-runtime": "^0.13.7", @@ -71,6 +73,7 @@ "@types/react-dom": "^16.9.8", "@types/react-responsive": "^8.0.2", "@types/react-router": "^5.1.8", + "@types/react-router-bootstrap": "^0.24.5", "@types/react-router-dom": "^5.1.5", "@types/reactstrap": "^8.5.1", "@types/webpack-env": "^1.15.2", diff --git a/Timeline/ClientApp/src/app/index.sass b/Timeline/ClientApp/src/app/index.sass index efac4df5..92f8efaf 100644 --- a/Timeline/ClientApp/src/app/index.sass +++ b/Timeline/ClientApp/src/app/index.sass @@ -33,9 +33,6 @@ small right: 0 bottom: 0 -.app-bar - z-index: 1035 - .avatar width: 60px diff --git a/Timeline/ClientApp/src/app/views/common/AppBar.tsx b/Timeline/ClientApp/src/app/views/common/AppBar.tsx index aefe0f27..464747c0 100644 --- a/Timeline/ClientApp/src/app/views/common/AppBar.tsx +++ b/Timeline/ClientApp/src/app/views/common/AppBar.tsx @@ -1,9 +1,7 @@ import React from "react"; -import { useHistory, matchPath } from "react-router"; -import { Link, NavLink } from "react-router-dom"; -import { Navbar, NavbarToggler, Collapse, Nav, NavItem } from "reactstrap"; -import { useMediaQuery } from "react-responsive"; import { useTranslation } from "react-i18next"; +import { LinkContainer } from "react-router-bootstrap"; +import { Navbar, Nav } from "react-bootstrap"; import { useUser, useAvatar } from "@/services/user"; @@ -11,95 +9,54 @@ import TimelineLogo from "./TimelineLogo"; import BlobImage from "./BlobImage"; const AppBar: React.FC = (_) => { - const history = useHistory(); const user = useUser(); const avatar = useAvatar(user?.username); const { t } = useTranslation(); - const isUpMd = useMediaQuery({ - minWidth: getComputedStyle(document.documentElement).getPropertyValue( - "--breakpoint-md" - ), - }); - - const [isMenuOpen, setIsMenuOpen] = React.useState(false); - - const toggleMenu = React.useCallback((): void => { - setIsMenuOpen((oldIsMenuOpen) => !oldIsMenuOpen); - }, []); - const isAdministrator = user && user.administrator; - const rightArea = ( -
- {user != null ? ( - - - - ) : ( - - {t("nav.login")} - - )} -
- ); - return ( - - - - Timeline - - - {isUpMd ? null : rightArea} + + + + + Timeline + + - - -