Skip to content

Commit

Permalink
Merge pull request #1921 from daostack/release
Browse files Browse the repository at this point in the history
Release 0.10.12
  • Loading branch information
dkent600 authored Jul 10, 2020
2 parents 92c8871 + 58efc4d commit fdbd3b7
Show file tree
Hide file tree
Showing 27 changed files with 270 additions and 234 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 0.10.12
- Features Added
- added custom landing page data for Venus Project
- made it easier for anyone to submit a PR to create their own DAO custom landing page
- added support for awarding the GEM and DXD tokens

- Bugs Fixed
- DAO and account balances are now computed correctly on xDAI
- contract and account etherscan links now direct to blockscout, for xDAI
- enabling predictions now works on xDAI
- fixed several visual bugs
- fixed layout of description label on Blockchain interaction proposal create modal
- fixed crash when clicking on a DAO on the DAO Langing page.

## 0.10.11
- Features Added
- added the ability to receive email notifications, per DAO, when proposals are created
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,7 @@ See [working with docker](./docs/docker.md) for details and troubleshooting.
1. If you need more than one test account you can also import these private keys: `0x6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1`, `0x6370fd033278c143179d81c5526140625662b8daa446c22ee2d73db3707e620c` and `0x646f1ce2fdad0e6deeeb5c7e8e5543bdde65e86029e2fd9fc169899c440a7913`. Make sure to give them all differnent names.
1. Make sure that Metamask is connected to `127.0.0.1:8545` (choose from the "Networks" picklist in Metamask)
1. Go to http://127.0.0.1:3000 to load Alchemy

## Adding custom landing page content for your DAO

Just submit a PR to https://github.com/daostack/alchemy with your desired changes in src/customDaoInfo.tsx. You may supply plain text or HTML inside of parentheses. The HTML may contain React.js components, most notably `Link` which will cleanly navigate to pages within Alchemy.
10 changes: 10 additions & 0 deletions data/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@
"decimals": 18,
"name": "Centrality Token",
"symbol": "CENNZ"
},
"0x859401b46E0f8b1CdF5432Af4b1426a8a5E5e0C8": {
"decimals": 18,
"name": "i4 token",
"symbol": "GEMS"
},
"0xa1d65E8fB6e87b60FECCBc582F7f97804B725521": {
"decimals": 18,
"name": "DXdao",
"symbol": "DXD"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alchemy-client",
"version": "0.10.11",
"version": "0.10.12",
"description": "An app for collaborative networks (DAOs), based on the DAO stack.",
"author": "DAOstack",
"license": "GPL-3.0",
Expand Down
8 changes: 5 additions & 3 deletions src/components/Account/AccountBalances.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Address, IDAOState, IMemberState } from "@daostack/arc.js";
import { baseTokenName, ethErrorHandler, genName } from "lib/util";
import { baseTokenName, ethErrorHandler, genName, ethBalance } from "lib/util";

import BN = require("bn.js");
import AccountBalance from "components/Account/AccountBalance";
Expand All @@ -8,6 +8,7 @@ import withSubscription, { ISubscriptionProps } from "components/Shared/withSubs
import * as css from "layouts/App.scss";
import * as React from "react";
import { combineLatest, of } from "rxjs";
import { getArc } from "arc";

interface IExternalProps {
dao?: IDAOState;
Expand Down Expand Up @@ -68,10 +69,11 @@ export default withSubscription({
return of(null);
}
const daoState = dao;
const arc = daoState.dao.context;
const arc = getArc();

return combineLatest(
address && daoState.dao.member(address).state( { subscribe: true }) || of(null),
arc.ethBalance(address).pipe(ethErrorHandler()),
ethBalance(address).pipe(ethErrorHandler()),
arc.GENToken().balanceOf(address).pipe(ethErrorHandler()),
);
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Account/AccountProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ThreeboxModal from "components/Shared/ThreeboxModal";
import withSubscription, { ISubscriptionProps } from "components/Shared/withSubscription";
import { Field, Formik, FormikProps } from "formik";
import Analytics from "lib/analytics";
import { baseTokenName, ethErrorHandler, genName, formatTokens } from "lib/util";
import { baseTokenName, ethErrorHandler, genName, formatTokens, ethBalance } from "lib/util";
import CopyToClipboard, { IconColor } from "components/Shared/CopyToClipboard";
import { Page } from "pages";
import { parse } from "query-string";
Expand Down Expand Up @@ -331,7 +331,7 @@ const SubscribedAccountProfilePage = withSubscription({
// subscribe if only to to get DAO reputation supply updates
daoAvatarAddress ? dao.state( {subscribe: true}) : of(null),
daoAvatarAddress ? dao.member(accountAddress).state() : of(null),
arc.ethBalance(accountAddress)
ethBalance(accountAddress)
.pipe(ethErrorHandler()),
arc.GENToken().balanceOf(accountAddress)
.pipe(ethErrorHandler())
Expand Down
7 changes: 4 additions & 3 deletions src/components/Dao/DaoLandingPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@
}
}

.welcome,
.visitProposals {
margin-bottom: 16px;
.infoContainer {
div {
margin-bottom: 16px;
}
}

.wallContainer {
Expand Down
21 changes: 7 additions & 14 deletions src/components/Dao/DaoLandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import Analytics from "lib/analytics";
import { Link } from "react-router-dom";
import { BreadcrumbsItem } from "react-breadcrumbs-dynamic";
import { DiscussionEmbed } from "disqus-react";
import { showSimpleMessage } from "lib/util";
import { showSimpleMessage, targetedNetwork } from "lib/util";
import customDaoInfo from "../../customDaoInfo";

type IExternalProps = {
daoState: IDAOState;
Expand Down Expand Up @@ -41,6 +42,7 @@ export default class DaoLandingPage extends React.Component<IProps, null> {

public render() {
const daoState = this.props.daoState;
const customData = customDaoInfo[targetedNetwork()]?.[daoState.id.toLowerCase()];

this.disqusConfig.url = `${process.env.BASE_URL}/dao/${this.props.daoState.address}/discussion`;
this.disqusConfig.identifier = this.props.daoState.address;
Expand All @@ -61,21 +63,12 @@ export default class DaoLandingPage extends React.Component<IProps, null> {
</div>
</div>

{ (daoState.address === "0xfaf05fedf06cac499b899d6a2052f23ae239b29d") ? // SoS Collective on xDAI
<>
<div className={css.welcome}>Welcome to the {daoState.name} digital co-op.</div>
<div className={css.welcome}>Our first event is the <a href="https://soshackathon.com/" target="_blank" rel="noopener noreferrer">SoS Hackathon</a>: Fund your ideas and solutions to heal the world in crisis.</div>
<ul>
<li>Register for the hackathon <a href="https://bit.ly/GlobalSOSRegistration" target="_blank" rel="noopener noreferrer">here</a>.</li>
<li>Create an onboarding proposal for the cooperative <Link to={`/dao/${daoState.id}/scheme/0xd4b6ee901566c88f942c2a04803f65cb7a554d8bc9a8f4fb5ded5cd012ca0897/proposals/create/?beneficiary=&description=This%20is%20an%20introduction%20proposal%20to%20join%20the%20builder%20collective%20and%20SoS%20hackathon.%20Please%20fill%20out%20%3CYOUR%20NAME%3E,%20%3CLINK%20TO%20YOUR%20DISCORD%20ID%3E,%20%3CYOURSKILLS%3E,%20and%20%3CWHAT%20ARE%20YOU%20EXCITED%20ABOUT%3E&ethReward=0&externalTokenAddress=0x543ff227f64aa17ea132bf9886cab5db55dcaddf&externalTokenReward=0&nativeTokenReward=0&reputationReward=50&title=Onboarding%20:%20%3CYOUR%20NAME%3E&url=&tags=[]`}>here</Link>.</li>
<li>Join our Discord community for further discussions here: <a href="https://discord.gg/rUr3rp7" target="_blank" rel="noopener noreferrer">https://discord.gg/rUr3rp7</a></li>
</ul>
</>
{customData ?
<>{customData}</>
:
<>
<div className={css.welcome}>Welcome to {daoState.name}, a decentralized organization built on DAOstack.</div>

<div className={css.visitProposals}>Visit the <Link to={`/dao/${daoState.id}/schemes/`}>Proposals page</Link> to
<div>Welcome to {daoState.name}, a decentralized organization built on DAOstack.</div>
<div>Visit the <Link to={`/dao/${daoState.id}/schemes/`}>Proposals page</Link> to
make a proposal to the DAO or vote on existing proposals.</div>
</>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ class CreateKnownSchemeProposal extends React.Component<IProps, IState> {

const actions = this.state.actions;
const currentAction = this.state.currentAction;
const fnDescription = () => (<span>Short description of the proposal.<ul><li>What are you proposing to do?</li><li>Why is it important?</li><li>How much will it cost the DAO?</li><li>When do you plan to deliver the work?</li></ul></span>);

return (
<div className={css.containerWithSidebar}>
Expand Down Expand Up @@ -409,13 +410,15 @@ class CreateKnownSchemeProposal extends React.Component<IProps, IState> {
className={touched.title && errors.title ? css.error : null}
/>

<label htmlFor="descriptionInput">
<div className={css.proposalDescriptionLabelText}>
<div className={css.requiredMarker}>*</div>
<div className={css.body}>Description</div><HelpButton text={HelpButton.helpTextProposalDescription} />
</div>
<ErrorMessage name="description">{(msg) => <span className={css.errorMessage}>{msg}</span>}</ErrorMessage>
</label>
<TrainingTooltip overlay={fnDescription} placement="right">
<label htmlFor="descriptionInput">
<div className={css.proposalDescriptionLabelText}>
<div className={css.requiredMarker}>*</div>
<div className={css.body}>Description</div><HelpButton text={HelpButton.helpTextProposalDescription} />
</div>
<ErrorMessage name="description">{(msg) => <span className={css.errorMessage}>{msg}</span>}</ErrorMessage>
</label>
</TrainingTooltip>
<Field
component={MarkdownField}
onChange={(value: any) => { setFieldValue("description", value); }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@ class CreateGenericScheme extends React.Component<IProps, IStateProps> {

<TrainingTooltip overlay={fnDescription} placement="right">
<label htmlFor="descriptionInput">
<div className={css.requiredMarker}>*</div>
<div className={css.body}>Description</div><HelpButton text={HelpButton.helpTextProposalDescription} />
<div className={css.proposalDescriptionLabelText}>
<div className={css.requiredMarker}>*</div>
<div className={css.body}>Description</div><HelpButton text={HelpButton.helpTextProposalDescription} />
</div>
<ErrorMessage name="description">{(msg: string) => <span className={css.errorMessage}>{msg}</span>}</ErrorMessage>
</label>
</TrainingTooltip>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Proposal/ProposalData.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Address, IDAOState, IMemberState, IProposalState, IRewardState, Reward, Stake, Vote } from "@daostack/arc.js";
import { getArc } from "arc";
import { ethErrorHandler } from "lib/util";
import { ethErrorHandler, ethBalance } from "lib/util";

import BN = require("bn.js");
import withSubscription, { ISubscriptionProps } from "components/Shared/withSubscription";
Expand Down Expand Up @@ -142,7 +142,7 @@ export default withSubscription({
// TODO: also need the member state for the proposal proposer and beneficiary
// but since we need the proposal state first to get those addresses we will need to
// update the arc.js query to load them inline
concat(of(new BN("0")), arcDao.ethBalance())
concat(of(new BN("0")), ethBalance(daoState.address))
.pipe(ethErrorHandler()),
arc.GENToken().balanceOf(currentAccountAddress)
.pipe(ethErrorHandler()),
Expand All @@ -156,7 +156,7 @@ export default withSubscription({
of([]), // stakes
of(null), // rewards
of(null), // current account member state
concat(of(new BN(0)), arcDao.ethBalance()) // dao eth balance
concat(of(new BN(0)), ethBalance(daoState.address)) // dao eth balance
.pipe(ethErrorHandler()),
of(new BN(0)), // current account gen balance
of(null), // current account GEN allowance
Expand Down
114 changes: 55 additions & 59 deletions src/components/Proposal/ProposalDetails.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ button.disabled {
margin-bottom: 0px;
display: flex;
position: relative;
overflow: hidden;
transition: all 0.25s ease;
vertical-align: top;
height: auto;
Expand Down Expand Up @@ -124,64 +123,25 @@ button.disabled {
}
}

.statusTitle {
position: absolute;
top: 12px;
padding-bottom: 12px;
border-bottom: $gray-border-2;
width: 100%;
height: 20px;
line-height: 20px;

h3 {
margin: 0;
padding: 0;
margin-left: 17px;
display: inline;
color: rgba(104, 155, 214, 1);
}

span {
display: inline-block;
padding-left: 10px;
color: rgba(0, 113, 255, 1);
font-size: 11px;
margin-left: 10px;
border-left: 1px solid rgba(233, 238, 244, 1);
}
}

.voteBox {
.votes {
position: relative;
background-color: $white;
border-right: 1px solid rgba(215, 225, 237, 1);
border-radius: 0 15px 15px 15px;
margin: 0 0 20px 20px;
}

.voteButtons {
float: right;
top: 15px;
right: 10px;
position: relative;
}
.voteStatus {
height: 140px;
padding-top: 22px;

.altVoteButtons {
display: inline-block;
margin-bottom: 8px;
}

.voteStatus {
height: 140px;
padding-top: 70px;

.voteGraph {
float: right;
text-align: left;
display: inline-block;
right: 40px;
top: 12px;
position: relative;
.voteGraph {
float: right;
text-align: left;
display: inline-block;
right: 40px;
top: 12px;
position: relative;
}
}
}

Expand All @@ -195,15 +155,46 @@ button.disabled {
margin: 0 0 20px 20px;

.predictionStatus {
padding-top: 45px;
padding-top: 8px;
}
}

.stakeButtons {
float: right;
top: 9px;
right: 10px;
position: relative;
.votes,
.predictions {
.header {
display: flex;
align-items: center;
justify-content: center;
border-bottom: $gray-border-2;
padding-top: 12px;
padding-bottom: 8px;
line-height: 20px;

.title {
font-weight: 300;
font-size: 1.17em;
// margin: 0;
// padding: 0;
padding-left: 17px;
color: rgba(104, 155, 214, 1);
}

.voters {
padding-left: 10px;
color: rgba(0, 113, 255, 1);
font-size: 11px;
margin-left: 10px;
border-left: 1px solid rgba(233, 238, 244, 1);
white-space: nowrap;
}

.voteButtons,
.stakeButtons {
flex-grow: 2;
text-align: right;
padding-right: 13px;
}
}
}

.timer {
Expand Down Expand Up @@ -281,6 +272,11 @@ button.disabled {
font-size: 16px;
font-weight: bold;
}

.altVoteButtons {
display: inline-block;
margin-bottom: 8px;
}
}

button.shareButton {
Expand Down Expand Up @@ -324,7 +320,7 @@ button.disabled {
}
}

.voteBox {
.votes {
margin: 0 0 0 0;
border-radius: 0;
}
Expand Down
Loading

0 comments on commit fdbd3b7

Please sign in to comment.