Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
hfpp2012
/
merng
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f3bf9d49
authored
Oct 23, 2019
by
qiuzhi99
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
semantic
1 parent
20cdba77
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
165 additions
and
3 deletions
client/package.json
client/src/App.js
client/src/components/MenuBar.js
client/yarn.lock
client/package.json
View file @
f3bf9d4
...
@@ -10,7 +10,9 @@
...
@@ -10,7 +10,9 @@
"react"
:
"^16.10.2"
,
"react"
:
"^16.10.2"
,
"react-dom"
:
"^16.10.2"
,
"react-dom"
:
"^16.10.2"
,
"react-router-dom"
:
"^5.1.2"
,
"react-router-dom"
:
"^5.1.2"
,
"react-scripts"
:
"3.2.0"
"react-scripts"
:
"3.2.0"
,
"semantic-ui-css"
:
"^2.4.1"
,
"semantic-ui-react"
:
"^0.88.1"
},
},
"scripts"
:
{
"scripts"
:
{
"start"
:
"react-scripts start"
,
"start"
:
"react-scripts start"
,
...
...
client/src/App.js
View file @
f3bf9d4
import
React
from
"react"
;
import
React
from
"react"
;
import
{
BrowserRouter
as
Router
,
Route
}
from
"react-router-dom"
;
import
{
BrowserRouter
as
Router
,
Route
}
from
"react-router-dom"
;
import
"semantic-ui-css/semantic.min.css"
;
import
{
Container
}
from
"semantic-ui-react"
;
import
Home
from
"./pages/Home"
;
import
Home
from
"./pages/Home"
;
import
Login
from
"./pages/Login"
;
import
Login
from
"./pages/Login"
;
import
Register
from
"./pages/Register"
;
import
Register
from
"./pages/Register"
;
import
MenuBar
from
"./components/MenuBar"
;
function
App
()
{
function
App
()
{
return
(
return
(
<
Router
>
<
Router
>
<
Container
>
<
MenuBar
/>
<
Route
exact
path
=
"/"
component
=
{
Home
}
/
>
<
Route
exact
path
=
"/"
component
=
{
Home
}
/
>
<
Route
exact
path
=
"/login"
component
=
{
Login
}
/
>
<
Route
exact
path
=
"/login"
component
=
{
Login
}
/
>
<
Route
exact
path
=
"/register"
component
=
{
Register
}
/
>
<
Route
exact
path
=
"/register"
component
=
{
Register
}
/
>
<
/Container
>
<
/Router
>
<
/Router
>
);
);
}
}
...
...
client/src/components/MenuBar.js
0 → 100644
View file @
f3bf9d4
import
React
,
{
useState
}
from
"react"
;
import
{
Menu
}
from
"semantic-ui-react"
;
import
{
Link
}
from
"react-router-dom"
;
function
MenuBar
()
{
const
pathname
=
window
.
location
.
pathname
;
const
path
=
pathname
===
"/"
?
"home"
:
pathname
.
substr
(
1
);
const
[
activeItem
,
setActiveItem
]
=
useState
(
path
);
const
handleItemClick
=
(
e
,
{
name
})
=>
setActiveItem
(
name
);
return
(
<
div
>
<
Menu
size
=
"massive"
color
=
"teal"
pointing
secondary
>
<
Menu
.
Item
name
=
"home"
active
=
{
activeItem
===
"home"
}
onClick
=
{
handleItemClick
}
as
=
{
Link
}
to
=
"/"
/
>
<
Menu
.
Menu
position
=
"right"
>
<
Menu
.
Item
name
=
"login"
active
=
{
activeItem
===
"login"
}
onClick
=
{
handleItemClick
}
as
=
{
Link
}
to
=
"/login"
/
>
<
Menu
.
Item
name
=
"register"
active
=
{
activeItem
===
"register"
}
onClick
=
{
handleItemClick
}
as
=
{
Link
}
to
=
"/register"
/
>
<
/Menu.Menu
>
<
/Menu
>
<
/div
>
);
}
export
default
MenuBar
;
client/yarn.lock
View file @
f3bf9d4
...
@@ -1126,6 +1126,31 @@
...
@@ -1126,6 +1126,31 @@
resolved "https://registry.npm.taobao.org/@nodelib/fs.stat/download/@nodelib/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
resolved "https://registry.npm.taobao.org/@nodelib/fs.stat/download/@nodelib/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
integrity sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=
integrity sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=
"@semantic-ui-react/event-stack@^3.1.0":
version "3.1.1"
resolved "https://registry.npm.taobao.org/@semantic-ui-react/event-stack/download/@semantic-ui-react/event-stack-3.1.1.tgz#3263d17511db81a743167fe45281a24b3eb6b3c8"
integrity sha1-MmPRdRHbgadDFn/kUoGiSz62s8g=
dependencies:
exenv "^1.2.2"
prop-types "^15.6.2"
"@stardust-ui/react-component-event-listener@~0.38.0":
version "0.38.0"
resolved "https://registry.npm.taobao.org/@stardust-ui/react-component-event-listener/download/@stardust-ui/react-component-event-listener-0.38.0.tgz#1787faded94b40ad41226e6289baf13e701c6e7f"
integrity sha1-F4f63tlLQK1BIm5iibrxPnAcbn8=
dependencies:
"@babel/runtime" "^7.1.2"
prop-types "^15.7.2"
"@stardust-ui/react-component-ref@~0.38.0":
version "0.38.0"
resolved "https://registry.npm.taobao.org/@stardust-ui/react-component-ref/download/@stardust-ui/react-component-ref-0.38.0.tgz#52d555f2d5edd213c923c93a106f7de940e427ef"
integrity sha1-UtVV8tXt0hPJI8k6EG996UDkJ+8=
dependencies:
"@babel/runtime" "^7.1.2"
prop-types "^15.7.2"
react-is "^16.6.3"
"@svgr/babel-plugin-add-jsx-attribute@^4.2.0":
"@svgr/babel-plugin-add-jsx-attribute@^4.2.0":
version "4.2.0"
version "4.2.0"
resolved "https://registry.npm.taobao.org/@svgr/babel-plugin-add-jsx-attribute/download/@svgr/babel-plugin-add-jsx-attribute-4.2.0.tgz#dadcb6218503532d6884b210e7f3c502caaa44b1"
resolved "https://registry.npm.taobao.org/@svgr/babel-plugin-add-jsx-attribute/download/@svgr/babel-plugin-add-jsx-attribute-4.2.0.tgz#dadcb6218503532d6884b210e7f3c502caaa44b1"
...
@@ -2587,6 +2612,11 @@ class-utils@^0.3.5:
...
@@ -2587,6 +2612,11 @@ class-utils@^0.3.5:
isobject "^3.0.0"
isobject "^3.0.0"
static-extend "^0.1.1"
static-extend "^0.1.1"
classnames@^2.2.6:
version "2.2.6"
resolved "https://registry.npm.taobao.org/classnames/download/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce"
integrity sha1-Q5Nb/90pHzJtrQogUwmzjQD2UM4=
clean-css@4.2.x:
clean-css@4.2.x:
version "4.2.1"
version "4.2.1"
resolved "https://registry.npm.taobao.org/clean-css/download/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17"
resolved "https://registry.npm.taobao.org/clean-css/download/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17"
...
@@ -2930,6 +2960,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
...
@@ -2930,6 +2960,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1"
safe-buffer "^5.0.1"
sha.js "^2.4.8"
sha.js "^2.4.8"
create-react-context@^0.3.0:
version "0.3.0"
resolved "https://registry.npm.taobao.org/create-react-context/download/create-react-context-0.3.0.tgz#546dede9dc422def0d3fc2fe03afe0bc0f4f7d8c"
integrity sha1-VG3t6dxCLe8NP8L+A6/gvA9PfYw=
dependencies:
gud "^1.0.0"
warning "^4.0.3"
cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5:
cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5"
version "6.0.5"
resolved "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz?cache=0&sync_timestamp=1570439888125&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
resolved "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz?cache=0&sync_timestamp=1570439888125&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
...
@@ -3942,6 +3980,11 @@ execa@^1.0.0:
...
@@ -3942,6 +3980,11 @@ execa@^1.0.0:
signal-exit "^3.0.0"
signal-exit "^3.0.0"
strip-eof "^1.0.0"
strip-eof "^1.0.0"
exenv@^1.2.2:
version "1.2.2"
resolved "https://registry.npm.taobao.org/exenv/download/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d"
integrity sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=
exit@^0.1.2:
exit@^0.1.2:
version "0.1.2"
version "0.1.2"
resolved "https://registry.npm.taobao.org/exit/download/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
resolved "https://registry.npm.taobao.org/exit/download/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
...
@@ -5768,6 +5811,11 @@ jest@24.9.0:
...
@@ -5768,6 +5811,11 @@ jest@24.9.0:
import-local "^2.0.0"
import-local "^2.0.0"
jest-cli "^24.9.0"
jest-cli "^24.9.0"
jquery@x.*:
version "3.4.1"
resolved "https://registry.npm.taobao.org/jquery/download/jquery-3.4.1.tgz#714f1f8d9dde4bdfa55764ba37ef214630d80ef2"
integrity sha1-cU8fjZ3eS9+lV2S6N+8hRjDYDvI=
js-levenshtein@^1.1.3:
js-levenshtein@^1.1.3:
version "1.1.6"
version "1.1.6"
resolved "https://registry.npm.taobao.org/js-levenshtein/download/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d"
resolved "https://registry.npm.taobao.org/js-levenshtein/download/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d"
...
@@ -5951,6 +5999,11 @@ jsx-ast-utils@^2.1.0, jsx-ast-utils@^2.2.1:
...
@@ -5951,6 +5999,11 @@ jsx-ast-utils@^2.1.0, jsx-ast-utils@^2.2.1:
array-includes "^3.0.3"
array-includes "^3.0.3"
object.assign "^4.1.0"
object.assign "^4.1.0"
keyboard-key@^1.0.4:
version "1.0.4"
resolved "https://registry.npm.taobao.org/keyboard-key/download/keyboard-key-1.0.4.tgz#52d8fa07b7e17757072aa22a67fb4ae85e4c46b0"
integrity sha1-Utj6B7fhd1cHKqIqZ/tK6F5MRrA=
killable@^1.0.0:
killable@^1.0.0:
version "1.0.1"
version "1.0.1"
resolved "https://registry.npm.taobao.org/killable/download/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"
resolved "https://registry.npm.taobao.org/killable/download/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"
...
@@ -7269,6 +7322,11 @@ pnp-webpack-plugin@1.5.0:
...
@@ -7269,6 +7322,11 @@ pnp-webpack-plugin@1.5.0:
dependencies:
dependencies:
ts-pnp "^1.1.2"
ts-pnp "^1.1.2"
popper.js@^1.14.4:
version "1.16.0"
resolved "https://registry.npm.taobao.org/popper.js/download/popper.js-1.16.0.tgz#2e1816bcbbaa518ea6c2e15a466f4cb9c6e2fbb3"
integrity sha1-LhgWvLuqUY6mwuFaRm9Mucbi+7M=
portfinder@^1.0.9:
portfinder@^1.0.9:
version "1.0.25"
version "1.0.25"
resolved "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca"
resolved "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca"
...
@@ -8016,7 +8074,7 @@ prompts@^2.0.1:
...
@@ -8016,7 +8074,7 @@ prompts@^2.0.1:
kleur "^3.0.3"
kleur "^3.0.3"
sisteransi "^1.0.3"
sisteransi "^1.0.3"
prop-types@^15.6.2, prop-types@^15.7.2:
prop-types@^15.6.
1, prop-types@^15.6.
2, prop-types@^15.7.2:
version "15.7.2"
version "15.7.2"
resolved "https://registry.npm.taobao.org/prop-types/download/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
resolved "https://registry.npm.taobao.org/prop-types/download/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
integrity sha1-UsQedbjIfnK52TYOAga5ncv/psU=
integrity sha1-UsQedbjIfnK52TYOAga5ncv/psU=
...
@@ -8238,11 +8296,23 @@ react-error-overlay@^6.0.3:
...
@@ -8238,11 +8296,23 @@ react-error-overlay@^6.0.3:
resolved "https://registry.npm.taobao.org/react-error-overlay/download/react-error-overlay-6.0.3.tgz#c378c4b0a21e88b2e159a3e62b2f531fd63bf60d"
resolved "https://registry.npm.taobao.org/react-error-overlay/download/react-error-overlay-6.0.3.tgz#c378c4b0a21e88b2e159a3e62b2f531fd63bf60d"
integrity sha1-w3jEsKIeiLLhWaPmKy9TH9Y79g0=
integrity sha1-w3jEsKIeiLLhWaPmKy9TH9Y79g0=
react-is@^16.6.0, react-is@^16.
7.0, react-is@^16.8.1, react-is@^16.8.4
:
react-is@^16.6.0, react-is@^16.
6.3, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6
:
version "16.10.2"
version "16.10.2"
resolved "https://registry.npm.taobao.org/react-is/download/react-is-16.10.2.tgz#984120fd4d16800e9a738208ab1fba422d23b5ab"
resolved "https://registry.npm.taobao.org/react-is/download/react-is-16.10.2.tgz#984120fd4d16800e9a738208ab1fba422d23b5ab"
integrity sha1-mEEg/U0WgA6ac4IIqx+6Qi0jtas=
integrity sha1-mEEg/U0WgA6ac4IIqx+6Qi0jtas=
react-popper@^1.3.4:
version "1.3.4"
resolved "https://registry.npm.taobao.org/react-popper/download/react-popper-1.3.4.tgz#f0cd3b0d30378e1f663b0d79bcc8614221652ced"
integrity sha1-8M07DTA3jh9mOw15vMhhQiFlLO0=
dependencies:
"@babel/runtime" "^7.1.2"
create-react-context "^0.3.0"
popper.js "^1.14.4"
prop-types "^15.6.1"
typed-styles "^0.0.7"
warning "^4.0.2"
react-router-dom@^5.1.2:
react-router-dom@^5.1.2:
version "5.1.2"
version "5.1.2"
resolved "https://registry.npm.taobao.org/react-router-dom/download/react-router-dom-5.1.2.tgz#06701b834352f44d37fbb6311f870f84c76b9c18"
resolved "https://registry.npm.taobao.org/react-router-dom/download/react-router-dom-5.1.2.tgz#06701b834352f44d37fbb6311f870f84c76b9c18"
...
@@ -8828,6 +8898,30 @@ selfsigned@^1.9.1:
...
@@ -8828,6 +8898,30 @@ selfsigned@^1.9.1:
dependencies:
dependencies:
node-forge "0.9.0"
node-forge "0.9.0"
semantic-ui-css@^2.4.1:
version "2.4.1"
resolved "https://registry.npm.taobao.org/semantic-ui-css/download/semantic-ui-css-2.4.1.tgz#f5aea39fafb787cbd905ec724272a3f9cba9004a"
integrity sha1-9a6jn6+3h8vZBexyQnKj+cupAEo=
dependencies:
jquery x.*
semantic-ui-react@^0.88.1:
version "0.88.1"
resolved "https://registry.npm.taobao.org/semantic-ui-react/download/semantic-ui-react-0.88.1.tgz#006d63f838b651370d68e73510327308f19ff6fd"
integrity sha1-AG1j+Di2UTcNaOc1EDJzCPGf9v0=
dependencies:
"@babel/runtime" "^7.1.2"
"@semantic-ui-react/event-stack" "^3.1.0"
"@stardust-ui/react-component-event-listener" "~0.38.0"
"@stardust-ui/react-component-ref" "~0.38.0"
classnames "^2.2.6"
keyboard-key "^1.0.4"
lodash "^4.17.15"
prop-types "^15.7.2"
react-is "^16.8.6"
react-popper "^1.3.4"
shallowequal "^1.1.0"
"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
version "5.7.1"
version "5.7.1"
resolved "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
resolved "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
...
@@ -8940,6 +9034,11 @@ shallow-clone@^3.0.0:
...
@@ -8940,6 +9034,11 @@ shallow-clone@^3.0.0:
dependencies:
dependencies:
kind-of "^6.0.2"
kind-of "^6.0.2"
shallowequal@^1.1.0:
version "1.1.0"
resolved "https://registry.npm.taobao.org/shallowequal/download/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
integrity sha1-GI1SHelbkIdAT9TctosT3wrk5/g=
shebang-command@^1.2.0:
shebang-command@^1.2.0:
version "1.2.0"
version "1.2.0"
resolved "https://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz?cache=0&sync_timestamp=1567781709015&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fshebang-command%2Fdownload%2Fshebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
resolved "https://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz?cache=0&sync_timestamp=1567781709015&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fshebang-command%2Fdownload%2Fshebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
...
@@ -9712,6 +9811,11 @@ type@^1.0.1:
...
@@ -9712,6 +9811,11 @@ type@^1.0.1:
resolved "https://registry.npm.taobao.org/type/download/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0"
resolved "https://registry.npm.taobao.org/type/download/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0"
integrity sha1-hI3XaY2vo+VKbEeedZxLw/GIR6A=
integrity sha1-hI3XaY2vo+VKbEeedZxLw/GIR6A=
typed-styles@^0.0.7:
version "0.0.7"
resolved "https://registry.npm.taobao.org/typed-styles/download/typed-styles-0.0.7.tgz#93392a008794c4595119ff62dde6809dbc40a3d9"
integrity sha1-kzkqAIeUxFlRGf9i3eaAnbxAo9k=
typedarray@^0.0.6:
typedarray@^0.0.6:
version "0.0.6"
version "0.0.6"
resolved "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
resolved "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
...
@@ -9972,6 +10076,13 @@ walker@^1.0.7, walker@~1.0.5:
...
@@ -9972,6 +10076,13 @@ walker@^1.0.7, walker@~1.0.5:
dependencies:
dependencies:
makeerror "1.0.x"
makeerror "1.0.x"
warning@^4.0.2, warning@^4.0.3:
version "4.0.3"
resolved "https://registry.npm.taobao.org/warning/download/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3"
integrity sha1-Fungd+uKhtavfWSqHgX9hbRnjKM=
dependencies:
loose-envify "^1.0.0"
watchpack@^1.6.0:
watchpack@^1.6.0:
version "1.6.0"
version "1.6.0"
resolved "https://registry.npm.taobao.org/watchpack/download/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00"
resolved "https://registry.npm.taobao.org/watchpack/download/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00"
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment