Skip to content

Commit

Permalink
Grid view on desktop, move ethers connection to self-hosted nodes, T&…
Browse files Browse the repository at this point in the history
…C fixes
  • Loading branch information
Evalir committed Aug 27, 2020
1 parent e66c13b commit cd59054
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/components/AddProposalPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ import { ZERO_ADDR } from '../constants'
const NULL_PROPOSAL_TYPE = -1
const FUNDING_PROPOSAL = 1

const BASE_IPFS_URI = 'https://ipfs.eth.aragon.network/ipfs/'
const TC_IPFS_HASH = 'QmTSDxWVFnNUis8ZJ7aBfH2z71Jc4N62YLYM9PzJz8DUjt'

const DEFAULT_FORM_DATA = {
title: '',
link: '',
Expand Down Expand Up @@ -263,10 +266,7 @@ const AddProposalPanel = React.memo(({ onSubmit }) => {
>
<Checkbox checked={termsAccepted} onChange={setTermsAccepted} />I accept
the&nbsp;
<Link
href="https://ipfs.eth.aragon.network/ipfs/QmU13GnuG9qo8NUi1WfJP19qTrViHwZ2dRzAnmJKG2i8hA"
external
>
<Link href={`${BASE_IPFS_URI}${TC_IPFS_HASH}`} external>
Terms and Conditions
</Link>
</label>
Expand Down
1 change: 0 additions & 1 deletion src/components/Header/HeaderPopover.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ function HeaderPopover({
onClose={onClose}
opener={opener}
visible={visible}
placement="center-start"
css={`
width: ${width}px;
`}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProposalSupported.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import TokenAmount from 'token-amount'
import { GU, IconCheck, RADIUS, textStyle, useTheme } from '@aragon/ui'
import { useAppState } from '../providers/AppState'

const LIGHT_INFO_SURFACE_COLOR = '#F8DFE'
const LIGHT_INFO_SURFACE_COLOR = '#F8FDFE'

function VoteCast({ amountOfTokens }) {
const theme = useTheme()
Expand Down
18 changes: 11 additions & 7 deletions src/components/ProposalsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function ProposalsView({ proposals, requestToken }) {
const history = useHistory()
const { below } = useViewport()

const compactMode = below('large')
const compactMode = below(1400)

const handleSelectProposal = useCallback(
id => {
Expand Down Expand Up @@ -69,16 +69,21 @@ function ProposalsView({ proposals, requestToken }) {
<div
css={`
width: 100%;
display: flex;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr;
justify-items: start;
${compactMode &&
`
display: flex;
flex-direction: column;
`}
`}
>
<ProposalProperty
title="Proposal Title"
css={`
grid-column-start: 0;
margin-top: ${2 * GU}px;
`}
>
Expand All @@ -88,7 +93,6 @@ function ProposalsView({ proposals, requestToken }) {
id={proposal.id}
/>
</ProposalProperty>
<div css="flex-grow: 0.8;" />
{proposal.beneficiary === ZERO_ADDR ? (
<SignalingIndicator />
) : (
Expand Down Expand Up @@ -172,7 +176,7 @@ function ProposalProperty({ title, children }) {
const theme = useTheme()
const { below } = useViewport()

const compactMode = below('large')
const compactMode = below(1400)

return (
<div
Expand Down Expand Up @@ -205,7 +209,7 @@ const SignalingIndicator = () => {
const theme = useTheme()
const { below } = useViewport()

const compactMode = below('large')
const compactMode = below(1400)

return (
<div
Expand Down Expand Up @@ -241,7 +245,7 @@ const CancelledIndicator = () => {
const theme = useTheme()
const { below } = useViewport()

const compactMode = below('large')
const compactMode = below(1400)

return (
<div
Expand Down Expand Up @@ -277,7 +281,7 @@ const ExecutedIndicator = () => {
const theme = useTheme()
const { below } = useViewport()

const compactMode = below('large')
const compactMode = below(1400)

return (
<div
Expand Down
6 changes: 3 additions & 3 deletions src/providers/Wallet.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext, useMemo } from 'react'
import Ethers, { providers as EthersProviders } from 'ethers'
import { providers as EthersProviders } from 'ethers'
import { UseWalletProvider, useWallet } from 'use-wallet'
import { getUseWalletConnectors } from '../lib/web3-utils'
import { getNetwork } from '../networks'
Expand All @@ -18,10 +18,10 @@ function WalletAugmented({ children }) {

const ethers = useMemo(() => {
if (!ethereum) {
const { defaultEthNode: networkNode, type } = getNetwork()
const { defaultEthNode: networkNode } = getNetwork()

return networkNode.includes('wss')
? Ethers.getDefaultProvider(type)
? new EthersProviders.WebSocketProvider(networkNode)
: new EthersProviders.JsonRpcProvider(networkNode)
}

Expand Down

0 comments on commit cd59054

Please sign in to comment.