Skip to content

Commit 388afbf

Browse files
authored
Merge pull request #663 from dOrgTech/develop
Merge Develop to Master
2 parents 7de8b00 + af626f6 commit 388afbf

56 files changed

Lines changed: 1381 additions & 411 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@types/mixpanel-browser": "^2.35.7",
3838
"@types/prismjs": "^1.26.0",
3939
"@types/react-router-hash-link": "^2.4.5",
40+
"@types/valid-url": "^1.0.4",
4041
"assert": "^2.0.0",
4142
"bignumber.js": "^9.0.1",
4243
"blockies-ts": "^1.0.0",
@@ -77,6 +78,7 @@
7778
"stream-http": "^3.2.0",
7879
"url": "^0.11.0",
7980
"util": "^0.12.5",
81+
"valid-url": "^1.0.9",
8082
"yup": "^0.32.9"
8183
},
8284
"devDependencies": {
@@ -131,4 +133,4 @@
131133
"yarn lint:check"
132134
]
133135
}
134-
}
136+
}

src/models/Community.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface Community {
1414
allowPublicAccess: boolean
1515
decimals?: string
1616
network: string
17+
votingAddressesCount: number
1718
}
1819

1920
export interface CommunityToken {
@@ -23,4 +24,5 @@ export interface CommunityToken {
2324
symbol: string
2425
tokenAddress: string
2526
decimals: string
27+
message?: string
2628
}

src/modules/common/SmallButton.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export const SmallButton = styled(Button)({
77
"transition": ".15s ease-out",
88
"textTransform": "capitalize",
99
"borderRadius": 8,
10+
"backgroundColor": "#81feb7 !important",
11+
"color": "#1c1f23",
1012

1113
"&$disabled": {
1214
boxShadow: "none"

src/modules/creator/deployment/index.tsx

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const ProgressContainer = styled(Grid)(({ theme }) => ({
7676
background: "#2F3438",
7777
display: "grid",
7878
borderRadius: 8,
79-
maxHeight: 410,
79+
maxHeight: 460,
8080
paddingTop: 20,
8181
position: "sticky",
8282
top: 125
@@ -92,6 +92,21 @@ const StyledStepper = styled(Stepper)({
9292
"cursor": "pointer"
9393
})
9494

95+
const FAQClickToAction = styled(Typography)(({ theme }) => ({
96+
color: theme.palette.secondary.main,
97+
fontSize: "14px",
98+
cursor: "pointer",
99+
textAlign: "center",
100+
textDecoration: "underline"
101+
}))
102+
103+
const FAQClickText = styled(Typography)(({ theme }) => ({
104+
color: theme.palette.secondary.main,
105+
fontSize: "14px",
106+
cursor: "pointer",
107+
textAlign: "center"
108+
}))
109+
95110
export const Deployment: React.FC = () => {
96111
const creator = useContext(DeploymentContext)
97112

@@ -102,7 +117,11 @@ export const Deployment: React.FC = () => {
102117

103118
const history = useHistory()
104119
const step = useDeploymentStepNumber()
105-
const progress = useMemo(() => step * 50, [step])
120+
const progress = useMemo(() => step * 45, [step])
121+
122+
const goToFAQ = (): void => {
123+
history.push("/faq")
124+
}
106125

107126
return (
108127
<PageContainer container direction="row">
@@ -120,10 +139,15 @@ export const Deployment: React.FC = () => {
120139
trackStrokeColor={"rgba(255, 255, 255, 0.2)"}
121140
>
122141
<Box className="indicator">
123-
<IndicatorValue>{progress === 0.5 ? 0 : step * 50}%</IndicatorValue>
142+
<IndicatorValue>{progress === 0.5 ? 0 : step * 45}%</IndicatorValue>
124143
</Box>
125144
</ProgressBar>
126145

146+
<Box onClick={goToFAQ}>
147+
<FAQClickText>New to DAOs?</FAQClickText>
148+
<FAQClickToAction> Read our FAQ </FAQClickToAction>
149+
</Box>
150+
127151
<StyledStepper activeStep={step} orientation="vertical">
128152
{STEPS.map(({ title, path }: StepInfo, index: number) => (
129153
<Step key={title}>

src/modules/creator/deployment/steps/Config.tsx

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const CustomTextarea = styled(withTheme(TextareaAutosize))(props => ({
2727
"boxSizing": "border-box",
2828
"width": "100%",
2929
"marginTop": 14,
30-
"fontWeight": 400,
30+
"fontWeight": 300,
3131
"padding": "21px 20px",
3232
"fontFamily": "Roboto Mono",
3333
"border": "none",
@@ -66,19 +66,24 @@ const CustomFormikTextField = withStyles({
6666
})(FormikTextField)
6767

6868
const CustomInputContainer = styled(Grid)(({ theme }) => ({
69-
height: 54,
70-
boxSizing: "border-box",
71-
marginTop: 14,
72-
background: "#2F3438",
73-
borderRadius: 8,
74-
alignItems: "center",
75-
display: "flex",
76-
padding: "13px 23px"
69+
"height": 54,
70+
"boxSizing": "border-box",
71+
"marginTop": 14,
72+
"background": "#2F3438",
73+
"borderRadius": 8,
74+
"alignItems": "center",
75+
"display": "flex",
76+
"padding": "13px 23px",
77+
"fontWeight": 300,
78+
"& input::placeholder": {
79+
fontWeight: 300
80+
}
7781
}))
7882

7983
const ErrorText = styled(Typography)({
8084
fontSize: 14,
81-
color: "red"
85+
color: "red",
86+
marginTop: 4
8287
})
8388

8489
const TextareaContainer = styled(Grid)({
@@ -116,6 +121,8 @@ const TokenSettingsForm = ({ submitForm, values, errors, touched, setFieldValue,
116121
const { dispatch } = useContext(DeploymentContext)
117122
const match = useRouteMatch()
118123
const history = useHistory()
124+
const theme = useTheme()
125+
const isMobileSmall = useMediaQuery(theme.breakpoints.down("sm"))
119126

120127
useEffect(() => {
121128
if (values) {
@@ -126,6 +133,10 @@ const TokenSettingsForm = ({ submitForm, values, errors, touched, setFieldValue,
126133
submitForm(values)
127134
},
128135
text: "Continue"
136+
},
137+
back: {
138+
text: "Back",
139+
handler: () => history.push("/creator/ownership")
129140
}
130141
})
131142
}
@@ -137,10 +148,10 @@ const TokenSettingsForm = ({ submitForm, values, errors, touched, setFieldValue,
137148
<Grid item xs={12}>
138149
<Typography variant="subtitle1" color="textSecondary">
139150
{" "}
140-
Contract name{" "}
151+
Contract Name{" "}
141152
</Typography>
142153
<CustomInputContainer>
143-
<Field id="outlined-basic" placeholder="Contract name" name="name" component={CustomFormikTextField} />
154+
<Field id="outlined-basic" placeholder="Contract Name" name="name" component={CustomFormikTextField} />
144155
</CustomInputContainer>
145156
{errors.name && touched.name ? <ErrorText>{errors.name}</ErrorText> : null}
146157
</Grid>
@@ -157,7 +168,7 @@ const TokenSettingsForm = ({ submitForm, values, errors, touched, setFieldValue,
157168
<CustomTextarea
158169
maxLength={1500}
159170
aria-label="empty textarea"
160-
placeholder="Description"
171+
placeholder="Type a description"
161172
value={getIn(values, "description")}
162173
onChange={(newValue: any) => {
163174
setFieldValue("description", newValue.target.value)
@@ -178,15 +189,15 @@ const TokenSettingsForm = ({ submitForm, values, errors, touched, setFieldValue,
178189
<Field
179190
id="outlined-basic"
180191
type="number"
181-
placeholder="Supply"
192+
placeholder="0"
182193
name="totalSupply"
183194
component={CustomFormikTextField}
184195
onKeyDown={(e: FieldChange) => handleNegativeInput(e)}
185196
/>
186197
</CustomInputContainer>
187198
{errors.totalSupply && touched.totalSupply ? <ErrorText>{errors.totalSupply}</ErrorText> : null}
188199
</Grid>
189-
<Grid item xs={6}>
200+
<Grid item xs={isMobileSmall ? 6 : 3}>
190201
<Typography variant="subtitle1" color="textSecondary">
191202
{" "}
192203
Decimals{" "}
@@ -195,7 +206,7 @@ const TokenSettingsForm = ({ submitForm, values, errors, touched, setFieldValue,
195206
<Field
196207
id="outlined-basic"
197208
type="number"
198-
placeholder="Decimals"
209+
placeholder="0"
199210
name="decimals"
200211
component={CustomFormikTextField}
201212
onKeyDown={(e: FieldChange) => handleChange(e)}
@@ -209,21 +220,21 @@ const TokenSettingsForm = ({ submitForm, values, errors, touched, setFieldValue,
209220
<Grid item xs={6}>
210221
<Typography variant="subtitle1" color="textSecondary">
211222
{" "}
212-
Symbol{" "}
223+
Icon{" "}
213224
</Typography>
214225
<CustomInputContainer>
215-
<Field id="outlined-basic" placeholder="Symbol" name="symbol" component={CustomFormikTextField} />
226+
<Field id="outlined-basic" placeholder="URL" name="icon" component={CustomFormikTextField} />
216227
</CustomInputContainer>
217-
{errors.symbol && touched.symbol ? <ErrorText>{errors.symbol}</ErrorText> : null}
218228
</Grid>
219-
<Grid item xs={6}>
229+
<Grid item xs={isMobileSmall ? 6 : 3}>
220230
<Typography variant="subtitle1" color="textSecondary">
221231
{" "}
222-
Icon{" "}
232+
Symbol{" "}
223233
</Typography>
224234
<CustomInputContainer>
225-
<Field id="outlined-basic" placeholder="Icon" name="icon" component={CustomFormikTextField} />
235+
<Field id="outlined-basic" placeholder="TEZ" name="symbol" component={CustomFormikTextField} />
226236
</CustomInputContainer>
237+
{errors.symbol && touched.symbol ? <ErrorText>{errors.symbol}</ErrorText> : null}
227238
</Grid>
228239
</Grid>
229240
</Grid>
@@ -252,7 +263,9 @@ export const ConfigContract: React.FC = () => {
252263
<>
253264
<Grid container direction="column">
254265
<Grid>
255-
<TitleBlock title="Configure token contract" description={""}></TitleBlock>
266+
<Typography style={{ marginBottom: 32 }} variant="h5" color="textSecondary">
267+
Configure Token Contract
268+
</Typography>
256269
</Grid>
257270

258271
<Formik

0 commit comments

Comments
 (0)