Skip to content

Commit

Permalink
Merge pull request #402 from Gateway-DAO/pre-main
Browse files Browse the repository at this point in the history
1st pre-main version to main
  • Loading branch information
NMCarv authored Mar 13, 2023
2 parents 6e58e75 + d6de1da commit adf75a7
Show file tree
Hide file tree
Showing 53 changed files with 20,588 additions and 199 deletions.
1 change: 0 additions & 1 deletion apps/website/components/atoms/avatar-file.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export function AvatarFile<Component extends React.ElementType>({
...props
}: AvatarFileProps<Component, { component?: Component }>) {
const image = useFile(file);

const src = image?.url ?? fallback;

return (
Expand Down
4 changes: 2 additions & 2 deletions apps/website/components/atoms/more-popover.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import MoreVertIcon from '@mui/icons-material/MoreVert';
import { Avatar, IconButton, Popover, Typography } from '@mui/material';
import { Avatar, IconButton, Popover, Stack, Typography } from '@mui/material';

type MorePopoverProps = {
options: {
Expand Down Expand Up @@ -38,7 +38,7 @@ const MorePopover = ({ options, withBackground }: MorePopoverProps) => {
onClick={handleClick}
key="gate-options"
>
<Avatar>
<Avatar sx={{ height: '30px', width: '31px' }}>
<MoreVertIcon
sx={{
mt: -0.25,
Expand Down
3 changes: 2 additions & 1 deletion apps/website/components/atoms/share-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ export function ShareButton(Props: Props) {
onClick={menu.onOpen}
key="share"
>
<Avatar>
<Avatar sx={{ height: '30px', width: '31px' }}>
<IosShare
sx={{
mt: -0.25,
height: '20px',
}}
/>
</Avatar>
Expand Down
4 changes: 3 additions & 1 deletion apps/website/components/atoms/task-icon/task-icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import CheckCircleIcon from '@mui/icons-material/CheckCircle';
import ElectricBoltIcon from '@mui/icons-material/ElectricBolt';
import GitHubIcon from '@mui/icons-material/GitHub';
import InsertLinkIcon from '@mui/icons-material/InsertLink';
import KeyIcon from '@mui/icons-material/Key';
import MonetizationOnIcon from '@mui/icons-material/MonetizationOn';
import NumbersIcon from '@mui/icons-material/Numbers';
import PhotoCameraBackIcon from '@mui/icons-material/PhotoCameraBack';
import QuizIcon from '@mui/icons-material/Quiz';
import Twitter from '@mui/icons-material/Twitter';
import KeyIcon from '@mui/icons-material/Key';
import { SvgIcon, SvgIconProps } from '@mui/material';
import { SxProps } from '@mui/material';
import Box from '@mui/material/Box';
Expand All @@ -24,6 +24,7 @@ const iconBgColor: Record<TaskType, string> = {
nft_hold: '#9A53FF',
meeting_code: '#9A53FF',
twitter_follow: '#0094FF',
twitter_like: '#0094FF',
twitter_retweet: '#0094FF',
twitter_tweet: '#0094FF',
github_contribute: '#4A4F57',
Expand All @@ -40,6 +41,7 @@ const typeIcons: Record<TaskType, SvgIconComponent> = {
nft_hold: PhotoCameraBackIcon,
meeting_code: NumbersIcon,
twitter_follow: Twitter,
twitter_like: Twitter,
twitter_retweet: Twitter,
twitter_tweet: Twitter,
github_contribute: GitHubIcon,
Expand Down
5 changes: 5 additions & 0 deletions apps/website/components/molecules/add-task/add-task-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ const AddTaskCard = ({ tasks, addTask }) => {
title: 'Retweet Post',
description: 'Ask users to retweet a post on Twitter',
},
{
type: 'twitter_like' as TaskType,
title: 'Like Tweet',
description: 'Ask users to like a post on Twitter',
},
{
type: 'twitter_tweet' as TaskType,
title: 'Post Tweet',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const FileLinkTask = ({ dragAndDrop, taskId, deleteTask }) => {
variant="standard"
autoFocus
sx={{
minWidth: { md: '600px', xs: '110%' },
minWidth: { md: '400px', xs: '110%', lg:'500px' },
maxWidth: { xs: '100%', md: '110%' },
}}
InputProps={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default function GithubContributeTask({
variant="standard"
autoFocus
sx={{
minWidth: { md: '600px', xs: '110%' },
minWidth: { md: '400px', xs: '110%', lg:'500px' },
maxWidth: { xs: '100%', md: '110%' },
}}
InputProps={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default function GithubPRTask({
variant="standard"
autoFocus
sx={{
minWidth: { md: '600px', xs: '110%' },
minWidth: { md: '400px', xs: '110%', lg:'500px' },
maxWidth: { xs: '100%', md: '110%' },
}}
InputProps={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const HoldNFTTask = ({ dragAndDrop, taskId, deleteTask }) => {
variant="standard"
autoFocus
sx={{
minWidth: { md: '600px', xs: '110%' },
minWidth: { md: '400px', xs: '110%', lg:'500px' },
maxWidth: { xs: '100%', md: '110%' },
}}
InputProps={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const HoldTokenTask = ({ dragAndDrop, taskId, deleteTask }) => {
variant="standard"
autoFocus
sx={{
minWidth: { md: '600px', xs: '110%' },
minWidth: { md: '400px', xs: '110%', lg:'500px' },
maxWidth: { xs: '100%', md: '110%' },
}}
InputProps={{
Expand Down
37 changes: 35 additions & 2 deletions apps/website/components/molecules/add-task/manual/manual-task.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import useTranslation from 'next-translate/useTranslation';
import { useEffect, useState } from 'react';

import { useFormContext } from 'react-hook-form';
import { Controller, useFormContext } from 'react-hook-form';

import { ExpandLess, ExpandMore } from '@mui/icons-material';
import DeleteIcon from '@mui/icons-material/Delete';
import {
Box,
FormControl,
FormControlLabel,
FormLabel,
IconButton,
Radio,
RadioGroup,
Stack,
TextField,
Typography,
Expand All @@ -21,6 +25,7 @@ export const ManualTask = ({ dragAndDrop, taskId, deleteTask }) => {
const { t } = useTranslation('gate-new');
const {
register,
control,
setValue,
getValues,
formState: { errors },
Expand Down Expand Up @@ -85,7 +90,7 @@ export const ManualTask = ({ dragAndDrop, taskId, deleteTask }) => {
variant="standard"
autoFocus
sx={{
minWidth: { md: '600px', xs: '110%' },
minWidth: { md: '400px', xs: '110%', lg: '500px' },
maxWidth: { xs: '100%', md: '110%' },
}}
InputProps={{
Expand Down Expand Up @@ -169,6 +174,34 @@ export const ManualTask = ({ dragAndDrop, taskId, deleteTask }) => {
},
}}
/>
<FormLabel id="demo-radio-buttons-group-label">
Ask users to submit a
</FormLabel>

<Controller
name={`tasks.${taskId}.task_data.event_type`}
control={control}
defaultValue={'send_link'}
render={({ field }) => (
<RadioGroup
row
aria-labelledby="demo-row-radio-buttons-group-label"
name="row-radio-buttons-group"
{...field}
>
<FormControlLabel
value="send_link"
control={<Radio />}
label="URL link"
/>
<FormControlLabel
value="comment"
control={<Radio />}
label="Text"
/>
</RadioGroup>
)}
/>
</FormControl>
</Stack>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import {
Typography,
} from '@mui/material';

import { TaskIcon } from '../../../atoms/task-icon';
import { QuestionCreator } from '../../../organisms/question-creator/question-creator';
import {
CreateGateData,
QuizTaskDataError,
} from '../../../templates/create-gate/schema';
import { TaskIcon } from 'apps/website/components/atoms/task-icon';

// Time Period (minutes)
export enum TimePeriod {
Expand Down Expand Up @@ -148,7 +148,7 @@ export function QuizTask({
required
autoFocus
sx={{
minWidth: { md: '600px', xs: '110%' },
minWidth: { md: '400px', xs: '110%', lg: '500px' },
maxWidth: { xs: '100%', md: '110%' },
}}
InputProps={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const SnapshotTask = ({ dragAndDrop, taskId, deleteTask }) => {
variant="standard"
autoFocus
sx={{
minWidth: { md: '600px', xs: '110%' },
minWidth: { md: '400px', xs: '110%', lg:'500px' },
maxWidth: { xs: '100%', md: '110%' },
}}
InputProps={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const FollowProfile = ({ dragAndDrop, taskId, deleteTask }) => {
variant="standard"
autoFocus
sx={{
minWidth: { md: '600px', xs: '110%' },
minWidth: { md: '400px', xs: '110%', lg:'500px' },
maxWidth: { xs: '100%', md: '110%' },
}}
InputProps={{
Expand Down
Loading

1 comment on commit adf75a7

@vercel
Copy link

@vercel vercel bot commented on adf75a7 Mar 13, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.