Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
eue
Commits
35c2084e
Commit
35c2084e
authored
Jul 27, 2021
by
KangMin An
Browse files
Merge branch 'who' into premaster
parents
d671b124
ecaf9de8
Changes
8
Hide whitespace changes
Inline
Side-by-side
client/src/App.css
View file @
35c2084e
...
@@ -37,7 +37,7 @@ body {
...
@@ -37,7 +37,7 @@ body {
color
:
rgb
(
129
,
129
,
129
);
color
:
rgb
(
129
,
129
,
129
);
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
padding
:
0.5em
;
font-weight
:
300
;
}
}
...
@@ -87,7 +87,7 @@ body {
...
@@ -87,7 +87,7 @@ body {
}
}
#contour
{
#contour
{
padding
:
10px
;
padding
-bottom
:
1em
;
color
:
rgba
(
195
,
195
,
195
,
0.753
);
color
:
rgba
(
195
,
195
,
195
,
0.753
);
}
}
...
...
client/src/components/EueSuggest.js
View file @
35c2084e
...
@@ -22,12 +22,14 @@ function EueSuggest() {
...
@@ -22,12 +22,14 @@ function EueSuggest() {
<
Card
style
=
{
cardstyled
}
>
<
Card
style
=
{
cardstyled
}
>
<
Card
.
Title
>
<
Card
.
Title
>
EUE
제안
<
p
>
EUE
제안
<
/p
>
<
/Card.Title
>
<
/Card.Title
>
<
Card
.
Text
>
<
Card
.
Text
>
"
에어컨을 줄이시면 더 효율적입니다.
"
"
에어컨을 줄이시면 더 효율적입니다.
"
<
/Card.Text
>
<
/Card.Text
>
<
/Card
>
<
/Card
>
<
/Row
>
<
/Row
>
)
)
...
...
client/src/components/Footer.js
View file @
35c2084e
import
React
,
{
useEffect
,
useState
}
from
'
react
'
import
React
,
{
useEffect
,
useState
}
from
'
react
'
import
{
Row
,
Card
,
Button
,
Col
,
Modal
,
}
from
'
react-bootstrap
'
;
import
{
Row
,
Card
,
Button
,
Col
,
Modal
,
}
from
'
react-bootstrap
'
;
import
{
CopyToClipboard
}
from
'
react-copy-to-clipboard
'
;
import
{
CopyToClipboard
}
from
'
react-copy-to-clipboard
'
;
import
'
../App.css
'
import
'
../App.css
'
...
@@ -50,9 +50,11 @@ function Footer() {
...
@@ -50,9 +50,11 @@ function Footer() {
<
Row
className
=
'
text-center w-100 my-2
'
>
<
Row
className
=
'
text-center w-100 my-2
'
>
<
Card
style
=
{
cardstyled
}
>
<
Card
style
=
{
cardstyled
}
>
<
Card
.
Title
>
<
Card
.
Title
>
서버비용
후원하기
<
p
>
서버비용
후원하기
<
/p
>
<
/Card.Title
>
<
/Card.Title
>
<
Card
.
Subtitle
style
=
{{
fontWeight
:
'
lighter
'
}}
>
<
Card
.
Subtitle
>
이용하시는데
불편함이
없도록
광고
없이
운영하고
있습니다
.
<
br
/>
이용하시는데
불편함이
없도록
광고
없이
운영하고
있습니다
.
<
br
/>
서버비용
충당
후
후원금이
남을시
UNICEF
에
기부하겠습니다
.
서버비용
충당
후
후원금이
남을시
UNICEF
에
기부하겠습니다
.
<
/Card.Subtitle
>
<
/Card.Subtitle
>
...
...
client/src/components/Loading.js
View file @
35c2084e
...
@@ -4,9 +4,7 @@ import { Spinner, Row, Button } from 'react-bootstrap';
...
@@ -4,9 +4,7 @@ import { Spinner, Row, Button } from 'react-bootstrap';
function
Loading
()
{
function
Loading
()
{
return
(
return
(
<
Button
id
=
'
formbtn
'
className
=
'
d-flex justify-content-center align-items-center m-auto
'
style
=
{{
width
:
'
200px
'
,
height
:
'
200px
'
,
flexDirection
:
'
column
'
}}
disabled
>
<
Button
id
=
'
formbtn
'
className
=
'
d-flex justify-content-center align-items-center m-auto
'
style
=
{{
width
:
'
200px
'
,
height
:
'
200px
'
,
flexDirection
:
'
column
'
}}
disabled
>
<
Spinner
animation
=
"
border
"
role
=
"
status
"
>
<
Spinner
animation
=
"
border
"
role
=
"
status
"
/>
<
span
className
=
"
sr-only
"
>
Loading
...
<
/span
>
<
/Spinner
>
<
br
/>
<
br
/>
Loading
...
Loading
...
<
/Button
>
<
/Button
>
...
...
client/src/components/MainLayer.js
View file @
35c2084e
...
@@ -35,7 +35,6 @@ function MainLayer() {
...
@@ -35,7 +35,6 @@ function MainLayer() {
}
}
const
logined
=
localStorage
.
getItem
(
'
nickname
'
)
const
logined
=
localStorage
.
getItem
(
'
nickname
'
)
const
[
airUsing
,
setAirUsing
]
=
useState
(
false
)
const
[
airUsing
,
setAirUsing
]
=
useState
(
false
)
function
aircondiCheck
()
{
function
aircondiCheck
()
{
...
@@ -43,6 +42,20 @@ function MainLayer() {
...
@@ -43,6 +42,20 @@ function MainLayer() {
localStorage
.
setItem
(
'
using-aircondition
'
,
!
airUsing
);
localStorage
.
setItem
(
'
using-aircondition
'
,
!
airUsing
);
}
}
useEffect
(()
=>
{
const
airUsingLocal
=
localStorage
.
getItem
(
'
using-aircondition
'
)
if
(
airUsingLocal
===
'
true
'
)
{
console
.
log
(
'
!!
'
,
airUsing
);
console
.
log
(
airUsingLocal
);
return
setAirUsing
(
true
)
}
else
{
console
.
log
(
'
%%
'
,
airUsing
);
console
.
log
(
airUsingLocal
);
return
setAirUsing
(
false
)
}
});
return
(
return
(
<
Col
>
<
Col
>
<
Row
className
=
'
d-flex align-items-center m-auto w-100
'
>
<
Row
className
=
'
d-flex align-items-center m-auto w-100
'
>
...
@@ -54,15 +67,19 @@ function MainLayer() {
...
@@ -54,15 +67,19 @@ function MainLayer() {
<
Row
className
=
'
m-auto d-flex justify-content-center w-100
'
>
<
Row
className
=
'
m-auto d-flex justify-content-center w-100
'
>
<
UserInfo
/>
<
UserInfo
/>
<
/Row
>
<
/Row
>
<
Form
key
=
'
checkbox
'
className
=
"
d-flex justify-content-center w-100
"
style
=
{{
flexDirection
:
'
row-reverse
'
}}
>
{
logined
&&
<
Form
.
Check
<
Form
type
=
'
switch
'
key
=
'
checkbox
'
className
=
"
d-flex justify-content-center w-100
"
style
=
{{
flexDirection
:
'
row-reverse
'
}}
>
id
=
'
aircondition-checkbox
'
<
Form
.
Check
label
=
'
에어컨 사용중
'
type
=
'
switch
'
onChange
=
{
aircondiCheck
}
id
=
'
aircondition-checkbox
'
/
>
label
=
'
에어컨 사용중
'
<
/Form
>
onChange
=
{
aircondiCheck
}
checked
=
{
airUsing
}
/
>
<
/Form
>
}
<
Row
className
=
'
d-flex justify-content-center align-items-center my-2 mx-auto w-100
'
>
<
Row
className
=
'
d-flex justify-content-center align-items-center my-2 mx-auto w-100
'
>
<
ButtonGroup
vertical
className
=
'
m-auto
'
style
=
{{
width
:
'
100%
'
,
flexDirection
:
'
column
'
}}
>
<
ButtonGroup
vertical
className
=
'
m-auto
'
style
=
{{
width
:
'
100%
'
,
flexDirection
:
'
column
'
}}
>
...
...
client/src/components/PageNotFound.js
View file @
35c2084e
import
React
,
{
useEffect
}
from
'
react
'
import
React
,
{
useEffect
}
from
'
react
'
import
{
Row
,
Container
}
from
'
react-bootstrap
'
;
import
{
Row
,
Container
}
from
'
react-bootstrap
'
;
import
{
Redirect
}
from
'
react-router-dom
'
;
import
Loading
from
'
./Loading
'
;
import
Loading
from
'
./Loading
'
;
// const goHome = setTimeout(window.location.replace('/'), 3000);
function
PageNotFound
()
{
function
PageNotFound
()
{
useEffect
(()
=>
{
useEffect
(()
=>
{
setTimeout
(
window
.
location
.
replace
(
'
/
'
),
5000
);
setTimeout
(
window
.
location
.
replace
(
'
/
'
),
5000
);
...
@@ -13,12 +9,19 @@ function PageNotFound() {
...
@@ -13,12 +9,19 @@ function PageNotFound() {
return
(
return
(
<
Container
className
=
'
d-flex justify-content-center align-items-center
'
style
=
{{
flexDirection
:
'
column
'
,
height
:
'
70vh
'
}}
>
<
Container
className
=
'
d-flex justify-content-center align-items-center
'
style
=
{{
flexDirection
:
'
column
'
,
height
:
'
70vh
'
}}
>
<
Row
style
=
{{
marginBottom
:
'
1em
'
,
fontSize
:
'
2rem
'
,
fontWeight
:
'
bold
'
}}
>
잘못된
접근
입니다
.
<
br
/>
PAGE
NOT
FOUND
<
/Row
>
<
Row
>
<
Row
>
<
Loading
/>
<
Loading
/>
<
/Row
>
<
/Row
>
<
Row
className
=
'
m-5
'
>
<
h1
className
=
'
d-flex justify-content-center
'
>
PAGE
NOT
FOUND
<
/h1
>
<
br
/>
<
h3
className
=
'
d-flex justify-content-center
'
style
=
{{
fontWeight
:
'
300
'
}}
>
잘못된
접근
입니다
.
<
/h3
>
<
/Row
>
<
/Container
>
<
/Container
>
)
)
}
}
...
...
client/src/components/UserInfo.js
View file @
35c2084e
...
@@ -13,7 +13,9 @@ function UserInfo() {
...
@@ -13,7 +13,9 @@ function UserInfo() {
const
cardstyled
=
{
const
cardstyled
=
{
margin
:
'
auto
'
,
margin
:
'
auto
'
,
padding
:
'
1em
'
,
padding
:
'
1em 0.5em 1em 0.5em
'
,
// paddingTop: '1em',
// paddingBottom: '1em',
display
:
'
flex
'
,
display
:
'
flex
'
,
justifyContent
:
'
center
'
,
justifyContent
:
'
center
'
,
width
:
'
100%
'
,
width
:
'
100%
'
,
...
@@ -42,22 +44,37 @@ function UserInfo() {
...
@@ -42,22 +44,37 @@ function UserInfo() {
<
Col
className
=
'
text-center pt-3 pb-2 px-0
'
>
<
Col
className
=
'
text-center pt-3 pb-2 px-0
'
>
<
Card
style
=
{
cardstyled
}
id
=
'
localName
'
>
<
Card
style
=
{
cardstyled
}
id
=
'
localName
'
>
<
Card
.
Title
>
<
Card
.
Title
>
{
nickname
?
<
strong
>
`
${
nickname
}
`
{
nickname
?
:
<
h2
>
<>
{
`
${
nickname
}
`
}
GUEST
<
/h2
>
<
/
>
:
},
환영합니다
.
<
h2
>
GUEST
<
/h2
>
}
<
/strong
>
<
p
style
=
{{
fontWeight
:
'
300
'
,
margin
:
'
0
'
}}
>
환영합니다
<
/p
>
<
/Card.Title
>
<
/Card.Title
>
<
hr
/>
<
Row
style
=
{{
alignItems
:
'
center
'
,
margin
:
'
auto
'
,
justifyContent
:
'
center
'
}}
>
<
Row
style
=
{{
alignItems
:
'
center
'
,
margin
:
'
auto
'
,
justifyContent
:
'
center
'
}}
>
<
Card
.
Subtitle
>
<
Card
.
Subtitle
>
{
localname_emd
?
{
localname_emd
?
`
${
localname_doe
}
${
localname_sgg
}
${
localname_emd
}
`
<
p
className
=
'
mb-2
'
>
{
`
${
localname_doe
}
`
}
<
br
/>
{
`
${
localname_sgg
}
`
}
<
br
/>
{
`
${
localname_emd
}
`
}
<
/p
>
:
:
<>
<
p
className
=
'
mb-2
'
>
지역을
입력해
주세요
로그인
후
이용
가능합니다
<
/
>
<
/
p
>
}
}
<
/Card.Subtitle
>
<
/Card.Subtitle
>
{
nickname
&&
{
nickname
&&
...
@@ -68,10 +85,14 @@ function UserInfo() {
...
@@ -68,10 +85,14 @@ function UserInfo() {
<
/Button
>
<
/Button
>
}
}
<
/Row
>
<
/Row
>
<
hr
/>
{
nickname
&&
<
p
className
=
'
w-100 justify-content-center m-auto
'
>
<
hr
/>
환경을
향한
노력
<
br
/>
환경을
향한
노력
<
br
/>
<
strong
>
OOO
일
째
<
/strong
>
<
strong
>
OOO
일
째
<
/strong
>
<
/p
>
}
<
/Card
>
<
/Card
>
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
...
...
client/src/routes.js
View file @
35c2084e
// # Global Routes
export
const
routes
=
{
const
BASE
=
"
/api
"
;
home
:
'
/
'
,
signup
:
'
/signup
'
,
// # Data Routes
login
:
'
login
'
,
const
DATA
=
"
/data
"
;
localcode
:
'
/local_code
'
,
// Data - Collector
}
const
DATA_INPUT
=
"
/input
"
;
// Data - Consumer
const
DATA_USER
=
"
/user
"
;
const
DATA_OUTSIDE
=
"
/outside
"
;
// # Local Code Data
const
LOCCODE
=
"
/loccode
"
;
// # Auth
const
SIGNUP
=
"
/signup
"
;
const
LOGIN
=
"
/login
"
;
const
CONFIRM
=
"
/confirm
"
;
const
EDIT_PROFILE
=
"
/edit-profile
"
;
// # Detail Object
const
DETAIL
=
"
/:id
"
;
const
routes
=
{
base
:
BASE
,
data
:
DATA
,
dataInput
:
DATA_INPUT
,
dataUser
:
DATA_USER
,
dataOutside
:
DATA_OUTSIDE
,
locCode
:
LOCCODE
,
signup
:
SIGNUP
,
login
:
LOGIN
,
confirm
:
CONFIRM
,
editProfile
:
EDIT_PROFILE
,
Detail
:
(
id
)
=>
{
if
(
id
)
{
return
`/
${
id
}
`
;
}
else
{
return
DETAIL
;
}
},
};
export
default
routes
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment