-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #326 from forbole/staging
Staging
- Loading branch information
Showing
40 changed files
with
856 additions
and
239 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/deploy.yaml → .github/workflows/deploy-production.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy | ||
name: Deploy Production | ||
on: | ||
push: | ||
branches: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Deploy Staging | ||
on: | ||
push: | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Update env variables | ||
run: | | ||
sed -i 's/MAILGUN_USER=secret/MAILGUN_USER=${{ secrets.MAILGUN_USER }}/g' .env | ||
sed -i 's/MAILGUN_KEY=secret/MAILGUN_KEY=${{ secrets.MAILGUN_KEY }}/g' .env | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: forbole/forbole-x-staging:latest | ||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
components/ConfirmTransactionDialog/ConfirmStageContent/SaveProfileContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { Divider, Typography, Box, useTheme, Avatar } from '@material-ui/core' | ||
import useTranslation from 'next-translate/useTranslation' | ||
import React from 'react' | ||
import SaveProfileIcon from '../../../assets/images/icons/icon_profile_tx.svg' | ||
import { useGeneralContext } from '../../../contexts/GeneralContext' | ||
import useStyles from '../styles' | ||
|
||
interface SaveProfileContentProps { | ||
msgs: TransactionMsgSaveProfile[] | ||
} | ||
|
||
const SaveProfileContent: React.FC<SaveProfileContentProps> = ({ msgs }) => { | ||
const { t } = useTranslation('common') | ||
const themeStyle = useTheme() | ||
const { theme } = useGeneralContext() | ||
const classes = useStyles() | ||
|
||
return ( | ||
<> | ||
<Box display="flex" flexDirection="column" alignItems="center" mt={6}> | ||
<SaveProfileIcon width={themeStyle.spacing(6)} height={themeStyle.spacing(6)} /> | ||
<Box mt={2} mb={4}> | ||
<Typography variant="h4">{t('save profile')}</Typography> | ||
</Box> | ||
</Box> | ||
{msgs.map((msg, i) => ( | ||
<React.Fragment key={String(i)}> | ||
<img | ||
src={msg.value.coverPicture || `/static/images/default_cover_image_${theme}.png`} | ||
alt="cover" | ||
className={classes.coverImg} | ||
/> | ||
<Avatar | ||
className={classes.avatar} | ||
title={msg.value.nickname} | ||
src={msg.value.profilePicture || `/static/images/default_profile_pic_${theme}.png`} | ||
/> | ||
<Box my={1}> | ||
<Typography>{t('nickname')}</Typography> | ||
<Typography color="textSecondary">{msg.value.nickname}</Typography> | ||
</Box> | ||
<Divider /> | ||
<Box my={1}> | ||
<Typography>{t('dtag')}</Typography> | ||
<Typography color="textSecondary">@{msg.value.dtag}</Typography> | ||
</Box> | ||
<Divider /> | ||
<Box my={1}> | ||
<Typography>{t('bio')}</Typography> | ||
<Typography color="textSecondary">{msg.value.bio}</Typography> | ||
</Box> | ||
<Divider /> | ||
</React.Fragment> | ||
))} | ||
</> | ||
) | ||
} | ||
|
||
export default SaveProfileContent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { Card, CardMedia, CardContent, Typography, Avatar, Box, Button } from '@material-ui/core' | ||
import useTranslation from 'next-translate/useTranslation' | ||
import React from 'react' | ||
import useStyles from './styles' | ||
import { useGeneralContext } from '../../contexts/GeneralContext' | ||
|
||
interface ProfileCardProps { | ||
profile: Profile | ||
onEditProfile(): void | ||
} | ||
|
||
const ProfileCard: React.FC<ProfileCardProps> = ({ profile, onEditProfile }) => { | ||
const classes = useStyles() | ||
const { t } = useTranslation('common') | ||
const { theme } = useGeneralContext() | ||
|
||
return ( | ||
<Card className={classes.container}> | ||
<CardMedia | ||
className={classes.coverImage} | ||
image={profile.coverPic || `/static/images/default_cover_image_${theme}.png`} | ||
title={profile.nickname} | ||
/> | ||
<CardContent className={classes.content}> | ||
<Avatar | ||
className={classes.avatar} | ||
title={profile.nickname} | ||
src={profile.profilePic || `/static/images/default_profile_pic_${theme}.png`} | ||
/> | ||
<Box display="flex" justifyContent="space-between" alignItems="flex-start"> | ||
<Box> | ||
<Typography variant="h4">{profile.nickname}</Typography> | ||
<Typography gutterBottom>@{profile.dtag}</Typography> | ||
</Box> | ||
{/* <Button className={classes.button} variant="outlined" onClick={onEditProfile}> | ||
{t('edit profile')} | ||
</Button> */} | ||
</Box> | ||
<Typography>{profile.bio}</Typography> | ||
</CardContent> | ||
</Card> | ||
) | ||
} | ||
|
||
export default ProfileCard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { makeStyles } from '@material-ui/core/styles' | ||
import { CustomTheme } from '../../misc/theme' | ||
|
||
const useStyles = makeStyles( | ||
(theme: CustomTheme) => ({ | ||
container: { | ||
marginBottom: theme.spacing(2), | ||
}, | ||
content: { | ||
padding: theme.spacing(3), | ||
marginTop: theme.spacing(-10.5), | ||
}, | ||
coverImage: { | ||
height: theme.spacing(27.5), | ||
}, | ||
avatar: { | ||
width: theme.spacing(15), | ||
height: theme.spacing(15), | ||
marginBottom: theme.spacing(2), | ||
}, | ||
button: { | ||
borderColor: theme.palette.iconBorder, | ||
}, | ||
}), | ||
{ | ||
name: 'HookGlobalStyles', | ||
index: 2, | ||
} | ||
) | ||
|
||
export default useStyles |
Oops, something went wrong.