Skip to content

Commit

Permalink
Finance, Tokens, Voting: dark mode support (#1054)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpierre authored and sohkai committed Dec 20, 2019
1 parent 90ad353 commit d2b9daf
Show file tree
Hide file tree
Showing 13 changed files with 130 additions and 116 deletions.
6 changes: 3 additions & 3 deletions apps/agent/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"private": true,
"license": "AGPL-3.0-or-later",
"dependencies": {
"@aragon/api": "^2.0.0-beta.6",
"@aragon/api-react": "^2.0.0-beta.6",
"@aragon/api": "^2.0.0-beta.9",
"@aragon/api-react": "^2.0.0-beta.9",
"@aragon/templates-tokens": "^1.2.0",
"@aragon/ui": "^1.0.0",
"@aragon/ui": "^1.2.1",
"@babel/polyfill": "^7.0.0",
"date-fns": "2.0.0-alpha.22",
"file-saver": "^2.0.2",
Expand Down
11 changes: 6 additions & 5 deletions apps/agent/app/src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Header, Layout, SyncIndicator, useLayout } from '@aragon/ui'
import React, { useEffect } from 'react'
import { Main, Header, SyncIndicator, useLayout } from '@aragon/ui'
import { useAragonApi } from '@aragon/api-react'
import InstallFrame from './components/InstallFrame'
import { IdentityProvider } from './components/IdentityManager/IdentityManager'
Expand Down Expand Up @@ -32,11 +32,12 @@ function App({ api, appState, isSyncing }) {
}

export default () => {
const { api, appState } = useAragonApi()
const { api, appState, guiStyle } = useAragonApi()
const { appearance } = guiStyle

return (
<Layout>
<Main theme={appearance} assetsUrl="./aragon-ui">
<App api={api} appState={appState} isSyncing={appState.isSyncing} />
</Layout>
</Main>
)
}
11 changes: 8 additions & 3 deletions apps/agent/app/src/components/ComingSoon.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function ComingSoon() {
css={`
width: 100%;
min-height: ${72 * GU}px;
text-align: center;
`}
>
<div
Expand All @@ -32,6 +33,7 @@ function ComingSoon() {
color: ${theme.content};
${textStyle('title2')};
margin-bottom: ${2 * GU}px;
padding: 0 ${2 * GU}px;
`}
>
Agent transaction list is coming soon!
Expand All @@ -42,12 +44,15 @@ function ComingSoon() {
max-width: ${52 * GU}px;
color: ${theme.contentSecondary};
${textStyle('body2')};
padding: 0 ${2 * GU}px;
`}
>
We are currently working on the full version of this app. You’ll soon be
able to browse Agent interactions with other Ethereum applications
from here.
<Link href="https://aragon.org/agent">Learn how you can start using it today</Link>
able to browse Agent interactions with other Ethereum applications from
here.
<Link href="https://aragon.org/agent">
Learn how you can start using it today
</Link>
</div>
</Card>
)
Expand Down
5 changes: 1 addition & 4 deletions apps/agent/app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ import '@babel/polyfill'
import React from 'react'
import ReactDOM from 'react-dom'
import { AragonApi } from '@aragon/api-react'
import { Main } from '@aragon/ui'
import appStateReducer from './app-state-reducer'
import App from './App'

ReactDOM.render(
<AragonApi reducer={appStateReducer}>
<Main assetsUrl="./aragon-ui">
<App />
</Main>
<App />
</AragonApi>,
document.getElementById('root')
)
6 changes: 3 additions & 3 deletions apps/finance/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"private": true,
"license": "AGPL-3.0-or-later",
"dependencies": {
"@aragon/api": "^2.0.0-beta.6",
"@aragon/api-react": "^2.0.0-beta.6",
"@aragon/api": "^2.0.0-beta.9",
"@aragon/api-react": "^2.0.0-beta.9",
"@aragon/templates-tokens": "^1.3.0",
"@aragon/ui": "^1.0.0",
"@aragon/ui": "^1.2.1",
"@babel/polyfill": "^7.0.0",
"bn.js": "^4.11.8",
"core-js": "^2.6.5",
Expand Down
20 changes: 12 additions & 8 deletions apps/finance/app/src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react'
import React, { useEffect } from 'react'
import PropTypes from 'prop-types'
import {
Button,
Header,
IconPlus,
Main,
SidePanel,
SyncIndicator,
useLayout,
Expand Down Expand Up @@ -129,15 +130,18 @@ class App extends React.Component {
}

export default () => {
const { api, appState } = useAragonApi()
const { api, appState, guiStyle } = useAragonApi()
const { layoutName } = useLayout()
const { appearance } = guiStyle

return (
<App
api={api}
appState={appState}
isSyncing={appState.isSyncing}
compactMode={layoutName === 'small'}
/>
<Main theme={appearance} assetsUrl="./aragon-ui">
<App
api={api}
appState={appState}
isSyncing={appState.isSyncing}
compactMode={layoutName === 'small'}
/>
</Main>
)
}
5 changes: 1 addition & 4 deletions apps/finance/app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ import '@babel/polyfill'

import React from 'react'
import ReactDOM from 'react-dom'
import { Main } from '@aragon/ui'
import { AragonApi } from '@aragon/api-react'
import appStateReducer from './app-state-reducer'
import App from './App'

ReactDOM.render(
<AragonApi reducer={appStateReducer}>
<Main assetsUrl="./aragon-ui">
<App />
</Main>
<App />
</AragonApi>,
document.getElementById('root')
)
6 changes: 3 additions & 3 deletions apps/token-manager/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"private": true,
"license": "AGPL-3.0-or-later",
"dependencies": {
"@aragon/api": "^2.0.0-beta.6",
"@aragon/api-react": "^2.0.0-beta.6",
"@aragon/ui": "^1.0.0",
"@aragon/api": "^2.0.0-beta.9",
"@aragon/api-react": "^2.0.0-beta.9",
"@aragon/ui": "^1.2.1",
"bn.js": "^4.11.6",
"prop-types": "^15.7.2",
"react": "^16.8.4",
Expand Down
10 changes: 8 additions & 2 deletions apps/token-manager/app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
GU,
Header,
IconPlus,
Main,
SyncIndicator,
Tag,
textStyle,
Expand Down Expand Up @@ -199,9 +200,14 @@ class App extends React.PureComponent {
}

export default () => {
const { api, appState } = useAragonApi()
const theme = useTheme()
const { api, appState, guiStyle } = useAragonApi()
const { layoutName } = useLayout()
const { appearance } = guiStyle

return <App api={api} layoutName={layoutName} theme={theme} {...appState} />
return (
<Main assetsUrl="./aragon-ui" theme={appearance}>
<App api={api} layoutName={layoutName} theme={theme} {...appState} />
</Main>
)
}
5 changes: 1 addition & 4 deletions apps/token-manager/app/src/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import React from 'react'
import ReactDOM from 'react-dom'
import { AragonApi } from '@aragon/api-react'
import { Main } from '@aragon/ui'
import appStateReducer from './app-state-reducer'
import App from './App'

ReactDOM.render(
<AragonApi reducer={appStateReducer}>
<Main assetsUrl="./aragon-ui">
<App />
</Main>
<App />
</AragonApi>,
document.getElementById('root')
)
6 changes: 3 additions & 3 deletions apps/voting/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"private": true,
"license": "AGPL-3.0-or-later",
"dependencies": {
"@aragon/api": "^2.0.0-beta.8",
"@aragon/api-react": "^2.0.0-beta.8",
"@aragon/ui": "^1.0.0",
"@aragon/api": "^2.0.0-beta.9",
"@aragon/api-react": "^2.0.0-beta.9",
"@aragon/ui": "^1.2.1",
"bn.js": "^4.11.8",
"date-fns": "2.0.0-alpha.22",
"onecolor": "^3.1.0",
Expand Down
Loading

0 comments on commit d2b9daf

Please sign in to comment.