app rev.8
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
718e9a7be4
commit
aaae299b32
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ghost-dao-interface",
|
||||
"private": true,
|
||||
"version": "0.5.27",
|
||||
"version": "0.5.28",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@ -9,12 +9,12 @@ const classes = {
|
||||
|
||||
const StyledMuiChip = styled(MuiChip, {
|
||||
shouldForwardProp: prop => prop !== "template" && prop !== "strong",
|
||||
})(({ theme, template, strong }) => {
|
||||
})(({ theme, template, background, strong }) => {
|
||||
return {
|
||||
[`&.${classes.chip}`]: {
|
||||
height: "21px",
|
||||
borderRadius: "16px",
|
||||
backgroundColor: template
|
||||
backgroundColor: background ? background : template
|
||||
? template === "purple"
|
||||
? theme.colors.special["olyZaps"]
|
||||
: template === "gray"
|
||||
@ -42,8 +42,8 @@ const StyledMuiChip = styled(MuiChip, {
|
||||
};
|
||||
});
|
||||
|
||||
const Chip = ({ template, strong = false, ...props }) => {
|
||||
return <StyledMuiChip className={classes.chip} template={template} strong={strong} {...props} />;
|
||||
const Chip = ({ background, template, strong = false, ...props }) => {
|
||||
return <StyledMuiChip className={classes.chip} background={background} template={template} strong={strong} {...props} />;
|
||||
};
|
||||
|
||||
export default Chip;
|
||||
|
||||
@ -32,7 +32,7 @@ import { formatNumber, formatCurrency, shorten } from "../../helpers";
|
||||
import { prettifySecondsInDays } from "../../helpers/timeUtil";
|
||||
import { DecimalBigNumber, } from "../../helpers/DecimalBigNumber";
|
||||
|
||||
import { convertStatusToTemplate, convertStatusToLabel } from "./helpers";
|
||||
import { convertStatusToColor, convertStatusToLabel } from "./helpers";
|
||||
import { parseFunctionCalldata } from "./components/functions";
|
||||
|
||||
import { networkAvgBlockSpeed } from "../../constants";
|
||||
@ -223,7 +223,7 @@ const ProposalDetails = ({ chainId, address, connect, config }) => {
|
||||
<Chip
|
||||
sx={{ marginTop: "4px", width: "88px" }}
|
||||
label={convertStatusToLabel(proposalState)}
|
||||
template={convertStatusToTemplate(proposalState)}
|
||||
background={convertStatusToColor(proposalState)}
|
||||
/>
|
||||
</Box>
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ import { PrimaryButton, TertiaryButton } from "../../../components/Button";
|
||||
|
||||
import ProposalInfoText from "./ProposalInfoText";
|
||||
import {
|
||||
convertStatusToTemplate,
|
||||
convertStatusToColor,
|
||||
convertStatusToLabel,
|
||||
MY_PROPOSALS_PREFIX,
|
||||
VOTED_PROPOSALS_PREFIX
|
||||
@ -174,7 +174,7 @@ const ProposalTable = ({ children }) => (
|
||||
<TableCell align="center" style={{ width: "130px", padding: "8px 0" }}>Status</TableCell>
|
||||
<TableCell align="center" style={{ padding: "8px 0" }}>Vote Ends</TableCell>
|
||||
<TableCell align="center" style={{ padding: "8px 0" }}>Voting Stats</TableCell>
|
||||
<TableCell align="center" style={{ padding: "8px 0" }}></TableCell>
|
||||
<TableCell align="center" style={{ width: "180px", padding: "8px 0" }}></TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
|
||||
@ -231,7 +231,7 @@ const ProposalRow = ({ proposal, blockNumber, openProposal, chainId }) => {
|
||||
<Chip
|
||||
sx={{ width: "100px" }}
|
||||
label={convertStatusToLabel(proposal.state)}
|
||||
template={convertStatusToTemplate(proposal.state)}
|
||||
background={convertStatusToColor(proposal.state)}
|
||||
/>
|
||||
</TableCell>
|
||||
|
||||
@ -290,7 +290,7 @@ const ProposalCard = ({ proposal, blockNumber, openProposal, chainId }) => {
|
||||
<Chip
|
||||
sx={{ width: "88px" }}
|
||||
label={convertStatusToLabel(proposal.state)}
|
||||
template={convertStatusToTemplate(proposal.state)}
|
||||
background={convertStatusToColor(proposal.state)}
|
||||
/>
|
||||
</Box>
|
||||
<Typography>
|
||||
|
||||
@ -296,7 +296,7 @@ const TokenAndBooleansArguments = ({
|
||||
rightText={"False"}
|
||||
setLeftValue={() => setCapacityInQuote(true)}
|
||||
setRightValue={() => setCapacityInQuote(false)}
|
||||
tooltip={`Determines how the bond market capacity is measured. True = measured in ${nativeCurrency}, False = measured in ${ftsoSymbol}.`}
|
||||
tooltip={`Determines how the bond market capacity is measured. True = measured in _quoteToken, False = measured in ${ftsoSymbol}.`}
|
||||
/>
|
||||
<BooleanTrigger
|
||||
value={fixedTerm}
|
||||
|
||||
@ -1,18 +1,24 @@
|
||||
export const MY_PROPOSALS_PREFIX = "MY_PROPOSALS";
|
||||
export const VOTED_PROPOSALS_PREFIX = "VOTED_PROPOSALS";
|
||||
|
||||
export const convertStatusToTemplate = (status) => {
|
||||
export const convertStatusToColor = (status) => {
|
||||
switch (status) {
|
||||
case 7:
|
||||
return 'darkGray';
|
||||
case 1:
|
||||
return "#f2e370";
|
||||
case 2:
|
||||
return 'warning';
|
||||
case 4:
|
||||
return 'success';
|
||||
return "#f06f73";
|
||||
case 3:
|
||||
return 'error';
|
||||
return "#f06f73";
|
||||
case 4:
|
||||
return "#60c45b";
|
||||
case 5:
|
||||
return "#60c45b";
|
||||
case 6:
|
||||
return "#f06f73";
|
||||
case 7:
|
||||
return "#f2e370";
|
||||
default:
|
||||
return 'darkGray';
|
||||
return "#a2b7ce";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user