Skip to content

Commit

Permalink
Merge pull request #587 from dOrgTech/develop
Browse files Browse the repository at this point in the history
Merge Develop to Master
  • Loading branch information
Man-Jain authored Jun 6, 2023
2 parents 7383848 + cc3544b commit 0d9d072
Show file tree
Hide file tree
Showing 38 changed files with 17,505 additions and 20,369 deletions.
31,555 changes: 13,989 additions & 17,566 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/assets/img/chart-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/img/cycle-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/img/list-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/img/tezos-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/modules/creator/deployment/steps/Config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ const CustomFormikTextField = withStyles({
"& .MuiInput-underline:after": {
borderBottom: "none !important"
}
}
},
disabled: {}
})(FormikTextField)

const CustomInputContainer = styled(Grid)(({ theme }) => ({
Expand Down
4 changes: 2 additions & 2 deletions src/modules/creator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const DAOCreate: React.FC = () => {

const { back, next } = creator.state
const step = useStepNumber()
const progress = useMemo(() => step * 33, [step])
const progress = useMemo(() => step * 20, [step])
const history = useHistory()
const theme = useTheme()
const isMobile = useMediaQuery(theme.breakpoints.down("sm"))
Expand Down Expand Up @@ -154,7 +154,7 @@ export const DAOCreate: React.FC = () => {
trackStrokeColor={"rgba(255, 255, 255, 0.2)"}
>
<Box className="indicator">
<IndicatorValue>{progress === 0.5 ? 0 : step * 33}%</IndicatorValue>
<IndicatorValue>{progress === 0.5 ? 0 : step * 20}%</IndicatorValue>
</Box>
</ProgressBar>
<Box>
Expand Down
46 changes: 14 additions & 32 deletions src/modules/explorer/components/AllProposalsList.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import { Collapse, Grid, IconButton, styled, Typography } from "@material-ui/core"
import { Collapse, Grid, styled, Theme, Typography } from "@material-ui/core"
import { ProposalItem } from "modules/explorer/pages/User"
import React, { useCallback, useEffect, useMemo, useState } from "react"
import React, { useCallback, useEffect, useState } from "react"
import { Link } from "react-router-dom"
import { Proposal, ProposalStatus } from "services/services/dao/mappers/proposal/types"
import { ContentContainer } from "./ContentContainer"
import { Dropdown } from "./Dropdown"
import { ProposalFilter } from "./ProposalsFilter"

const TableContainer = styled(ContentContainer)({
width: "100%"
})

const TableHeader = styled(Grid)({
const TableHeader = styled(Grid)(({ theme }: { theme: Theme }) => ({
padding: "16px 46px",
minHeight: 34
})
minHeight: 34,
[theme.breakpoints.down("sm")]: {
gap: 10
}
}))

const ProposalsFooter = styled(Grid)({
padding: "16px 46px",
Expand All @@ -31,13 +34,13 @@ interface Props {

export const AllProposalsList: React.FC<Props> = ({ currentLevel, proposals, title, showFooter, rightItem }) => {
const [filteredProposal, setFilteredProposals] = useState(proposals)
const [filter, setFilter] = useState("All")
const [filter, setFilter] = useState("all")

const filterProposals = useCallback(
(status?: any) => {
if (status === "All") {
if (status === "all") {
return setFilteredProposals(proposals)
} else if (status !== "All" && status !== undefined) {
} else if (status !== "all" && status !== undefined) {
const filtered = proposals.filter(proposal => proposal["cachedStatus"]?.status === status)
setFilteredProposals(filtered)
} else {
Expand Down Expand Up @@ -65,32 +68,11 @@ export const AllProposalsList: React.FC<Props> = ({ currentLevel, proposals, tit
<Grid container direction="column" wrap={"nowrap"}>
<TableHeader item container justifyContent="space-between" alignItems="center">
<Grid item>
<Typography variant="body2" style={{ fontWeight: "500" }} color="textPrimary">
<Typography variant="body1" style={{ fontWeight: "500" }} color="textPrimary">
{title}
</Typography>
</Grid>
{proposals.length ? (
<Grid item>
<IconButton aria-label="expand row" size="small">
<Dropdown
options={[
{ name: "All", value: "All" },
{ name: ProposalStatus.ACTIVE, value: ProposalStatus.ACTIVE },
{ name: ProposalStatus.DROPPED, value: ProposalStatus.DROPPED },
{ name: ProposalStatus.EXECUTABLE, value: ProposalStatus.EXECUTABLE },
{ name: ProposalStatus.EXECUTED, value: ProposalStatus.EXECUTED },
{ name: ProposalStatus.EXPIRED, value: ProposalStatus.EXPIRED },
{ name: ProposalStatus.NO_QUORUM, value: ProposalStatus.NO_QUORUM },
{ name: ProposalStatus.PASSED, value: ProposalStatus.PASSED },
{ name: ProposalStatus.PENDING, value: ProposalStatus.PENDING },
{ name: ProposalStatus.REJECTED, value: ProposalStatus.REJECTED }
]}
value={"All"}
onSelected={filterProposalByStatus}
/>{" "}
</IconButton>
</Grid>
) : null}
{proposals.length ? <ProposalFilter filterProposalByStatus={filterProposalByStatus} /> : null}
</TableHeader>
{filteredProposal.length ? (
<Grid
Expand Down
2 changes: 1 addition & 1 deletion src/modules/explorer/components/CodeCollapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const CodeCollapse: React.FC<Props> = ({ code }) => {
>
<ProposalCodeEditorInput
label=""
containerStyle={{ marginTop: "8px" }}
containerstyle={{ marginTop: "8px" }}
insertSpaces
ignoreTabKey={false}
tabSize={4}
Expand Down
20 changes: 10 additions & 10 deletions src/modules/explorer/components/ConfigProposalFormLambda.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const CheckIcon = styled(CheckOutlined)({
fontSize: 169
})

const codeEditorContainerStyles = {
const codeEditorcontainerstyles = {
marginTop: "8px"
}

Expand Down Expand Up @@ -87,7 +87,7 @@ enum LambdaProposalState {
const codeEditorPlaceholder = {
addLambda: `Write Michelson Code for Lambda's Implementation
Eg:-
Eg:-
(Left (Left (Pair (Pair { DROP ;
NIL operation ;
Expand All @@ -102,7 +102,7 @@ Eg:-
`,
lambdaExecuteArgumentsCode: `Write Michelson Code for the input Paramerers of your Lambda
Eg:-
Eg:-
{
"prim": "pair",
Expand All @@ -127,7 +127,7 @@ Eg:-
`,
lambdaExecuteParams: `Enter the values for the given params in a JSON/JavaScript Object format.
Eg:-
Eg:-
{
xtz_transfer_type: {
Expand Down Expand Up @@ -259,7 +259,7 @@ export const ProposalFormLambda: React.FC<Props> = ({ open, handleClose, action
<>
<ProposalCodeEditorInput
label="Implementation"
containerStyle={codeEditorContainerStyles}
containerstyle={codeEditorcontainerstyles}
insertSpaces
ignoreTabKey={false}
tabSize={4}
Expand All @@ -282,7 +282,7 @@ export const ProposalFormLambda: React.FC<Props> = ({ open, handleClose, action
</ProposalFormInput>
<ProposalCodeEditorInput
label="Implementation"
containerStyle={codeEditorContainerStyles}
containerstyle={codeEditorcontainerstyles}
insertSpaces
ignoreTabKey={false}
tabSize={4}
Expand All @@ -305,7 +305,7 @@ export const ProposalFormLambda: React.FC<Props> = ({ open, handleClose, action
</ProposalFormInput>
<ProposalCodeEditorInput
label="Implementation"
containerStyle={codeEditorContainerStyles}
containerstyle={codeEditorcontainerstyles}
insertSpaces
ignoreTabKey={false}
tabSize={4}
Expand All @@ -318,7 +318,7 @@ export const ProposalFormLambda: React.FC<Props> = ({ open, handleClose, action
/>
<ProposalCodeEditorInput
label="Lambda Arguments Code"
containerStyle={codeEditorContainerStyles}
containerstyle={codeEditorcontainerstyles}
insertSpaces
ignoreTabKey={false}
tabSize={4}
Expand All @@ -331,7 +331,7 @@ export const ProposalFormLambda: React.FC<Props> = ({ open, handleClose, action
/>
<ProposalCodeEditorInput
label="Lambda Params"
containerStyle={codeEditorContainerStyles}
containerstyle={codeEditorcontainerstyles}
insertSpaces
ignoreTabKey={false}
tabSize={4}
Expand All @@ -352,7 +352,7 @@ export const ProposalFormLambda: React.FC<Props> = ({ open, handleClose, action
open={open}
onClose={handleClose}
title={ProposalAction[action] + " Lambda Proposal"}
template="lambda"
template="md"
>
{state === LambdaProposalState.write_action ? (
<>
Expand Down
8 changes: 7 additions & 1 deletion src/modules/explorer/components/FreezeDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const CustomMaxLabel = styled(Typography)({

export const FreezeDialog: React.FC<{ freeze: boolean }> = ({ freeze }) => {
const [open, setOpen] = React.useState(false)
const [amount, setAmount] = React.useState<number>(0)
const [amount, setAmount] = React.useState<number | "">(0)
const daoId = useDAOID()
const { mutate } = useFreeze()
const { data: dao, ledger } = useDAO(daoId)
Expand Down Expand Up @@ -146,6 +146,12 @@ export const FreezeDialog: React.FC<{ freeze: boolean }> = ({ freeze }) => {
type="number"
placeholder="0"
onChange={(newValue: any) => setAmount(newValue.target.value)}
onClick={(newValue: any) => {
if (amount === 0) {
setAmount("")
}
return
}}
inputProps={{ min: 0 }}
InputProps={{
disableUnderline: true,
Expand Down
Loading

0 comments on commit 0d9d072

Please sign in to comment.