서승완

chore: DEPRECATE REACT

Showing 162 changed files with 6 additions and 5632 deletions
1 stages: 1 stages:
2 - - deploy:backend 2 + - deploy
3 - - deploy:frontend
4 3
5 variables: 4 variables:
6 PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache" 5 PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
...@@ -9,9 +8,9 @@ cache: ...@@ -9,9 +8,9 @@ cache:
9 paths: 8 paths:
10 - "$CI_PROJECT_DIR/.cache" 9 - "$CI_PROJECT_DIR/.cache"
11 10
12 -deploy:backend: 11 +deploy:
13 image: python:3.6.5 12 image: python:3.6.5
14 - stage: deploy:backend 13 + stage: deploy
15 cache: 14 cache:
16 paths: 15 paths:
17 - "$CI_PROJECT_DIR/khubox-api/venv" 16 - "$CI_PROJECT_DIR/khubox-api/venv"
...@@ -27,22 +26,6 @@ deploy:backend: ...@@ -27,22 +26,6 @@ deploy:backend:
27 - source venv/bin/activate 26 - source venv/bin/activate
28 - pip install -r requirements.txt 27 - pip install -r requirements.txt
29 - zappa update 28 - zappa update
30 -
31 -deploy:frontend:
32 - image: nikolaik/python-nodejs:python3.6-nodejs12-alpine
33 - stage: deploy:frontend
34 - cache:
35 - paths:
36 - - "$CI_PROJECT_DIR/.yarn"
37 - - "$CI_PROJECT_DIR/khubox-front/node_modules"
38 - script:
39 - cd $CI_PROJECT_DIR/khubox-front 29 - cd $CI_PROJECT_DIR/khubox-front
40 - - yarn config set cache-folder $CI_PROJECT_DIR/.yarn 30 + - aws s3 cp ./ s3://khubox-deploy/ --recursive --include "*" --acl public-read
41 - - yarn install
42 - - CI=false yarn build
43 - - pip install awscli
44 - - aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
45 - - aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
46 - - aws configure set region $AWS_DEFAULT_REGION
47 - - aws s3 cp ./build/ s3://khubox-deploy/ --recursive --include "*" --acl public-read
48 - aws cloudfront create-invalidation --distribution-id E1RC3LPJHL5VUA --paths "/*" 31 - aws cloudfront create-invalidation --distribution-id E1RC3LPJHL5VUA --paths "/*"
......
1 -# KhuBox · [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![Python 3.6.5](https://img.shields.io/badge/python-3.6.5-blue.svg)](https://www.python.org/downloads/release/python-365/) [![Node 12.16.3](https://img.shields.io/badge/node-12.16.3-brightgreen.svg)](https://nodejs.org/dist/v12.16.3/) [![build status](http://khuhub.khu.ac.kr/2020-1-CloudComputing-E/E_Team_KhuBox/badges/master/build.svg)](http://khuhub.khu.ac.kr/2020-1-CloudComputing-E/E_Team_KhuBox/commits/master) 1 +# KhuBox · [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![Python 3.6.5](https://img.shields.io/badge/python-3.6.5-blue.svg)](https://www.python.org/downloads/release/python-365/) [![build status](http://khuhub.khu.ac.kr/2020-1-CloudComputing-E/E_Team_KhuBox/badges/master/build.svg)](http://khuhub.khu.ac.kr/2020-1-CloudComputing-E/E_Team_KhuBox/commits/master)
2 2
3 2020년 1학기 경희대학교 클라우드컴퓨팅(CSE335) E조 3 2020년 1학기 경희대학교 클라우드컴퓨팅(CSE335) E조
4 4
...@@ -16,7 +16,7 @@ AWS를 활용한 Dropbox 개발 프로젝트 ...@@ -16,7 +16,7 @@ AWS를 활용한 Dropbox 개발 프로젝트
16 16
17 ## 기술 스택 17 ## 기술 스택
18 18
19 -1. Front-end : React 19 +1. Front-end : HTML5, CSS3, JavaScript, jQuery
20 20
21 2. Back-end : Django 21 2. Back-end : Django
22 22
......
1 -{
2 - "compilerOptions": {
3 - "baseUrl": "src"
4 - },
5 - "include": ["src"]
6 -}
1 -{
2 - "name": "khubox",
3 - "author": "2020-1_KHU_CloudComputing_E",
4 - "email": "16wjlee@khu.ac.kr",
5 - "licence": "MIT",
6 - "version": "0.0.1",
7 - "private": false,
8 - "scripts": {
9 - "start": "react-scripts start",
10 - "build": "react-scripts build",
11 - "test": "react-scripts test",
12 - "eject": "react-scripts eject"
13 - },
14 - "eslintConfig": {
15 - "extends": "react-app"
16 - },
17 - "browserslist": {
18 - "production": [
19 - ">0.2%",
20 - "not dead",
21 - "not op_mini all"
22 - ],
23 - "development": [
24 - "last 1 chrome version",
25 - "last 1 firefox version",
26 - "last 1 safari version"
27 - ]
28 - },
29 - "dependencies": {
30 - "@material-ui/core": "^4.2.1",
31 - "@material-ui/icons": "^4.2.1",
32 - "@material-ui/styles": "^4.2.1",
33 - "chart.js": "^2.8.0",
34 - "clsx": "^1.0.4",
35 - "history": "^4.9.0",
36 - "moment": "2.24.0",
37 - "moment-timezone": "^0.5.28",
38 - "node-sass": "^4.12.0",
39 - "prop-types": "^15.7.2",
40 - "react": "^16.8.6",
41 - "react-chartjs-2": "^2.7.6",
42 - "react-dom": "^16.8.6",
43 - "react-perfect-scrollbar": "^1.5.3",
44 - "react-router-dom": "^5.0.1",
45 - "react-scripts": "^3.0.1",
46 - "recompose": "^0.30.0",
47 - "underscore": "^1.9.1",
48 - "uuid": "^3.3.2",
49 - "validate.js": "^0.13.1"
50 - },
51 - "devDependencies": {
52 - "eslint-plugin-prettier": "^3.0.1",
53 - "eslint-plugin-react": "^7.12.4",
54 - "prettier": "^1.17.1",
55 - "prettier-eslint": "^8.8.2",
56 - "prettier-eslint-cli": "^4.7.1",
57 - "typescript": "^3.5.1"
58 - }
59 -}
1 -/* /index.html 200
...\ No newline at end of file ...\ No newline at end of file
No preview for this file type
1 -<svg width="133" height="36" viewBox="0 0 133 36" fill="none" xmlns="http://www.w3.org/2000/svg">
2 -<g id="Group 2">
3 -<g id="flex">
4 -<path id="Combined Shape" fill-rule="evenodd" clip-rule="evenodd" d="M0 18.1065C0 27.9411 8.05887 36 18.1065 36C27.9411 36 36 27.9411 36 18.1065C36 8.05887 27.9411 0 18.1065 0C8.05887 0 0 8.05887 0 18.1065ZM33.7263 18.1065C33.7263 26.6854 26.6854 33.7263 18.1065 33.7263C9.34353 33.7263 2.27368 26.714 2.27368 18.1065C2.27368 9.3146 9.3146 2.27368 18.1065 2.27368C26.714 2.27368 33.7263 9.34353 33.7263 18.1065Z" fill="white"/>
5 -<path id="Oval 3" fill-rule="evenodd" clip-rule="evenodd" d="M16.4288 13.5917C16.7107 13.359 17.0649 13.2318 17.4305 13.2318C17.7922 13.2318 18.1429 13.3564 18.4235 13.5846L22.6335 17.0082C23.0074 17.3123 23.5156 17.3923 23.9648 17.218L25.9502 16.4474C26.1292 16.3779 26.3302 16.4036 26.4851 16.517C27.0788 16.9516 28.5751 18.0497 29.1289 18.482C30.4861 19.5416 31.486 20.25 31.486 20.25C31.486 20.25 31.4686 19.8601 31.486 19.4401C31.846 10.718 25.2324 4.39017 17.8022 4.50144C10.3803 4.61568 4.38132 10.5662 4.50178 18.8354C4.51309 19.5319 4.6193 20.25 4.6193 20.25L6.50953 18.8354L8.80622 17.1806C9.12242 16.9528 9.54513 16.9393 9.87525 17.1464L10.7991 17.7261C11.0088 17.8577 11.2793 17.8402 11.4703 17.6826L16.4288 13.5917Z" fill="white"/>
6 -<path id="Oval 4" fill-rule="evenodd" clip-rule="evenodd" d="M16.6359 34.7904C18.8195 35.0437 20.6187 34.6644 21.2437 34.486C21.5288 34.4046 22.5941 34.144 22.8452 34.0596C23.6863 33.777 24.9699 33.1782 25.7013 32.7418C26.7957 32.0887 27.5685 31.4007 28.6388 30.4354C31.015 28.2924 32.625 24.3249 32.625 23.92C32.625 23.8287 28.2146 20.5068 26.9191 19.5329C26.7151 19.3796 26.4318 19.4032 26.253 19.5853C26.0843 19.7571 26.0583 20.0226 26.1911 20.2234C26.6343 20.894 27.5743 22.3246 27.6195 22.4617C27.792 22.9849 27.5465 23.2804 27.3009 23.1231C27.0553 22.9658 21.5646 19.2672 21.5646 19.2672L18.2802 16.9963C17.8686 16.7117 17.3068 17.0063 17.3068 17.5066C17.3068 17.5066 17.1957 19.1166 17.1957 20.1676C17.1957 20.5941 17.1518 21.1118 16.6359 21.246C16.3774 21.3132 15.7234 21.3527 15.7234 21.3527L10.1751 20.9334C9.79851 20.905 9.58736 21.358 9.85128 21.6281C9.85128 21.6281 17.1957 26.5849 17.1957 26.9884C17.1957 27.846 14.552 26.4718 12.4773 25.4639C9.95208 24.2372 7.14641 23.1341 6.44734 22.8633C6.34242 22.8227 6.22787 22.8316 6.13033 22.8877C5.52897 23.2335 3.35694 24.4869 3.37515 24.5407C4.0878 26.6437 5.97806 29.7235 8.8419 31.7745C9.987 32.5946 11.3079 33.3606 12.5939 33.8365C14.0645 34.3806 15.6064 34.7904 16.6359 34.7904Z" fill="white"/>
7 -</g>
8 -<path id="Devias Material Kit" d="M45.4453 25V10.7812H49.6445C50.901 10.7812 52.0143 11.0612 52.9844 11.6211C53.9609 12.181 54.7161 12.9753 55.25 14.0039C55.7839 15.0326 56.0508 16.2109 56.0508 17.5391V18.252C56.0508 19.5996 55.7806 20.7845 55.2402 21.8066C54.7064 22.8288 53.9414 23.6165 52.9453 24.1699C51.9557 24.7233 50.8197 25 49.5371 25H45.4453ZM47.916 12.7734V23.0273H49.5273C50.8229 23.0273 51.8158 22.6237 52.5059 21.8164C53.2025 21.0026 53.5573 19.8372 53.5703 18.3203V17.5293C53.5703 15.9863 53.235 14.8079 52.5645 13.9941C51.8939 13.1803 50.9206 12.7734 49.6445 12.7734H47.916ZM62.88 25.1953C61.3761 25.1953 60.1554 24.7233 59.2179 23.7793C58.2869 22.8288 57.8214 21.5658 57.8214 19.9902V19.6973C57.8214 18.6426 58.0232 17.7018 58.4269 16.875C58.837 16.0417 59.4099 15.3939 60.1456 14.9316C60.8813 14.4694 61.7016 14.2383 62.6066 14.2383C64.0454 14.2383 65.1554 14.6973 65.9366 15.6152C66.7244 16.5332 67.1183 17.832 67.1183 19.5117V20.4688H60.214C60.2856 21.3411 60.5753 22.0312 61.0831 22.5391C61.5974 23.0469 62.242 23.3008 63.0167 23.3008C64.1039 23.3008 64.9894 22.8613 65.673 21.9824L66.9523 23.2031C66.5291 23.8346 65.9627 24.3262 65.253 24.6777C64.5499 25.0228 63.7589 25.1953 62.88 25.1953ZM62.5968 16.1426C61.9457 16.1426 61.4184 16.3704 61.0148 16.8262C60.6176 17.2819 60.3637 17.9167 60.253 18.7305H64.7745V18.5547C64.7224 17.7604 64.5109 17.1615 64.1398 16.7578C63.7687 16.3477 63.2543 16.1426 62.5968 16.1426ZM72.5022 21.9922L74.7385 14.4336H77.1897L73.5276 25H71.467L67.7756 14.4336H70.2365L72.5022 21.9922ZM81.1478 25H78.7747V14.4336H81.1478V25ZM78.6283 11.6895C78.6283 11.3249 78.7422 11.0221 78.9701 10.7812C79.2044 10.5404 79.5365 10.4199 79.9661 10.4199C80.3958 10.4199 80.7279 10.5404 80.9622 10.7812C81.1966 11.0221 81.3138 11.3249 81.3138 11.6895C81.3138 12.0475 81.1966 12.347 80.9622 12.5879C80.7279 12.8223 80.3958 12.9395 79.9661 12.9395C79.5365 12.9395 79.2044 12.8223 78.9701 12.5879C78.7422 12.347 78.6283 12.0475 78.6283 11.6895ZM89.9985 25C89.8943 24.7982 89.8032 24.4694 89.725 24.0137C88.9698 24.8014 88.0454 25.1953 86.9516 25.1953C85.8904 25.1953 85.0245 24.8926 84.354 24.2871C83.6834 23.6816 83.3481 22.9329 83.3481 22.041C83.3481 20.9147 83.7648 20.0521 84.5981 19.4531C85.4379 18.8477 86.6359 18.5449 88.1918 18.5449H89.6469V17.8516C89.6469 17.3047 89.4939 16.8685 89.1879 16.543C88.8819 16.2109 88.4165 16.0449 87.7915 16.0449C87.2511 16.0449 86.8084 16.1816 86.4633 16.4551C86.1183 16.722 85.9457 17.0638 85.9457 17.4805H83.5727C83.5727 16.901 83.7648 16.3607 84.1489 15.8594C84.533 15.3516 85.0538 14.9544 85.7114 14.668C86.3754 14.3815 87.1144 14.2383 87.9282 14.2383C89.1651 14.2383 90.1515 14.5508 90.8872 15.1758C91.6228 15.7943 92.0004 16.6667 92.02 17.793V22.5586C92.02 23.5091 92.1534 24.2676 92.4204 24.834V25H89.9985ZM87.3911 23.291C87.8598 23.291 88.2993 23.1771 88.7094 22.9492C89.1261 22.7214 89.4386 22.4154 89.6469 22.0312V20.0391H88.3676C87.4887 20.0391 86.8279 20.1921 86.3852 20.498C85.9425 20.804 85.7211 21.237 85.7211 21.7969C85.7211 22.2526 85.8709 22.6172 86.1704 22.8906C86.4763 23.1576 86.8832 23.291 87.3911 23.291ZM100.373 22.1289C100.373 21.7057 100.197 21.3835 99.8453 21.1621C99.5002 20.9408 98.924 20.7454 98.1168 20.5762C97.3095 20.4069 96.6356 20.1921 96.0953 19.9316C94.9104 19.3587 94.3179 18.5286 94.3179 17.4414C94.3179 16.5299 94.702 15.7682 95.4703 15.1562C96.2385 14.5443 97.2151 14.2383 98.4 14.2383C99.663 14.2383 100.682 14.5508 101.457 15.1758C102.238 15.8008 102.628 16.6113 102.628 17.6074H100.255C100.255 17.1517 100.086 16.7741 99.7476 16.4746C99.4091 16.1686 98.9599 16.0156 98.4 16.0156C97.8791 16.0156 97.4527 16.1361 97.1207 16.377C96.7951 16.6178 96.6324 16.9401 96.6324 17.3438C96.6324 17.7083 96.7854 17.9915 97.0914 18.1934C97.3974 18.3952 98.0158 18.6003 98.9468 18.8086C99.8778 19.0104 100.607 19.2546 101.134 19.541C101.668 19.821 102.062 20.1595 102.316 20.5566C102.576 20.9538 102.707 21.4355 102.707 22.002C102.707 22.9525 102.313 23.724 101.525 24.3164C100.737 24.9023 99.7053 25.1953 98.4293 25.1953C97.5634 25.1953 96.7919 25.0391 96.1148 24.7266C95.4377 24.4141 94.9104 23.9844 94.5328 23.4375C94.1552 22.8906 93.9664 22.3014 93.9664 21.6699H96.271C96.3036 22.2298 96.5152 22.6628 96.9058 22.9688C97.2964 23.2682 97.814 23.418 98.4585 23.418C99.0835 23.418 99.5588 23.3008 99.8843 23.0664C100.21 22.8255 100.373 22.513 100.373 22.1289ZM113.963 18.8574L112.351 20.5664V25H109.881V10.7812H112.351V17.4512L113.719 15.7617L117.879 10.7812H120.867L115.584 17.0801L121.17 25H118.24L113.963 18.8574ZM124.737 25H122.364V14.4336H124.737V25ZM122.218 11.6895C122.218 11.3249 122.332 11.0221 122.559 10.7812C122.794 10.5404 123.126 10.4199 123.556 10.4199C123.985 10.4199 124.317 10.5404 124.552 10.7812C124.786 11.0221 124.903 11.3249 124.903 11.6895C124.903 12.0475 124.786 12.347 124.552 12.5879C124.317 12.8223 123.985 12.9395 123.556 12.9395C123.126 12.9395 122.794 12.8223 122.559 12.5879C122.332 12.347 122.218 12.0475 122.218 11.6895ZM130.248 11.8652V14.4336H132.113V16.1914H130.248V22.0898C130.248 22.4935 130.326 22.7865 130.482 22.9688C130.645 23.1445 130.932 23.2324 131.342 23.2324C131.615 23.2324 131.892 23.1999 132.172 23.1348V24.9707C131.632 25.1204 131.111 25.1953 130.609 25.1953C128.786 25.1953 127.875 24.1895 127.875 22.1777V16.1914H126.137V14.4336H127.875V11.8652H130.248Z" fill="white"/>
9 -</g>
10 -</svg>
1 -<svg id="fd59ce54-f850-4dfc-bc34-dd7d379d600e" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="1074.392" height="584.231" viewBox="0 0 1074.392 584.231"><title>page not found</title><ellipse cx="540.64346" cy="549.3094" rx="527.5" ry="34.9216" fill="#f2f2f2"/><path d="M583.47969,324.89424c-85.94407,0-147.651,55.13938-147.651,183.79791,0,145.813,61.70691,184.41057,147.651,184.41057s151.327-42.27352,151.327-184.41057C734.80664,356.75255,669.42376,324.89424,583.47969,324.89424Zm.56495,319.80837c-59.52686,0-90.62592-34.92288-90.62592-135.9163,0-89.11185,32.37209-136.10461,91.899-136.10461s91.899,30.86774,91.899,136.10461C677.21663,607.23367,643.5715,644.70261,584.04464,644.70261Z" transform="translate(-63.054 -157.8845)" fill="#2f2e41"/><path d="M384.36531,591.40121H348.831V486.76183A20.95585,20.95585,0,0,0,327.87517,465.806h-8.32638a20.95585,20.95585,0,0,0-20.95586,20.95585V591.40121H198.36285a11.96327,11.96327,0,0,1-10.57763-17.552l106.0824-200.78034A20.95585,20.95585,0,0,0,284.28724,344.33l-6.26231-2.9572a20.95585,20.95585,0,0,0-27.4293,9.07005L121.21416,592.4754a28.41578,28.41578,0,0,0-3.35584,13.39612v0a28.41583,28.41583,0,0,0,28.41584,28.41583H298.59293v66.16727a25.119,25.119,0,0,0,25.119,25.119h.00005a25.119,25.119,0,0,0,25.119-25.119V634.28739h35.53428a21.44307,21.44307,0,0,0,21.44307-21.44307v0A21.44307,21.44307,0,0,0,384.36531,591.40121Z" transform="translate(-63.054 -157.8845)" fill="#6c63ff"/><path d="M1042.36183,591.40121h-35.53428V486.76183A20.95585,20.95585,0,0,0,985.87169,465.806h-8.32638a20.95585,20.95585,0,0,0-20.95586,20.95585V591.40121H856.35937a11.96326,11.96326,0,0,1-10.57763-17.552L951.86413,373.06891A20.95586,20.95586,0,0,0,942.28376,344.33l-6.26231-2.9572a20.95586,20.95586,0,0,0-27.42931,9.07005L779.21068,592.4754a28.41578,28.41578,0,0,0-3.35584,13.39612v0a28.41583,28.41583,0,0,0,28.41583,28.41583H956.58945v66.16727a25.119,25.119,0,0,0,25.119,25.119h0a25.119,25.119,0,0,0,25.119-25.119V634.28739h35.53428a21.44307,21.44307,0,0,0,21.44307-21.44307v0A21.44307,21.44307,0,0,0,1042.36183,591.40121Z" transform="translate(-63.054 -157.8845)" fill="#6c63ff"/><path d="M394.16787,579.148H358.63358V474.50864a20.95585,20.95585,0,0,0-20.95585-20.95586h-8.32638a20.95586,20.95586,0,0,0-20.95586,20.95586V579.148H208.16541a11.96327,11.96327,0,0,1-10.57763-17.552L303.67017,360.81572a20.95586,20.95586,0,0,0-9.58037-28.73893l-6.26231-2.9572a20.95586,20.95586,0,0,0-27.42931,9.07L131.01672,580.2222a28.41582,28.41582,0,0,0-3.35584,13.39613v0a28.41583,28.41583,0,0,0,28.41583,28.41583H308.39549v66.16727a25.119,25.119,0,0,0,25.119,25.119h.00005a25.119,25.119,0,0,0,25.119-25.119V622.0342h35.53429a21.44307,21.44307,0,0,0,21.44307-21.44307v0A21.44307,21.44307,0,0,0,394.16787,579.148Z" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M1060.74162,579.148h-35.53428V474.50864a20.95586,20.95586,0,0,0-20.95586-20.95586H995.9251a20.95586,20.95586,0,0,0-20.95586,20.95586V579.148H874.73916a11.96327,11.96327,0,0,1-10.57763-17.552L970.24392,360.81572a20.95586,20.95586,0,0,0-9.58037-28.73893l-6.26231-2.9572a20.95586,20.95586,0,0,0-27.42931,9.07L797.59047,580.2222a28.41582,28.41582,0,0,0-3.35584,13.39613v0a28.41583,28.41583,0,0,0,28.41583,28.41583H974.96924v66.16727a25.119,25.119,0,0,0,25.119,25.119h0a25.119,25.119,0,0,0,25.119-25.119V622.0342h35.53428a21.44307,21.44307,0,0,0,21.44307-21.44307v0A21.44307,21.44307,0,0,0,1060.74162,579.148Z" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M603.0848,313.86637c-85.94407,0-147.651,55.13937-147.651,183.79791,0,145.813,61.70691,184.41057,147.651,184.41057s151.327-42.27352,151.327-184.41057C754.41175,345.72467,689.02887,313.86637,603.0848,313.86637Zm.565,319.80836c-59.52686,0-90.62592-34.92287-90.62592-135.91629,0-89.11185,32.37209-136.10461,91.899-136.10461s91.899,30.86774,91.899,136.10461C696.82174,596.20579,663.17661,633.67473,603.64975,633.67473Z" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><circle cx="471.14108" cy="18.25044" r="12.90118" fill="#2f2e41"/><ellipse cx="502.60736" cy="46.88476" rx="36.18622" ry="46.88476" fill="#2f2e41"/><path d="M565.66136,237.49419c-18.1276,0-33.1413-17.27052-35.77576-39.80484a60.9759,60.9759,0,0,0-.41046,7.07991c0,25.89373,16.20114,46.88476,36.18622,46.88476s36.18623-20.991,36.18623-46.88476a60.9759,60.9759,0,0,0-.41046-7.07991C598.80267,220.22367,583.789,237.49419,565.66136,237.49419Z" transform="translate(-63.054 -157.8845)" opacity="0.1"/><path d="M639.29619,342.07326c-.77711,3.19345-4.12792,5.751-7.83881,7.53791-7.80188,3.75682-17.4253,4.87788-26.7597,5.25418a45.17622,45.17622,0,0,1-7.1445-.132,20.5371,20.5371,0,0,1-12.25052-5.63141,1.68086,1.68086,0,0,1,.04371-2.84388c4.9694-5.45888,13.2622-8.80605,21.61613-11.21609,6.3344-1.82743,17.3813-6.56089,24.29013-5.9221C637.94444,329.73864,640.2774,338.04112,639.29619,342.07326Z" transform="translate(-63.054 -157.8845)" fill="#3f3d56"/><path d="M639.29619,342.07326c-.77711,3.19345-4.12792,5.751-7.83881,7.53791-7.80188,3.75682-17.4253,4.87788-26.7597,5.25418a45.17622,45.17622,0,0,1-7.1445-.132,20.5371,20.5371,0,0,1-12.25052-5.63141,1.68086,1.68086,0,0,1,.04371-2.84388c4.9694-5.45888,13.2622-8.80605,21.61613-11.21609,6.3344-1.82743,17.3813-6.56089,24.29013-5.9221C637.94444,329.73864,640.2774,338.04112,639.29619,342.07326Z" transform="translate(-63.054 -157.8845)" opacity="0.1"/><path d="M540.09786,318.2059a19.76967,19.76967,0,0,0-1.1987,15.07476,26.33914,26.33914,0,0,0,8.82921,12.49683c10.09467,8.09163,23.98784,9.20512,36.92477,9.09278a284.6495,284.6495,0,0,0,33.90525-2.32384,40.53788,40.53788,0,0,0,11.00143-2.55442c4.22242-1.82679,7.93282-5.17756,9.436-9.5257s.43625-9.67246-3.13383-12.57428c-3.13686-2.54969-7.46265-2.9004-11.49775-3.14289l-23.08764-1.38745c2.281-2.30839,5.31816-3.614,8.09586-5.29216,3.68523-2.22642,6.13358-5.96455,8.81312-9.33471a129.00143,129.00143,0,0,1,13.4386-13.817c.75138,4.31038,3.4782,7.8499,6.68733,10.824s6.90841,5.36845,10.2439,8.20013c8.0786,6.85838,13.89583,16.1669,22.39215,22.50043a43.82885,43.82885,0,0,0,16.04862-8.0122l-3.30209-5.98141a3.94,3.94,0,0,0-1.24459-1.55282c-.93465-.575-2.13975-.27872-3.225-.44144-2.90082-.435-4.16771-3.784-5.306-6.48737-3.12491-7.42173-9.108-13.17993-14.21783-19.40381a98.00854,98.00854,0,0,1-9.99577-14.72284c-1.71652-3.10162-3.288-6.33107-5.61746-9.00321s-5.59358-4.773-9.1385-4.78051c-3.13222-.00662-6.02122,1.58355-8.71422,3.18308a230.47679,230.47679,0,0,0-23.63018,16.09894c-3.94376,3.0617-7.86306,6.29645-12.48933,8.17393-1.94748.79035-4.00044,1.33052-5.86924,2.29223-3.27313,1.6844-5.75721,4.53435-8.43128,7.06415C566.27712,311.89225,553.219,317.73841,540.09786,318.2059Z" transform="translate(-63.054 -157.8845)" fill="#3f3d56"/><path d="M588.3737,253.98251a23.77444,23.77444,0,0,1-1.73379,8.03335,10.04492,10.04492,0,0,1-5.76772,5.57269,12.37513,12.37513,0,0,1-5.62306.18249,10.88232,10.88232,0,0,1-4.58151-1.56071c-2.16484-1.48837-3.24415-4.14413-3.63748-6.74325-.39333-2.596-.21714-5.24857-.46885-7.86342a42.94439,42.94439,0,0,0-1.202-6.25549c-.16993-.68282-.343-1.36248-.51294-2.04216-.16674-.67967-.33037-1.35935-.48141-2.039-.13847-.63878-.26745-1.28068-.37761-1.92574-.09123-.54436-.173-1.09189-.23285-1.64255a18.42329,18.42329,0,0,0-.80867-4.81118,14.60727,14.60727,0,0,0-1.68659-2.854c-.28635-.40906-.56326-.81811-.81815-1.24292a5.88984,5.88984,0,0,1-.97226-3.74763,3.286,3.286,0,0,1,.14788-.601c.02516-.07552.05347-.151.085-.2234A1.80187,1.80187,0,0,0,560.932,223.07a3.43341,3.43341,0,0,0-.14788-1.77783,11.31808,11.31808,0,0,0-.95974-2.28761c-.2643-.47829-1.16108-1.34046-1.16738-1.888-.0126-1.10132,2.13972-1.98867,3.01134-2.42291a16.79623,16.79623,0,0,1,8.59657-1.74323c1.90369.129,3.9679.71428,5.0189,2.30962.944,1.438.81807,3.30081,1.22085,4.97169a1.47068,1.47068,0,0,0,.29892.66393,1.34135,1.34135,0,0,0,.73948.33982,4.54948,4.54948,0,0,0,1.416.05666h.00315a2.93138,2.93138,0,0,0,.37128-.05351,4.957,4.957,0,0,0,2.03271-.8779q.58531-.15576,1.18-.25488a.25112.25112,0,0,0,.04725-.00945c1.57646,4.97482,1.781,10.30836,3.07111,15.37444.63874,2.52044,1.55442,5.00943,1.6834,7.60225.00945.11327.0126.2297.01575.34612.0189.83386-.04717,1.674-.0126,2.50472a6.981,6.981,0,0,0,.12591,1.1139,15.61121,15.61121,0,0,0,.52546,1.74325l.00945.02831c.05977.18251.11643.36817.16363.55381.03457.1353.06607.26747.09127.40277l.00311.00943A14.93754,14.93754,0,0,1,588.3737,253.98251Z" transform="translate(-63.054 -157.8845)" fill="#fbbebe"/><circle cx="503.23669" cy="44.99678" r="18.56511" fill="#fbbebe"/><path d="M684.15711,304.03278a30.445,30.445,0,0,0-5.236-14.10317q.72216,4.29513,1.44748,8.58714a3.214,3.214,0,0,1-3.36688-1.03523,10.33663,10.33663,0,0,1-1.76529-3.27565,67.46571,67.46571,0,0,0-8.2095-14.73567c-11.81876-.98489-23.50223-5.88418-33.89555-11.59532-10.39643-5.708-20.12582-12.5519-30.38382-18.50217a43.57346,43.57346,0,0,0-5.54436-2.832c-3.20954-1.287-6.81242-1.95406-9.85526-3.46759-.2045-.1007-.409-.20767-.61043-.31781a12.57834,12.57834,0,0,1-1.94459-1.30584,10.34363,10.34363,0,0,1-.93139-.8559,20.35115,20.35115,0,0,1-3.55886-5.95341c-1.63308-3.61232-2.21524-7.97041-3.84517-11.58274a11.20292,11.20292,0,0,1,2.50156-1.76525h.00315c.13213-.06924.2643-.13532.39962-.19824a11.9404,11.9404,0,0,1,2.00437-.73317q.58531-.15576,1.18-.25488a.25112.25112,0,0,0,.04725-.00945,11.56564,11.56564,0,0,1,5.49085.43424c2.58652.87477,4.76711,2.62115,6.94148,4.27313a114.02006,114.02006,0,0,1,10.14787,8.04908c1.79357,1.718,3.4298,3.606,5.35868,5.16676a42.14393,42.14393,0,0,0,5.05662,3.35116q15.65613,9.32658,31.31525,18.65005c3.53365,2.1051,7.07046,4.21019,10.52553,6.438,5.24855,3.38578,10.30828,7.05474,15.36493,10.72057q4.46978,3.23787,8.93647,6.47889a9.72771,9.72771,0,0,1,2.533,2.3411,8.4724,8.4724,0,0,1,1.12337,3.433A31.3874,31.3874,0,0,1,684.15711,304.03278Z" transform="translate(-63.054 -157.8845)" fill="#fbbebe"/><path d="M592.97726,267.9441c-1.25235,5.61674-6.92888,9.012-9.89617,13.94586-3.68784,6.12335-2.18378,13.241-.79922,20.25484q-3.79485,3.27095-7.59285,6.54186c-1.39708,1.19886-2.79417,2.404-4.29827,3.46444a57.35064,57.35064,0,0,1-6.85966,3.93956q-3.3606,1.72752-6.72119,3.45814a32.1282,32.1282,0,0,1-6.57961,2.78793c-4.41473,1.13278-9.10318.33982-13.4707-.97232a6.08761,6.08761,0,0,1-1.47264-.601,2.39351,2.39351,0,0,1-.69854-.63248,3.91067,3.91067,0,0,1-.44365-2.53933c.44365-7.35052,2.24036-14.54686,4.03081-21.68971a85.2598,85.2598,0,0,1,3.84832-12.57708,85.0766,85.0766,0,0,1,5.41538-10.151,68.36751,68.36751,0,0,1,7.92948-11.51353,18.47881,18.47881,0,0,0,3.67525-4.73882c1.11706-2.54876.686-5.472.91252-8.24732a17.14844,17.14844,0,0,1,1.63312-6.0069v-.00315a17.09326,17.09326,0,0,1,1.74321-2.88232q.45788,1.06671.91568,2.13027.30209.69855.59783,1.394.38706.89679.7678,1.78728,1.09973,2.55823,2.19637,5.11327a21.58968,21.58968,0,0,0,3.33538,5.944,6.49923,6.49923,0,0,0,11.12337-.85275,21.26125,21.26125,0,0,0,2.27185-6.0132,19.21547,19.21547,0,0,0,.25175-7.83509c-.75835-5.00945-2.88862-10.12585-4.43678-14.77972a14.94511,14.94511,0,0,1-1.07927-4.871,3.35144,3.35144,0,0,1,.05662-.56011c.00945-.04719.0189-.09754.02834-.14473a11.9404,11.9404,0,0,1,2.00437-.73317q.58531-.15576,1.18-.25488,2.04378,11.06355,4.09377,22.12709c.0315.17307.0661.34613.09756.52234.19509,1.05726.39333,2.11454.61358,3.16865.19828.95657.41223,1.91.65137,2.85715l.00945.02831c.08182.321.16678.63877.2549.95658l.00311.00943c.2423.86848.5129,1.73065.81811,2.58024C590.93825,257.47528,594.16355,262.62946,592.97726,267.9441Z" transform="translate(-63.054 -157.8845)" fill="#6c63ff"/><path d="M668.32144,346.87707a6.58269,6.58269,0,0,0,.61,3.14328c1.16192,2.12353,3.94981,2.60625,6.36228,2.80484a188.37688,188.37688,0,0,0,42.2657-1.28774,4.88565,4.88565,0,0,0,2.15136-.66766c1.98985-1.39509.76329-4.7951-1.40951-5.88355s-4.75126-.82614-7.1353-1.29748a22.47912,22.47912,0,0,1-6.67794-2.89617q-7.25234-4.16669-14.293-8.68808c-2.79453-1.79464-6.09272-3.70993-9.23987-2.64587C672.43,332.34264,668.26533,337.68065,668.32144,346.87707Z" transform="translate(-63.054 -157.8845)" fill="#3f3d56"/><path d="M564.43732,240.87367v.00315c-.022.13215-.04406.26116-.07237.39018-.0346.214-.07551.43108-.11642.645-.39018,1.99812-.86847,3.98678-1.41913,5.96287-1.5104,5.45939-3.53366,10.83069-5.54121,16.12332q-8.08055,21.28692-16.16423,42.577c-1.35936,3.57457-2.71554,7.15228-4.26054,10.65448-.516,1.16741-1.04782,2.34424-1.57647,3.53368-1.89427,4.25737-3.713,8.65322-4.31716,13.18436a27.44976,27.44976,0,0,0-.19194,9.04027c.60416,2.97042,2.40718,5.8716,5.22969,6.96977,1.37823.53808,3.35113,1.25865,2.97355,2.69037-.2045.78665-1.09817,1.17055-1.90057,1.3027a7.31234,7.31234,0,0,1-5.966-1.718c-1.50725-1.33732-2.66518-3.41725-4.66959-3.64065-1.38767-.151-2.66518.67966-3.93643,1.26178-5.18564,2.36942-11.22719.71114-16.674-.9723.42794-2.20579,2.64318-3.65953,4.84267-4.10006,2.19949-.44367,4.47449-.129,6.718-.18879a3.50958,3.50958,0,0,0,2.04216-.52549,3.70545,3.70545,0,0,0,1.10132-1.88169,78.96356,78.96356,0,0,0,3.21273-13.14661c.7237-4.66645,1.02581-9.40527,2.05787-14.01507.80241-3.59661,2.0422-7.07991,3.10572-10.61044a224.68238,224.68238,0,0,0,5.0598-22.07674,78.02019,78.02019,0,0,0,1.42543-9.36751c.17935-2.6117.09438-5.236.34609-7.83826a60.8877,60.8877,0,0,1,2.11141-9.99683q1.44427-5.34769,2.88547-10.68911c1.42544-5.2706,2.95465-10.74572,6.567-14.84264a13.96159,13.96159,0,0,1,10.02834-4.78915,9.8819,9.8819,0,0,1,2.13027.22969c.11639.02831.23285.05664.34923.0881a8.63447,8.63447,0,0,1,2.17437.89995c1.11388-.708,1.68025-.45942,2.41974.63246a6.97319,6.97319,0,0,1,.88107,3.79485A52.42378,52.42378,0,0,1,564.43732,240.87367Z" transform="translate(-63.054 -157.8845)" fill="#fbbebe"/><path d="M565.66136,245.0461l-.0472.04719-.25486.25488-2.5299,2.52675-1.23976-5.20767-4.25109-17.854a9.8819,9.8819,0,0,1,2.13027.22969,3.286,3.286,0,0,1,.14788-.601l.20135.68911,1.44118,4.90245,2.72811,9.30773.45,1.53241v.00315Z" transform="translate(-63.054 -157.8845)" fill="#6c63ff"/><path d="M581.71523,188.0873a12.58165,12.58165,0,0,1-3.70049,8.89583,12.31392,12.31392,0,0,1-1.36008,1.17634,12.52812,12.52812,0,0,1-7.53567,2.52415H554.023a12.5902,12.5902,0,0,1,0-25.18037h15.096A12.62919,12.62919,0,0,1,581.71523,188.0873Z" transform="translate(-63.054 -157.8845)" fill="#2f2e41"/><circle cx="532.81499" cy="18.25044" r="12.90118" fill="#2f2e41"/><path d="M595.55433,163.23377c-.15825,0-.31505.00628-.472.01193a12.89776,12.89776,0,0,1,0,25.77849c.15694.00565.31374.01193.472.01193a12.90117,12.90117,0,1,0,0-25.80235Z" transform="translate(-63.054 -157.8845)" opacity="0.1"/><path d="M534.19508,163.23377c.15825,0,.31505.00628.472.01193a12.89776,12.89776,0,0,0,0,25.77849c-.157.00565-.31375.01193-.472.01193a12.90118,12.90118,0,0,1,0-25.80235Z" transform="translate(-63.054 -157.8845)" opacity="0.1"/><path d="M576.65466,198.15947a12.52812,12.52812,0,0,1-7.53567,2.52415H554.023a12.52833,12.52833,0,0,1-7.53574-2.52415Z" transform="translate(-63.054 -157.8845)" opacity="0.1"/><path d="M674.13958,291.64042s3.25228,9.37161,6.229,6.87633L677.996,286.26693Z" transform="translate(-63.054 -157.8845)" fill="#fbbebe"/><path d="M1069.91781,577.43414a20.81252,20.81252,0,1,0,2.7716-39.91524l.52093,10.7122-5.06814-9.18045a20.734,20.734,0,0,0-10.68367,11.72261,20.40847,20.40847,0,0,0-1.19713,5.62986A20.80856,20.80856,0,0,0,1069.91781,577.43414Z" transform="translate(-63.054 -157.8845)" fill="#57b894"/><path d="M1094.99516,701.67756c-1.78906-9.11027,5.9633-17.1868,13.62086-22.43651s16.605-10.40779,19.21775-19.31684c3.755-12.80387-7.43-24.52981-16.13564-34.64176a125.30044,125.30044,0,0,1-16.52359-24.55738c-1.81107-3.5325-3.47558-7.22528-3.95221-11.16626-.68641-5.67546,1.13693-11.32309,2.9739-16.73673q9.17925-27.05169,19.62843-53.65005" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M1070.77493,574.6762a20.81252,20.81252,0,1,0,2.7716-39.91524l.52093,10.7122-5.06815-9.18045a20.734,20.734,0,0,0-10.68366,11.72261,20.40847,20.40847,0,0,0-1.19713,5.62986A20.80855,20.80855,0,0,0,1070.77493,574.6762Z" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M1092.45136,515.47266a20.78819,20.78819,0,0,1,14.97993-13.19764l1.71361,10.18378,3.177-10.69566a20.81,20.81,0,1,1-19.87057,13.70952Z" transform="translate(-63.054 -157.8845)" fill="#57b894"/><path d="M1093.59418,511.7954a20.7882,20.7882,0,0,1,14.97993-13.19763l1.71361,10.18378,3.177-10.69567a20.81,20.81,0,1,1-19.87057,13.70952Z" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M1108.04474,625.48885a20.81,20.81,0,0,0,18.419-37.02267l-2.44121,8.21926-1.73105-10.30382a.36183.36183,0,0,0-.053-.0201,20.81113,20.81113,0,1,0-14.1938,39.12733Z" transform="translate(-63.054 -157.8845)" fill="#57b894"/><path d="M1109.035,621.76417a20.81,20.81,0,0,0,18.419-37.02267l-2.44121,8.21926-1.73105-10.30382a.3621.3621,0,0,0-.053-.0201,20.81113,20.81113,0,1,0-14.1938,39.12733Z" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M1086.37782,660.05148a20.80131,20.80131,0,1,0,4.01058-16.29737l9.27267,13.95654-12.66994-7.40768A20.61638,20.61638,0,0,0,1086.37782,660.05148Z" transform="translate(-63.054 -157.8845)" fill="#57b894"/><path d="M1087.23494,657.29354a20.80131,20.80131,0,1,0,4.01058-16.29737l9.27267,13.95655-12.66994-7.40769A20.61626,20.61626,0,0,0,1087.23494,657.29354Z" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M72.06146,628.13325a13.67421,13.67421,0,1,0,1.821-26.225l.34227,7.03811-3.32987-6.03172a13.62263,13.62263,0,0,0-7.01936,7.702,13.40883,13.40883,0,0,0-.78654,3.69893A13.6716,13.6716,0,0,0,72.06146,628.13325Z" transform="translate(-63.054 -157.8845)" fill="#57b894"/><path d="M88.53774,709.76344c-1.17545-5.98561,3.918-11.292,8.94915-14.7412s10.90978-6.8381,12.62642-12.69151c2.46711-8.41238-4.88167-16.11653-10.60142-22.76027A82.32442,82.32442,0,0,1,88.6556,643.43581a22.20962,22.20962,0,0,1-2.59668-7.33643c-.451-3.72888.747-7.43947,1.95391-10.99634q6.03093-17.77346,12.89623-35.24906" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M72.62461,626.32123a13.6742,13.6742,0,1,0,1.821-26.225l.34227,7.03812L71.458,601.10258a13.62262,13.62262,0,0,0-7.01936,7.702,13.40912,13.40912,0,0,0-.78654,3.69892A13.67158,13.67158,0,0,0,72.62461,626.32123Z" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M86.86641,587.42343a13.65822,13.65822,0,0,1,9.84209-8.67109l1.12587,6.69093,2.08737-7.02725a13.67252,13.67252,0,1,1-13.05533,9.00741Z" transform="translate(-63.054 -157.8845)" fill="#57b894"/><path d="M87.61727,585.0074a13.65822,13.65822,0,0,1,9.84209-8.67108l1.12587,6.69093L100.6726,576a13.67252,13.67252,0,1,1-13.05533,9.0074Z" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M97.11155,659.70607a13.67255,13.67255,0,0,0,12.10164-24.32457l-1.60392,5.4002-1.13733-6.76979a.238.238,0,0,0-.0348-.0132,13.67329,13.67329,0,1,0-9.32559,25.70736Z" transform="translate(-63.054 -157.8845)" fill="#57b894"/><path d="M97.76214,657.25889a13.67255,13.67255,0,0,0,12.10164-24.32457l-1.60392,5.4002-1.13733-6.7698a.238.238,0,0,0-.0348-.0132,13.67329,13.67329,0,1,0-9.32559,25.70737Z" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M82.876,682.41435a13.66684,13.66684,0,1,0,2.635-10.70767l6.09231,9.16971-8.32438-4.867A13.54535,13.54535,0,0,0,82.876,682.41435Z" transform="translate(-63.054 -157.8845)" fill="#57b894"/><path d="M83.43913,680.60233a13.66684,13.66684,0,1,0,2.635-10.70767l6.09231,9.16971-8.32439-4.867A13.54535,13.54535,0,0,0,83.43913,680.60233Z" transform="translate(-63.054 -157.8845)" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><ellipse cx="480.946" cy="319.1155" rx="17" ry="22" fill="#2f2e41"/><ellipse cx="573.446" cy="319.6155" rx="17" ry="22" fill="#2f2e41"/><path d="M623.5,542.5c0,9.94-13.88,18-31,18s-31-8.06-31-18c0-8.61,10.41-15.81,24.32-17.57a50.10353,50.10353,0,0,1,6.68-.43,50.69869,50.69869,0,0,1,11.13,1.2C615.25,528.29,623.5,534.84,623.5,542.5Z" transform="translate(-63.054 -157.8845)" fill="#2f2e41"/><ellipse cx="484.946" cy="314.1155" rx="17" ry="22" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><ellipse cx="577.446" cy="314.6155" rx="17" ry="22" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><ellipse cx="533.446" cy="379.6155" rx="31" ry="18" fill="none" stroke="#3f3d56" stroke-miterlimit="10"/><path d="M604,527.2a4.93658,4.93658,0,0,1-1.32,3.392A4.33873,4.33873,0,0,1,599.5,532h-10a4.66433,4.66433,0,0,1-4.5-4.8,4.90458,4.90458,0,0,1,.82-2.74134A47.02,47.02,0,0,1,592.5,524a47.66454,47.66454,0,0,1,11.13,1.28A5.06656,5.06656,0,0,1,604,527.2Z" transform="translate(-63.054 -157.8845)" fill="#fff"/><circle cx="484.946" cy="308.1155" r="5" fill="#fff"/><circle cx="577.946" cy="308.1155" r="5" fill="#fff"/><circle cx="582.946" cy="355.1155" r="5" fill="#6c63ff" opacity="0.3"/><circle cx="460.946" cy="355.1155" r="5" fill="#6c63ff" opacity="0.3"/></svg>
...\ No newline at end of file ...\ No newline at end of file
1 -<svg id="0b188637-16b1-4c40-a71f-ceebe5cfc5ec" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="729.22" height="746.14" viewBox="0 0 729.22 746.14"><defs><linearGradient id="161b0b7e-f39b-42f9-9ca9-e5f4182b27e7" x1="459.12" y1="621" x2="459.12" y2="193.38" gradientTransform="translate(-9.77 -29.03)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity="0.25"/><stop offset="0.54" stop-color="gray" stop-opacity="0.12"/><stop offset="1" stop-color="gray" stop-opacity="0.1"/></linearGradient><linearGradient id="0379165a-8b01-4db8-a9fd-a7f74912e5f9" x1="459.12" y1="355.96" x2="459.12" y2="192.97" gradientTransform="translate(-44.96 -24.28)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#b3b3b3" stop-opacity="0.25"/><stop offset="0.54" stop-color="#b3b3b3" stop-opacity="0.1"/><stop offset="1" stop-color="#b3b3b3" stop-opacity="0.05"/></linearGradient><linearGradient id="a5c94603-d688-4cb8-935e-8753937e09f1" x1="890.03" y1="384.1" x2="893.49" y2="466.67" gradientTransform="matrix(-0.96, 0.28, -0.28, -0.96, 1290.21, 438.32)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-opacity="0.12"/><stop offset="0.55" stop-opacity="0.09"/><stop offset="1" stop-opacity="0.02"/></linearGradient><linearGradient id="452544f9-f0e1-48f7-bf2a-2e6d32ceef9c" x1="630.78" y1="714.25" x2="630.78" y2="285.78" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#161b0b7e-f39b-42f9-9ca9-e5f4182b27e7"/><linearGradient id="b357cf12-7038-49e2-a945-bede915bae9c" x1="737.4" y1="672.7" x2="737.4" y2="245.08" gradientTransform="translate(15.96 0.36)" xlink:href="#161b0b7e-f39b-42f9-9ca9-e5f4182b27e7"/><linearGradient id="ea27b32b-d891-4df9-a7ed-488b1d56dfe9" x1="737.4" y1="407.66" x2="737.4" y2="244.68" gradientTransform="translate(1.98 1.1)" xlink:href="#0379165a-8b01-4db8-a9fd-a7f74912e5f9"/><linearGradient id="e9a0bbc5-d046-4610-9b74-eda9798afd67" x1="612.39" y1="329.04" x2="615.85" y2="411.61" gradientTransform="translate(1291.19 632.77) rotate(173.26)" xlink:href="#a5c94603-d688-4cb8-935e-8753937e09f1"/><linearGradient id="d89d3977-de30-46d1-ab57-98fa636459b9" x1="382.92" y1="428.03" x2="382.92" y2="0.4" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#161b0b7e-f39b-42f9-9ca9-e5f4182b27e7"/><linearGradient id="1e925d76-3047-4c1e-82a0-04113f14e226" x1="382.92" y1="162.99" x2="382.92" y2="0" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#0379165a-8b01-4db8-a9fd-a7f74912e5f9"/><linearGradient id="9a56d00c-164c-4fec-8f17-f5f893f4fff9" x1="729.45" y1="498.21" x2="732.9" y2="580.79" gradientTransform="matrix(-1, 0.01, -0.01, -1, 1253.94, 688.13)" xlink:href="#a5c94603-d688-4cb8-935e-8753937e09f1"/><linearGradient id="595bce0a-5d70-43e8-a094-99f33f4517de" x1="328.81" y1="746.14" x2="328.81" y2="254.91" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#161b0b7e-f39b-42f9-9ca9-e5f4182b27e7"/><linearGradient id="7d63bf16-77e8-4c09-b275-41a64fa57a97" x1="329.34" y1="675.01" x2="329.34" y2="373.01" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#161b0b7e-f39b-42f9-9ca9-e5f4182b27e7"/><linearGradient id="cafffc46-2bab-4c9b-8a17-f57a9c7cb665" x1="683.6" y1="52.97" x2="690.12" y2="208.87" gradientTransform="matrix(-1, 0.01, -0.01, -1, 1253.94, 688.13)" xlink:href="#a5c94603-d688-4cb8-935e-8753937e09f1"/></defs><title>resume folder_2</title><rect x="286.73" y="164.35" width="325.25" height="427.62" transform="matrix(0.96, -0.27, 0.27, 0.96, -319.57, 55.74)" fill="url(#161b0b7e-f39b-42f9-9ca9-e5f4182b27e7)"/><rect x="251.16" y="168.7" width="326" height="162.99" transform="translate(-286.9 41.83) rotate(-15.37)" fill="url(#0379165a-8b01-4db8-a9fd-a7f74912e5f9)"/><rect x="290.45" y="167.72" width="316.93" height="417.67" transform="translate(-319.16 55.57) rotate(-15.37)" fill="#eee"/><rect x="255.71" y="171.97" width="317.66" height="159.19" transform="translate(-287.25 41.98) rotate(-15.37)" fill="#3f51b5"/><rect x="358.16" y="384.47" width="86.17" height="6.57" transform="translate(-323.84 43.33) rotate(-15.37)" fill="#bdbdbd"/><rect x="365.13" y="409.82" width="86.17" height="6.57" transform="translate(-330.31 46.09) rotate(-15.37)" fill="#f5f5f5"/><rect x="359.16" y="378.75" width="224.92" height="6.57" transform="translate(-319.8 61.79) rotate(-15.37)" fill="#69f0ae"/><rect x="375.45" y="229.76" width="86.17" height="6.57" transform="translate(-282.2 42.38) rotate(-15.37)" fill="#fff"/><rect x="378.38" y="236.87" width="138.75" height="6.57" transform="translate(-283.04 50.38) rotate(-15.37)" fill="#fff"/><rect x="409.8" y="255.17" width="86.17" height="7.3" rx="3.09" ry="3.09" transform="translate(-287.8 52.41) rotate(-15.37)" opacity="0.2"/><circle cx="325.31" cy="413.18" r="15.34" transform="translate(-333.29 24.11) rotate(-15.37)" fill="#69f0ae"/><rect x="375.01" y="445.73" width="86.17" height="6.57" transform="translate(-339.47 49.99) rotate(-15.37)" fill="#bdbdbd"/><rect x="381.98" y="471.08" width="86.17" height="6.57" transform="translate(-345.95 52.75) rotate(-15.37)" fill="#f5f5f5"/><rect x="376.01" y="440.01" width="224.92" height="6.57" transform="translate(-335.44 68.45) rotate(-15.37)" fill="#e0e0e0"/><circle cx="342.15" cy="474.44" r="15.34" transform="translate(-348.93 30.77) rotate(-15.37)" fill="#e0e0e0"/><rect x="391.85" y="506.98" width="86.17" height="6.57" transform="translate(-355.11 56.65) rotate(-15.37)" fill="#bdbdbd"/><rect x="398.82" y="532.33" width="86.17" height="6.57" transform="translate(-361.58 59.4) rotate(-15.37)" fill="#f5f5f5"/><rect x="392.85" y="501.27" width="224.92" height="6.57" transform="translate(-351.08 75.1) rotate(-15.37)" fill="#e0e0e0"/><circle cx="359" cy="535.7" r="15.34" transform="translate(-364.57 37.43) rotate(-15.37)" fill="#e0e0e0"/><path d="M274.62,287.15A42.28,42.28,0,1,0,318,233.24l3,10.47a14.36,14.36,0,0,1-9.8,17.72h0a14.36,14.36,0,0,1-17.72-9.8l-3-10.47A42.3,42.3,0,0,0,274.62,287.15Z" transform="translate(-235.39 -76.93)" fill="url(#a5c94603-d688-4cb8-935e-8753937e09f1)"/><path d="M355,260.43a42.28,42.28,0,1,0-44,53.38l-2.89-10.5a14.36,14.36,0,0,1,10-17.6h0a14.36,14.36,0,0,1,17.6,10l2.89,10.5A42.3,42.3,0,0,0,355,260.43Z" transform="translate(-235.39 -76.93)" fill="#3f51b5"/><circle cx="312.7" cy="266.03" r="16.25" transform="translate(-294.73 15.5) rotate(-15.37)" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M318.09,285.71h0a14.36,14.36,0,0,0-10,17.6l2.89,10.5a42.44,42.44,0,0,0,27.61-7.59l-2.89-10.5A14.36,14.36,0,0,0,318.09,285.71Z" transform="translate(-235.39 -76.93)" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M296.66,269.51a15.77,15.77,0,0,1-3.84-7.42,10.93,10.93,0,0,1,1.51-8.11c1.75-2.57,4.65-4.11,7.58-5.17s6-1.75,8.78-3.14a19.44,19.44,0,0,0,9.74-11.41,26.14,26.14,0,0,1,1.83,6.92,8.81,8.81,0,0,1-2,6.68c2.08-1.76,2.53.9,2.44,2.59,1.57,1.1,4.5.55,5.16,2.35a12,12,0,0,1,.9,5.61c-.25,1.9,1.34,4.68-.46,5.32" transform="translate(-235.39 -76.93)" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M321,247.24s11.2-2.05,7.87,16.32" transform="translate(-235.39 -76.93)" fill="#fff"/><polygon points="637.77 714.25 532.34 714.25 532.34 285.78 729.22 285.78 637.77 714.25" fill="url(#452544f9-f0e1-48f7-bf2a-2e6d32ceef9c)"/><polygon points="632.52 714.25 529.17 714.25 529.17 285.78 722.16 285.78 632.52 714.25" fill="#bdbdbd"/><rect x="590.74" y="245.44" width="325.25" height="427.62" transform="translate(-279.59 5.03) rotate(-6.05)" fill="url(#b357cf12-7038-49e2-a945-bede915bae9c)"/><rect x="576.38" y="245.78" width="326" height="162.99" transform="translate(-265.76 2.82) rotate(-6.05)" fill="url(#ea27b32b-d891-4df9-a7ed-488b1d56dfe9)"/><rect x="594.73" y="248.76" width="316.93" height="417.67" transform="translate(-279.42 5) rotate(-6.05)" fill="#f5f5f5"/><rect x="580.7" y="249.09" width="317.66" height="159.19" transform="translate(-265.91 2.84) rotate(-6.05)" fill="#3f51b5"/><rect x="661.26" y="457.64" width="86.17" height="6.57" transform="translate(-280.04 -0.13) rotate(-6.05)" fill="#bdbdbd"/><rect x="664.03" y="483.78" width="86.17" height="6.57" transform="translate(-282.78 0.31) rotate(-6.05)" fill="#f5f5f5"/><rect x="662.26" y="463.4" width="224.92" height="6.57" transform="translate(-280.26 7.32) rotate(-6.05)" fill="#69f0ae"/><rect x="703.39" y="307.77" width="86.17" height="6.57" transform="translate(-264.01 3.48) rotate(-6.05)" fill="#fff"/><rect x="704.78" y="319.53" width="138.75" height="6.57" transform="translate(-265.1 6.46) rotate(-6.05)" fill="#fff"/><rect x="733.11" y="338.4" width="86.17" height="7.3" rx="3.09" ry="3.09" transform="translate(-267.12 6.78) rotate(-6.05)" opacity="0.2"/><circle cx="625.29" cy="473.71" r="15.34" transform="translate(-281.83 -8.39) rotate(-6.05)" fill="#69f0ae"/><rect x="667.96" y="520.81" width="86.17" height="6.57" transform="translate(-286.66 0.93) rotate(-6.05)" fill="#bdbdbd"/><rect x="670.73" y="546.96" width="86.17" height="6.57" transform="translate(-289.4 1.36) rotate(-6.05)" fill="#f5f5f5"/><rect x="668.96" y="526.57" width="224.92" height="6.57" transform="translate(-286.88 8.38) rotate(-6.05)" fill="#e0e0e0"/><circle cx="631.99" cy="536.88" r="15.34" transform="translate(-288.45 -7.33) rotate(-6.05)" fill="#e0e0e0"/><rect x="674.65" y="583.99" width="86.17" height="6.57" transform="translate(-293.28 1.98) rotate(-6.05)" fill="#bdbdbd"/><rect x="677.42" y="610.13" width="86.17" height="6.57" transform="translate(-296.02 2.42) rotate(-6.05)" fill="#f5f5f5"/><rect x="675.65" y="589.75" width="224.92" height="6.57" transform="translate(-293.5 9.43) rotate(-6.05)" fill="#e0e0e0"/><circle cx="638.68" cy="600.06" r="15.34" transform="translate(-295.07 -6.28) rotate(-6.05)" fill="#e0e0e0"/><path d="M595.69,341.12A42.28,42.28,0,1,0,647.23,295l1.28,10.82A14.36,14.36,0,0,1,636,321.67h0a14.36,14.36,0,0,1-15.9-12.54l-1.28-10.82A42.3,42.3,0,0,0,595.69,341.12Z" transform="translate(-235.39 -76.93)" fill="url(#e9a0bbc5-d046-4610-9b74-eda9798afd67)"/><path d="M679.33,327.79a42.28,42.28,0,1,0-52.09,45.54l-1.15-10.83a14.36,14.36,0,0,1,12.73-15.75h0a14.36,14.36,0,0,1,15.75,12.73l1.15,10.83A42.3,42.3,0,0,0,679.33,327.79Z" transform="translate(-235.39 -76.93)" fill="#3f51b5"/><circle cx="636.7" cy="326.46" r="16.25" transform="translate(-266.25 -8.01) rotate(-6.05)" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M638.82,346.75h0a14.36,14.36,0,0,0-12.73,15.75l1.15,10.83a42.44,42.44,0,0,0,28.48-3l-1.15-10.83A14.36,14.36,0,0,0,638.82,346.75Z" transform="translate(-235.39 -76.93)" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M620.3,327.29a15.77,15.77,0,0,1-2.59-7.95,10.93,10.93,0,0,1,2.8-7.75c2.14-2.26,5.26-3.31,8.32-3.88S635,307,638,306a19.44,19.44,0,0,0,11.46-9.68,26.14,26.14,0,0,1,.69,7.12,8.81,8.81,0,0,1-3.06,6.27c2.33-1.4,2.35,1.29,2,2.95,1.37,1.34,4.35,1.27,4.71,3.16a12,12,0,0,1,0,5.68c-.56,1.83.57,4.84-1.32,5.17" transform="translate(-235.39 -76.93)" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M647.93,309.26s11.38-.21,5.13,17.38" transform="translate(-235.39 -76.93)" fill="#fff"/><rect x="220.3" y="0.4" width="325.25" height="427.62" fill="url(#d89d3977-de30-46d1-ab57-98fa636459b9)"/><rect x="219.92" width="326" height="162.99" fill="url(#1e925d76-3047-4c1e-82a0-04113f14e226)"/><rect x="224.46" y="3.71" width="316.93" height="417.67" fill="#f5f5f5"/><rect x="224.1" y="3.32" width="317.66" height="159.19" fill="#3f51b5"/><rect x="290.91" y="207.42" width="86.17" height="6.57" fill="#bdbdbd"/><rect x="290.91" y="233.71" width="86.17" height="6.57" fill="#f5f5f5"/><rect x="290.91" y="220.57" width="224.92" height="6.57" fill="#69f0ae"/><rect x="348.6" y="62.84" width="86.17" height="6.57" fill="#fff"/><rect x="348.6" y="77.44" width="138.75" height="6.57" fill="#fff"/><rect x="374.89" y="96.43" width="86.17" height="7.3" rx="3.09" ry="3.09" opacity="0.2"/><circle cx="254.04" cy="215.09" r="15.34" fill="#69f0ae"/><rect x="290.91" y="270.95" width="86.17" height="6.57" fill="#bdbdbd"/><rect x="290.91" y="297.24" width="86.17" height="6.57" fill="#f5f5f5"/><rect x="290.91" y="284.1" width="224.92" height="6.57" fill="#e0e0e0"/><circle cx="254.04" cy="278.62" r="15.34" fill="#e0e0e0"/><rect x="290.91" y="334.49" width="86.17" height="6.57" fill="#bdbdbd"/><rect x="290.91" y="360.77" width="86.17" height="6.57" fill="#f5f5f5"/><rect x="290.91" y="347.63" width="224.92" height="6.57" fill="#e0e0e0"/><circle cx="254.04" cy="342.15" r="15.34" fill="#e0e0e0"/><path d="M474,157.06a42.28,42.28,0,1,0,56.12-40.48l.13,10.89A14.36,14.36,0,0,1,516.07,142h0a14.36,14.36,0,0,1-14.49-14.14l-.13-10.89A42.3,42.3,0,0,0,474,157.06Z" transform="translate(-235.39 -76.93)" fill="url(#9a56d00c-164c-4fec-8f17-f5f893f4fff9)"/><path d="M558.55,152.61a42.28,42.28,0,1,0-56.6,39.8V181.51a14.36,14.36,0,0,1,14.32-14.32h0a14.36,14.36,0,0,1,14.32,14.32v10.89A42.3,42.3,0,0,0,558.55,152.61Z" transform="translate(-235.39 -76.93)" fill="#3f51b5"/><circle cx="280.9" cy="69.87" r="16.25" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M516.26,167.19h0a14.36,14.36,0,0,0-14.32,14.32v10.89a42.44,42.44,0,0,0,28.64,0V181.51A14.36,14.36,0,0,0,516.26,167.19Z" transform="translate(-235.39 -76.93)" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M499.9,145.89a15.77,15.77,0,0,1-1.73-8.18,10.93,10.93,0,0,1,3.6-7.42c2.37-2,5.58-2.73,8.68-3s6.24-.1,9.3-.7a19.44,19.44,0,0,0,12.41-8.42,26.14,26.14,0,0,1-.07,7.15,8.81,8.81,0,0,1-3.7,5.91c2.47-1.14,2.2,1.53,1.67,3.14,1.22,1.48,4.2,1.72,4.35,3.64a12,12,0,0,1-.62,5.65c-.75,1.76.05,4.87-1.86,5" transform="translate(-235.39 -76.93)" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M529.27,130.88s11.34,1,3.27,17.82" transform="translate(-235.39 -76.93)" fill="#fff"/><polygon points="190.59 304.74 119.42 254.91 20.88 254.91 20.88 304.74 20.88 329.15 20.88 746.14 636.74 746.14 636.74 304.74 190.59 304.74" fill="url(#595bce0a-5d70-43e8-a094-99f33f4517de)"/><polyline points="26.15 309.78 26.15 333.48 26.15 738.25 632.52 738.25 632.52 309.78 193.25 309.78" fill="#fff"/><polyline points="193.25 309.78 123.17 261.41 26.15 261.41 26.15 309.78" fill="#bdbdbd"/><text x="-235.39" y="-76.93"></text><rect x="162.34" y="373.01" width="334" height="302" fill="url(#7d63bf16-77e8-4c09-b275-41a64fa57a97)"/><rect x="166.88" y="375.21" width="326.42" height="294.31" fill="#fff"/><rect x="268.19" y="595.49" width="128.34" height="10.51" fill="#bdbdbd"/><rect x="189.87" y="616.52" width="280.44" height="10.51" fill="#e0e0e0"/><rect x="189.87" y="637.55" width="280.44" height="10.51" fill="#e0e0e0"/><path d="M485.62,564.67a79.84,79.84,0,1,0,106-76.43l.25,20.57a27.11,27.11,0,0,1-26.7,27.36h0a27.11,27.11,0,0,1-27.36-26.7l-.25-20.57A79.87,79.87,0,0,0,485.62,564.67Z" transform="translate(-235.39 -76.93)" fill="url(#cafffc46-2bab-4c9b-8a17-f57a9c7cb665)"/><path d="M645.32,556.28a79.84,79.84,0,1,0-106.87,75.14V610.85a27.11,27.11,0,0,1,27-27h0a27.11,27.11,0,0,1,27,27v20.57A79.87,79.87,0,0,0,645.32,556.28Z" transform="translate(-235.39 -76.93)" fill="#bdbdbd"/><rect x="323.18" y="488.01" width="9.6" height="33.85" rx="4.8" ry="4.8" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><circle cx="328.03" cy="461.87" r="30.69" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M563.37,577.31h0a27.11,27.11,0,0,0-27,27v20.57a80.13,80.13,0,0,0,54.07,0V604.35A27.11,27.11,0,0,0,563.37,577.31Z" transform="translate(-235.39 -76.93)" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M532.47,537.1a29.77,29.77,0,0,1-3.27-15.44,20.64,20.64,0,0,1,6.8-14c4.47-3.81,10.53-5.16,16.39-5.63s11.79-.19,17.55-1.32a36.69,36.69,0,0,0,23.43-15.89c.37,4.5.74,9.07-.13,13.51s-3.15,8.79-7,11.16c4.66-2.16,4.15,2.9,3.14,5.93,2.31,2.79,7.92,3.25,8.21,6.86s.24,7.34-1.17,10.67.1,9.19-3.5,9.45" transform="translate(-235.39 -76.93)" fill="#fff" stroke="#fff" stroke-miterlimit="10"/><path d="M587.94,508.75s21.41,1.87,6.17,33.65" transform="translate(-235.39 -76.93)" fill="#fff"/></svg>
...\ No newline at end of file ...\ No newline at end of file
1 -<!DOCTYPE html>
2 -<html lang="en" dir="ltr">
3 - <head>
4 - <meta charset="utf-8" />
5 - <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
6 - <meta
7 - name="viewport"
8 - content="width=device-width, initial-scale=1, shrink-to-fit=no"
9 - />
10 - <meta name="theme-color" content="#000000" />
11 - <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
12 - <link
13 - href="https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto+Slab|Roboto:300,400,500,700"
14 - rel="stylesheet"
15 - />
16 - <title>KHU Box</title>
17 - </head>
18 - <body>
19 - <noscript>You need to enable JavaScript to run this app.</noscript>
20 - <div id="root"></div>
21 - </body>
22 -</html>
1 -{
2 - "short_name": "React App",
3 - "name": "Create React App Sample",
4 - "icons": [
5 - {
6 - "src": "favicon.ico",
7 - "sizes": "64x64 32x32 24x24 16x16",
8 - "type": "image/x-icon"
9 - }
10 - ],
11 - "start_url": ".",
12 - "display": "standalone",
13 - "theme_color": "#000000",
14 - "background_color": "#ffffff"
15 -}
1 -import React, { Component } from 'react';
2 -import { Router } from 'react-router-dom';
3 -import { createBrowserHistory } from 'history';
4 -import { Chart } from 'react-chartjs-2';
5 -import { ThemeProvider } from '@material-ui/styles';
6 -import validate from 'validate.js';
7 -
8 -import { chartjs } from './helpers';
9 -import theme from './theme';
10 -import 'react-perfect-scrollbar/dist/css/styles.css';
11 -import './assets/scss/index.scss';
12 -import validators from './common/validators';
13 -import Routes from './Routes';
14 -
15 -const browserHistory = createBrowserHistory();
16 -
17 -Chart.helpers.extend(Chart.elements.Rectangle.prototype, {
18 - draw: chartjs.draw
19 -});
20 -
21 -validate.validators = {
22 - ...validate.validators,
23 - ...validators
24 -};
25 -
26 -export default class App extends Component {
27 - render() {
28 - return (
29 - <ThemeProvider theme={theme}>
30 - <Router history={browserHistory}>
31 - <Routes />
32 - </Router>
33 - </ThemeProvider>
34 - );
35 - }
36 -}
1 -import React from 'react';
2 -import { Switch, Redirect } from 'react-router-dom';
3 -
4 -import { RouteWithLayout } from './components';
5 -import { Main as MainLayout, Minimal as MinimalLayout } from './layouts';
6 -
7 -import {
8 - Dashboard as DashboardView,
9 - RecentFileList as RecentFileListView,
10 - MyDrive as MyDriveView,
11 - SharedFileList as SharedFileView,
12 - Trash as TrashView,
13 - Icons as IconsView,
14 - Account as AccountView,
15 - Settings as SettingsView,
16 - SignUp as SignUpView,
17 - SignIn as SignInView,
18 - NotFound as NotFoundView
19 -} from './views';
20 -
21 -const Routes = () => {
22 - return (
23 - <Switch>
24 - <Redirect
25 - exact
26 - from="/"
27 - to="/my-drive"
28 - />
29 - <RouteWithLayout
30 - component={MyDriveView}
31 - exact
32 - layout={MainLayout}
33 - path="/my-drive"
34 - />
35 - <RouteWithLayout
36 - component={SharedFileView}
37 - exact
38 - layout={MainLayout}
39 - path="/share"
40 - />
41 - <RouteWithLayout
42 - component={RecentFileListView}
43 - exact
44 - layout={MainLayout}
45 - path="/recent"
46 - />
47 - <RouteWithLayout
48 - component={TrashView}
49 - exact
50 - layout={MainLayout}
51 - path="/trash"
52 - />
53 - <RouteWithLayout
54 - component={AccountView}
55 - exact
56 - layout={MainLayout}
57 - path="/account"
58 - />
59 - <RouteWithLayout
60 - component={SettingsView}
61 - exact
62 - layout={MainLayout}
63 - path="/settings"
64 - />
65 - <RouteWithLayout
66 - component={SignUpView}
67 - exact
68 - layout={MinimalLayout}
69 - path="/sign-up"
70 - />
71 - <RouteWithLayout
72 - component={SignInView}
73 - exact
74 - layout={MinimalLayout}
75 - path="/sign-in"
76 - />
77 - <RouteWithLayout
78 - component={NotFoundView}
79 - exact
80 - layout={MinimalLayout}
81 - path="/not-found"
82 - />
83 - <Redirect to="/not-found" />
84 - </Switch>
85 - );
86 -};
87 -
88 -export default Routes;
1 -* {
2 - box-sizing: border-box;
3 - margin: 0;
4 - padding: 0;
5 -}
6 -
7 -html {
8 - height: 100%;
9 - -webkit-font-smoothing: antialiased;
10 - -moz-osx-font-smoothing: grayscale;
11 -}
12 -
13 -body {
14 - background-color: #f4f6f8;
15 - height: 100%;
16 -}
17 -
18 -a {
19 - text-decoration: none;
20 -}
21 -
22 -#root {
23 - height: 100%;
24 -}
1 -const checked = (value, options) => {
2 - if (value !== true) {
3 - return options.message || 'must be checked';
4 - }
5 -};
6 -
7 -export default {
8 - checked
9 -};
1 -import React from 'react';
2 -import { Route } from 'react-router-dom';
3 -import PropTypes from 'prop-types';
4 -
5 -const RouteWithLayout = props => {
6 - const { layout: Layout, component: Component, ...rest } = props;
7 -
8 - return (
9 - <Route
10 - {...rest}
11 - render={matchProps => (
12 - <Layout>
13 - <Component {...matchProps} />
14 - </Layout>
15 - )}
16 - />
17 - );
18 -};
19 -
20 -RouteWithLayout.propTypes = {
21 - component: PropTypes.any.isRequired,
22 - layout: PropTypes.any.isRequired,
23 - path: PropTypes.string
24 -};
25 -
26 -export default RouteWithLayout;
1 -export { default } from './RouteWithLayout';
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import clsx from 'clsx';
4 -import { makeStyles } from '@material-ui/styles';
5 -import { Paper, Input } from '@material-ui/core';
6 -import SearchIcon from '@material-ui/icons/Search';
7 -
8 -const useStyles = makeStyles(theme => ({
9 - root: {
10 - borderRadius: '4px',
11 - alignItems: 'center',
12 - padding: theme.spacing(1),
13 - display: 'flex',
14 - flexBasis: 420
15 - },
16 - icon: {
17 - marginRight: theme.spacing(1),
18 - color: theme.palette.text.secondary
19 - },
20 - input: {
21 - flexGrow: 1,
22 - fontSize: '14px',
23 - lineHeight: '16px',
24 - letterSpacing: '-0.05px'
25 - }
26 -}));
27 -
28 -const SearchInput = props => {
29 - const { className, onChange, style, ...rest } = props;
30 -
31 - const classes = useStyles();
32 -
33 - return (
34 - <Paper
35 - {...rest}
36 - className={clsx(classes.root, className)}
37 - style={style}
38 - >
39 - <SearchIcon className={classes.icon} />
40 - <Input
41 - {...rest}
42 - className={classes.input}
43 - disableUnderline
44 - onChange={onChange}
45 - />
46 - </Paper>
47 - );
48 -};
49 -
50 -SearchInput.propTypes = {
51 - className: PropTypes.string,
52 - onChange: PropTypes.func,
53 - style: PropTypes.object
54 -};
55 -
56 -export default SearchInput;
1 -export { default } from './SearchInput';
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import clsx from 'clsx';
4 -import { makeStyles } from '@material-ui/styles';
5 -
6 -const useStyles = makeStyles(theme => ({
7 - root: {
8 - display: 'inline-block',
9 - borderRadius: '50%',
10 - flexGrow: 0,
11 - flexShrink: 0
12 - },
13 - sm: {
14 - height: theme.spacing(1),
15 - width: theme.spacing(1)
16 - },
17 - md: {
18 - height: theme.spacing(2),
19 - width: theme.spacing(2)
20 - },
21 - lg: {
22 - height: theme.spacing(3),
23 - width: theme.spacing(3)
24 - },
25 - neutral: {
26 - backgroundColor: theme.palette.neutral
27 - },
28 - primary: {
29 - backgroundColor: theme.palette.primary.main
30 - },
31 - info: {
32 - backgroundColor: theme.palette.info.main
33 - },
34 - warning: {
35 - backgroundColor: theme.palette.warning.main
36 - },
37 - danger: {
38 - backgroundColor: theme.palette.error.main
39 - },
40 - success: {
41 - backgroundColor: theme.palette.success.main
42 - }
43 -}));
44 -
45 -const StatusBullet = props => {
46 - const { className, size, color, ...rest } = props;
47 -
48 - const classes = useStyles();
49 -
50 - return (
51 - <span
52 - {...rest}
53 - className={clsx(
54 - {
55 - [classes.root]: true,
56 - [classes[size]]: size,
57 - [classes[color]]: color
58 - },
59 - className
60 - )}
61 - />
62 - );
63 -};
64 -
65 -StatusBullet.propTypes = {
66 - className: PropTypes.string,
67 - color: PropTypes.oneOf([
68 - 'neutral',
69 - 'primary',
70 - 'info',
71 - 'success',
72 - 'warning',
73 - 'danger'
74 - ]),
75 - size: PropTypes.oneOf(['sm', 'md', 'lg'])
76 -};
77 -
78 -StatusBullet.defaultProps = {
79 - size: 'md',
80 - color: 'default'
81 -};
82 -
83 -export default StatusBullet;
1 -export { default } from './StatusBullet'
...\ No newline at end of file ...\ No newline at end of file
1 -export { default as SearchInput } from './SearchInput';
2 -export { default as StatusBullet } from './StatusBullet';
3 -export { default as RouteWithLayout } from './RouteWithLayout';
1 -// ChartJS extension rounded bar chart
2 -// https://codepen.io/jedtrow/full/ygRYgo
3 -function draw() {
4 - const { ctx } = this._chart;
5 - const vm = this._view;
6 - let { borderWidth } = vm;
7 -
8 - let left;
9 - let right;
10 - let top;
11 - let bottom;
12 - let signX;
13 - let signY;
14 - let borderSkipped;
15 - let radius;
16 -
17 - // If radius is less than 0 or is large enough to cause drawing errors a max
18 - // radius is imposed. If cornerRadius is not defined set it to 0.
19 - let { cornerRadius } = this._chart.config.options;
20 - if (cornerRadius < 0) {
21 - cornerRadius = 0;
22 - }
23 -
24 - if (typeof cornerRadius === 'undefined') {
25 - cornerRadius = 0;
26 - }
27 -
28 - if (!vm.horizontal) {
29 - // bar
30 - left = vm.x - vm.width / 2;
31 - right = vm.x + vm.width / 2;
32 - top = vm.y;
33 - bottom = vm.base;
34 - signX = 1;
35 - signY = bottom > top ? 1 : -1;
36 - borderSkipped = vm.borderSkipped || 'bottom';
37 - } else {
38 - // horizontal bar
39 - left = vm.base;
40 - right = vm.x;
41 - top = vm.y - vm.height / 2;
42 - bottom = vm.y + vm.height / 2;
43 - signX = right > left ? 1 : -1;
44 - signY = 1;
45 - borderSkipped = vm.borderSkipped || 'left';
46 - }
47 -
48 - // Canvas doesn't allow us to stroke inside the width so we can
49 - // adjust the sizes to fit if we're setting a stroke on the line
50 - if (borderWidth) {
51 - // borderWidth shold be less than bar width and bar height.
52 - const barSize = Math.min(Math.abs(left - right), Math.abs(top - bottom));
53 - borderWidth = borderWidth > barSize ? barSize : borderWidth;
54 - const halfStroke = borderWidth / 2;
55 - // Adjust borderWidth when bar top position is near vm.base(zero).
56 - const borderLeft =
57 - left + (borderSkipped !== 'left' ? halfStroke * signX : 0);
58 - const borderRight =
59 - right + (borderSkipped !== 'right' ? -halfStroke * signX : 0);
60 - const borderTop = top + (borderSkipped !== 'top' ? halfStroke * signY : 0);
61 - const borderBottom =
62 - bottom + (borderSkipped !== 'bottom' ? -halfStroke * signY : 0);
63 - // not become a vertical line?
64 - if (borderLeft !== borderRight) {
65 - top = borderTop;
66 - bottom = borderBottom;
67 - }
68 - // not become a horizontal line?
69 - if (borderTop !== borderBottom) {
70 - left = borderLeft;
71 - right = borderRight;
72 - }
73 - }
74 -
75 - ctx.beginPath();
76 - ctx.fillStyle = vm.backgroundColor;
77 - ctx.strokeStyle = vm.borderColor;
78 - ctx.lineWidth = borderWidth;
79 -
80 - // Corner points, from bottom-left to bottom-right clockwise
81 - // | 1 2 |
82 - // | 0 3 |
83 - const corners = [[left, bottom], [left, top], [right, top], [right, bottom]];
84 -
85 - // Find first (starting) corner with fallback to 'bottom'
86 - const borders = ['bottom', 'left', 'top', 'right'];
87 - let startCorner = borders.indexOf(borderSkipped, 0);
88 - if (startCorner === -1) {
89 - startCorner = 0;
90 - }
91 -
92 - function cornerAt(index) {
93 - return corners[(startCorner + index) % 4];
94 - }
95 -
96 - // Draw rectangle from 'startCorner'
97 - let corner = cornerAt(0);
98 - ctx.moveTo(corner[0], corner[1]);
99 -
100 - for (let i = 1; i < 4; i += 1) {
101 - corner = cornerAt(i);
102 - let nextCornerId = i + 1;
103 - if (nextCornerId === 4) {
104 - nextCornerId = 0;
105 - }
106 -
107 - const width = corners[2][0] - corners[1][0];
108 - const height = corners[0][1] - corners[1][1];
109 - const x = corners[1][0];
110 - const y = corners[1][1];
111 -
112 - radius = cornerRadius;
113 - // Fix radius being too large
114 - if (radius > Math.abs(height) / 2) {
115 - radius = Math.floor(Math.abs(height) / 2);
116 - }
117 - if (radius > Math.abs(width) / 2) {
118 - radius = Math.floor(Math.abs(width) / 2);
119 - }
120 -
121 - if (height < 0) {
122 - // Negative values in a standard bar chart
123 - const xTl = x;
124 - const xTr = x + width;
125 - const yTl = y + height;
126 - const yTr = y + height;
127 -
128 - const xBl = x;
129 - const xBr = x + width;
130 - const yBl = y;
131 - const yBr = y;
132 -
133 - // Draw
134 - ctx.moveTo(xBl + radius, yBl);
135 - ctx.lineTo(xBr - radius, yBr);
136 - ctx.quadraticCurveTo(xBr, yBr, xBr, yBr - radius);
137 - ctx.lineTo(xTr, yTr + radius);
138 - ctx.quadraticCurveTo(xTr, yTr, xTr - radius, yTr);
139 - ctx.lineTo(xTl + radius, yTl);
140 - ctx.quadraticCurveTo(xTl, yTl, xTl, yTl + radius);
141 - ctx.lineTo(xBl, yBl - radius);
142 - ctx.quadraticCurveTo(xBl, yBl, xBl + radius, yBl);
143 - } else if (width < 0) {
144 - // Negative values in a horizontal bar chart
145 - const xTl = x + width;
146 - const xTr = x;
147 - const yTl = y;
148 - const yTr = y;
149 -
150 - const xBl = x + width;
151 - const xBr = x;
152 - const yBl = y + height;
153 - const yBr = y + height;
154 -
155 - // Draw
156 - ctx.moveTo(xBl + radius, yBl);
157 - ctx.lineTo(xBr - radius, yBr);
158 - ctx.quadraticCurveTo(xBr, yBr, xBr, yBr - radius);
159 - ctx.lineTo(xTr, yTr + radius);
160 - ctx.quadraticCurveTo(xTr, yTr, xTr - radius, yTr);
161 - ctx.lineTo(xTl + radius, yTl);
162 - ctx.quadraticCurveTo(xTl, yTl, xTl, yTl + radius);
163 - ctx.lineTo(xBl, yBl - radius);
164 - ctx.quadraticCurveTo(xBl, yBl, xBl + radius, yBl);
165 - } else {
166 - // Positive Value
167 - ctx.moveTo(x + radius, y);
168 - ctx.lineTo(x + width - radius, y);
169 - ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
170 - ctx.lineTo(x + width, y + height - radius);
171 - ctx.quadraticCurveTo(
172 - x + width,
173 - y + height,
174 - x + width - radius,
175 - y + height
176 - );
177 - ctx.lineTo(x + radius, y + height);
178 - ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
179 - ctx.lineTo(x, y + radius);
180 - ctx.quadraticCurveTo(x, y, x + radius, y);
181 - }
182 - }
183 -
184 - ctx.fill();
185 - if (borderWidth) {
186 - ctx.stroke();
187 - }
188 -}
189 -
190 -export default {
191 - draw
192 -};
1 -export default (name = '') =>
2 - name
3 - .replace(/\s+/, ' ')
4 - .split(' ')
5 - .slice(0, 2)
6 - .map(v => v && v[0].toUpperCase())
7 - .join('');
1 -export { default as chartjs } from './chartjs';
2 -export { default as getInitials } from './getInitials';
1 -import React from 'react';
2 -
3 -// Material components
4 -import { SvgIcon } from '@material-ui/core';
5 -
6 -export default function Facebook(props) {
7 - return (
8 - <SvgIcon {...props}>
9 - <path d="M9.53144612,22.005 L9.53144612,13.0552149 L6.44166667,13.0552149 L6.44166667,9.49875 L9.53144612,9.49875 L9.53144612,6.68484375 C9.53144612,5.19972656 9.95946769,4.04680661 10.8155103,3.22608401 C11.6715529,2.4053613 12.808485,1.995 14.2263057,1.995 C15.3766134,1.995 16.3129099,2.04710915 17.0351961,2.15132812 L17.0351961,5.3169726 L15.1090998,5.3169726 C14.3868137,5.3169726 13.8919142,5.47330073 13.6244006,5.78595698 C13.4103902,6.04650407 13.3033846,6.46337874 13.3033846,7.03658198 L13.3033846,9.49875 L16.71418,9.49875 L16.2326559,13.0552149 L13.3033846,13.0552149 L13.3033846,22.005 L9.53144612,22.005 Z" />
10 - </SvgIcon>
11 - );
12 -}
1 -import React from 'react';
2 -
3 -// Material components
4 -import { SvgIcon } from '@material-ui/core';
5 -
6 -export default function Google(props) {
7 - return (
8 - <SvgIcon {...props}>
9 - <path d="M21,12.2177419 C21,13.9112905 20.6311475,15.4233869 19.8934426,16.7540323 C19.1557377,18.0846776 18.1168031,19.1249998 16.7766393,19.875 C15.4364756,20.6250002 13.8934424,21 12.147541,21 C10.4999998,21 8.97540984,20.5947579 7.57377049,19.7842742 C6.17213115,18.9737905 5.05942604,17.8790323 4.23565574,16.5 C3.41188543,15.1209677 3,13.6209679 3,12 C3,10.3790321 3.41188543,8.87903226 4.23565574,7.5 C5.05942604,6.12096774 6.17213115,5.02620949 7.57377049,4.21572581 C8.97540984,3.40524212 10.4999998,3 12.147541,3 C14.5327871,3 16.5737705,3.78629051 18.2704918,5.35887097 L15.7991803,7.71774194 C15.0122953,6.96774175 14.0655738,6.52016129 12.9590164,6.375 C11.9262295,6.22983871 10.9057375,6.375 9.89754098,6.81048387 C8.88934445,7.24596774 8.07786904,7.89919355 7.46311475,8.77016129 C6.79918033,9.71370968 6.46721311,10.7903228 6.46721311,12 C6.46721311,13.0403228 6.72540984,13.9899192 7.24180328,14.8487903 C7.75819672,15.7076615 8.4467215,16.3971776 9.30737705,16.9173387 C10.1680326,17.4374998 11.1147541,17.6975806 12.147541,17.6975806 C13.2540984,17.6975806 14.2254096,17.455645 15.0614754,16.9717742 C15.7254098,16.5846772 16.2786885,16.0645161 16.7213115,15.4112903 C17.0409838,14.8790321 17.2499998,14.3467744 17.3483607,13.8145161 L12.147541,13.8145161 L12.147541,10.6935484 L20.852459,10.6935484 C20.9508199,11.2258066 21,11.7338712 21,12.2177419 Z" />
10 - </SvgIcon>
11 - );
12 -}
1 -export { default as Facebook } from './Facebook';
2 -export { default as Google } from './Google';
1 -import React from 'react';
2 -import ReactDOM from 'react-dom';
3 -
4 -import * as serviceWorker from './serviceWorker';
5 -import App from './App';
6 -
7 -ReactDOM.render(<App />, document.getElementById('root'));
8 -
9 -serviceWorker.unregister();
1 -import React, { useState } from 'react';
2 -import PropTypes from 'prop-types';
3 -import clsx from 'clsx';
4 -import { makeStyles, useTheme } from '@material-ui/styles';
5 -import { useMediaQuery } from '@material-ui/core';
6 -
7 -import { Sidebar, Topbar, Footer } from './components';
8 -
9 -const useStyles = makeStyles(theme => ({
10 - root: {
11 - paddingTop: 56,
12 - height: '100%',
13 - [theme.breakpoints.up('sm')]: {
14 - paddingTop: 64
15 - }
16 - },
17 - shiftContent: {
18 - paddingLeft: 240
19 - },
20 - content: {
21 - height: '100%'
22 - }
23 -}));
24 -
25 -const Main = props => {
26 - const { children } = props;
27 -
28 - const classes = useStyles();
29 - const theme = useTheme();
30 - const isDesktop = useMediaQuery(theme.breakpoints.up('lg'), {
31 - defaultMatches: true
32 - });
33 -
34 - const [openSidebar, setOpenSidebar] = useState(false);
35 -
36 - const handleSidebarOpen = () => {
37 - setOpenSidebar(true);
38 - };
39 -
40 - const handleSidebarClose = () => {
41 - setOpenSidebar(false);
42 - };
43 -
44 - const shouldOpenSidebar = isDesktop ? true : openSidebar;
45 -
46 - return (
47 - <div
48 - className={clsx({
49 - [classes.root]: true,
50 - [classes.shiftContent]: isDesktop
51 - })}
52 - >
53 - <Topbar onSidebarOpen={handleSidebarOpen} />
54 - <Sidebar
55 - onClose={handleSidebarClose}
56 - open={shouldOpenSidebar}
57 - variant={isDesktop ? 'persistent' : 'temporary'}
58 - />
59 - <main className={classes.content}>
60 - {children}
61 - <Footer />
62 - </main>
63 - </div>
64 - );
65 -};
66 -
67 -Main.propTypes = {
68 - children: PropTypes.node
69 -};
70 -
71 -export default Main;
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import clsx from 'clsx';
4 -import { makeStyles } from '@material-ui/styles';
5 -import { Typography, Link } from '@material-ui/core';
6 -
7 -const useStyles = makeStyles(theme => ({
8 - root: {
9 - padding: theme.spacing(4)
10 - }
11 -}));
12 -
13 -const Footer = props => {
14 - const { className, ...rest } = props;
15 -
16 - const classes = useStyles();
17 -
18 - return (
19 - <div
20 - {...rest}
21 - className={clsx(classes.root, className)}
22 - >
23 - <Typography variant="body1">
24 - &copy;{' '}
25 - <Link
26 - component="a"
27 - href="https://devias.io/"
28 - target="_blank"
29 - >
30 - Devias IO
31 - </Link>
32 - . 2019
33 - </Typography>
34 - <Typography variant="caption">
35 - Created with love for the environment. By designers and developers who
36 - love to work together in offices!
37 - </Typography>
38 - </div>
39 - );
40 -};
41 -
42 -Footer.propTypes = {
43 - className: PropTypes.string
44 -};
45 -
46 -export default Footer;
1 -import React from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import { makeStyles } from '@material-ui/styles';
5 -import { Divider, Drawer } from '@material-ui/core';
6 -import DashboardIcon from '@material-ui/icons/Dashboard';
7 -import PeopleIcon from '@material-ui/icons/People';
8 -import ShoppingBasketIcon from '@material-ui/icons/ShoppingBasket';
9 -import TextFieldsIcon from '@material-ui/icons/TextFields';
10 -import ImageIcon from '@material-ui/icons/Image';
11 -import AccountBoxIcon from '@material-ui/icons/AccountBox';
12 -import SettingsIcon from '@material-ui/icons/Settings';
13 -import LockOpenIcon from '@material-ui/icons/LockOpen';
14 -
15 -import { Profile, SidebarNav, UpgradePlan } from './components';
16 -
17 -const useStyles = makeStyles(theme => ({
18 - drawer: {
19 - width: 240,
20 - [theme.breakpoints.up('lg')]: {
21 - marginTop: 64,
22 - height: 'calc(100% - 64px)'
23 - }
24 - },
25 - root: {
26 - backgroundColor: theme.palette.white,
27 - display: 'flex',
28 - flexDirection: 'column',
29 - height: '100%',
30 - padding: theme.spacing(2)
31 - },
32 - divider: {
33 - margin: theme.spacing(2, 0)
34 - },
35 - nav: {
36 - marginBottom: theme.spacing(2)
37 - }
38 -}));
39 -
40 -const Sidebar = props => {
41 - const { open, variant, onClose, className, ...rest } = props;
42 -
43 - const classes = useStyles();
44 -
45 - const pages = [
46 - {
47 - title: '내 드라이브',
48 - href: '/my-drive',
49 - icon: <DashboardIcon />
50 - },
51 - {
52 - title: '공유함',
53 - href: '/share',
54 - icon: <PeopleIcon />
55 - },
56 - {
57 - title: '최근 열어본 파일',
58 - href: '/recent',
59 - icon: <ShoppingBasketIcon />
60 - },
61 - {
62 - title: '휴지통',
63 - href: '/trash',
64 - icon: <LockOpenIcon />
65 - },
66 - {
67 - title: '계정',
68 - href: '/account',
69 - icon: <AccountBoxIcon />
70 - },
71 - {
72 - title: '설정',
73 - href: '/settings',
74 - icon: <SettingsIcon />
75 - }
76 - ];
77 -
78 - return (
79 - <Drawer
80 - anchor="left"
81 - classes={{ paper: classes.drawer }}
82 - onClose={onClose}
83 - open={open}
84 - variant={variant}
85 - >
86 - <div
87 - {...rest}
88 - className={clsx(classes.root, className)}
89 - >
90 - <Profile />
91 - <Divider className={classes.divider} />
92 - <SidebarNav
93 - className={classes.nav}
94 - pages={pages}
95 - />
96 - </div>
97 - </Drawer>
98 - );
99 -};
100 -
101 -Sidebar.propTypes = {
102 - className: PropTypes.string,
103 - onClose: PropTypes.func,
104 - open: PropTypes.bool.isRequired,
105 - variant: PropTypes.string.isRequired
106 -};
107 -
108 -export default Sidebar;
1 -import React from 'react';
2 -import { Link as RouterLink } from 'react-router-dom';
3 -import clsx from 'clsx';
4 -import PropTypes from 'prop-types';
5 -import { makeStyles } from '@material-ui/styles';
6 -import { Avatar, Typography } from '@material-ui/core';
7 -
8 -const useStyles = makeStyles(theme => ({
9 - root: {
10 - display: 'flex',
11 - flexDirection: 'column',
12 - alignItems: 'center',
13 - minHeight: 'fit-content'
14 - },
15 - avatar: {
16 - width: 60,
17 - height: 60
18 - },
19 - name: {
20 - marginTop: theme.spacing(1)
21 - }
22 -}));
23 -
24 -const Profile = props => {
25 - const { className, ...rest } = props;
26 -
27 - const classes = useStyles();
28 -
29 - const user = {
30 - name: '엄준식',
31 - avatar: '/images/avatars/avatar_1.png',
32 - membership: 'Basic Plan'
33 - };
34 -
35 - return (
36 - <div
37 - {...rest}
38 - className={clsx(classes.root, className)}
39 - >
40 - <Avatar
41 - alt="Person"
42 - className={classes.avatar}
43 - component={RouterLink}
44 - src={user.avatar}
45 - to="/settings"
46 - />
47 - <Typography
48 - className={classes.name}
49 - variant="h4"
50 - >
51 - {user.name}
52 - </Typography>
53 - <Typography variant="body2">{user.membership}</Typography>
54 - </div>
55 - );
56 -};
57 -
58 -Profile.propTypes = {
59 - className: PropTypes.string
60 -};
61 -
62 -export default Profile;
1 -/* eslint-disable react/no-multi-comp */
2 -/* eslint-disable react/display-name */
3 -import React, { forwardRef } from 'react';
4 -import { NavLink as RouterLink } from 'react-router-dom';
5 -import clsx from 'clsx';
6 -import PropTypes from 'prop-types';
7 -import { makeStyles } from '@material-ui/styles';
8 -import { List, ListItem, Button, colors } from '@material-ui/core';
9 -
10 -const useStyles = makeStyles(theme => ({
11 - root: {},
12 - item: {
13 - display: 'flex',
14 - paddingTop: 0,
15 - paddingBottom: 0
16 - },
17 - button: {
18 - color: colors.blueGrey[800],
19 - padding: '10px 8px',
20 - justifyContent: 'flex-start',
21 - textTransform: 'none',
22 - letterSpacing: 0,
23 - width: '100%',
24 - fontWeight: theme.typography.fontWeightMedium
25 - },
26 - icon: {
27 - color: theme.palette.icon,
28 - width: 24,
29 - height: 24,
30 - display: 'flex',
31 - alignItems: 'center',
32 - marginRight: theme.spacing(1)
33 - },
34 - active: {
35 - color: theme.palette.primary.main,
36 - fontWeight: theme.typography.fontWeightMedium,
37 - '& $icon': {
38 - color: theme.palette.primary.main
39 - }
40 - }
41 -}));
42 -
43 -const CustomRouterLink = forwardRef((props, ref) => (
44 - <div
45 - ref={ref}
46 - style={{ flexGrow: 1 }}
47 - >
48 - <RouterLink {...props} />
49 - </div>
50 -));
51 -
52 -const SidebarNav = props => {
53 - const { pages, className, ...rest } = props;
54 -
55 - const classes = useStyles();
56 -
57 - return (
58 - <List
59 - {...rest}
60 - className={clsx(classes.root, className)}
61 - >
62 - {pages.map(page => (
63 - <ListItem
64 - className={classes.item}
65 - disableGutters
66 - key={page.title}
67 - >
68 - <Button
69 - activeClassName={classes.active}
70 - className={classes.button}
71 - component={CustomRouterLink}
72 - to={page.href}
73 - >
74 - <div className={classes.icon}>{page.icon}</div>
75 - {page.title}
76 - </Button>
77 - </ListItem>
78 - ))}
79 - </List>
80 - );
81 -};
82 -
83 -SidebarNav.propTypes = {
84 - className: PropTypes.string,
85 - pages: PropTypes.array.isRequired
86 -};
87 -
88 -export default SidebarNav;
1 -import React from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import { makeStyles } from '@material-ui/styles';
5 -import { Typography, Button, colors } from '@material-ui/core';
6 -
7 -const useStyles = makeStyles(theme => ({
8 - root: {
9 - backgroundColor: colors.grey[50]
10 - },
11 - media: {
12 - paddingTop: theme.spacing(2),
13 - height: 80,
14 - textAlign: 'center',
15 - '& > img': {
16 - height: '100%',
17 - width: 'auto'
18 - }
19 - },
20 - content: {
21 - padding: theme.spacing(1, 2)
22 - },
23 - actions: {
24 - padding: theme.spacing(1, 2),
25 - display: 'flex',
26 - justifyContent: 'center'
27 - }
28 -}));
29 -
30 -const UpgradePlan = props => {
31 - const { className, ...rest } = props;
32 -
33 - const classes = useStyles();
34 -
35 - return (
36 - <div
37 - {...rest}
38 - className={clsx(classes.root, className)}
39 - >
40 - <div className={classes.media}>
41 - <img
42 - alt="Upgrade to PRO"
43 - src="/images/undraw_resume_folder_2_arse.svg"
44 - />
45 - </div>
46 - <div className={classes.content}>
47 - <Typography
48 - align="center"
49 - gutterBottom
50 - variant="h6"
51 - >
52 - Upgrade to PRO
53 - </Typography>
54 - <Typography
55 - align="center"
56 - variant="body2"
57 - >
58 - Upgrade to Devias Kit PRO and get even more components
59 - </Typography>
60 - </div>
61 - <div className={classes.actions}>
62 - <Button
63 - color="primary"
64 - component="a"
65 - href="https://devias.io/products/devias-kit-pro"
66 - variant="contained"
67 - >
68 - Upgrade
69 - </Button>
70 - </div>
71 - </div>
72 - );
73 -};
74 -
75 -UpgradePlan.propTypes = {
76 - className: PropTypes.string
77 -};
78 -
79 -export default UpgradePlan;
1 -export { default as Profile } from './Profile';
2 -export { default as SidebarNav } from './SidebarNav';
3 -export { default as UpgradePlan } from './UpgradePlan';
1 -import React, { useState } from 'react';
2 -import { Link as RouterLink } from 'react-router-dom';
3 -import clsx from 'clsx';
4 -import PropTypes from 'prop-types';
5 -import { makeStyles } from '@material-ui/styles';
6 -import { AppBar, Toolbar, Badge, Hidden, IconButton } from '@material-ui/core';
7 -import MenuIcon from '@material-ui/icons/Menu';
8 -import NotificationsIcon from '@material-ui/icons/NotificationsOutlined';
9 -import InputIcon from '@material-ui/icons/Input';
10 -
11 -const useStyles = makeStyles(theme => ({
12 - root: {
13 - boxShadow: 'none'
14 - },
15 - flexGrow: {
16 - flexGrow: 1
17 - },
18 - signOutButton: {
19 - marginLeft: theme.spacing(1)
20 - }
21 -}));
22 -
23 -const Topbar = props => {
24 - const { className, onSidebarOpen, ...rest } = props;
25 -
26 - const classes = useStyles();
27 -
28 - const [notifications] = useState([]);
29 -
30 - return (
31 - <AppBar
32 - {...rest}
33 - className={clsx(classes.root, className)}
34 - >
35 - <Toolbar>
36 - <RouterLink to="/">
37 - <h1>KHU Box</h1>
38 - </RouterLink>
39 - <div className={classes.flexGrow} />
40 - <Hidden mdDown>
41 - <IconButton color="inherit">
42 - <Badge
43 - badgeContent={notifications.length}
44 - color="primary"
45 - variant="dot"
46 - >
47 - <NotificationsIcon />
48 - </Badge>
49 - </IconButton>
50 - <IconButton
51 - className={classes.signOutButton}
52 - color="inherit"
53 - >
54 - <InputIcon />
55 - </IconButton>
56 - </Hidden>
57 - <Hidden lgUp>
58 - <IconButton
59 - color="inherit"
60 - onClick={onSidebarOpen}
61 - >
62 - <MenuIcon />
63 - </IconButton>
64 - </Hidden>
65 - </Toolbar>
66 - </AppBar>
67 - );
68 -};
69 -
70 -Topbar.propTypes = {
71 - className: PropTypes.string,
72 - onSidebarOpen: PropTypes.func
73 -};
74 -
75 -export default Topbar;
1 -export { default as Footer } from './Footer';
2 -export { default as Sidebar } from './Sidebar';
3 -export { default as Topbar } from './Topbar';
1 -export { default } from './Main';
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import { makeStyles } from '@material-ui/styles';
4 -
5 -import { Topbar } from './components';
6 -
7 -const useStyles = makeStyles(() => ({
8 - root: {
9 - paddingTop: 64,
10 - height: '100%'
11 - },
12 - content: {
13 - height: '100%'
14 - }
15 -}));
16 -
17 -const Minimal = props => {
18 - const { children } = props;
19 -
20 - const classes = useStyles();
21 -
22 - return (
23 - <div className={classes.root}>
24 - <Topbar />
25 - <main className={classes.content}>{children}</main>
26 - </div>
27 - );
28 -};
29 -
30 -Minimal.propTypes = {
31 - children: PropTypes.node,
32 - className: PropTypes.string
33 -};
34 -
35 -export default Minimal;
1 -import React from 'react';
2 -import { Link as RouterLink } from 'react-router-dom';
3 -import clsx from 'clsx';
4 -import PropTypes from 'prop-types';
5 -import { makeStyles } from '@material-ui/styles';
6 -import { AppBar, Toolbar } from '@material-ui/core';
7 -
8 -const useStyles = makeStyles(() => ({
9 - root: {
10 - boxShadow: 'none'
11 - }
12 -}));
13 -
14 -const Topbar = props => {
15 - const { className, ...rest } = props;
16 -
17 - const classes = useStyles();
18 -
19 - return (
20 - <AppBar
21 - {...rest}
22 - className={clsx(classes.root, className)}
23 - color="primary"
24 - position="fixed"
25 - >
26 - <Toolbar>
27 - <RouterLink to="/">
28 - <img
29 - alt="Logo"
30 - src="/images/logos/logo--white.svg"
31 - />
32 - </RouterLink>
33 - </Toolbar>
34 - </AppBar>
35 - );
36 -};
37 -
38 -Topbar.propTypes = {
39 - className: PropTypes.string
40 -};
41 -
42 -export default Topbar;
1 -export { default as Topbar } from './Topbar';
1 -export { default } from './Minimal';
1 -export { default as Main } from './Main';
2 -export { default as Minimal } from './Minimal';
1 -[{"id":1,"name":"MattisNibh.tiff","modifiedAt":"2019-12-20","size":334,"share":false,"sharedAt":"2019-11-19","sharedUser":"Vi de Lloyd"},
2 -{"id":2,"name":"UltricesPosuereCubilia.mpeg","modifiedAt":"2019-06-12","size":703,"share":true,"sharedAt":"2019-10-10","sharedUser":"Rogerio Baynon"},
3 -{"id":3,"name":"FuscePosuereFelis.tiff","modifiedAt":"2019-08-09","size":811,"share":true,"sharedAt":"2019-11-18","sharedUser":"Etheline Hynard"},
4 -{"id":4,"name":"HacHabitassePlatea.xls","modifiedAt":"2020-01-23","size":414,"share":false,"sharedAt":"2020-01-08","sharedUser":"Rudd Skellern"},
5 -{"id":5,"name":"Vivamus.xls","modifiedAt":"2020-03-14","size":351,"share":false,"sharedAt":"2019-12-12","sharedUser":"Carmelle Plumridege"},
6 -{"id":6,"name":"BlanditMi.ppt","modifiedAt":"2019-05-09","size":234,"share":false,"sharedAt":"2020-03-12","sharedUser":"Darla Hassey"},
7 -{"id":7,"name":"ErosVestibulumAc.ppt","modifiedAt":"2019-12-18","size":381,"share":true,"sharedAt":"2019-12-17","sharedUser":"Dame Alenikov"},
8 -{"id":8,"name":"AcTellusSemper.ppt","modifiedAt":"2019-05-07","size":706,"share":false,"sharedAt":"2020-02-10","sharedUser":"Jules Gutteridge"},
9 -{"id":9,"name":"SedTinciduntEu.xls","modifiedAt":"2019-07-24","size":746,"share":true,"sharedAt":"2020-04-19","sharedUser":"Peyton Wakeling"},
10 -{"id":10,"name":"Turpis.tiff","modifiedAt":"2019-12-14","size":132,"share":true,"sharedAt":"2019-07-10","sharedUser":"Felice Tethcote"},
11 -{"id":11,"name":"Nascetur.mp3","modifiedAt":"2019-12-28","size":218,"share":true,"sharedAt":"2019-05-19","sharedUser":"Lindie Balmann"},
12 -{"id":12,"name":"Est.ppt","modifiedAt":"2019-07-13","size":467,"share":true,"sharedAt":"2019-08-31","sharedUser":"Nathalia Heinritz"},
13 -{"id":13,"name":"Egestas.txt","modifiedAt":"2020-04-22","size":690,"share":true,"sharedAt":"2020-04-26","sharedUser":"Eloise Proschke"},
14 -{"id":14,"name":"Sed.doc","modifiedAt":"2019-10-09","size":691,"share":false,"sharedAt":"2019-08-27","sharedUser":"Janaye Aikin"},
15 -{"id":15,"name":"InFaucibus.ppt","modifiedAt":"2019-12-10","size":677,"share":false,"sharedAt":"2020-02-09","sharedUser":"Maurizia Swann"},
16 -{"id":16,"name":"EgetTempus.xls","modifiedAt":"2020-04-07","size":542,"share":false,"sharedAt":"2019-11-16","sharedUser":"Terrence Gummow"},
17 -{"id":17,"name":"AcNulla.tiff","modifiedAt":"2019-09-12","size":409,"share":true,"sharedAt":"2019-12-03","sharedUser":"Paulie Strawbridge"},
18 -{"id":18,"name":"LiberoNullam.mov","modifiedAt":"2019-11-29","size":700,"share":true,"sharedAt":"2019-07-07","sharedUser":"Peggi Guildford"},
19 -{"id":19,"name":"DuisBibendum.xls","modifiedAt":"2020-04-19","size":822,"share":true,"sharedAt":"2019-06-17","sharedUser":"Baron Colles"},
20 -{"id":20,"name":"AliquetPulvinar.ppt","modifiedAt":"2019-09-11","size":799,"share":true,"sharedAt":"2020-02-13","sharedUser":"Roxanna Elcombe"},
21 -{"id":21,"name":"Congue.ppt","modifiedAt":"2020-03-28","size":671,"share":true,"sharedAt":"2019-05-11","sharedUser":"Gleda Rabjohn"},
22 -{"id":22,"name":"IdNulla.xls","modifiedAt":"2019-06-05","size":810,"share":true,"sharedAt":"2019-08-18","sharedUser":"Constantia Windrass"},
23 -{"id":23,"name":"MaurisLaoreet.mov","modifiedAt":"2019-07-12","size":651,"share":false,"sharedAt":"2019-11-17","sharedUser":"Lynda Paoletto"},
24 -{"id":24,"name":"EuSapien.mp3","modifiedAt":"2019-08-19","size":50,"share":true,"sharedAt":"2019-10-23","sharedUser":"Bern Rizzello"},
25 -{"id":25,"name":"Eu.jpeg","modifiedAt":"2020-01-08","size":635,"share":true,"sharedAt":"2019-12-01","sharedUser":"Norah Dumini"},
26 -{"id":26,"name":"Cras.ppt","modifiedAt":"2020-04-28","size":37,"share":true,"sharedAt":"2019-11-26","sharedUser":"Kelsy Stebbings"},
27 -{"id":27,"name":"SapienUt.xls","modifiedAt":"2020-02-10","size":901,"share":true,"sharedAt":"2019-09-13","sharedUser":"Aveline Kemmis"},
28 -{"id":28,"name":"EgetTempus.ppt","modifiedAt":"2020-03-05","size":652,"share":false,"sharedAt":"2020-04-05","sharedUser":"Steffane Hussy"},
29 -{"id":29,"name":"ConvallisTortor.mpeg","modifiedAt":"2019-10-05","size":306,"share":false,"sharedAt":"2020-01-20","sharedUser":"Coral Lisciandro"},
30 -{"id":30,"name":"Sed.pdf","modifiedAt":"2020-03-22","size":965,"share":false,"sharedAt":"2020-02-25","sharedUser":"Dawna Ruprechter"},
31 -{"id":31,"name":"MollisMolestieLorem.ppt","modifiedAt":"2019-12-12","size":415,"share":true,"sharedAt":"2020-03-06","sharedUser":"Myra Fifield"},
32 -{"id":32,"name":"APedePosuere.tiff","modifiedAt":"2019-12-01","size":132,"share":false,"sharedAt":"2019-09-03","sharedUser":"Wolfy Boniface"},
33 -{"id":33,"name":"Proin.jpeg","modifiedAt":"2020-04-21","size":315,"share":false,"sharedAt":"2019-10-13","sharedUser":"Ozzie Orpin"},
34 -{"id":34,"name":"HacHabitassePlatea.mp3","modifiedAt":"2020-03-09","size":761,"share":false,"sharedAt":"2019-10-09","sharedUser":"Theadora Vaughan"},
35 -{"id":35,"name":"Vulputate.doc","modifiedAt":"2019-11-22","size":761,"share":false,"sharedAt":"2019-05-18","sharedUser":"Reina Copley"},
36 -{"id":36,"name":"SitAmet.tiff","modifiedAt":"2019-07-11","size":284,"share":true,"sharedAt":"2019-10-06","sharedUser":"Rhiamon Devon"},
37 -{"id":37,"name":"ConvallisNullaNeque.tiff","modifiedAt":"2019-12-23","size":201,"share":true,"sharedAt":"2019-05-19","sharedUser":"Dur Pocke"},
38 -{"id":38,"name":"RhoncusAliquet.xls","modifiedAt":"2019-10-11","size":635,"share":true,"sharedAt":"2019-07-31","sharedUser":"Dori Grellis"},
39 -{"id":39,"name":"TinciduntEuFelis.doc","modifiedAt":"2019-06-05","size":118,"share":true,"sharedAt":"2019-09-17","sharedUser":"Wylie Warbrick"},
40 -{"id":40,"name":"Erat.mp3","modifiedAt":"2020-02-13","size":285,"share":false,"sharedAt":"2019-10-06","sharedUser":"Chelsey Marzellano"},
41 -{"id":41,"name":"VestibulumSitAmet.jpeg","modifiedAt":"2020-04-23","size":262,"share":false,"sharedAt":"2019-11-03","sharedUser":"Marni Harpur"},
42 -{"id":42,"name":"PorttitorLacusAt.xls","modifiedAt":"2019-11-06","size":301,"share":false,"sharedAt":"2019-08-23","sharedUser":"Gerri Jest"},
43 -{"id":43,"name":"EratNulla.jpeg","modifiedAt":"2019-10-11","size":788,"share":true,"sharedAt":"2020-01-20","sharedUser":"Ginni Hillatt"},
44 -{"id":44,"name":"CubiliaCuraeMauris.ppt","modifiedAt":"2019-11-04","size":416,"share":true,"sharedAt":"2019-10-09","sharedUser":"Eolande Garstan"},
45 -{"id":45,"name":"QuisJusto.avi","modifiedAt":"2020-03-03","size":159,"share":false,"sharedAt":"2020-02-13","sharedUser":"Karl Lyness"},
46 -{"id":46,"name":"ElementumInHac.avi","modifiedAt":"2019-09-04","size":413,"share":true,"sharedAt":"2019-06-17","sharedUser":"Hugo Challicum"},
47 -{"id":47,"name":"Adipiscing.tiff","modifiedAt":"2020-01-16","size":510,"share":true,"sharedAt":"2019-08-30","sharedUser":"Leela Larmouth"},
48 -{"id":48,"name":"Sed.gif","modifiedAt":"2020-02-17","size":778,"share":true,"sharedAt":"2019-12-30","sharedUser":"Koren Timmermann"},
49 -{"id":49,"name":"QuisqueArcuLibero.xls","modifiedAt":"2020-02-23","size":320,"share":false,"sharedAt":"2020-01-15","sharedUser":"Osborne Sprull"},
50 -{"id":50,"name":"Ac.ppt","modifiedAt":"2019-07-01","size":644,"share":true,"sharedAt":"2019-10-15","sharedUser":"Brandy Antal"}]
1 -// This optional code is used to register a service worker.
2 -// register() is not called by default.
3 -
4 -// This lets the app load faster on subsequent visits in production, and gives
5 -// it offline capabilities. However, it also means that developers (and users)
6 -// will only see deployed updates on subsequent visits to a page, after all the
7 -// existing tabs open on the page have been closed, since previously cached
8 -// resources are updated in the background.
9 -
10 -// To learn more about the benefits of this model and instructions on how to
11 -// opt-in, read http://bit.ly/CRA-PWA
12 -
13 -const isLocalhost = Boolean(
14 - window.location.hostname === 'localhost' ||
15 - // [::1] is the IPv6 localhost address.
16 - window.location.hostname === '[::1]' ||
17 - // 127.0.0.1/8 is considered localhost for IPv4.
18 - window.location.hostname.match(
19 - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
20 - )
21 -);
22 -
23 -export function register(config) {
24 - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
25 - // The URL constructor is available in all browsers that support SW.
26 - const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
27 - if (publicUrl.origin !== window.location.origin) {
28 - // Our service worker won't work if PUBLIC_URL is on a different origin
29 - // from what our page is served on. This might happen if a CDN is used to
30 - // serve assets; see https://github.com/facebook/create-react-app/issues/2374
31 - return;
32 - }
33 -
34 - window.addEventListener('load', () => {
35 - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
36 -
37 - if (isLocalhost) {
38 - // This is running on localhost. Let's check if a service worker still exists or not.
39 - checkValidServiceWorker(swUrl, config);
40 -
41 - // Add some additional logging to localhost, pointing developers to the
42 - // service worker/PWA documentation.
43 - navigator.serviceWorker.ready.then(() => {
44 - console.log(
45 - 'This web app is being served cache-first by a service ' +
46 - 'worker. To learn more, visit http://bit.ly/CRA-PWA'
47 - );
48 - });
49 - } else {
50 - // Is not localhost. Just register service worker
51 - registerValidSW(swUrl, config);
52 - }
53 - });
54 - }
55 -}
56 -
57 -function registerValidSW(swUrl, config) {
58 - navigator.serviceWorker
59 - .register(swUrl)
60 - .then(registration => {
61 - registration.onupdatefound = () => {
62 - const installingWorker = registration.installing;
63 - if (installingWorker == null) {
64 - return;
65 - }
66 - installingWorker.onstatechange = () => {
67 - if (installingWorker.state === 'installed') {
68 - if (navigator.serviceWorker.controller) {
69 - // At this point, the updated precached content has been fetched,
70 - // but the previous service worker will still serve the older
71 - // content until all client tabs are closed.
72 - console.log(
73 - 'New content is available and will be used when all ' +
74 - 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'
75 - );
76 -
77 - // Execute callback
78 - if (config && config.onUpdate) {
79 - config.onUpdate(registration);
80 - }
81 - } else {
82 - // At this point, everything has been precached.
83 - // It's the perfect time to display a
84 - // "Content is cached for offline use." message.
85 - console.log('Content is cached for offline use.');
86 -
87 - // Execute callback
88 - if (config && config.onSuccess) {
89 - config.onSuccess(registration);
90 - }
91 - }
92 - }
93 - };
94 - };
95 - })
96 - .catch(error => {
97 - console.error('Error during service worker registration:', error);
98 - });
99 -}
100 -
101 -function checkValidServiceWorker(swUrl, config) {
102 - // Check if the service worker can be found. If it can't reload the page.
103 - fetch(swUrl)
104 - .then(response => {
105 - // Ensure service worker exists, and that we really are getting a JS file.
106 - const contentType = response.headers.get('content-type');
107 - if (
108 - response.status === 404 ||
109 - (contentType != null && contentType.indexOf('javascript') === -1)
110 - ) {
111 - // No service worker found. Probably a different app. Reload the page.
112 - navigator.serviceWorker.ready.then(registration => {
113 - registration.unregister().then(() => {
114 - window.location.reload();
115 - });
116 - });
117 - } else {
118 - // Service worker found. Proceed as normal.
119 - registerValidSW(swUrl, config);
120 - }
121 - })
122 - .catch(() => {
123 - console.log(
124 - 'No internet connection found. App is running in offline mode.'
125 - );
126 - });
127 -}
128 -
129 -export function unregister() {
130 - if ('serviceWorker' in navigator) {
131 - navigator.serviceWorker.ready.then(registration => {
132 - registration.unregister();
133 - });
134 - }
135 -}
1 -import { createMuiTheme } from '@material-ui/core';
2 -
3 -import palette from './palette';
4 -import typography from './typography';
5 -import overrides from './overrides';
6 -
7 -const theme = createMuiTheme({
8 - palette,
9 - typography,
10 - overrides,
11 - zIndex: {
12 - appBar: 1200,
13 - drawer: 1100
14 - }
15 -});
16 -
17 -export default theme;
1 -export default {
2 - contained: {
3 - boxShadow:
4 - '0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20)',
5 - backgroundColor: '#FFFFFF'
6 - }
7 -};
1 -import palette from '../palette';
2 -
3 -export default {
4 - root: {
5 - color: palette.icon,
6 - '&:hover': {
7 - backgroundColor: 'rgba(0, 0, 0, 0.03)'
8 - }
9 - }
10 -};
1 -export default {
2 - elevation1: {
3 - boxShadow: '0 0 0 1px rgba(63,63,68,0.05), 0 1px 3px 0 rgba(63,63,68,0.15)'
4 - }
5 -};
1 -import palette from '../palette';
2 -import typography from '../typography';
3 -
4 -export default {
5 - root: {
6 - ...typography.body1,
7 - borderBottom: `1px solid ${palette.divider}`
8 - }
9 -};
1 -import { colors } from '@material-ui/core';
2 -
3 -export default {
4 - root: {
5 - backgroundColor: colors.grey[50]
6 - }
7 -};
1 -import palette from '../palette';
2 -
3 -export default {
4 - root: {
5 - '&$selected': {
6 - backgroundColor: palette.background.default
7 - },
8 - '&$hover': {
9 - '&:hover': {
10 - backgroundColor: palette.background.default
11 - }
12 - }
13 - }
14 -};
1 -export default {
2 - gutterBottom: {
3 - marginBottom: 8
4 - }
5 -};
1 -import MuiButton from './MuiButton';
2 -import MuiIconButton from './MuiIconButton';
3 -import MuiPaper from './MuiPaper';
4 -import MuiTableCell from './MuiTableCell';
5 -import MuiTableHead from './MuiTableHead';
6 -import MuiTypography from './MuiTypography';
7 -
8 -export default {
9 - MuiButton,
10 - MuiIconButton,
11 - MuiPaper,
12 - MuiTableCell,
13 - MuiTableHead,
14 - MuiTypography
15 -};
1 -import { colors } from '@material-ui/core';
2 -
3 -const white = '#FFFFFF';
4 -const black = '#000000';
5 -
6 -export default {
7 - black,
8 - white,
9 - primary: {
10 - contrastText: white,
11 - dark: colors.indigo[900],
12 - main: colors.indigo[500],
13 - light: colors.indigo[100]
14 - },
15 - secondary: {
16 - contrastText: white,
17 - dark: colors.blue[900],
18 - main: colors.blue['A400'],
19 - light: colors.blue['A400']
20 - },
21 - success: {
22 - contrastText: white,
23 - dark: colors.green[900],
24 - main: colors.green[600],
25 - light: colors.green[400]
26 - },
27 - info: {
28 - contrastText: white,
29 - dark: colors.blue[900],
30 - main: colors.blue[600],
31 - light: colors.blue[400]
32 - },
33 - warning: {
34 - contrastText: white,
35 - dark: colors.orange[900],
36 - main: colors.orange[600],
37 - light: colors.orange[400]
38 - },
39 - error: {
40 - contrastText: white,
41 - dark: colors.red[900],
42 - main: colors.red[600],
43 - light: colors.red[400]
44 - },
45 - text: {
46 - primary: colors.blueGrey[900],
47 - secondary: colors.blueGrey[600],
48 - link: colors.blue[600]
49 - },
50 - background: {
51 - default: '#F4F6F8',
52 - paper: white
53 - },
54 - icon: colors.blueGrey[600],
55 - divider: colors.grey[200]
56 -};
1 -import palette from './palette';
2 -
3 -export default {
4 - h1: {
5 - color: palette.text.primary,
6 - fontWeight: 500,
7 - fontSize: '35px',
8 - letterSpacing: '-0.24px',
9 - lineHeight: '40px'
10 - },
11 - h2: {
12 - color: palette.text.primary,
13 - fontWeight: 500,
14 - fontSize: '29px',
15 - letterSpacing: '-0.24px',
16 - lineHeight: '32px'
17 - },
18 - h3: {
19 - color: palette.text.primary,
20 - fontWeight: 500,
21 - fontSize: '24px',
22 - letterSpacing: '-0.06px',
23 - lineHeight: '28px'
24 - },
25 - h4: {
26 - color: palette.text.primary,
27 - fontWeight: 500,
28 - fontSize: '20px',
29 - letterSpacing: '-0.06px',
30 - lineHeight: '24px'
31 - },
32 - h5: {
33 - color: palette.text.primary,
34 - fontWeight: 500,
35 - fontSize: '16px',
36 - letterSpacing: '-0.05px',
37 - lineHeight: '20px'
38 - },
39 - h6: {
40 - color: palette.text.primary,
41 - fontWeight: 500,
42 - fontSize: '14px',
43 - letterSpacing: '-0.05px',
44 - lineHeight: '20px'
45 - },
46 - subtitle1: {
47 - color: palette.text.primary,
48 - fontSize: '16px',
49 - letterSpacing: '-0.05px',
50 - lineHeight: '25px'
51 - },
52 - subtitle2: {
53 - color: palette.text.secondary,
54 - fontWeight: 400,
55 - fontSize: '14px',
56 - letterSpacing: '-0.05px',
57 - lineHeight: '21px'
58 - },
59 - body1: {
60 - color: palette.text.primary,
61 - fontSize: '14px',
62 - letterSpacing: '-0.05px',
63 - lineHeight: '21px'
64 - },
65 - body2: {
66 - color: palette.text.secondary,
67 - fontSize: '12px',
68 - letterSpacing: '-0.04px',
69 - lineHeight: '18px'
70 - },
71 - button: {
72 - color: palette.text.primary,
73 - fontSize: '14px'
74 - },
75 - caption: {
76 - color: palette.text.secondary,
77 - fontSize: '11px',
78 - letterSpacing: '0.33px',
79 - lineHeight: '13px'
80 - },
81 - overline: {
82 - color: palette.text.secondary,
83 - fontSize: '11px',
84 - fontWeight: 500,
85 - letterSpacing: '0.33px',
86 - lineHeight: '13px',
87 - textTransform: 'uppercase'
88 - }
89 -};
1 -import React from 'react';
2 -import { makeStyles } from '@material-ui/styles';
3 -import { Grid } from '@material-ui/core';
4 -
5 -import { AccountProfile, AccountDetails } from './components';
6 -
7 -const useStyles = makeStyles(theme => ({
8 - root: {
9 - padding: theme.spacing(4)
10 - }
11 -}));
12 -
13 -const Account = () => {
14 - const classes = useStyles();
15 -
16 - return (
17 - <div className={classes.root}>
18 - <Grid
19 - container
20 - spacing={4}
21 - >
22 - <Grid
23 - item
24 - lg={4}
25 - md={6}
26 - xl={4}
27 - xs={12}
28 - >
29 - <AccountProfile />
30 - </Grid>
31 - <Grid
32 - item
33 - lg={8}
34 - md={6}
35 - xl={8}
36 - xs={12}
37 - >
38 - <AccountDetails />
39 - </Grid>
40 - </Grid>
41 - </div>
42 - );
43 -};
44 -
45 -export default Account;
1 -import React, { useState } from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import { makeStyles } from '@material-ui/styles';
5 -import {
6 - Card,
7 - CardHeader,
8 - CardContent,
9 - CardActions,
10 - Divider,
11 - Grid,
12 - Button,
13 - TextField
14 -} from '@material-ui/core';
15 -
16 -const useStyles = makeStyles(() => ({
17 - root: {}
18 -}));
19 -
20 -const AccountDetails = props => {
21 - const { className, ...rest } = props;
22 -
23 - const classes = useStyles();
24 -
25 - const [values, setValues] = useState({
26 - firstName: 'Shen',
27 - lastName: 'Zhi',
28 - email: 'shen.zhi@devias.io',
29 - phone: '',
30 - state: 'Alabama',
31 - country: 'USA'
32 - });
33 -
34 - const handleChange = event => {
35 - setValues({
36 - ...values,
37 - [event.target.name]: event.target.value
38 - });
39 - };
40 -
41 - const states = [
42 - {
43 - value: 'alabama',
44 - label: 'Alabama'
45 - },
46 - {
47 - value: 'new-york',
48 - label: 'New York'
49 - },
50 - {
51 - value: 'san-francisco',
52 - label: 'San Francisco'
53 - }
54 - ];
55 -
56 - return (
57 - <Card
58 - {...rest}
59 - className={clsx(classes.root, className)}
60 - >
61 - <form
62 - autoComplete="off"
63 - noValidate
64 - >
65 - <CardHeader
66 - subheader="The information can be edited"
67 - title="Profile"
68 - />
69 - <Divider />
70 - <CardContent>
71 - <Grid
72 - container
73 - spacing={3}
74 - >
75 - <Grid
76 - item
77 - md={6}
78 - xs={12}
79 - >
80 - <TextField
81 - fullWidth
82 - helperText="Please specify the first name"
83 - label="First name"
84 - margin="dense"
85 - name="firstName"
86 - onChange={handleChange}
87 - required
88 - value={values.firstName}
89 - variant="outlined"
90 - />
91 - </Grid>
92 - <Grid
93 - item
94 - md={6}
95 - xs={12}
96 - >
97 - <TextField
98 - fullWidth
99 - label="Last name"
100 - margin="dense"
101 - name="lastName"
102 - onChange={handleChange}
103 - required
104 - value={values.lastName}
105 - variant="outlined"
106 - />
107 - </Grid>
108 - <Grid
109 - item
110 - md={6}
111 - xs={12}
112 - >
113 - <TextField
114 - fullWidth
115 - label="Email Address"
116 - margin="dense"
117 - name="email"
118 - onChange={handleChange}
119 - required
120 - value={values.email}
121 - variant="outlined"
122 - />
123 - </Grid>
124 - <Grid
125 - item
126 - md={6}
127 - xs={12}
128 - >
129 - <TextField
130 - fullWidth
131 - label="Phone Number"
132 - margin="dense"
133 - name="phone"
134 - onChange={handleChange}
135 - type="number"
136 - value={values.phone}
137 - variant="outlined"
138 - />
139 - </Grid>
140 - <Grid
141 - item
142 - md={6}
143 - xs={12}
144 - >
145 - <TextField
146 - fullWidth
147 - label="Select State"
148 - margin="dense"
149 - name="state"
150 - onChange={handleChange}
151 - required
152 - select
153 - // eslint-disable-next-line react/jsx-sort-props
154 - SelectProps={{ native: true }}
155 - value={values.state}
156 - variant="outlined"
157 - >
158 - {states.map(option => (
159 - <option
160 - key={option.value}
161 - value={option.value}
162 - >
163 - {option.label}
164 - </option>
165 - ))}
166 - </TextField>
167 - </Grid>
168 - <Grid
169 - item
170 - md={6}
171 - xs={12}
172 - >
173 - <TextField
174 - fullWidth
175 - label="Country"
176 - margin="dense"
177 - name="country"
178 - onChange={handleChange}
179 - required
180 - value={values.country}
181 - variant="outlined"
182 - />
183 - </Grid>
184 - </Grid>
185 - </CardContent>
186 - <Divider />
187 - <CardActions>
188 - <Button
189 - color="primary"
190 - variant="contained"
191 - >
192 - Save details
193 - </Button>
194 - </CardActions>
195 - </form>
196 - </Card>
197 - );
198 -};
199 -
200 -AccountDetails.propTypes = {
201 - className: PropTypes.string
202 -};
203 -
204 -export default AccountDetails;
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import clsx from 'clsx';
4 -import moment from 'moment';
5 -import { makeStyles } from '@material-ui/styles';
6 -import {
7 - Card,
8 - CardActions,
9 - CardContent,
10 - Avatar,
11 - Typography,
12 - Divider,
13 - Button,
14 - LinearProgress
15 -} from '@material-ui/core';
16 -
17 -const useStyles = makeStyles(theme => ({
18 - root: {},
19 - details: {
20 - display: 'flex'
21 - },
22 - avatar: {
23 - marginLeft: 'auto',
24 - height: 110,
25 - width: 100,
26 - flexShrink: 0,
27 - flexGrow: 0
28 - },
29 - progress: {
30 - marginTop: theme.spacing(2)
31 - },
32 - uploadButton: {
33 - marginRight: theme.spacing(2)
34 - }
35 -}));
36 -
37 -const AccountProfile = props => {
38 - const { className, ...rest } = props;
39 -
40 - const classes = useStyles();
41 -
42 - const user = {
43 - name: '엄준식',
44 - membership: 'Basic',
45 - avatar: '/images/avatars/avatar_1.png'
46 - };
47 -
48 - return (
49 - <Card
50 - {...rest}
51 - className={clsx(classes.root, className)}
52 - >
53 - <CardContent>
54 - <div className={classes.details}>
55 - <div>
56 - <Typography
57 - gutterBottom
58 - variant="h2"
59 - >
60 - {user.name}
61 - </Typography>
62 - <Typography
63 - color="textSecondary"
64 - variant="body1"
65 - >
66 - {user.membership + " Plan"}
67 - </Typography>
68 - </div>
69 - <Avatar
70 - className={classes.avatar}
71 - src={user.avatar}
72 - />
73 - </div>
74 - <div className={classes.progress}>
75 - <Typography variant="body1">저장용량: 70% (7GB/10GB)</Typography>
76 - <LinearProgress
77 - value={70}
78 - variant="determinate"
79 - />
80 - </div>
81 - </CardContent>
82 - <Divider />
83 - <CardActions>
84 - <Button
85 - className={classes.uploadButton}
86 - color="primary"
87 - variant="text"
88 - >
89 - Upload picture
90 - </Button>
91 - <Button variant="text">Remove picture</Button>
92 - </CardActions>
93 - </Card>
94 - );
95 -};
96 -
97 -AccountProfile.propTypes = {
98 - className: PropTypes.string
99 -};
100 -
101 -export default AccountProfile;
1 -export { default as AccountDetails } from './AccountDetails';
2 -export { default as AccountProfile } from './AccountProfile';
1 -export { default } from './Account';
1 -import React from 'react';
2 -import { makeStyles } from '@material-ui/styles';
3 -import { Grid } from '@material-ui/core';
4 -
5 -import {
6 - Budget,
7 - TotalUsers,
8 - TasksProgress,
9 - TotalProfit,
10 - LatestSales,
11 - UsersByDevice,
12 - LatestProducts,
13 - LatestOrders
14 -} from './components';
15 -
16 -const useStyles = makeStyles(theme => ({
17 - root: {
18 - padding: theme.spacing(4)
19 - }
20 -}));
21 -
22 -const Dashboard = () => {
23 - const classes = useStyles();
24 -
25 - return (
26 - <div className={classes.root}>
27 - <Grid
28 - container
29 - spacing={4}
30 - >
31 - <Grid
32 - item
33 - lg={3}
34 - sm={6}
35 - xl={3}
36 - xs={12}
37 - >
38 - <Budget />
39 - </Grid>
40 - <Grid
41 - item
42 - lg={3}
43 - sm={6}
44 - xl={3}
45 - xs={12}
46 - >
47 - <TotalUsers />
48 - </Grid>
49 - <Grid
50 - item
51 - lg={3}
52 - sm={6}
53 - xl={3}
54 - xs={12}
55 - >
56 - <TasksProgress />
57 - </Grid>
58 - <Grid
59 - item
60 - lg={3}
61 - sm={6}
62 - xl={3}
63 - xs={12}
64 - >
65 - <TotalProfit />
66 - </Grid>
67 - <Grid
68 - item
69 - lg={8}
70 - md={12}
71 - xl={9}
72 - xs={12}
73 - >
74 - <LatestSales />
75 - </Grid>
76 - <Grid
77 - item
78 - lg={4}
79 - md={6}
80 - xl={3}
81 - xs={12}
82 - >
83 - <UsersByDevice />
84 - </Grid>
85 - <Grid
86 - item
87 - lg={4}
88 - md={6}
89 - xl={3}
90 - xs={12}
91 - >
92 - <LatestProducts />
93 - </Grid>
94 - <Grid
95 - item
96 - lg={8}
97 - md={12}
98 - xl={9}
99 - xs={12}
100 - >
101 - <LatestOrders />
102 - </Grid>
103 - </Grid>
104 - </div>
105 - );
106 -};
107 -
108 -export default Dashboard;
1 -import React from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import { makeStyles } from '@material-ui/styles';
5 -import { Card, CardContent, Grid, Typography, Avatar } from '@material-ui/core';
6 -import ArrowDownwardIcon from '@material-ui/icons/ArrowDownward';
7 -import MoneyIcon from '@material-ui/icons/Money';
8 -
9 -const useStyles = makeStyles(theme => ({
10 - root: {
11 - height: '100%'
12 - },
13 - content: {
14 - alignItems: 'center',
15 - display: 'flex'
16 - },
17 - title: {
18 - fontWeight: 700
19 - },
20 - avatar: {
21 - backgroundColor: theme.palette.error.main,
22 - height: 56,
23 - width: 56
24 - },
25 - icon: {
26 - height: 32,
27 - width: 32
28 - },
29 - difference: {
30 - marginTop: theme.spacing(2),
31 - display: 'flex',
32 - alignItems: 'center'
33 - },
34 - differenceIcon: {
35 - color: theme.palette.error.dark
36 - },
37 - differenceValue: {
38 - color: theme.palette.error.dark,
39 - marginRight: theme.spacing(1)
40 - }
41 -}));
42 -
43 -const Budget = props => {
44 - const { className, ...rest } = props;
45 -
46 - const classes = useStyles();
47 -
48 - return (
49 - <Card
50 - {...rest}
51 - className={clsx(classes.root, className)}
52 - >
53 - <CardContent>
54 - <Grid
55 - container
56 - justify="space-between"
57 - >
58 - <Grid item>
59 - <Typography
60 - className={classes.title}
61 - color="textSecondary"
62 - gutterBottom
63 - variant="body2"
64 - >
65 - BUDGET
66 - </Typography>
67 - <Typography variant="h3">$24,000</Typography>
68 - </Grid>
69 - <Grid item>
70 - <Avatar className={classes.avatar}>
71 - <MoneyIcon className={classes.icon} />
72 - </Avatar>
73 - </Grid>
74 - </Grid>
75 - <div className={classes.difference}>
76 - <ArrowDownwardIcon className={classes.differenceIcon} />
77 - <Typography
78 - className={classes.differenceValue}
79 - variant="body2"
80 - >
81 - 12%
82 - </Typography>
83 - <Typography
84 - className={classes.caption}
85 - variant="caption"
86 - >
87 - Since last month
88 - </Typography>
89 - </div>
90 - </CardContent>
91 - </Card>
92 - );
93 -};
94 -
95 -Budget.propTypes = {
96 - className: PropTypes.string
97 -};
98 -
99 -export default Budget;
1 -import React, { useState } from 'react';
2 -import clsx from 'clsx';
3 -import moment from 'moment';
4 -import PerfectScrollbar from 'react-perfect-scrollbar';
5 -import PropTypes from 'prop-types';
6 -import { makeStyles } from '@material-ui/styles';
7 -import {
8 - Card,
9 - CardActions,
10 - CardHeader,
11 - CardContent,
12 - Button,
13 - Divider,
14 - Table,
15 - TableBody,
16 - TableCell,
17 - TableHead,
18 - TableRow,
19 - Tooltip,
20 - TableSortLabel
21 -} from '@material-ui/core';
22 -import ArrowRightIcon from '@material-ui/icons/ArrowRight';
23 -
24 -import mockData from './data';
25 -import { StatusBullet } from 'components';
26 -
27 -const useStyles = makeStyles(theme => ({
28 - root: {},
29 - content: {
30 - padding: 0
31 - },
32 - inner: {
33 - minWidth: 800
34 - },
35 - statusContainer: {
36 - display: 'flex',
37 - alignItems: 'center'
38 - },
39 - status: {
40 - marginRight: theme.spacing(1)
41 - },
42 - actions: {
43 - justifyContent: 'flex-end'
44 - }
45 -}));
46 -
47 -const statusColors = {
48 - delivered: 'success',
49 - pending: 'info',
50 - refunded: 'danger'
51 -};
52 -
53 -const LatestOrders = props => {
54 - const { className, ...rest } = props;
55 -
56 - const classes = useStyles();
57 -
58 - const [orders] = useState(mockData);
59 -
60 - return (
61 - <Card
62 - {...rest}
63 - className={clsx(classes.root, className)}
64 - >
65 - <CardHeader
66 - action={
67 - <Button
68 - color="primary"
69 - size="small"
70 - variant="outlined"
71 - >
72 - New entry
73 - </Button>
74 - }
75 - title="Latest Orders"
76 - />
77 - <Divider />
78 - <CardContent className={classes.content}>
79 - <PerfectScrollbar>
80 - <div className={classes.inner}>
81 - <Table>
82 - <TableHead>
83 - <TableRow>
84 - <TableCell>Order Ref</TableCell>
85 - <TableCell>Customer</TableCell>
86 - <TableCell sortDirection="desc">
87 - <Tooltip
88 - enterDelay={300}
89 - title="Sort"
90 - >
91 - <TableSortLabel
92 - active
93 - direction="desc"
94 - >
95 - Date
96 - </TableSortLabel>
97 - </Tooltip>
98 - </TableCell>
99 - <TableCell>Status</TableCell>
100 - </TableRow>
101 - </TableHead>
102 - <TableBody>
103 - {orders.map(order => (
104 - <TableRow
105 - hover
106 - key={order.id}
107 - >
108 - <TableCell>{order.ref}</TableCell>
109 - <TableCell>{order.customer.name}</TableCell>
110 - <TableCell>
111 - {moment(order.createdAt).format('DD/MM/YYYY')}
112 - </TableCell>
113 - <TableCell>
114 - <div className={classes.statusContainer}>
115 - <StatusBullet
116 - className={classes.status}
117 - color={statusColors[order.status]}
118 - size="sm"
119 - />
120 - {order.status}
121 - </div>
122 - </TableCell>
123 - </TableRow>
124 - ))}
125 - </TableBody>
126 - </Table>
127 - </div>
128 - </PerfectScrollbar>
129 - </CardContent>
130 - <Divider />
131 - <CardActions className={classes.actions}>
132 - <Button
133 - color="primary"
134 - size="small"
135 - variant="text"
136 - >
137 - View all <ArrowRightIcon />
138 - </Button>
139 - </CardActions>
140 - </Card>
141 - );
142 -};
143 -
144 -LatestOrders.propTypes = {
145 - className: PropTypes.string
146 -};
147 -
148 -export default LatestOrders;
1 -import uuid from 'uuid/v1';
2 -
3 -export default [
4 - {
5 - id: uuid(),
6 - ref: 'CDD1049',
7 - amount: 30.5,
8 - customer: {
9 - name: 'Ekaterina Tankova'
10 - },
11 - createdAt: 1555016400000,
12 - status: 'pending'
13 - },
14 - {
15 - id: uuid(),
16 - ref: 'CDD1048',
17 - amount: 25.1,
18 - customer: {
19 - name: 'Cao Yu'
20 - },
21 - createdAt: 1555016400000,
22 - status: 'delivered'
23 - },
24 - {
25 - id: uuid(),
26 - ref: 'CDD1047',
27 - amount: 10.99,
28 - customer: {
29 - name: 'Alexa Richardson'
30 - },
31 - createdAt: 1554930000000,
32 - status: 'refunded'
33 - },
34 - {
35 - id: uuid(),
36 - ref: 'CDD1046',
37 - amount: 96.43,
38 - customer: {
39 - name: 'Anje Keizer'
40 - },
41 - createdAt: 1554757200000,
42 - status: 'pending'
43 - },
44 - {
45 - id: uuid(),
46 - ref: 'CDD1045',
47 - amount: 32.54,
48 - customer: {
49 - name: 'Clarke Gillebert'
50 - },
51 - createdAt: 1554670800000,
52 - status: 'delivered'
53 - },
54 - {
55 - id: uuid(),
56 - ref: 'CDD1044',
57 - amount: 16.76,
58 - customer: {
59 - name: 'Adam Denisov'
60 - },
61 - createdAt: 1554670800000,
62 - status: 'delivered'
63 - }
64 -];
1 -import React, { useState } from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import { makeStyles } from '@material-ui/styles';
5 -import {
6 - Card,
7 - CardHeader,
8 - CardContent,
9 - CardActions,
10 - Button,
11 - Divider,
12 - List,
13 - ListItem,
14 - ListItemAvatar,
15 - ListItemText,
16 - IconButton
17 -} from '@material-ui/core';
18 -import ArrowRightIcon from '@material-ui/icons/ArrowRight';
19 -import MoreVertIcon from '@material-ui/icons/MoreVert';
20 -
21 -import mockData from './data';
22 -
23 -const useStyles = makeStyles(() => ({
24 - root: {
25 - height: '100%'
26 - },
27 - content: {
28 - padding: 0
29 - },
30 - image: {
31 - height: 48,
32 - width: 48
33 - },
34 - actions: {
35 - justifyContent: 'flex-end'
36 - }
37 -}));
38 -
39 -const LatestProducts = props => {
40 - const { className, ...rest } = props;
41 -
42 - const classes = useStyles();
43 -
44 - const [products] = useState(mockData);
45 -
46 - return (
47 - <Card
48 - {...rest}
49 - className={clsx(classes.root, className)}
50 - >
51 - <CardHeader
52 - subtitle={`${products.length} in total`}
53 - title="Latest products"
54 - />
55 - <Divider />
56 - <CardContent className={classes.content}>
57 - <List>
58 - {products.map((product, i) => (
59 - <ListItem
60 - divider={i < products.length - 1}
61 - key={product.id}
62 - >
63 - <ListItemAvatar>
64 - <img
65 - alt="Product"
66 - className={classes.image}
67 - src={product.imageUrl}
68 - />
69 - </ListItemAvatar>
70 - <ListItemText
71 - primary={product.name}
72 - secondary={`Updated ${product.updatedAt.fromNow()}`}
73 - />
74 - <IconButton
75 - edge="end"
76 - size="small"
77 - >
78 - <MoreVertIcon />
79 - </IconButton>
80 - </ListItem>
81 - ))}
82 - </List>
83 - </CardContent>
84 - <Divider />
85 - <CardActions className={classes.actions}>
86 - <Button
87 - color="primary"
88 - size="small"
89 - variant="text"
90 - >
91 - View all <ArrowRightIcon />
92 - </Button>
93 - </CardActions>
94 - </Card>
95 - );
96 -};
97 -
98 -LatestProducts.propTypes = {
99 - className: PropTypes.string
100 -};
101 -
102 -export default LatestProducts;
1 -import uuid from 'uuid/v1';
2 -import moment from 'moment';
3 -
4 -export default [
5 - {
6 - id: uuid(),
7 - name: 'Dropbox',
8 - imageUrl: '/images/products/product_1.png',
9 - updatedAt: moment().subtract(2, 'hours')
10 - },
11 - {
12 - id: uuid(),
13 - name: 'Medium Corporation',
14 - imageUrl: '/images/products/product_2.png',
15 - updatedAt: moment().subtract(2, 'hours')
16 - },
17 - {
18 - id: uuid(),
19 - name: 'Slack',
20 - imageUrl: '/images/products/product_3.png',
21 - updatedAt: moment().subtract(3, 'hours')
22 - },
23 - {
24 - id: uuid(),
25 - name: 'Lyft',
26 - imageUrl: '/images/products/product_4.png',
27 - updatedAt: moment().subtract(5, 'hours')
28 - },
29 - {
30 - id: uuid(),
31 - name: 'GitHub',
32 - imageUrl: '/images/products/product_5.png',
33 - updatedAt: moment().subtract(9, 'hours')
34 - }
35 -];
1 -import React from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import { Bar } from 'react-chartjs-2';
5 -import { makeStyles } from '@material-ui/styles';
6 -import {
7 - Card,
8 - CardHeader,
9 - CardContent,
10 - CardActions,
11 - Divider,
12 - Button
13 -} from '@material-ui/core';
14 -import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
15 -import ArrowRightIcon from '@material-ui/icons/ArrowRight';
16 -
17 -import { data, options } from './chart';
18 -
19 -const useStyles = makeStyles(() => ({
20 - root: {},
21 - chartContainer: {
22 - height: 400,
23 - position: 'relative'
24 - },
25 - actions: {
26 - justifyContent: 'flex-end'
27 - }
28 -}));
29 -
30 -const LatestSales = props => {
31 - const { className, ...rest } = props;
32 -
33 - const classes = useStyles();
34 -
35 - return (
36 - <Card
37 - {...rest}
38 - className={clsx(classes.root, className)}
39 - >
40 - <CardHeader
41 - action={
42 - <Button
43 - size="small"
44 - variant="text"
45 - >
46 - Last 7 days <ArrowDropDownIcon />
47 - </Button>
48 - }
49 - title="Latest Sales"
50 - />
51 - <Divider />
52 - <CardContent>
53 - <div className={classes.chartContainer}>
54 - <Bar
55 - data={data}
56 - options={options}
57 - />
58 - </div>
59 - </CardContent>
60 - <Divider />
61 - <CardActions className={classes.actions}>
62 - <Button
63 - color="primary"
64 - size="small"
65 - variant="text"
66 - >
67 - Overview <ArrowRightIcon />
68 - </Button>
69 - </CardActions>
70 - </Card>
71 - );
72 -};
73 -
74 -LatestSales.propTypes = {
75 - className: PropTypes.string
76 -};
77 -
78 -export default LatestSales;
1 -import palette from 'theme/palette';
2 -
3 -export const data = {
4 - labels: ['1 Aug', '2 Aug', '3 Aug', '4 Aug', '5 Aug', '6 Aug'],
5 - datasets: [
6 - {
7 - label: 'This year',
8 - backgroundColor: palette.primary.main,
9 - data: [18, 5, 19, 27, 29, 19, 20]
10 - },
11 - {
12 - label: 'Last year',
13 - backgroundColor: palette.neutral,
14 - data: [11, 20, 12, 29, 30, 25, 13]
15 - }
16 - ]
17 -};
18 -
19 -export const options = {
20 - responsive: true,
21 - maintainAspectRatio: false,
22 - animation: false,
23 - legend: { display: false },
24 - cornerRadius: 20,
25 - tooltips: {
26 - enabled: true,
27 - mode: 'index',
28 - intersect: false,
29 - borderWidth: 1,
30 - borderColor: palette.divider,
31 - backgroundColor: palette.white,
32 - titleFontColor: palette.text.primary,
33 - bodyFontColor: palette.text.secondary,
34 - footerFontColor: palette.text.secondary
35 - },
36 - layout: { padding: 0 },
37 - scales: {
38 - xAxes: [
39 - {
40 - barThickness: 12,
41 - maxBarThickness: 10,
42 - barPercentage: 0.5,
43 - categoryPercentage: 0.5,
44 - ticks: {
45 - fontColor: palette.text.secondary
46 - },
47 - gridLines: {
48 - display: false,
49 - drawBorder: false
50 - }
51 - }
52 - ],
53 - yAxes: [
54 - {
55 - ticks: {
56 - fontColor: palette.text.secondary,
57 - beginAtZero: true,
58 - min: 0
59 - },
60 - gridLines: {
61 - borderDash: [2],
62 - borderDashOffset: [2],
63 - color: palette.divider,
64 - drawBorder: false,
65 - zeroLineBorderDash: [2],
66 - zeroLineBorderDashOffset: [2],
67 - zeroLineColor: palette.divider
68 - }
69 - }
70 - ]
71 - }
72 -};
1 -import React from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import { makeStyles } from '@material-ui/styles';
5 -import {
6 - Card,
7 - CardContent,
8 - Grid,
9 - Typography,
10 - Avatar,
11 - LinearProgress
12 -} from '@material-ui/core';
13 -import InsertChartIcon from '@material-ui/icons/InsertChartOutlined';
14 -
15 -const useStyles = makeStyles(theme => ({
16 - root: {
17 - height: '100%'
18 - },
19 - content: {
20 - alignItems: 'center',
21 - display: 'flex'
22 - },
23 - title: {
24 - fontWeight: 700
25 - },
26 - avatar: {
27 - backgroundColor: theme.palette.primary.main,
28 - color: theme.palette.primary.contrastText,
29 - height: 56,
30 - width: 56
31 - },
32 - icon: {
33 - height: 32,
34 - width: 32
35 - },
36 - progress: {
37 - marginTop: theme.spacing(3)
38 - }
39 -}));
40 -
41 -const TasksProgress = props => {
42 - const { className, ...rest } = props;
43 -
44 - const classes = useStyles();
45 -
46 - return (
47 - <Card
48 - {...rest}
49 - className={clsx(classes.root, className)}
50 - >
51 - <CardContent>
52 - <Grid
53 - container
54 - justify="space-between"
55 - >
56 - <Grid item>
57 - <Typography
58 - className={classes.title}
59 - color="textSecondary"
60 - gutterBottom
61 - variant="body2"
62 - >
63 - TASKS PROGRESS
64 - </Typography>
65 - <Typography variant="h3">75.5%</Typography>
66 - </Grid>
67 - <Grid item>
68 - <Avatar className={classes.avatar}>
69 - <InsertChartIcon className={classes.icon} />
70 - </Avatar>
71 - </Grid>
72 - </Grid>
73 - <LinearProgress
74 - className={classes.progress}
75 - value={75.5}
76 - variant="determinate"
77 - />
78 - </CardContent>
79 - </Card>
80 - );
81 -};
82 -
83 -TasksProgress.propTypes = {
84 - className: PropTypes.string
85 -};
86 -
87 -export default TasksProgress;
1 -import React from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import { makeStyles } from '@material-ui/styles';
5 -import { Card, CardContent, Grid, Typography, Avatar } from '@material-ui/core';
6 -import AttachMoneyIcon from '@material-ui/icons/AttachMoney';
7 -
8 -const useStyles = makeStyles(theme => ({
9 - root: {
10 - height: '100%',
11 - backgroundColor: theme.palette.primary.main,
12 - color: theme.palette.primary.contrastText
13 - },
14 - content: {
15 - alignItems: 'center',
16 - display: 'flex'
17 - },
18 - title: {
19 - fontWeight: 700
20 - },
21 - avatar: {
22 - backgroundColor: theme.palette.white,
23 - color: theme.palette.primary.main,
24 - height: 56,
25 - width: 56
26 - },
27 - icon: {
28 - height: 32,
29 - width: 32
30 - }
31 -}));
32 -
33 -const TotalProfit = props => {
34 - const { className, ...rest } = props;
35 -
36 - const classes = useStyles();
37 -
38 - return (
39 - <Card
40 - {...rest}
41 - className={clsx(classes.root, className)}
42 - >
43 - <CardContent>
44 - <Grid
45 - container
46 - justify="space-between"
47 - >
48 - <Grid item>
49 - <Typography
50 - className={classes.title}
51 - color="inherit"
52 - gutterBottom
53 - variant="body2"
54 - >
55 - TOTAL PROFIT
56 - </Typography>
57 - <Typography
58 - color="inherit"
59 - variant="h3"
60 - >
61 - $23,200
62 - </Typography>
63 - </Grid>
64 - <Grid item>
65 - <Avatar className={classes.avatar}>
66 - <AttachMoneyIcon className={classes.icon} />
67 - </Avatar>
68 - </Grid>
69 - </Grid>
70 - </CardContent>
71 - </Card>
72 - );
73 -};
74 -
75 -TotalProfit.propTypes = {
76 - className: PropTypes.string
77 -};
78 -
79 -export default TotalProfit;
1 -import React from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import { makeStyles } from '@material-ui/styles';
5 -import { Card, CardContent, Grid, Typography, Avatar } from '@material-ui/core';
6 -import ArrowUpwardIcon from '@material-ui/icons/ArrowUpward';
7 -import PeopleIcon from '@material-ui/icons/PeopleOutlined';
8 -
9 -const useStyles = makeStyles(theme => ({
10 - root: {
11 - height: '100%'
12 - },
13 - content: {
14 - alignItems: 'center',
15 - display: 'flex'
16 - },
17 - title: {
18 - fontWeight: 700
19 - },
20 - avatar: {
21 - backgroundColor: theme.palette.success.main,
22 - height: 56,
23 - width: 56
24 - },
25 - icon: {
26 - height: 32,
27 - width: 32
28 - },
29 - difference: {
30 - marginTop: theme.spacing(2),
31 - display: 'flex',
32 - alignItems: 'center'
33 - },
34 - differenceIcon: {
35 - color: theme.palette.success.dark
36 - },
37 - differenceValue: {
38 - color: theme.palette.success.dark,
39 - marginRight: theme.spacing(1)
40 - }
41 -}));
42 -
43 -const TotalUsers = props => {
44 - const { className, ...rest } = props;
45 -
46 - const classes = useStyles();
47 -
48 - return (
49 - <Card
50 - {...rest}
51 - className={clsx(classes.root, className)}
52 - >
53 - <CardContent>
54 - <Grid
55 - container
56 - justify="space-between"
57 - >
58 - <Grid item>
59 - <Typography
60 - className={classes.title}
61 - color="textSecondary"
62 - gutterBottom
63 - variant="body2"
64 - >
65 - TOTAL USERS
66 - </Typography>
67 - <Typography variant="h3">1,600</Typography>
68 - </Grid>
69 - <Grid item>
70 - <Avatar className={classes.avatar}>
71 - <PeopleIcon className={classes.icon} />
72 - </Avatar>
73 - </Grid>
74 - </Grid>
75 - <div className={classes.difference}>
76 - <ArrowUpwardIcon className={classes.differenceIcon} />
77 - <Typography
78 - className={classes.differenceValue}
79 - variant="body2"
80 - >
81 - 16%
82 - </Typography>
83 - <Typography
84 - className={classes.caption}
85 - variant="caption"
86 - >
87 - Since last month
88 - </Typography>
89 - </div>
90 - </CardContent>
91 - </Card>
92 - );
93 -};
94 -
95 -TotalUsers.propTypes = {
96 - className: PropTypes.string
97 -};
98 -
99 -export default TotalUsers;
1 -import React from 'react';
2 -import { Doughnut } from 'react-chartjs-2';
3 -import clsx from 'clsx';
4 -import PropTypes from 'prop-types';
5 -import { makeStyles, useTheme } from '@material-ui/styles';
6 -import {
7 - Card,
8 - CardHeader,
9 - CardContent,
10 - IconButton,
11 - Divider,
12 - Typography
13 -} from '@material-ui/core';
14 -import LaptopMacIcon from '@material-ui/icons/LaptopMac';
15 -import PhoneIphoneIcon from '@material-ui/icons/PhoneIphone';
16 -import RefreshIcon from '@material-ui/icons/Refresh';
17 -import TabletMacIcon from '@material-ui/icons/TabletMac';
18 -
19 -const useStyles = makeStyles(theme => ({
20 - root: {
21 - height: '100%'
22 - },
23 - chartContainer: {
24 - position: 'relative',
25 - height: '300px'
26 - },
27 - stats: {
28 - marginTop: theme.spacing(2),
29 - display: 'flex',
30 - justifyContent: 'center'
31 - },
32 - device: {
33 - textAlign: 'center',
34 - padding: theme.spacing(1)
35 - },
36 - deviceIcon: {
37 - color: theme.palette.icon
38 - }
39 -}));
40 -
41 -const UsersByDevice = props => {
42 - const { className, ...rest } = props;
43 -
44 - const classes = useStyles();
45 - const theme = useTheme();
46 -
47 - const data = {
48 - datasets: [
49 - {
50 - data: [63, 15, 22],
51 - backgroundColor: [
52 - theme.palette.primary.main,
53 - theme.palette.error.main,
54 - theme.palette.warning.main
55 - ],
56 - borderWidth: 8,
57 - borderColor: theme.palette.white,
58 - hoverBorderColor: theme.palette.white
59 - }
60 - ],
61 - labels: ['Desktop', 'Tablet', 'Mobile']
62 - };
63 -
64 - const options = {
65 - legend: {
66 - display: false
67 - },
68 - responsive: true,
69 - maintainAspectRatio: false,
70 - animation: false,
71 - cutoutPercentage: 80,
72 - layout: { padding: 0 },
73 - tooltips: {
74 - enabled: true,
75 - mode: 'index',
76 - intersect: false,
77 - borderWidth: 1,
78 - borderColor: theme.palette.divider,
79 - backgroundColor: theme.palette.white,
80 - titleFontColor: theme.palette.text.primary,
81 - bodyFontColor: theme.palette.text.secondary,
82 - footerFontColor: theme.palette.text.secondary
83 - }
84 - };
85 -
86 - const devices = [
87 - {
88 - title: 'Desktop',
89 - value: '63',
90 - icon: <LaptopMacIcon />,
91 - color: theme.palette.primary.main
92 - },
93 - {
94 - title: 'Tablet',
95 - value: '15',
96 - icon: <TabletMacIcon />,
97 - color: theme.palette.error.main
98 - },
99 - {
100 - title: 'Mobile',
101 - value: '23',
102 - icon: <PhoneIphoneIcon />,
103 - color: theme.palette.warning.main
104 - }
105 - ];
106 -
107 - return (
108 - <Card
109 - {...rest}
110 - className={clsx(classes.root, className)}
111 - >
112 - <CardHeader
113 - action={
114 - <IconButton size="small">
115 - <RefreshIcon />
116 - </IconButton>
117 - }
118 - title="Users By Device"
119 - />
120 - <Divider />
121 - <CardContent>
122 - <div className={classes.chartContainer}>
123 - <Doughnut
124 - data={data}
125 - options={options}
126 - />
127 - </div>
128 - <div className={classes.stats}>
129 - {devices.map(device => (
130 - <div
131 - className={classes.device}
132 - key={device.title}
133 - >
134 - <span className={classes.deviceIcon}>{device.icon}</span>
135 - <Typography variant="body1">{device.title}</Typography>
136 - <Typography
137 - style={{ color: device.color }}
138 - variant="h2"
139 - >
140 - {device.value}%
141 - </Typography>
142 - </div>
143 - ))}
144 - </div>
145 - </CardContent>
146 - </Card>
147 - );
148 -};
149 -
150 -UsersByDevice.propTypes = {
151 - className: PropTypes.string
152 -};
153 -
154 -export default UsersByDevice;
1 -export { default as Budget } from './Budget';
2 -export { default as LatestOrders } from './LatestOrders';
3 -export { default as LatestProducts } from './LatestProducts';
4 -export { default as LatestSales } from './LatestSales';
5 -export { default as TasksProgress } from './TasksProgress';
6 -export { default as TotalProfit } from './TotalProfit';
7 -export { default as TotalUsers } from './TotalUsers';
8 -export { default as UsersByDevice } from './UsersByDevice';
1 -export { default } from './Dashboard';
1 -import React from 'react';
2 -import { makeStyles } from '@material-ui/styles';
3 -
4 -const useStyles = makeStyles(theme => ({
5 - root: {
6 - padding: theme.spacing(4)
7 - },
8 - iframe: {
9 - width: '100%',
10 - minHeight: 640,
11 - border: 0
12 - }
13 -}));
14 -
15 -const Icons = () => {
16 - const classes = useStyles();
17 -
18 - return (
19 - <div className={classes.root}>
20 - <iframe
21 - className={classes.iframe}
22 - src="https://material.io/tools/icons/?icon=accessibility&style=outline"
23 - title="Material Design icons"
24 - />
25 - </div>
26 - );
27 -};
28 -
29 -export default Icons;
1 -export { default } from './Icons';
1 -import React, { useState } from 'react';
2 -import { makeStyles } from '@material-ui/styles';
3 -
4 -import { DriveToolbar, FileTable } from './components';
5 -import mockData from './data';
6 -
7 -const useStyles = makeStyles(theme => ({
8 - root: {
9 - padding: theme.spacing(3)
10 - },
11 - content: {
12 - marginTop: theme.spacing(2)
13 - }
14 -}));
15 -
16 -const MyDrive = () => {
17 - const classes = useStyles();
18 -
19 - const [files] = useState(mockData);
20 -
21 - return (
22 - <div className={classes.root}>
23 - <DriveToolbar />
24 - <div className={classes.content}>
25 - <FileTable files={files} />
26 - </div>
27 - </div>
28 - );
29 -};
30 -
31 -export default MyDrive;
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import clsx from 'clsx';
4 -import { makeStyles } from '@material-ui/styles';
5 -import { Button } from '@material-ui/core';
6 -
7 -import { SearchInput } from 'components';
8 -
9 -const useStyles = makeStyles(theme => ({
10 - root: {},
11 - row: {
12 - height: '42px',
13 - display: 'flex',
14 - alignItems: 'center',
15 - marginTop: theme.spacing(1)
16 - },
17 - spacer: {
18 - flexGrow: 1
19 - },
20 - Button: {
21 - marginRight: theme.spacing(1)
22 - },
23 - importButton: {
24 - marginRight: theme.spacing(1)
25 - },
26 - exportButton: {
27 - marginRight: theme.spacing(1)
28 - },
29 - searchInput: {
30 - marginRight: theme.spacing(1)
31 - }
32 -}));
33 -
34 -const DriveToolbar = props => {
35 - const { className, ...rest } = props;
36 -
37 - const classes = useStyles();
38 -
39 - return (
40 - <div
41 - {...rest}
42 - className={clsx(classes.root, className)}
43 - >
44 - <div className={classes.row}>
45 - <span className={classes.spacer} />
46 - <Button className={classes.Button}> 폴더</Button>
47 - <Button className={classes.Button}>폴더 업로드</Button>
48 - <Button
49 - color="primary"
50 - variant="contained"
51 - >
52 - 파일 업로드
53 - </Button>
54 - </div>
55 - <div className={classes.row}>
56 - {/* 파일 클릭했을 때 표시 */}
57 - <span className={classes.spacer} />
58 - <Button className={classes.Button}>공유</Button>
59 - <Button className={classes.Button}>미리보기</Button>
60 - <Button className={classes.Button}>삭제</Button>
61 - <Button className={classes.Button}>이름 바꾸기</Button>
62 - <Button className={classes.Button}>이동</Button>
63 - <Button className={classes.Button}>다운로드</Button>
64 - </div>
65 - <div className={classes.row}>
66 - <SearchInput
67 - className={classes.searchInput}
68 - placeholder="파일, 폴더 검색"
69 - />
70 - </div>
71 - </div>
72 - );
73 -};
74 -
75 -DriveToolbar.propTypes = {
76 - className: PropTypes.string
77 -};
78 -
79 -export default DriveToolbar;
1 -import React, { useState } from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import moment from 'moment';
5 -import PerfectScrollbar from 'react-perfect-scrollbar';
6 -import { makeStyles } from '@material-ui/styles';
7 -import {
8 - Card,
9 - CardActions,
10 - CardContent,
11 - Avatar,
12 - Checkbox,
13 - Table,
14 - TableBody,
15 - TableCell,
16 - TableHead,
17 - TableRow,
18 - Typography,
19 - TablePagination
20 -} from '@material-ui/core';
21 -
22 -import { getInitials } from 'helpers';
23 -
24 -const useStyles = makeStyles(theme => ({
25 - root: {},
26 - content: {
27 - padding: 0
28 - },
29 - inner: {
30 - minWidth: 1050
31 - },
32 - nameContainer: {
33 - display: 'flex',
34 - alignItems: 'center'
35 - },
36 - avatar: {
37 - marginRight: theme.spacing(2)
38 - },
39 - actions: {
40 - justifyContent: 'flex-end'
41 - }
42 -}));
43 -
44 -const FileTable = props => {
45 - const { className, files: files, ...rest } = props;
46 -
47 - const classes = useStyles();
48 -
49 - const [selectedUsers, setSelectedUsers] = useState([]);
50 - const [rowsPerPage, setRowsPerPage] = useState(10);
51 - const [page, setPage] = useState(0);
52 -
53 - const handleSelectAll = event => {
54 - const { files } = props;
55 -
56 - let selectedUsers;
57 -
58 - if (event.target.checked) {
59 - selectedUsers = files.map(user => user.id);
60 - } else {
61 - selectedUsers = [];
62 - }
63 -
64 - setSelectedUsers(selectedUsers);
65 - };
66 -
67 - const handleSelectOne = (event, id) => {
68 - const selectedIndex = selectedUsers.indexOf(id);
69 - let newSelectedUsers = [];
70 -
71 - if (selectedIndex === -1) {
72 - newSelectedUsers = newSelectedUsers.concat(selectedUsers, id);
73 - } else if (selectedIndex === 0) {
74 - newSelectedUsers = newSelectedUsers.concat(selectedUsers.slice(1));
75 - } else if (selectedIndex === selectedUsers.length - 1) {
76 - newSelectedUsers = newSelectedUsers.concat(selectedUsers.slice(0, -1));
77 - } else if (selectedIndex > 0) {
78 - newSelectedUsers = newSelectedUsers.concat(
79 - selectedUsers.slice(0, selectedIndex),
80 - selectedUsers.slice(selectedIndex + 1)
81 - );
82 - }
83 -
84 - setSelectedUsers(newSelectedUsers);
85 - };
86 -
87 - const handlePageChange = (event, page) => {
88 - setPage(page);
89 - };
90 -
91 - const handleRowsPerPageChange = event => {
92 - setRowsPerPage(event.target.value);
93 - };
94 -
95 - return (
96 - <Card
97 - {...rest}
98 - className={clsx(classes.root, className)}
99 - >
100 - <CardContent className={classes.content}>
101 - <PerfectScrollbar>
102 - <div className={classes.inner}>
103 - <Table>
104 - <TableHead>
105 - <TableRow>
106 - <TableCell padding="checkbox">
107 - <Checkbox
108 - checked={selectedUsers.length === files.length}
109 - color="primary"
110 - indeterminate={
111 - selectedUsers.length > 0 &&
112 - selectedUsers.length < files.length
113 - }
114 - onChange={handleSelectAll}
115 - />
116 - </TableCell>
117 - <TableCell>이름</TableCell>
118 - <TableCell>마지막으로 수정한 날짜</TableCell>
119 - <TableCell>크기</TableCell>
120 - <TableCell>공유</TableCell>
121 - </TableRow>
122 - </TableHead>
123 - <TableBody>
124 - {files.slice(0, rowsPerPage).map(file => (
125 - <TableRow
126 - className={classes.tableRow}
127 - hover
128 - key={file.id}
129 - selected={selectedUsers.indexOf(file.id) !== -1}
130 - >
131 - <TableCell padding="checkbox">
132 - <Checkbox
133 - checked={selectedUsers.indexOf(file.id) !== -1}
134 - color="primary"
135 - onChange={event => handleSelectOne(event, file.id)}
136 - value="true"
137 - />
138 - </TableCell>
139 - <TableCell>
140 - <div className={classes.nameContainer}>
141 - {/* 파일 아이콘 */}
142 - <Typography variant="body1">{file.name}</Typography>
143 - </div>
144 - </TableCell>
145 - <TableCell>
146 - {moment(file.modifiedAt).format('DD/MM/YYYY')}
147 - </TableCell>
148 - <TableCell>{file.size}</TableCell>
149 - <TableCell>
150 - {file.share}
151 - </TableCell>
152 -
153 - </TableRow>
154 - ))}
155 - </TableBody>
156 - </Table>
157 - </div>
158 - </PerfectScrollbar>
159 - </CardContent>
160 - <CardActions className={classes.actions}>
161 - <TablePagination
162 - component="div"
163 - count={files.length}
164 - onChangePage={handlePageChange}
165 - onChangeRowsPerPage={handleRowsPerPageChange}
166 - page={page}
167 - rowsPerPage={rowsPerPage}
168 - rowsPerPageOptions={[5, 10, 25]}
169 - />
170 - </CardActions>
171 - </Card>
172 - );
173 -};
174 -
175 -FileTable.propTypes = {
176 - className: PropTypes.string,
177 - files: PropTypes.array.isRequired
178 -};
179 -
180 -export default FileTable;
1 -export { default as FileTable } from './FileTable';
2 -export { default as DriveToolbar } from './DriveToolbar';
1 -import uuid from 'uuid/v1';
2 -import data from 'mock_file_data.json'
3 -
4 -export default data;
...\ No newline at end of file ...\ No newline at end of file
1 -export { default } from './MyDrive';
1 -import React from 'react';
2 -import { makeStyles } from '@material-ui/styles';
3 -import { Grid, Typography } from '@material-ui/core';
4 -
5 -const useStyles = makeStyles(theme => ({
6 - root: {
7 - padding: theme.spacing(4)
8 - },
9 - content: {
10 - paddingTop: 150,
11 - textAlign: 'center'
12 - },
13 - image: {
14 - marginTop: 50,
15 - display: 'inline-block',
16 - maxWidth: '100%',
17 - width: 560
18 - }
19 -}));
20 -
21 -const NotFound = () => {
22 - const classes = useStyles();
23 -
24 - return (
25 - <div className={classes.root}>
26 - <Grid
27 - container
28 - justify="center"
29 - spacing={4}
30 - >
31 - <Grid
32 - item
33 - lg={6}
34 - xs={12}
35 - >
36 - <div className={classes.content}>
37 - <Typography variant="h1">
38 - 404: The page you are looking for isnt here
39 - </Typography>
40 - <Typography variant="subtitle2">
41 - You either tried some shady route or you came here by mistake.
42 - Whichever it is, try using the navigation
43 - </Typography>
44 - <img
45 - alt="Under development"
46 - className={classes.image}
47 - src="/images/undraw_page_not_found_su7k.svg"
48 - />
49 - </div>
50 - </Grid>
51 - </Grid>
52 - </div>
53 - );
54 -};
55 -
56 -export default NotFound;
1 -export { default } from './NotFound';
1 -import React, { useState } from 'react';
2 -import { makeStyles } from '@material-ui/styles';
3 -import { IconButton, Grid, Typography } from '@material-ui/core';
4 -import ChevronRightIcon from '@material-ui/icons/ChevronRight';
5 -import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
6 -
7 -import { FileCard } from './components';
8 -import mockData from './data';
9 -
10 -const useStyles = makeStyles(theme => ({
11 - root: {
12 - padding: theme.spacing(3)
13 - },
14 - content: {
15 - marginTop: theme.spacing(2)
16 - },
17 - pagination: {
18 - marginTop: theme.spacing(3),
19 - display: 'flex',
20 - alignItems: 'center',
21 - justifyContent: 'flex-end'
22 - }
23 -}));
24 -
25 -const RecentFileList = () => {
26 - const classes = useStyles();
27 -
28 - const [files] = useState(mockData);
29 -
30 - return (
31 - <div className={classes.root}>
32 - <div className={classes.content}>
33 - <Grid
34 - container
35 - spacing={3}
36 - >
37 - {files.map(file => (
38 - <Grid
39 - item
40 - key={file.id}
41 - lg={4}
42 - md={6}
43 - xs={12}
44 - >
45 - <FileCard file={file} />
46 - </Grid>
47 - ))}
48 - </Grid>
49 - </div>
50 - <div className={classes.pagination}>
51 - <Typography variant="caption">1-6 of 20</Typography>
52 - <IconButton>
53 - <ChevronLeftIcon />
54 - </IconButton>
55 - <IconButton>
56 - <ChevronRightIcon />
57 - </IconButton>
58 - </div>
59 - </div>
60 - );
61 -};
62 -
63 -export default RecentFileList;
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import clsx from 'clsx';
4 -import { makeStyles } from '@material-ui/styles';
5 -import {
6 - Card,
7 - CardContent,
8 - CardActions,
9 - Typography,
10 - Grid,
11 - Divider
12 -} from '@material-ui/core';
13 -import AccessTimeIcon from '@material-ui/icons/AccessTime';
14 -import GetAppIcon from '@material-ui/icons/GetApp';
15 -
16 -const useStyles = makeStyles(theme => ({
17 - root: {},
18 - imageContainer: {
19 - height: 64,
20 - width: 64,
21 - margin: '0 auto',
22 - border: `1px solid ${theme.palette.divider}`,
23 - borderRadius: '5px',
24 - overflow: 'hidden',
25 - display: 'flex',
26 - alignItems: 'center',
27 - justifyContent: 'center'
28 - },
29 - image: {
30 - width: '100%'
31 - },
32 - statsItem: {
33 - display: 'flex',
34 - alignItems: 'center'
35 - },
36 - statsIcon: {
37 - color: theme.palette.icon,
38 - marginRight: theme.spacing(1)
39 - }
40 -}));
41 -
42 -const FileCard = props => {
43 - const { className, file, ...rest } = props;
44 -
45 - const classes = useStyles();
46 -
47 - return (
48 - <Card
49 - {...rest}
50 - className={clsx(classes.root, className)}
51 - >
52 - <CardContent>
53 - <div className={classes.imageContainer}>
54 - {/* TODO: file.modifiedAt과 연동 */}
55 - <img
56 - alt="FileIcon"
57 - className={classes.image}
58 - src={file.imageUrl}
59 - />
60 - </div>
61 - <Typography
62 - align="center"
63 - gutterBottom
64 - variant="h4"
65 - >
66 - {file.name}
67 - </Typography>
68 - </CardContent>
69 - <Divider />
70 - <CardActions>
71 - <Grid
72 - container
73 - justify="space-between"
74 - >
75 - <Grid
76 - className={classes.statsItem}
77 - item
78 - >
79 - <AccessTimeIcon className={classes.statsIcon} />
80 - <Typography
81 - display="inline"
82 - variant="body2"
83 - >
84 - {/* TODO: file.modifiedAt과 연동 */}
85 - Updated 2hr ago
86 - </Typography>
87 - </Grid>
88 - <Grid
89 - className={classes.statsItem}
90 - item
91 - >
92 - </Grid>
93 - </Grid>
94 - </CardActions>
95 - </Card>
96 - );
97 -};
98 -
99 -FileCard.propTypes = {
100 - className: PropTypes.string,
101 - file: PropTypes.object.isRequired
102 -};
103 -
104 -export default FileCard;
1 -export { default as FileCard } from './FileCard';
1 -import uuid from 'uuid/v1';
2 -import data from 'mock_file_data.json'
3 -
4 -export default data;
1 -export { default } from './RecentFileList';
1 -import React from 'react';
2 -import { makeStyles } from '@material-ui/styles';
3 -import { Grid } from '@material-ui/core';
4 -
5 -import { Notifications, Password } from './components';
6 -
7 -const useStyles = makeStyles(theme => ({
8 - root: {
9 - padding: theme.spacing(4)
10 - }
11 -}));
12 -
13 -const Settings = () => {
14 - const classes = useStyles();
15 -
16 - return (
17 - <div className={classes.root}>
18 - <Grid
19 - container
20 - spacing={4}
21 - >
22 - <Grid
23 - item
24 - md={7}
25 - xs={12}
26 - >
27 - <Notifications />
28 - </Grid>
29 - <Grid
30 - item
31 - md={5}
32 - xs={12}
33 - >
34 - <Password />
35 - </Grid>
36 - </Grid>
37 - </div>
38 - );
39 -};
40 -
41 -export default Settings;
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import clsx from 'clsx';
4 -import { makeStyles } from '@material-ui/styles';
5 -import {
6 - Card,
7 - CardHeader,
8 - CardContent,
9 - CardActions,
10 - Grid,
11 - Divider,
12 - FormControlLabel,
13 - Checkbox,
14 - Typography,
15 - Button
16 -} from '@material-ui/core';
17 -
18 -const useStyles = makeStyles(() => ({
19 - root: {},
20 - item: {
21 - display: 'flex',
22 - flexDirection: 'column'
23 - }
24 -}));
25 -
26 -const Notifications = props => {
27 - const { className, ...rest } = props;
28 -
29 - const classes = useStyles();
30 -
31 - return (
32 - <Card
33 - {...rest}
34 - className={clsx(classes.root, className)}
35 - >
36 - <form>
37 - <CardHeader
38 - subheader="Manage the notifications"
39 - title="Notifications"
40 - />
41 - <Divider />
42 - <CardContent>
43 - <Grid
44 - container
45 - spacing={6}
46 - wrap="wrap"
47 - >
48 - <Grid
49 - className={classes.item}
50 - item
51 - md={4}
52 - sm={6}
53 - xs={12}
54 - >
55 - <Typography
56 - gutterBottom
57 - variant="h6"
58 - >
59 - Notifications
60 - </Typography>
61 - <FormControlLabel
62 - control={
63 - <Checkbox
64 - color="primary"
65 - defaultChecked //
66 - />
67 - }
68 - label="Email"
69 - />
70 - <FormControlLabel
71 - control={
72 - <Checkbox
73 - color="primary"
74 - defaultChecked //
75 - />
76 - }
77 - label="Push Notifications"
78 - />
79 - <FormControlLabel
80 - control={<Checkbox color="primary" />}
81 - label="Text Messages"
82 - />
83 - <FormControlLabel
84 - control={
85 - <Checkbox
86 - color="primary"
87 - defaultChecked //
88 - />
89 - }
90 - label="Phone calls"
91 - />
92 - </Grid>
93 - <Grid
94 - className={classes.item}
95 - item
96 - md={4}
97 - sm={6}
98 - xs={12}
99 - >
100 - <Typography
101 - gutterBottom
102 - variant="h6"
103 - >
104 - Messages
105 - </Typography>
106 - <FormControlLabel
107 - control={
108 - <Checkbox
109 - color="primary"
110 - defaultChecked //
111 - />
112 - }
113 - label="Email"
114 - />
115 - <FormControlLabel
116 - control={<Checkbox color="primary" />}
117 - label="Push Notifications"
118 - />
119 - <FormControlLabel
120 - control={
121 - <Checkbox
122 - color="primary"
123 - defaultChecked //
124 - />
125 - }
126 - label="Phone calls"
127 - />
128 - </Grid>
129 - </Grid>
130 - </CardContent>
131 - <Divider />
132 - <CardActions>
133 - <Button
134 - color="primary"
135 - variant="outlined"
136 - >
137 - Save
138 - </Button>
139 - </CardActions>
140 - </form>
141 - </Card>
142 - );
143 -};
144 -
145 -Notifications.propTypes = {
146 - className: PropTypes.string
147 -};
148 -
149 -export default Notifications;
1 -import React, { useState } from 'react';
2 -import PropTypes from 'prop-types';
3 -import clsx from 'clsx';
4 -import { makeStyles } from '@material-ui/styles';
5 -import {
6 - Card,
7 - CardHeader,
8 - CardContent,
9 - CardActions,
10 - Divider,
11 - Button,
12 - TextField
13 -} from '@material-ui/core';
14 -
15 -const useStyles = makeStyles(() => ({
16 - root: {}
17 -}));
18 -
19 -const Password = props => {
20 - const { className, ...rest } = props;
21 -
22 - const classes = useStyles();
23 -
24 - const [values, setValues] = useState({
25 - password: '',
26 - confirm: ''
27 - });
28 -
29 - const handleChange = event => {
30 - setValues({
31 - ...values,
32 - [event.target.name]: event.target.value
33 - });
34 - };
35 -
36 - return (
37 - <Card
38 - {...rest}
39 - className={clsx(classes.root, className)}
40 - >
41 - <form>
42 - <CardHeader
43 - subheader="Update password"
44 - title="Password"
45 - />
46 - <Divider />
47 - <CardContent>
48 - <TextField
49 - fullWidth
50 - label="Password"
51 - name="password"
52 - onChange={handleChange}
53 - type="password"
54 - value={values.password}
55 - variant="outlined"
56 - />
57 - <TextField
58 - fullWidth
59 - label="Confirm password"
60 - name="confirm"
61 - onChange={handleChange}
62 - style={{ marginTop: '1rem' }}
63 - type="password"
64 - value={values.confirm}
65 - variant="outlined"
66 - />
67 - </CardContent>
68 - <Divider />
69 - <CardActions>
70 - <Button
71 - color="primary"
72 - variant="outlined"
73 - >
74 - Update
75 - </Button>
76 - </CardActions>
77 - </form>
78 - </Card>
79 - );
80 -};
81 -
82 -Password.propTypes = {
83 - className: PropTypes.string
84 -};
85 -
86 -export default Password;
1 -export { default as Notifications } from './Notifications';
2 -export { default as Password } from './Password';
1 -export { default } from './Settings';
1 -import React, { useState } from 'react';
2 -import { makeStyles } from '@material-ui/styles';
3 -
4 -import { SharedFileToolbar, SharedFileTable } from './components';
5 -import mockData from './data';
6 -
7 -const useStyles = makeStyles(theme => ({
8 - root: {
9 - padding: theme.spacing(3)
10 - },
11 - content: {
12 - marginTop: theme.spacing(2)
13 - }
14 -}));
15 -
16 -const SharedFileList = () => {
17 - const classes = useStyles();
18 -
19 - const [files] = useState(mockData);
20 -
21 - return (
22 - <div className={classes.root}>
23 - <SharedFileToolbar />
24 - <div className={classes.content}>
25 - <SharedFileTable files={files} />
26 - </div>
27 - </div>
28 - );
29 -};
30 -
31 -export default SharedFileList;
1 -import React, { useState } from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import moment from 'moment';
5 -import PerfectScrollbar from 'react-perfect-scrollbar';
6 -import { makeStyles } from '@material-ui/styles';
7 -import {
8 - Card,
9 - CardActions,
10 - CardContent,
11 - Avatar,
12 - Checkbox,
13 - Table,
14 - TableBody,
15 - TableCell,
16 - TableHead,
17 - TableRow,
18 - Typography,
19 - TablePagination
20 -} from '@material-ui/core';
21 -
22 -import { getInitials } from '../../../Trash/components/RemovedFileTable/node_modules/helpers';
23 -
24 -const useStyles = makeStyles(theme => ({
25 - root: {},
26 - content: {
27 - padding: 0
28 - },
29 - inner: {
30 - minWidth: 1050
31 - },
32 - nameContainer: {
33 - display: 'flex',
34 - alignItems: 'center'
35 - },
36 - avatar: {
37 - marginRight: theme.spacing(2)
38 - },
39 - actions: {
40 - justifyContent: 'flex-end'
41 - }
42 -}));
43 -
44 -const FileTable = props => {
45 - const { className, files: files, ...rest } = props;
46 -
47 - const classes = useStyles();
48 -
49 - const [selectedUsers, setSelectedUsers] = useState([]);
50 - const [rowsPerPage, setRowsPerPage] = useState(10);
51 - const [page, setPage] = useState(0);
52 -
53 - const handleSelectAll = event => {
54 - const { files } = props;
55 -
56 - let selectedUsers;
57 -
58 - if (event.target.checked) {
59 - selectedUsers = files.map(user => user.id);
60 - } else {
61 - selectedUsers = [];
62 - }
63 -
64 - setSelectedUsers(selectedUsers);
65 - };
66 -
67 - const handleSelectOne = (event, id) => {
68 - const selectedIndex = selectedUsers.indexOf(id);
69 - let newSelectedUsers = [];
70 -
71 - if (selectedIndex === -1) {
72 - newSelectedUsers = newSelectedUsers.concat(selectedUsers, id);
73 - } else if (selectedIndex === 0) {
74 - newSelectedUsers = newSelectedUsers.concat(selectedUsers.slice(1));
75 - } else if (selectedIndex === selectedUsers.length - 1) {
76 - newSelectedUsers = newSelectedUsers.concat(selectedUsers.slice(0, -1));
77 - } else if (selectedIndex > 0) {
78 - newSelectedUsers = newSelectedUsers.concat(
79 - selectedUsers.slice(0, selectedIndex),
80 - selectedUsers.slice(selectedIndex + 1)
81 - );
82 - }
83 -
84 - setSelectedUsers(newSelectedUsers);
85 - };
86 -
87 - const handlePageChange = (event, page) => {
88 - setPage(page);
89 - };
90 -
91 - const handleRowsPerPageChange = event => {
92 - setRowsPerPage(event.target.value);
93 - };
94 -
95 - return (
96 - <Card
97 - {...rest}
98 - className={clsx(classes.root, className)}
99 - >
100 - <CardContent className={classes.content}>
101 - <PerfectScrollbar>
102 - <div className={classes.inner}>
103 - <Table>
104 - <TableHead>
105 - <TableRow>
106 - <TableCell padding="checkbox">
107 - <Checkbox
108 - checked={selectedUsers.length === files.length}
109 - color="primary"
110 - indeterminate={
111 - selectedUsers.length > 0 &&
112 - selectedUsers.length < files.length
113 - }
114 - onChange={handleSelectAll}
115 - />
116 - </TableCell>
117 - <TableCell>이름</TableCell>
118 - <TableCell>마지막으로 수정한 날짜</TableCell>
119 - <TableCell>크기</TableCell>
120 - <TableCell>공유</TableCell>
121 - </TableRow>
122 - </TableHead>
123 - <TableBody>
124 - {files.slice(0, rowsPerPage).map(file => (
125 - <TableRow
126 - className={classes.tableRow}
127 - hover
128 - key={file.id}
129 - selected={selectedUsers.indexOf(file.id) !== -1}
130 - >
131 - <TableCell padding="checkbox">
132 - <Checkbox
133 - checked={selectedUsers.indexOf(file.id) !== -1}
134 - color="primary"
135 - onChange={event => handleSelectOne(event, file.id)}
136 - value="true"
137 - />
138 - </TableCell>
139 - <TableCell>
140 - <div className={classes.nameContainer}>
141 - {/* 파일 아이콘 */}
142 - <Typography variant="body1">{file.name}</Typography>
143 - </div>
144 - </TableCell>
145 - <TableCell>
146 - {moment(file.modifiedAt).format('DD/MM/YYYY')}
147 - </TableCell>
148 - <TableCell>{file.size}</TableCell>
149 - <TableCell>
150 - {file.share}
151 - </TableCell>
152 -
153 - </TableRow>
154 - ))}
155 - </TableBody>
156 - </Table>
157 - </div>
158 - </PerfectScrollbar>
159 - </CardContent>
160 - <CardActions className={classes.actions}>
161 - <TablePagination
162 - component="div"
163 - count={files.length}
164 - onChangePage={handlePageChange}
165 - onChangeRowsPerPage={handleRowsPerPageChange}
166 - page={page}
167 - rowsPerPage={rowsPerPage}
168 - rowsPerPageOptions={[5, 10, 25]}
169 - />
170 - </CardActions>
171 - </Card>
172 - );
173 -};
174 -
175 -FileTable.propTypes = {
176 - className: PropTypes.string,
177 - files: PropTypes.array.isRequired
178 -};
179 -
180 -export default FileTable;
1 -import React, { useState } from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import moment from 'moment';
5 -import PerfectScrollbar from 'react-perfect-scrollbar';
6 -import { makeStyles } from '@material-ui/styles';
7 -import {
8 - Card,
9 - CardActions,
10 - CardContent,
11 - Avatar,
12 - Checkbox,
13 - Table,
14 - TableBody,
15 - TableCell,
16 - TableHead,
17 - TableRow,
18 - Typography,
19 - TablePagination
20 -} from '@material-ui/core';
21 -
22 -import { getInitials } from 'helpers';
23 -
24 -const useStyles = makeStyles(theme => ({
25 - root: {},
26 - content: {
27 - padding: 0
28 - },
29 - inner: {
30 - minWidth: 1050
31 - },
32 - nameContainer: {
33 - display: 'flex',
34 - alignItems: 'center'
35 - },
36 - avatar: {
37 - marginRight: theme.spacing(2)
38 - },
39 - actions: {
40 - justifyContent: 'flex-end'
41 - }
42 -}));
43 -
44 -const FileTable = props => {
45 - const { className, files: files, ...rest } = props;
46 -
47 - const classes = useStyles();
48 -
49 - const [selectedUsers, setSelectedUsers] = useState([]);
50 - const [rowsPerPage, setRowsPerPage] = useState(10);
51 - const [page, setPage] = useState(0);
52 -
53 - const handleSelectAll = event => {
54 - const { files } = props;
55 -
56 - let selectedUsers;
57 -
58 - if (event.target.checked) {
59 - selectedUsers = files.map(user => user.id);
60 - } else {
61 - selectedUsers = [];
62 - }
63 -
64 - setSelectedUsers(selectedUsers);
65 - };
66 -
67 - const handleSelectOne = (event, id) => {
68 - const selectedIndex = selectedUsers.indexOf(id);
69 - let newSelectedUsers = [];
70 -
71 - if (selectedIndex === -1) {
72 - newSelectedUsers = newSelectedUsers.concat(selectedUsers, id);
73 - } else if (selectedIndex === 0) {
74 - newSelectedUsers = newSelectedUsers.concat(selectedUsers.slice(1));
75 - } else if (selectedIndex === selectedUsers.length - 1) {
76 - newSelectedUsers = newSelectedUsers.concat(selectedUsers.slice(0, -1));
77 - } else if (selectedIndex > 0) {
78 - newSelectedUsers = newSelectedUsers.concat(
79 - selectedUsers.slice(0, selectedIndex),
80 - selectedUsers.slice(selectedIndex + 1)
81 - );
82 - }
83 -
84 - setSelectedUsers(newSelectedUsers);
85 - };
86 -
87 - const handlePageChange = (event, page) => {
88 - setPage(page);
89 - };
90 -
91 - const handleRowsPerPageChange = event => {
92 - setRowsPerPage(event.target.value);
93 - };
94 -
95 - return (
96 - <Card
97 - {...rest}
98 - className={clsx(classes.root, className)}
99 - >
100 - <CardContent className={classes.content}>
101 - <PerfectScrollbar>
102 - <div className={classes.inner}>
103 - <Table>
104 - <TableHead>
105 - <TableRow>
106 - <TableCell padding="checkbox">
107 - <Checkbox
108 - checked={selectedUsers.length === files.length}
109 - color="primary"
110 - indeterminate={
111 - selectedUsers.length > 0 &&
112 - selectedUsers.length < files.length
113 - }
114 - onChange={handleSelectAll}
115 - />
116 - </TableCell>
117 - <TableCell>이름</TableCell>
118 - <TableCell>공유한 날짜</TableCell>
119 - <TableCell>공유자</TableCell>
120 - </TableRow>
121 - </TableHead>
122 - <TableBody>
123 - {files.slice(0, rowsPerPage).map(file => (
124 - <TableRow
125 - className={classes.tableRow}
126 - hover
127 - key={file.id}
128 - selected={selectedUsers.indexOf(file.id) !== -1}
129 - >
130 - <TableCell padding="checkbox">
131 - <Checkbox
132 - checked={selectedUsers.indexOf(file.id) !== -1}
133 - color="primary"
134 - onChange={event => handleSelectOne(event, file.id)}
135 - value="true"
136 - />
137 - </TableCell>
138 - <TableCell>
139 - <div className={classes.nameContainer}>
140 - {/* 파일 아이콘 */}
141 - <Typography variant="body1">{file.name}</Typography>
142 - </div>
143 - </TableCell>
144 - <TableCell>
145 - {moment(file.sharedAt).format('DD/MM/YYYY')}
146 - </TableCell>
147 - <TableCell>{file.sharedUser}</TableCell>
148 -
149 - </TableRow>
150 - ))}
151 - </TableBody>
152 - </Table>
153 - </div>
154 - </PerfectScrollbar>
155 - </CardContent>
156 - <CardActions className={classes.actions}>
157 - <TablePagination
158 - component="div"
159 - count={files.length}
160 - onChangePage={handlePageChange}
161 - onChangeRowsPerPage={handleRowsPerPageChange}
162 - page={page}
163 - rowsPerPage={rowsPerPage}
164 - rowsPerPageOptions={[5, 10, 25]}
165 - />
166 - </CardActions>
167 - </Card>
168 - );
169 -};
170 -
171 -FileTable.propTypes = {
172 - className: PropTypes.string,
173 - files: PropTypes.array.isRequired
174 -};
175 -
176 -export default FileTable;
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import clsx from 'clsx';
4 -import { makeStyles } from '@material-ui/styles';
5 -import { Button } from '@material-ui/core';
6 -
7 -import { SearchInput } from 'components';
8 -
9 -const useStyles = makeStyles(theme => ({
10 - root: {},
11 - row: {
12 - height: '42px',
13 - display: 'flex',
14 - alignItems: 'center',
15 - marginTop: theme.spacing(1)
16 - },
17 - spacer: {
18 - flexGrow: 1
19 - },
20 - importButton: {
21 - marginRight: theme.spacing(1)
22 - },
23 - exportButton: {
24 - marginRight: theme.spacing(1)
25 - },
26 - searchInput: {
27 - marginRight: theme.spacing(1)
28 - }
29 -}));
30 -
31 -const DriveToolbar = props => {
32 - const { className, ...rest } = props;
33 -
34 - const classes = useStyles();
35 -
36 - return (
37 - <div
38 - {...rest}
39 - className={clsx(classes.root, className)}
40 - >
41 - <div className={classes.row}>
42 - {/* 파일 클릭했을 때 표시 */}
43 - <span className={classes.spacer} />
44 - <Button className={classes.Button}>공유</Button>
45 - <Button className={classes.Button}>미리보기</Button>
46 - <Button className={classes.Button}>삭제</Button>
47 - <Button className={classes.Button}>이름 바꾸기</Button>
48 - <Button className={classes.Button}>다운로드</Button>
49 - </div>
50 - <div className={classes.row}>
51 - <SearchInput
52 - className={classes.searchInput}
53 - placeholder="파일, 폴더 검색"
54 - />
55 - </div>
56 - </div>
57 - );
58 -};
59 -
60 -DriveToolbar.propTypes = {
61 - className: PropTypes.string
62 -};
63 -
64 -export default DriveToolbar;
1 -export { default as SharedFileTable } from './SharedFileTable';
2 -export { default as SharedFileToolbar } from './SharedFileToolbar';
1 -import uuid from 'uuid/v1';
2 -import data from 'mock_file_data.json'
3 -
4 -export default data;
1 -export { default } from './SharedFileList';
1 -import React, { useState, useEffect } from 'react';
2 -import { Link as RouterLink, withRouter } from 'react-router-dom';
3 -import PropTypes from 'prop-types';
4 -import validate from 'validate.js';
5 -import { makeStyles } from '@material-ui/styles';
6 -import {
7 - Grid,
8 - Button,
9 - IconButton,
10 - TextField,
11 - Link,
12 - Typography
13 -} from '@material-ui/core';
14 -import ArrowBackIcon from '@material-ui/icons/ArrowBack';
15 -
16 -import { Facebook as FacebookIcon, Google as GoogleIcon } from 'icons';
17 -
18 -const schema = {
19 - email: {
20 - presence: { allowEmpty: false, message: 'is required' },
21 - email: true,
22 - length: {
23 - maximum: 64
24 - }
25 - },
26 - password: {
27 - presence: { allowEmpty: false, message: 'is required' },
28 - length: {
29 - maximum: 128
30 - }
31 - }
32 -};
33 -
34 -const useStyles = makeStyles(theme => ({
35 - root: {
36 - backgroundColor: theme.palette.background.default,
37 - height: '100%'
38 - },
39 - grid: {
40 - height: '100%'
41 - },
42 - quoteContainer: {
43 - [theme.breakpoints.down('md')]: {
44 - display: 'none'
45 - }
46 - },
47 - quote: {
48 - backgroundColor: theme.palette.neutral,
49 - height: '100%',
50 - display: 'flex',
51 - justifyContent: 'center',
52 - alignItems: 'center',
53 - backgroundImage: 'url(/images/auth.jpg)',
54 - backgroundSize: 'cover',
55 - backgroundRepeat: 'no-repeat',
56 - backgroundPosition: 'center'
57 - },
58 - quoteInner: {
59 - textAlign: 'center',
60 - flexBasis: '600px'
61 - },
62 - quoteText: {
63 - color: theme.palette.white,
64 - fontWeight: 300
65 - },
66 - name: {
67 - marginTop: theme.spacing(3),
68 - color: theme.palette.white
69 - },
70 - bio: {
71 - color: theme.palette.white
72 - },
73 - contentContainer: {},
74 - content: {
75 - height: '100%',
76 - display: 'flex',
77 - flexDirection: 'column'
78 - },
79 - contentHeader: {
80 - display: 'flex',
81 - alignItems: 'center',
82 - paddingTop: theme.spacing(5),
83 - paddingBototm: theme.spacing(2),
84 - paddingLeft: theme.spacing(2),
85 - paddingRight: theme.spacing(2)
86 - },
87 - logoImage: {
88 - marginLeft: theme.spacing(4)
89 - },
90 - contentBody: {
91 - flexGrow: 1,
92 - display: 'flex',
93 - alignItems: 'center',
94 - [theme.breakpoints.down('md')]: {
95 - justifyContent: 'center'
96 - }
97 - },
98 - form: {
99 - paddingLeft: 100,
100 - paddingRight: 100,
101 - paddingBottom: 125,
102 - flexBasis: 700,
103 - [theme.breakpoints.down('sm')]: {
104 - paddingLeft: theme.spacing(2),
105 - paddingRight: theme.spacing(2)
106 - }
107 - },
108 - title: {
109 - marginTop: theme.spacing(3)
110 - },
111 - socialButtons: {
112 - marginTop: theme.spacing(3)
113 - },
114 - socialIcon: {
115 - marginRight: theme.spacing(1)
116 - },
117 - sugestion: {
118 - marginTop: theme.spacing(2)
119 - },
120 - textField: {
121 - marginTop: theme.spacing(2)
122 - },
123 - signInButton: {
124 - margin: theme.spacing(2, 0)
125 - }
126 -}));
127 -
128 -const SignIn = props => {
129 - const { history } = props;
130 -
131 - const classes = useStyles();
132 -
133 - const [formState, setFormState] = useState({
134 - isValid: false,
135 - values: {},
136 - touched: {},
137 - errors: {}
138 - });
139 -
140 - useEffect(() => {
141 - const errors = validate(formState.values, schema);
142 -
143 - setFormState(formState => ({
144 - ...formState,
145 - isValid: errors ? false : true,
146 - errors: errors || {}
147 - }));
148 - }, [formState.values]);
149 -
150 - const handleBack = () => {
151 - history.goBack();
152 - };
153 -
154 - const handleChange = event => {
155 - event.persist();
156 -
157 - setFormState(formState => ({
158 - ...formState,
159 - values: {
160 - ...formState.values,
161 - [event.target.name]:
162 - event.target.type === 'checkbox'
163 - ? event.target.checked
164 - : event.target.value
165 - },
166 - touched: {
167 - ...formState.touched,
168 - [event.target.name]: true
169 - }
170 - }));
171 - };
172 -
173 - const handleSignIn = event => {
174 - event.preventDefault();
175 - history.push('/');
176 - };
177 -
178 - const hasError = field =>
179 - formState.touched[field] && formState.errors[field] ? true : false;
180 -
181 - return (
182 - <div className={classes.root}>
183 - <Grid
184 - className={classes.grid}
185 - container
186 - >
187 - <Grid
188 - className={classes.quoteContainer}
189 - item
190 - lg={5}
191 - >
192 - <div className={classes.quote}>
193 - <div className={classes.quoteInner}>
194 - <Typography
195 - className={classes.quoteText}
196 - variant="h1"
197 - >
198 - Hella narwhal Cosby sweater McSweeney's, salvia kitsch before
199 - they sold out High Life.
200 - </Typography>
201 - <div className={classes.person}>
202 - <Typography
203 - className={classes.name}
204 - variant="body1"
205 - >
206 - Takamaru Ayako
207 - </Typography>
208 - <Typography
209 - className={classes.bio}
210 - variant="body2"
211 - >
212 - Manager at inVision
213 - </Typography>
214 - </div>
215 - </div>
216 - </div>
217 - </Grid>
218 - <Grid
219 - className={classes.content}
220 - item
221 - lg={7}
222 - xs={12}
223 - >
224 - <div className={classes.content}>
225 - <div className={classes.contentHeader}>
226 - <IconButton onClick={handleBack}>
227 - <ArrowBackIcon />
228 - </IconButton>
229 - </div>
230 - <div className={classes.contentBody}>
231 - <form
232 - className={classes.form}
233 - onSubmit={handleSignIn}
234 - >
235 - <Typography
236 - className={classes.title}
237 - variant="h2"
238 - >
239 - Sign in
240 - </Typography>
241 - <Typography
242 - color="textSecondary"
243 - gutterBottom
244 - >
245 - Sign in with social media
246 - </Typography>
247 - <Grid
248 - className={classes.socialButtons}
249 - container
250 - spacing={2}
251 - >
252 - <Grid item>
253 - <Button
254 - color="primary"
255 - onClick={handleSignIn}
256 - size="large"
257 - variant="contained"
258 - >
259 - <FacebookIcon className={classes.socialIcon} />
260 - Login with Facebook
261 - </Button>
262 - </Grid>
263 - <Grid item>
264 - <Button
265 - onClick={handleSignIn}
266 - size="large"
267 - variant="contained"
268 - >
269 - <GoogleIcon className={classes.socialIcon} />
270 - Login with Google
271 - </Button>
272 - </Grid>
273 - </Grid>
274 - <Typography
275 - align="center"
276 - className={classes.sugestion}
277 - color="textSecondary"
278 - variant="body1"
279 - >
280 - or login with email address
281 - </Typography>
282 - <TextField
283 - className={classes.textField}
284 - error={hasError('email')}
285 - fullWidth
286 - helperText={
287 - hasError('email') ? formState.errors.email[0] : null
288 - }
289 - label="Email address"
290 - name="email"
291 - onChange={handleChange}
292 - type="text"
293 - value={formState.values.email || ''}
294 - variant="outlined"
295 - />
296 - <TextField
297 - className={classes.textField}
298 - error={hasError('password')}
299 - fullWidth
300 - helperText={
301 - hasError('password') ? formState.errors.password[0] : null
302 - }
303 - label="Password"
304 - name="password"
305 - onChange={handleChange}
306 - type="password"
307 - value={formState.values.password || ''}
308 - variant="outlined"
309 - />
310 - <Button
311 - className={classes.signInButton}
312 - color="primary"
313 - disabled={!formState.isValid}
314 - fullWidth
315 - size="large"
316 - type="submit"
317 - variant="contained"
318 - >
319 - Sign in now
320 - </Button>
321 - <Typography
322 - color="textSecondary"
323 - variant="body1"
324 - >
325 - Don't have an account?{' '}
326 - <Link
327 - component={RouterLink}
328 - to="/sign-up"
329 - variant="h6"
330 - >
331 - Sign up
332 - </Link>
333 - </Typography>
334 - </form>
335 - </div>
336 - </div>
337 - </Grid>
338 - </Grid>
339 - </div>
340 - );
341 -};
342 -
343 -SignIn.propTypes = {
344 - history: PropTypes.object
345 -};
346 -
347 -export default withRouter(SignIn);
1 -export { default } from './SignIn';
1 -import React, { useState, useEffect } from 'react';
2 -import { Link as RouterLink, withRouter } from 'react-router-dom';
3 -import PropTypes from 'prop-types';
4 -import validate from 'validate.js';
5 -import { makeStyles } from '@material-ui/styles';
6 -import {
7 - Grid,
8 - Button,
9 - IconButton,
10 - TextField,
11 - Link,
12 - FormHelperText,
13 - Checkbox,
14 - Typography
15 -} from '@material-ui/core';
16 -import ArrowBackIcon from '@material-ui/icons/ArrowBack';
17 -
18 -const schema = {
19 - firstName: {
20 - presence: { allowEmpty: false, message: 'is required' },
21 - length: {
22 - maximum: 32
23 - }
24 - },
25 - lastName: {
26 - presence: { allowEmpty: false, message: 'is required' },
27 - length: {
28 - maximum: 32
29 - }
30 - },
31 - email: {
32 - presence: { allowEmpty: false, message: 'is required' },
33 - email: true,
34 - length: {
35 - maximum: 64
36 - }
37 - },
38 - password: {
39 - presence: { allowEmpty: false, message: 'is required' },
40 - length: {
41 - maximum: 128
42 - }
43 - },
44 - policy: {
45 - presence: { allowEmpty: false, message: 'is required' },
46 - checked: true
47 - }
48 -};
49 -
50 -const useStyles = makeStyles(theme => ({
51 - root: {
52 - backgroundColor: theme.palette.background.default,
53 - height: '100%'
54 - },
55 - grid: {
56 - height: '100%'
57 - },
58 - quoteContainer: {
59 - [theme.breakpoints.down('md')]: {
60 - display: 'none'
61 - }
62 - },
63 - quote: {
64 - backgroundColor: theme.palette.neutral,
65 - height: '100%',
66 - display: 'flex',
67 - justifyContent: 'center',
68 - alignItems: 'center',
69 - backgroundImage: 'url(/images/auth.jpg)',
70 - backgroundSize: 'cover',
71 - backgroundRepeat: 'no-repeat',
72 - backgroundPosition: 'center'
73 - },
74 - quoteInner: {
75 - textAlign: 'center',
76 - flexBasis: '600px'
77 - },
78 - quoteText: {
79 - color: theme.palette.white,
80 - fontWeight: 300
81 - },
82 - name: {
83 - marginTop: theme.spacing(3),
84 - color: theme.palette.white
85 - },
86 - bio: {
87 - color: theme.palette.white
88 - },
89 - contentContainer: {},
90 - content: {
91 - height: '100%',
92 - display: 'flex',
93 - flexDirection: 'column'
94 - },
95 - contentHeader: {
96 - display: 'flex',
97 - alignItems: 'center',
98 - paddingTop: theme.spacing(5),
99 - paddingBototm: theme.spacing(2),
100 - paddingLeft: theme.spacing(2),
101 - paddingRight: theme.spacing(2)
102 - },
103 - logoImage: {
104 - marginLeft: theme.spacing(4)
105 - },
106 - contentBody: {
107 - flexGrow: 1,
108 - display: 'flex',
109 - alignItems: 'center',
110 - [theme.breakpoints.down('md')]: {
111 - justifyContent: 'center'
112 - }
113 - },
114 - form: {
115 - paddingLeft: 100,
116 - paddingRight: 100,
117 - paddingBottom: 125,
118 - flexBasis: 700,
119 - [theme.breakpoints.down('sm')]: {
120 - paddingLeft: theme.spacing(2),
121 - paddingRight: theme.spacing(2)
122 - }
123 - },
124 - title: {
125 - marginTop: theme.spacing(3)
126 - },
127 - textField: {
128 - marginTop: theme.spacing(2)
129 - },
130 - policy: {
131 - marginTop: theme.spacing(1),
132 - display: 'flex',
133 - alignItems: 'center'
134 - },
135 - policyCheckbox: {
136 - marginLeft: '-14px'
137 - },
138 - signUpButton: {
139 - margin: theme.spacing(2, 0)
140 - }
141 -}));
142 -
143 -const SignUp = props => {
144 - const { history } = props;
145 -
146 - const classes = useStyles();
147 -
148 - const [formState, setFormState] = useState({
149 - isValid: false,
150 - values: {},
151 - touched: {},
152 - errors: {}
153 - });
154 -
155 - useEffect(() => {
156 - const errors = validate(formState.values, schema);
157 -
158 - setFormState(formState => ({
159 - ...formState,
160 - isValid: errors ? false : true,
161 - errors: errors || {}
162 - }));
163 - }, [formState.values]);
164 -
165 - const handleChange = event => {
166 - event.persist();
167 -
168 - setFormState(formState => ({
169 - ...formState,
170 - values: {
171 - ...formState.values,
172 - [event.target.name]:
173 - event.target.type === 'checkbox'
174 - ? event.target.checked
175 - : event.target.value
176 - },
177 - touched: {
178 - ...formState.touched,
179 - [event.target.name]: true
180 - }
181 - }));
182 - };
183 -
184 - const handleBack = () => {
185 - history.goBack();
186 - };
187 -
188 - const handleSignUp = event => {
189 - event.preventDefault();
190 - history.push('/');
191 - };
192 -
193 - const hasError = field =>
194 - formState.touched[field] && formState.errors[field] ? true : false;
195 -
196 - return (
197 - <div className={classes.root}>
198 - <Grid
199 - className={classes.grid}
200 - container
201 - >
202 - <Grid
203 - className={classes.quoteContainer}
204 - item
205 - lg={5}
206 - >
207 - <div className={classes.quote}>
208 - <div className={classes.quoteInner}>
209 - <Typography
210 - className={classes.quoteText}
211 - variant="h1"
212 - >
213 - Hella narwhal Cosby sweater McSweeney's, salvia kitsch before
214 - they sold out High Life.
215 - </Typography>
216 - <div className={classes.person}>
217 - <Typography
218 - className={classes.name}
219 - variant="body1"
220 - >
221 - Takamaru Ayako
222 - </Typography>
223 - <Typography
224 - className={classes.bio}
225 - variant="body2"
226 - >
227 - Manager at inVision
228 - </Typography>
229 - </div>
230 - </div>
231 - </div>
232 - </Grid>
233 - <Grid
234 - className={classes.content}
235 - item
236 - lg={7}
237 - xs={12}
238 - >
239 - <div className={classes.content}>
240 - <div className={classes.contentHeader}>
241 - <IconButton onClick={handleBack}>
242 - <ArrowBackIcon />
243 - </IconButton>
244 - </div>
245 - <div className={classes.contentBody}>
246 - <form
247 - className={classes.form}
248 - onSubmit={handleSignUp}
249 - >
250 - <Typography
251 - className={classes.title}
252 - variant="h2"
253 - >
254 - Create new account
255 - </Typography>
256 - <Typography
257 - color="textSecondary"
258 - gutterBottom
259 - >
260 - Use your email to create new account
261 - </Typography>
262 - <TextField
263 - className={classes.textField}
264 - error={hasError('firstName')}
265 - fullWidth
266 - helperText={
267 - hasError('firstName') ? formState.errors.firstName[0] : null
268 - }
269 - label="First name"
270 - name="firstName"
271 - onChange={handleChange}
272 - type="text"
273 - value={formState.values.firstName || ''}
274 - variant="outlined"
275 - />
276 - <TextField
277 - className={classes.textField}
278 - error={hasError('lastName')}
279 - fullWidth
280 - helperText={
281 - hasError('lastName') ? formState.errors.lastName[0] : null
282 - }
283 - label="Last name"
284 - name="lastName"
285 - onChange={handleChange}
286 - type="text"
287 - value={formState.values.lastName || ''}
288 - variant="outlined"
289 - />
290 - <TextField
291 - className={classes.textField}
292 - error={hasError('email')}
293 - fullWidth
294 - helperText={
295 - hasError('email') ? formState.errors.email[0] : null
296 - }
297 - label="Email address"
298 - name="email"
299 - onChange={handleChange}
300 - type="text"
301 - value={formState.values.email || ''}
302 - variant="outlined"
303 - />
304 - <TextField
305 - className={classes.textField}
306 - error={hasError('password')}
307 - fullWidth
308 - helperText={
309 - hasError('password') ? formState.errors.password[0] : null
310 - }
311 - label="Password"
312 - name="password"
313 - onChange={handleChange}
314 - type="password"
315 - value={formState.values.password || ''}
316 - variant="outlined"
317 - />
318 - <div className={classes.policy}>
319 - <Checkbox
320 - checked={formState.values.policy || false}
321 - className={classes.policyCheckbox}
322 - color="primary"
323 - name="policy"
324 - onChange={handleChange}
325 - />
326 - <Typography
327 - className={classes.policyText}
328 - color="textSecondary"
329 - variant="body1"
330 - >
331 - I have read the{' '}
332 - <Link
333 - color="primary"
334 - component={RouterLink}
335 - to="#"
336 - underline="always"
337 - variant="h6"
338 - >
339 - Terms and Conditions
340 - </Link>
341 - </Typography>
342 - </div>
343 - {hasError('policy') && (
344 - <FormHelperText error>
345 - {formState.errors.policy[0]}
346 - </FormHelperText>
347 - )}
348 - <Button
349 - className={classes.signUpButton}
350 - color="primary"
351 - disabled={!formState.isValid}
352 - fullWidth
353 - size="large"
354 - type="submit"
355 - variant="contained"
356 - >
357 - Sign up now
358 - </Button>
359 - <Typography
360 - color="textSecondary"
361 - variant="body1"
362 - >
363 - Have an account?{' '}
364 - <Link
365 - component={RouterLink}
366 - to="/sign-in"
367 - variant="h6"
368 - >
369 - Sign in
370 - </Link>
371 - </Typography>
372 - </form>
373 - </div>
374 - </div>
375 - </Grid>
376 - </Grid>
377 - </div>
378 - );
379 -};
380 -
381 -SignUp.propTypes = {
382 - history: PropTypes.object
383 -};
384 -
385 -export default withRouter(SignUp);
1 -export { default } from './SignUp';
1 -import React, { useState } from 'react';
2 -import { makeStyles } from '@material-ui/styles';
3 -
4 -import { TrashToolbar, RemovedFileTable } from './components';
5 -import mockData from './data';
6 -
7 -const useStyles = makeStyles(theme => ({
8 - root: {
9 - padding: theme.spacing(3)
10 - },
11 - content: {
12 - marginTop: theme.spacing(2)
13 - }
14 -}));
15 -
16 -const Trash = () => {
17 - const classes = useStyles();
18 -
19 - const [files] = useState(mockData);
20 -
21 - return (
22 - <div className={classes.root}>
23 - <TrashToolbar />
24 - <div className={classes.content}>
25 - <RemovedFileTable files={files} />
26 - </div>
27 - </div>
28 - );
29 -};
30 -
31 -export default Trash;
1 -import React, { useState } from 'react';
2 -import clsx from 'clsx';
3 -import PropTypes from 'prop-types';
4 -import moment from 'moment';
5 -import PerfectScrollbar from 'react-perfect-scrollbar';
6 -import { makeStyles } from '@material-ui/styles';
7 -import {
8 - Card,
9 - CardActions,
10 - CardContent,
11 - Avatar,
12 - Checkbox,
13 - Table,
14 - TableBody,
15 - TableCell,
16 - TableHead,
17 - TableRow,
18 - Typography,
19 - TablePagination
20 -} from '@material-ui/core';
21 -
22 -import { getInitials } from 'helpers';
23 -
24 -const useStyles = makeStyles(theme => ({
25 - root: {},
26 - content: {
27 - padding: 0
28 - },
29 - inner: {
30 - minWidth: 1050
31 - },
32 - nameContainer: {
33 - display: 'flex',
34 - alignItems: 'center'
35 - },
36 - avatar: {
37 - marginRight: theme.spacing(2)
38 - },
39 - actions: {
40 - justifyContent: 'flex-end'
41 - }
42 -}));
43 -
44 -const RemovedFileTable = props => {
45 - const { className, files: files, ...rest } = props;
46 -
47 - const classes = useStyles();
48 -
49 - const [selectedUsers, setSelectedUsers] = useState([]);
50 - const [rowsPerPage, setRowsPerPage] = useState(10);
51 - const [page, setPage] = useState(0);
52 -
53 - const handleSelectAll = event => {
54 - const { files } = props;
55 -
56 - let selectedUsers;
57 -
58 - if (event.target.checked) {
59 - selectedUsers = files.map(user => user.id);
60 - } else {
61 - selectedUsers = [];
62 - }
63 -
64 - setSelectedUsers(selectedUsers);
65 - };
66 -
67 - const handleSelectOne = (event, id) => {
68 - const selectedIndex = selectedUsers.indexOf(id);
69 - let newSelectedUsers = [];
70 -
71 - if (selectedIndex === -1) {
72 - newSelectedUsers = newSelectedUsers.concat(selectedUsers, id);
73 - } else if (selectedIndex === 0) {
74 - newSelectedUsers = newSelectedUsers.concat(selectedUsers.slice(1));
75 - } else if (selectedIndex === selectedUsers.length - 1) {
76 - newSelectedUsers = newSelectedUsers.concat(selectedUsers.slice(0, -1));
77 - } else if (selectedIndex > 0) {
78 - newSelectedUsers = newSelectedUsers.concat(
79 - selectedUsers.slice(0, selectedIndex),
80 - selectedUsers.slice(selectedIndex + 1)
81 - );
82 - }
83 -
84 - setSelectedUsers(newSelectedUsers);
85 - };
86 -
87 - const handlePageChange = (event, page) => {
88 - setPage(page);
89 - };
90 -
91 - const handleRowsPerPageChange = event => {
92 - setRowsPerPage(event.target.value);
93 - };
94 -
95 - return (
96 - <Card
97 - {...rest}
98 - className={clsx(classes.root, className)}
99 - >
100 - <CardContent className={classes.content}>
101 - <PerfectScrollbar>
102 - <div className={classes.inner}>
103 - <Table>
104 - <TableHead>
105 - <TableRow>
106 - <TableCell padding="checkbox">
107 - <Checkbox
108 - checked={selectedUsers.length === files.length}
109 - color="primary"
110 - indeterminate={
111 - selectedUsers.length > 0 &&
112 - selectedUsers.length < files.length
113 - }
114 - onChange={handleSelectAll}
115 - />
116 - </TableCell>
117 - <TableCell>이름</TableCell>
118 - <TableCell>마지막으로 수정한 날짜</TableCell>
119 - <TableCell>크기</TableCell>
120 - <TableCell>공유</TableCell>
121 - </TableRow>
122 - </TableHead>
123 - <TableBody>
124 - {files.slice(0, rowsPerPage).map(file => (
125 - <TableRow
126 - className={classes.tableRow}
127 - hover
128 - key={file.id}
129 - selected={selectedUsers.indexOf(file.id) !== -1}
130 - >
131 - <TableCell padding="checkbox">
132 - <Checkbox
133 - checked={selectedUsers.indexOf(file.id) !== -1}
134 - color="primary"
135 - onChange={event => handleSelectOne(event, file.id)}
136 - value="true"
137 - />
138 - </TableCell>
139 - <TableCell>
140 - <div className={classes.nameContainer}>
141 - {/* 파일 아이콘 */}
142 - <Typography variant="body1">{file.name}</Typography>
143 - </div>
144 - </TableCell>
145 - <TableCell>
146 - {moment(file.modifiedAt).format('DD/MM/YYYY')}
147 - </TableCell>
148 - <TableCell>{file.size}</TableCell>
149 - <TableCell>
150 - {file.share}
151 - </TableCell>
152 -
153 - </TableRow>
154 - ))}
155 - </TableBody>
156 - </Table>
157 - </div>
158 - </PerfectScrollbar>
159 - </CardContent>
160 - <CardActions className={classes.actions}>
161 - <TablePagination
162 - component="div"
163 - count={files.length}
164 - onChangePage={handlePageChange}
165 - onChangeRowsPerPage={handleRowsPerPageChange}
166 - page={page}
167 - rowsPerPage={rowsPerPage}
168 - rowsPerPageOptions={[5, 10, 25]}
169 - />
170 - </CardActions>
171 - </Card>
172 - );
173 -};
174 -
175 -RemovedFileTable.propTypes = {
176 - className: PropTypes.string,
177 - files: PropTypes.array.isRequired
178 -};
179 -
180 -export default RemovedFileTable;
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import clsx from 'clsx';
4 -import { makeStyles } from '@material-ui/styles';
5 -import { Button } from '@material-ui/core';
6 -
7 -import { SearchInput } from 'components';
8 -
9 -const useStyles = makeStyles(theme => ({
10 - root: {},
11 - row: {
12 - height: '42px',
13 - display: 'flex',
14 - alignItems: 'center',
15 - marginTop: theme.spacing(1)
16 - },
17 - spacer: {
18 - flexGrow: 1
19 - },
20 - importButton: {
21 - marginRight: theme.spacing(1)
22 - },
23 - exportButton: {
24 - marginRight: theme.spacing(1)
25 - },
26 - searchInput: {
27 - marginRight: theme.spacing(1)
28 - }
29 -}));
30 -
31 -const DriveToolbar = props => {
32 - const { className, ...rest } = props;
33 -
34 - const classes = useStyles();
35 -
36 - return (
37 - <div
38 - {...rest}
39 - className={clsx(classes.root, className)}
40 - >
41 - <div className={classes.row}>
42 - {/* 파일 클릭했을 때 표시 */}
43 - <span className={classes.spacer} />
44 - <Button className={classes.Button}>복원</Button>
45 - <Button className={classes.Button}>영구 삭제</Button>
46 - </div>
47 - <div className={classes.row}>
48 - <SearchInput
49 - className={classes.searchInput}
50 - placeholder="파일, 폴더 검색"
51 - />
52 - </div>
53 - </div>
54 - );
55 -};
56 -
57 -DriveToolbar.propTypes = {
58 - className: PropTypes.string
59 -};
60 -
61 -export default DriveToolbar;
1 -export { default as RemovedFileTable } from './RemovedFileTable';
2 -export { default as TrashToolbar } from './TrashToolbar';
1 -import uuid from 'uuid/v1';
2 -import data from 'mock_file_data.json'
3 -
4 -export default data;
...\ No newline at end of file ...\ No newline at end of file
1 -export { default } from './Trash';
1 -import React, { Fragment } from 'react';
2 -import { makeStyles } from '@material-ui/styles';
3 -import { Grid, Typography as MuiTypography } from '@material-ui/core';
4 -
5 -const useStyles = makeStyles(theme => ({
6 - root: {
7 - padding: theme.spacing(4)
8 - }
9 -}));
10 -
11 -const variants = {
12 - h1: 'Nisi euismod ante senectus consequat phasellus ut',
13 - h2: 'Nisi euismod ante senectus consequat phasellus ut',
14 - h3: 'Nisi euismod ante senectus consequat phasellus ut',
15 - h4: 'Nisi euismod ante senectus consequat phasellus ut',
16 - h5: 'Nisi euismod ante senectus consequat phasellus ut',
17 - h6: 'Nisi euismod ante senectus consequat phasellus ut',
18 - subtitle1: 'Leo varius justo aptent arcu urna felis pede nisl',
19 - subtitle2: 'Leo varius justo aptent arcu urna felis pede nisl',
20 - body1:
21 - 'Justo proin curabitur dictumst semper auctor, consequat tempor, nostra aenean neque turpis nunc. Leo. Sapien aliquet facilisi turpis, elit facilisi praesent porta metus leo. Dignissim amet dis nec ac integer inceptos erat dis Turpis sodales ad torquent. Dolor, erat convallis.Laoreet velit a fames commodo tristique hendrerit sociosqu rhoncus vel sapien penatibus facilisis faucibus ad. Mus purus vehicula imperdiet tempor lectus, feugiat Sapien erat viverra netus potenti mattis purus turpis. Interdum curabitur potenti tristique. Porta velit dignissim tristique ultrices primis.',
22 - body2:
23 - 'Justo proin curabitur dictumst semper auctor, consequat tempor, nostra aenean neque turpis nunc. Leo. Sapien aliquet facilisi turpis, elit facilisi praesent porta metus leo. Dignissim amet dis nec ac integer inceptos erat dis Turpis sodales ad torquent. Dolor, erat convallis.',
24 - caption: 'Accumsan leo pretium conubia ullamcorper.',
25 - overline: 'Accumsan leo pretium conubia ullamcorper.',
26 - button: 'Vivamus ultrices rutrum fames dictumst'
27 -};
28 -
29 -const Typography = () => {
30 - const classes = useStyles();
31 -
32 - return (
33 - <div className={classes.root}>
34 - <Grid
35 - container
36 - spacing={4}
37 - >
38 - {Object.keys(variants).map((key, i) => (
39 - <Fragment key={i}>
40 - <Grid
41 - item
42 - sm={3}
43 - xs={12}
44 - >
45 - <MuiTypography variant="caption">{key}</MuiTypography>
46 - </Grid>
47 - <Grid
48 - item
49 - sm={9}
50 - xs={12}
51 - >
52 - <MuiTypography variant={key}>{variants[key]}</MuiTypography>
53 - </Grid>
54 - </Fragment>
55 - ))}
56 - </Grid>
57 - </div>
58 - );
59 -};
60 -
61 -export default Typography;
1 -export { default } from './Typography';
1 -export { default as Account } from './Account';
2 -export { default as Dashboard } from './Dashboard';
3 -export { default as Icons } from './Icons';
4 -export { default as NotFound } from './NotFound';
5 -export { default as RecentFileList } from './RecentFileList';
6 -export { default as Settings } from './Settings';
7 -export { default as SignIn } from './SignIn';
8 -export { default as SignUp } from './SignUp';
9 -export { default as Typography } from './Typography';
10 -export { default as MyDrive } from './MyDrive';
11 -export { default as SharedFileList } from './SharedFileList';
12 -export { default as Trash } from './Trash';
This diff could not be displayed because it is too large.