Skip to content

Commit

Permalink
update figma 1.2 & 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentxuu committed Apr 15, 2023
1 parent b6c2bff commit b643cf7
Show file tree
Hide file tree
Showing 20 changed files with 249 additions and 252 deletions.
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"tabWidth": 2
}
37 changes: 23 additions & 14 deletions components/Profile/Contact/ContactDone/index.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Modal, Box, Typography, Button } from '@mui/material';

function ContactDoneModal({ onClose, onOk, isLoadingSubmit, open }) {
function ContactDoneModal() {
return (
<Modal
keepMounted
open={open}
onClose={onClose}
open
aria-labelledby="keep-mounted-modal-title"
aria-describedby="keep-mounted-modal-description"
>
Expand All @@ -16,18 +15,24 @@ function ContactDoneModal({ onClose, onOk, isLoadingSubmit, open }) {
left: '50%',
transform: 'translate(-50%, -50%)',
width: '480px',
height: '602px',
bgcolor: 'background.paper',
boxShadow: 24,
borderRadius: '16px',
p: 5,
p: '45px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
}}
>
<img
src="/assets/partner-popup.png"
alt="nobody-land"
width="360"
height="280"
/>
<Box sx={{ mt: '77px', mb: '16px' }}>
<img
src="/assets/contactdone.png"
alt="nobody-land"
width="312px"
height="184px"
/>
</Box>
<Typography
id="keep-mounted-modal-title"
variant="h3"
Expand All @@ -52,15 +57,19 @@ function ContactDoneModal({ onClose, onOk, isLoadingSubmit, open }) {
fontWeight: 400,
fontWize: '14px',
lineHeight: '140%',
mt: '8px',
}}
>
請耐心等候夥伴的回應
</Typography>
<Button
sx={{ width: '100%', borderRadius: '20px', mr: '4px' }}
variant="outlined"
disabled={isLoadingSubmit}
onClick={onClose}
sx={{
color: 'white',
width: '100%',
borderRadius: '20px',
mt: '145px',
}}
variant="contained"
>
關閉
</Button>
Expand Down
66 changes: 66 additions & 0 deletions components/Profile/Contact/ContactError/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { Modal, Box, Typography, Button } from '@mui/material';

function ContactErrorModal() {
return (
<Modal
keepMounted
open
aria-labelledby="keep-mounted-modal-title"
aria-describedby="keep-mounted-modal-description"
>
<Box
sx={{
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
width: '480px',
height: '602px',
bgcolor: 'background.paper',
boxShadow: 24,
borderRadius: '16px',
p: '45px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
}}
>
<Box sx={{ mt: '68px', mb: '21px' }}>
<img
src="/assets/contacterror.png"
alt="nobody-land"
width="212px"
height="184px"
/>
</Box>
<Typography
id="keep-mounted-modal-title"
variant="h3"
component="h2"
textAlign="center"
sx={{
color: ' #536166',
fontWeight: 700,
fontWize: '18px',
lineHeight: '120%',
}}
>
哎呀!有不明錯誤
</Typography>
<Button
sx={{
color: 'white',
width: '100%',
borderRadius: '20px',
mt: '173px ',
}}
variant="contained"
>
再試一次
</Button>
</Box>
</Modal>
);
}

export default ContactErrorModal;
78 changes: 4 additions & 74 deletions components/Profile/Contact/index.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React, { useState } from 'react';
import {
Modal,
Box,
Expand All @@ -7,76 +8,6 @@ import {
Avatar,
} from '@mui/material';


function ContactDoneModal() {
return (
<Modal
keepMounted
// open={open}
// onClose={onClose}
aria-labelledby="keep-mounted-modal-title"
aria-describedby="keep-mounted-modal-description"
>
<Box
sx={{
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
width: '480px',
bgcolor: 'background.paper',
boxShadow: 24,
borderRadius: '16px',
p: 5,
}}
>
<img
src="/assets/partner-popup.png"
alt="nobody-land"
width="360"
height="280"
/>
<Typography
id="keep-mounted-modal-title"
variant="h3"
component="h2"
textAlign="center"
sx={{
color: ' #536166',
fontWeight: 700,
fontWize: '18px',
lineHeight: '120%',
}}
>
已送出邀請
</Typography>
<Typography
id="keep-mounted-modal-subtitle"
variant="h6"
component="h4"
textAlign="center"
sx={{
color: ' #536166',
fontWeight: 400,
fontWize: '14px',
lineHeight: '140%',
}}
>
請耐心等候夥伴的回應
</Typography>
<Button
sx={{ width: '100%', borderRadius: '20px', mr: '4px' }}
variant="outlined"
disabled={isLoadingSubmit}
onClick={onClose}
>
關閉
</Button>
</Box>
</Modal>
);
}

function ContactModal({ onClose, onOk, isLoadingSubmit, open }) {
return (
<Modal
Expand Down Expand Up @@ -137,7 +68,7 @@ function ContactModal({ onClose, onOk, isLoadingSubmit, open }) {
width: '100%',
display: 'flex',
flexDirection: 'column',
ml: '12px'
ml: '12px',
}}
>
<Typography
Expand Down Expand Up @@ -177,7 +108,7 @@ function ContactModal({ onClose, onOk, isLoadingSubmit, open }) {
</Typography>
<TextareaAutosize
sx={{
color:'#DBDBDB',
color: '#DBDBDB',
width: '100%',
minHeight: '200px',
padding: '10px',
Expand All @@ -200,7 +131,7 @@ function ContactModal({ onClose, onOk, isLoadingSubmit, open }) {
</Typography>
<TextareaAutosize
sx={{
color:'#DBDBDB',
color: '#DBDBDB',
width: '100%',
minHeight: '200px',
padding: '10px',
Expand Down Expand Up @@ -232,7 +163,6 @@ function ContactModal({ onClose, onOk, isLoadingSubmit, open }) {
bgcolor: '#16B9B3',
}}
variant="contained"
onClick={()=> {ContactDoneModal}}
>
送出
</Button>
Expand Down
5 changes: 2 additions & 3 deletions components/Profile/Edit/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import COUNTIES from '../../../constants/countries.json';
const HomePageWrapper = styled.div`
--section-height: calc(100vh - 80px);
--section-height-offset: 80px;
`;

const ContentWrapper = styled.div`
Expand Down Expand Up @@ -92,7 +91,7 @@ function EditPage() {
if (!isLoading) {
const db = getFirestore();
if (user?.uid) {
const docRef = doc(db, 'user', user?.uid);
const docRef = doc(db, 'partnerlist', user?.uid);
getDoc(docRef).then((docSnap) => {
const data = docSnap.data();
console.log('data', data);
Expand Down Expand Up @@ -134,7 +133,7 @@ function EditPage() {

const db = getFirestore();

const docRef = doc(db, 'user', user?.uid);
const docRef = doc(db, 'partnerlist', user?.uid);
const partnerlistDocRef = doc(db, 'partnerlist', user?.uid);
getDoc(docRef).then((docSnap) => {
setIsLoadingSubmit(true);
Expand Down
5 changes: 3 additions & 2 deletions components/Profile/UserCard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Box, Button, Chip, Skeleton, Typography } from '@mui/material';
import { LazyLoadImage } from 'react-lazy-load-image-component';
import LocationOnOutlinedIcon from '@mui/icons-material/LocationOnOutlined';
import EditOutlinedIcon from '@mui/icons-material/EditOutlined';
import moment from 'moment/moment';
import { useRouter } from 'next/router';
import LOCATION from '../../../constants/countries.json';

Expand Down Expand Up @@ -185,7 +186,7 @@ function UserCard({
disabled
size="small"
sx={{
height:'24px',
height: '24px',
fontSize: '14px',
margin: '0px 0px 5px 8px ',
}}
Expand Down Expand Up @@ -231,7 +232,7 @@ function UserCard({
component="p"
sx={{ fontSize: '12px', color: '#92989A', marginTop: '5px' }}
>
1天前更新
{moment(new Date() - 500 * 60 * 60).fromNow()}
</Typography>
</Box>
</Box>
Expand Down
Loading

1 comment on commit b643cf7

@vercel
Copy link

@vercel vercel bot commented on b643cf7 Apr 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

daodao-f2e – ./

daodao-f2e.vercel.app
daodao-f2e-git-dev-daodaoedu.vercel.app
daodao-f2e-daodaoedu.vercel.app

Please sign in to comment.