app rev.8

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2026-02-20 12:12:53 +03:00
parent 718e9a7be4
commit aaae299b32
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
6 changed files with 26 additions and 20 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "ghost-dao-interface", "name": "ghost-dao-interface",
"private": true, "private": true,
"version": "0.5.27", "version": "0.5.28",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -9,12 +9,12 @@ const classes = {
const StyledMuiChip = styled(MuiChip, { const StyledMuiChip = styled(MuiChip, {
shouldForwardProp: prop => prop !== "template" && prop !== "strong", shouldForwardProp: prop => prop !== "template" && prop !== "strong",
})(({ theme, template, strong }) => { })(({ theme, template, background, strong }) => {
return { return {
[`&.${classes.chip}`]: { [`&.${classes.chip}`]: {
height: "21px", height: "21px",
borderRadius: "16px", borderRadius: "16px",
backgroundColor: template backgroundColor: background ? background : template
? template === "purple" ? template === "purple"
? theme.colors.special["olyZaps"] ? theme.colors.special["olyZaps"]
: template === "gray" : template === "gray"
@ -42,8 +42,8 @@ const StyledMuiChip = styled(MuiChip, {
}; };
}); });
const Chip = ({ template, strong = false, ...props }) => { const Chip = ({ background, template, strong = false, ...props }) => {
return <StyledMuiChip className={classes.chip} template={template} strong={strong} {...props} />; return <StyledMuiChip className={classes.chip} background={background} template={template} strong={strong} {...props} />;
}; };
export default Chip; export default Chip;

View File

@ -32,7 +32,7 @@ import { formatNumber, formatCurrency, shorten } from "../../helpers";
import { prettifySecondsInDays } from "../../helpers/timeUtil"; import { prettifySecondsInDays } from "../../helpers/timeUtil";
import { DecimalBigNumber, } from "../../helpers/DecimalBigNumber"; import { DecimalBigNumber, } from "../../helpers/DecimalBigNumber";
import { convertStatusToTemplate, convertStatusToLabel } from "./helpers"; import { convertStatusToColor, convertStatusToLabel } from "./helpers";
import { parseFunctionCalldata } from "./components/functions"; import { parseFunctionCalldata } from "./components/functions";
import { networkAvgBlockSpeed } from "../../constants"; import { networkAvgBlockSpeed } from "../../constants";
@ -223,7 +223,7 @@ const ProposalDetails = ({ chainId, address, connect, config }) => {
<Chip <Chip
sx={{ marginTop: "4px", width: "88px" }} sx={{ marginTop: "4px", width: "88px" }}
label={convertStatusToLabel(proposalState)} label={convertStatusToLabel(proposalState)}
template={convertStatusToTemplate(proposalState)} background={convertStatusToColor(proposalState)}
/> />
</Box> </Box>
} }

View File

@ -33,7 +33,7 @@ import { PrimaryButton, TertiaryButton } from "../../../components/Button";
import ProposalInfoText from "./ProposalInfoText"; import ProposalInfoText from "./ProposalInfoText";
import { import {
convertStatusToTemplate, convertStatusToColor,
convertStatusToLabel, convertStatusToLabel,
MY_PROPOSALS_PREFIX, MY_PROPOSALS_PREFIX,
VOTED_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={{ width: "130px", padding: "8px 0" }}>Status</TableCell>
<TableCell align="center" style={{ padding: "8px 0" }}>Vote Ends</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" }}>Voting Stats</TableCell>
<TableCell align="center" style={{ padding: "8px 0" }}></TableCell> <TableCell align="center" style={{ width: "180px", padding: "8px 0" }}></TableCell>
</TableRow> </TableRow>
</TableHead> </TableHead>
@ -231,7 +231,7 @@ const ProposalRow = ({ proposal, blockNumber, openProposal, chainId }) => {
<Chip <Chip
sx={{ width: "100px" }} sx={{ width: "100px" }}
label={convertStatusToLabel(proposal.state)} label={convertStatusToLabel(proposal.state)}
template={convertStatusToTemplate(proposal.state)} background={convertStatusToColor(proposal.state)}
/> />
</TableCell> </TableCell>
@ -290,7 +290,7 @@ const ProposalCard = ({ proposal, blockNumber, openProposal, chainId }) => {
<Chip <Chip
sx={{ width: "88px" }} sx={{ width: "88px" }}
label={convertStatusToLabel(proposal.state)} label={convertStatusToLabel(proposal.state)}
template={convertStatusToTemplate(proposal.state)} background={convertStatusToColor(proposal.state)}
/> />
</Box> </Box>
<Typography> <Typography>

View File

@ -296,7 +296,7 @@ const TokenAndBooleansArguments = ({
rightText={"False"} rightText={"False"}
setLeftValue={() => setCapacityInQuote(true)} setLeftValue={() => setCapacityInQuote(true)}
setRightValue={() => setCapacityInQuote(false)} 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 <BooleanTrigger
value={fixedTerm} value={fixedTerm}

View File

@ -1,18 +1,24 @@
export const MY_PROPOSALS_PREFIX = "MY_PROPOSALS"; export const MY_PROPOSALS_PREFIX = "MY_PROPOSALS";
export const VOTED_PROPOSALS_PREFIX = "VOTED_PROPOSALS"; export const VOTED_PROPOSALS_PREFIX = "VOTED_PROPOSALS";
export const convertStatusToTemplate = (status) => { export const convertStatusToColor = (status) => {
switch (status) { switch (status) {
case 7: case 1:
return 'darkGray'; return "#f2e370";
case 2: case 2:
return 'warning'; return "#f06f73";
case 4:
return 'success';
case 3: case 3:
return 'error'; return "#f06f73";
case 4:
return "#60c45b";
case 5:
return "#60c45b";
case 6:
return "#f06f73";
case 7:
return "#f2e370";
default: default:
return 'darkGray'; return "#a2b7ce";
} }
} }