Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

54 dockerizing #57

Merged
merged 66 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
ae8d6da
feat: fix: api res data
ananjaemin Nov 4, 2022
9ea88fa
feat: useDownloaddPageNavigate custom hook
ananjaemin Nov 4, 2022
0daa1ff
feat: button, fix: navigate/미완성
ananjaemin Nov 4, 2022
62ac8a7
fix: api res data
ananjaemin Nov 4, 2022
de99bb0
.
ananjaemin Nov 4, 2022
f8b328c
feat: fix: api res data
ananjaemin Nov 4, 2022
d9b1052
feat: useDownloaddPageNavigate custom hook
ananjaemin Nov 4, 2022
0ea80d6
feat: button, fix: navigate/미완성
ananjaemin Nov 4, 2022
de32a1b
.
ananjaemin Nov 4, 2022
c938ec8
rebase main
ananjaemin Nov 4, 2022
862b3c4
fix: git
ananjaemin Nov 4, 2022
e76388f
feat: fix: api res data
ananjaemin Nov 4, 2022
c854d33
feat: useDownloaddPageNavigate custom hook
ananjaemin Nov 4, 2022
df2af69
feat: button, fix: navigate/미완성
ananjaemin Nov 4, 2022
8d168e1
.
ananjaemin Nov 4, 2022
5c5caaf
fix: git
ananjaemin Nov 4, 2022
e35b93d
.
ananjaemin Nov 4, 2022
3db8682
.
ananjaemin Nov 4, 2022
eeaa120
fix: test코드 삭제
ananjaemin Nov 6, 2022
8faf2f8
feat: Lock Icon추가 및 isEncrypted 인수 추가
ananjaemin Nov 8, 2022
68ff073
feat: FileBox component 추가
ananjaemin Nov 8, 2022
81e9efe
feat: isEncrypted handle, fix: redux 이름
ananjaemin Nov 9, 2022
feebcc7
fix: token
ananjaemin Nov 9, 2022
3a5803a
feat: checkpw page (미완성)
ananjaemin Nov 9, 2022
0c6ac1d
feat: token handle 추가, fix: redux 이름, 함수
ananjaemin Nov 9, 2022
014e01b
Success page삭제, CheckpasswordPage 추가
ananjaemin Nov 9, 2022
b74fa08
feat: lockicon
ananjaemin Nov 9, 2022
8a65489
feat: token 추가 및 isEncrypted핸들링 추가
ananjaemin Nov 9, 2022
01b55d7
feat:CheckPasswordFileProps, fix: successFileProps 삭제
ananjaemin Nov 9, 2022
7cbfa41
fix: BaseURL local(개발용 서버)로 번경
ananjaemin Nov 9, 2022
1f05c02
fix: success page 삭제
ananjaemin Nov 9, 2022
8b46546
Merge branch '15-filelist-page-개편-및-다운로드-패스워드-확인' into 24-download-pa…
ananjaemin Nov 9, 2022
50f7983
Merge pull request #34 from ananjaemin/24-download-page-구조-개편-및-합치기
ananjaemin Nov 9, 2022
8f1ce83
fix: util name
ananjaemin Nov 9, 2022
6f337e8
fix: utils 위치 변경 bugfix
ananjaemin Nov 9, 2022
fde0993
feat: password check 기능 추가
ananjaemin Nov 9, 2022
32d5548
Merge pull request #36 from ananjaemin/15-filelist-page-개편-및-다운로드-패스워…
ananjaemin Nov 9, 2022
f09bd50
Merge branch '27-delete-page-구조-개편' of https://github.com/ananjaemin/…
ananjaemin Nov 9, 2022
cdc538a
fix: deletePage redux 개편
ananjaemin Nov 9, 2022
feea7d0
feat: DeletePageNavigator hook token추가
ananjaemin Nov 9, 2022
86ae790
feat: token추가
ananjaemin Nov 9, 2022
e2c2179
feat: 파일삭제 버튼 활성화
ananjaemin Nov 9, 2022
e6d3f00
Merge pull request #39 from ananjaemin/27-delete-page-구조-개편
ananjaemin Nov 9, 2022
fbfc555
fix: 배포
ananjaemin Nov 9, 2022
ee260b5
feat: background black, fix: color
ananjaemin Nov 10, 2022
65c8e63
fix: color
ananjaemin Nov 10, 2022
08eff30
Merge branch '38-기본-design-color-변경' of https://github.com/ananjaemin…
ananjaemin Nov 10, 2022
4a36700
Merge branch 'dev' into 38-기본-design-color-변경
ananjaemin Nov 10, 2022
355d6e0
Merge pull request #40 from ananjaemin/38-기본-design-color-변경
ananjaemin Nov 10, 2022
6bef193
fix: 주석
ananjaemin Nov 10, 2022
a8be451
feat: Container 정렬
ananjaemin Nov 10, 2022
0659aea
feat: 기기별 크기 variables 추가
ananjaemin Nov 10, 2022
bef071b
fix: px -> rem
ananjaemin Nov 10, 2022
f4e5bff
fix: 충돌
ananjaemin Nov 10, 2022
5359fc5
Merge pull request #47 from ananjaemin/37-전체-페이지-반응형-작업
ananjaemin Nov 10, 2022
4d7c82c
fix: 충돌
ananjaemin Nov 10, 2022
d8badda
feat: url 변경(미완성
ananjaemin Nov 10, 2022
57f4308
fix: redux props name
ananjaemin Nov 10, 2022
64afb14
Merge branch 'dev' into 46-url-개편
ananjaemin Nov 10, 2022
1f2839e
Merge pull request #48 from ananjaemin/46-url-개편
ananjaemin Nov 10, 2022
09bda68
feat: no password redux에 url추가
ananjaemin Nov 10, 2022
c8b85b2
chore(deps): bump loader-utils from 2.0.2 to 2.0.3
dependabot[bot] Nov 10, 2022
36c4b96
feat: dark color
ananjaemin Nov 10, 2022
192c0cb
Merge branch '45-checkpw-page-dark-color-적용' of https://github.com/an…
ananjaemin Nov 10, 2022
957a7e6
Merge pull request #52 from ananjaemin/45-checkpw-page-dark-color-적용
ananjaemin Nov 10, 2022
94c9666
completion
minpeter Nov 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
PUBLIC_URL=/tempfiles-frontend
REACT_APP_BACKEND_BASEURL= https://tfb.minpeter.cf
PUBLIC_URL= '/'
REACT_APP_BACKEND_BASEURL=http://localhost:5000
# dev - http://localhost:5000
# main - https://tfb.minpeter.cf
42 changes: 42 additions & 0 deletions .github/workflows/docker-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Docker Image CI

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Nodejs
uses: actions/setup-node@v3
with:
node-version: 16

- name: Build
run: npm run build

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/tempfiles-frontend:latest
34 changes: 0 additions & 34 deletions .github/workflows/main.yml

This file was deleted.

7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM nginx:latest

COPY build /usr/share/nginx/html

EXPOSE 80

CMD nginx -g 'daemon off;'
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "frontend",
"version": "0.1.0",
"homepage": "https://ananjaemin.github.io/tempfiles-frontend/",
"homepage": "https://tempfiles.ml/",
"private": true,
"dependencies": {
"@emotion/react": "^11.10.4",
Expand Down Expand Up @@ -58,4 +58,4 @@
"prettier": "^2.7.1",
"react-scripts": "^5.0.1"
}
}
}
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import 'react-toastify/dist/ReactToastify.css';
import { Navbar } from './components';
import {
MainPage,
SuccessPage,
DownloadPage,
DeletePage,
FileListPage,
ApiPage,
NotFoundPage,
CheckPasswordPage,
} from './pages';
import { store } from './state/store';

Expand Down Expand Up @@ -45,11 +45,11 @@ export const App: React.FC = () => (
}
>
<Route index element={<MainPage />} />
<Route path="/success" element={<SuccessPage />} />
<Route path="/download" element={<DownloadPage />} />
<Route path="/delete" element={<DeletePage />} />
<Route path="/filelist" element={<FileListPage />} />
<Route path="/api/*" element={<ApiPage />} />
<Route path="/checkpw" element={<CheckPasswordPage />} />
<Route path="*" element={<NotFoundPage />} />
</Route>
</Routes>
Expand Down
22 changes: 22 additions & 0 deletions src/assets/lockIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/common/Button/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import styled from '@emotion/styled';

export const ButtonContainer = styled.input<{ bgColor: string }>`
background-color: ${(props) => props.bgColor};
border-radius: 8px;
border-radius: 0.8rem;
outline: none;
font-size: 2rem;
font-weight: 700;
width: 14rem;
height: 6rem;
border: 0;
color: var(--color-text-primary);
margin: 0px 10px 0px 10px;
margin: 0px 1rem 0px 1rem;
`;

ButtonContainer.defaultProps = { type: 'button' };
8 changes: 4 additions & 4 deletions src/components/common/CheckBox/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import styled from '@emotion/styled';
export const CheckBoxContainer = styled.div`
display: flex;
align-items: center;
margin-right: 40px;
margin-right: 4rem;
`;

export const CheckBoxObject = styled.div<{ isCheck: boolean }>`
width: 2.4rem;
height: 2.4rem;
padding: 5px;
margin: 5px 12px 5px 5px;
border-radius: 3px;
padding: 0.5rem;
margin: 0.5rem 1.2rem 0.5rem 0.5rem;
border-radius: 0.3rem;
background-color: ${(props) =>
props.isCheck ? 'var(--color-check-true-background)' : 'var(--color-check-false-background)'};
`;
Expand Down
12 changes: 12 additions & 0 deletions src/components/common/FileBox/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import styled from '@emotion/styled';

export const FileBox = styled.div`
background-color: var(--color-backgorund-filelistbox);
color: var(--color-text-tertiary);
border-radius: 1rem;
padding: 1.2rem 1.2rem 1.2rem 1.2rem;
display: flex;
flex-direction: row;
align-items: center;
font-size: 2.2rem;
`;
17 changes: 10 additions & 7 deletions src/components/common/FileFind/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ type FileFindProps = {

export const FileFind: React.FC<FileFindProps> = ({ handleChangeFile, fileProps }) => (
<S.FileFindContainer>
{fileProps.name != '' && fileProps.size != '' && fileProps.fileType != '' ? (
<S.FileFindTextBox placeholders={false}>
{'이름:' + fileProps.name + ' / 크기:' + fileProps.size + ' / 타입:' + fileProps.fileType}
</S.FileFindTextBox>
) : (
<S.FileFindTextBox placeholders={true}>업로드 할 파일을 선택해주세요....</S.FileFindTextBox>
)}
<S.FileFindTextBox>
{fileProps.filename != '' && fileProps.size != '' && fileProps.fileType != ''
? '이름:' +
fileProps.filename +
' / 크기:' +
fileProps.size +
' / 타입:' +
fileProps.fileType
: '업로드 할 파일을 선택해주세요....'}
</S.FileFindTextBox>

<S.FileFindButton htmlFor="file">찾아보기</S.FileFindButton>
<input type={'file'} id="file" style={{ display: 'none' }} onChange={handleChangeFile} />
Expand Down
20 changes: 9 additions & 11 deletions src/components/common/FileFind/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@ import styled from '@emotion/styled';
export const FileFindContainer = styled.div`
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
margin-top: 2rem;
`;

export const FileFindTextBox = styled.div<{ placeholders: boolean }>`
border: 4px solid var(--color-border);
border-radius: 10px;
export const FileFindTextBox = styled.div`
border: 0.4rem solid var(--color-border);
border-radius: 1rem;
width: 45rem;
height: 4.2rem;
background-color: var(--color-text-primary);
color: ${(props) =>
props.placeholders ? 'var(--color-text-placeholder)' : ' var(--color-text-secondary)'};
background-color: var(--color-backgorund-black);
color: var(--color-text-placeholder);
display: flex;
align-items: center;
white-space: nowrap;
padding-left: 12px;
padding-right: 12px;
padding-left: 1.2rem;
padding-right: 1.2rem;
font-size: 1.8rem;
font-weight: 700;
overflow: auto;
Expand All @@ -36,7 +34,7 @@ export const FileFindButton = styled.label`
display: flex;
align-items: center;
justify-content: center;
color: var(--color-text-secondary);
color: var(--color-text-primary);
font-size: 2rem;
font-weight: 700;
border-radius: 10px;
Expand Down
4 changes: 4 additions & 0 deletions src/components/common/FileListBox/index.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
import React from 'react';

import { ReactComponent as LockIcon } from '../../../assets/lockIcon.svg';
import * as S from './styled';

type FileListBoxProps = {
filename: string;
size: string;
LastModified: any;
isEncrypted: boolean;
click: () => void;
};

export const FileListBox: React.FC<FileListBoxProps> = ({
filename,
size,
LastModified,
isEncrypted,
click,
}) => (
<S.FileListBoxContainer onClick={click}>
{isEncrypted ? <LockIcon width={'2.3rem'} style={{ marginRight: '0.5rem' }} /> : <></>}
파일이름: {filename} / 크기:{size} / 업로드날짜:{LastModified.year}-{LastModified.month}-
{LastModified.day}
</S.FileListBoxContainer>
Expand Down
5 changes: 3 additions & 2 deletions src/components/common/FileListBox/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import styled from '@emotion/styled';
export const FileListBoxContainer = styled.div`
background-color: var(--color-backgorund-filelistbox);
color: var(--color-text-tertiary);
border-radius: 10px;
border-radius: 1rem;
padding: 1.2rem 1.2rem 1.2rem 1.2rem;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
align-items: flex-end;
font-size: 2.2rem;
margin-bottom: 1.5rem;
cursor: pointer;
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Navbar/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';
export const NavbarContainer = styled.nav`
width: 32rem;
min-width: 250px;
margin: 30px auto 30px auto;
margin: 3rem auto 3rem auto;
display: flex;
justify-content: space-between;
z-index: 99;
Expand Down
13 changes: 9 additions & 4 deletions src/components/common/PasswordInput/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import styled from '@emotion/styled';

export const PasswordInput = styled.input`
border: 4px solid var(--color-border);
border-radius: 10px;
border: 0.4rem solid var(--color-border);
background-color: var(--color-backgorund-black);
color: var(--color-text-placeholder);
border-radius: 1rem;
outline: none;
width: 100%;
height: 5rem;
padding-left: 12px;
padding-left: 1.2rem;
font-size: 1.8rem;
font-weight: 700;
margin-top: 20px;
margin-top: 2rem;
&::-webkit-input-placeholder {
color: var(--color-text-placeholder);
}
`;
6 changes: 3 additions & 3 deletions src/components/common/Progress/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export const ProgressBar = styled.div<{ width: number }>`
min-width: 70rem;
min-height: 5.6rem;
background: var(--color-backgorund-progressbar);
border-radius: 15px;
border-radius: 1.5rem;
overflow: hidden;
&::before {
content: ' ';
transition: all 1s;
width: ${(props) => props.width}%;
height: auto;
border-radius: 15px;
border-radius: 1.5rem;
background: #373c62;
}
`;
Expand All @@ -33,5 +33,5 @@ export const ProgressAnimationBox = styled.div`
width: 20rem;
height: 20rem;
overflow: hidden;
margin-bottom: 10px;
margin-bottom: 1rem;
`;
Loading