Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/0.18.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
larrysalibra committed Oct 18, 2017
2 parents a6d723b + be1d302 commit 1c8bdef
Show file tree
Hide file tree
Showing 34 changed files with 339 additions and 219 deletions.
Binary file added app/images/app-icon-afia-1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-afia-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-beacon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-casa-1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-casa-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-dotpodcast-1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-dotpodcast-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-forum-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-guild-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-hello-blockstack-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-ongaku-ryoho-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-openbazaar-1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-openbazaar-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/app-icon-todo-list-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions app/js/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { connect } from 'react-redux'
import { AccountActions } from './account/store/account'
import { IdentityActions } from './profiles/store/identity'
import { SettingsActions } from './account/store/settings'
import { AuthActions } from './auth/store/auth'
import WelcomeModal from './welcome/WelcomeModal'
import TrustLevelFooter from './components/TrustLevelFooter'
import { getCoreAPIPasswordFromURL, getLogServerPortFromURL } from './utils/api-utils'
Expand All @@ -29,7 +30,8 @@ function mapStateToProps(state) {
coreApiRunning: state.sanity.coreApiRunning,
coreApiPasswordValid: state.sanity.coreApiPasswordValid,
walletPaymentAddressUrl: state.settings.api.walletPaymentAddressUrl,
coreAPIPassword: state.settings.api.coreAPIPassword
coreAPIPassword: state.settings.api.coreAPIPassword,
instanceIdentifier: state.auth.instanceIdentifier
}
}

Expand All @@ -38,7 +40,8 @@ function mapDispatchToProps(dispatch) {
AccountActions,
SanityActions,
SettingsActions,
IdentityActions
IdentityActions,
AuthActions,
), dispatch)
}

Expand All @@ -55,10 +58,12 @@ class App extends Component {
coreApiPasswordValid: PropTypes.bool.isRequired,
isCoreRunning: PropTypes.func.isRequired,
isCoreApiPasswordValid: PropTypes.func.isRequired,
generateInstanceIdentifier: PropTypes.func.isRequired,
walletPaymentAddressUrl: PropTypes.string.isRequired,
coreAPIPassword: PropTypes.string,
stateVersion: PropTypes.number,
router: PropTypes.object.isRequired
router: PropTypes.object.isRequired,
instanceIdentifier: PropTypes.string
}

constructor(props) {
Expand Down Expand Up @@ -109,6 +114,10 @@ class App extends Component {
api = Object.assign({}, api, { logServerPort })
this.props.updateApi(api)
}

if (!this.props.instanceIdentifier) {
this.props.generateInstanceIdentifier()
}
}

componentWillReceiveProps(nextProps) {
Expand Down
242 changes: 84 additions & 158 deletions app/js/HomeScreenPage.js
Original file line number Diff line number Diff line change
@@ -1,167 +1,93 @@
// @flow
import React from 'react'
import React, { Component, PropTypes } from 'react'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import Navbar from './components/Navbar'
import { AppsActions } from './store/apps'
import appList from './data/apps'

const HomeScreenPage = () =>
(
<div>
<Navbar
hideBackToHomeLink
activeTab="home"
/>
<div className="home-screen">
<div className="container-fluid app-center">
<div className="container app-wrap">
<div className="app-container no-padding">
<div className="container-fluid app-box-wrap">
<a
href="http://blockstack-todos.appartisan.com/"
className="app-box-container"
>
<div className="app-box">
<img
src="/images/[email protected]"
alt="To Do List"
/>
</div>
</a>
<div className="app-text-container">
<h3>To Do List</h3>
</div>
</div>
<div className="container-fluid app-box-wrap">
<a
href="http://www.guildblog.com/"
className="app-box-container"
>
<div className="app-box">
<img
src="/images/[email protected]"
alt="Guild"
/>
</div>
</a>
<div className="app-text-container">
<h3>Guild</h3>
</div>
</div>
<div className="container-fluid app-box-wrap">
<a
href="http://ongakuryoho.com"
className="app-box-container"
>
<div className="app-box">
<img
src="/images/[email protected]"
alt="Ongaku Ryoho"
/>
</div>
</a>
<div className="app-text-container">
<h3>Ongaku Ryoho</h3>
</div>
</div>
<div className="container-fluid app-box-wrap">
<a
href="https://helloblockstack.com"
className="app-box-container"
>
<div className="app-box">
<img
src="/images/[email protected]"
alt="Hello, Blockstack"
/>
</div>
</a>
<div className="app-text-container">
<h3>Hello, Blockstack</h3>
</div>
</div>
<div className="container-fluid app-box-wrap">
<a
href="https://forum.blockstack.org"
className="app-box-container"
>
<div className="app-box">
<img
src="/images/[email protected]"
alt="Forum"
/>
</div>
</a>
<div className="app-text-container">
<h3>Forum</h3>
</div>
</div>
<div className="container-fluid app-box-wrap">
<a
href="https://casa.cash"
className="app-box-container"
>
<div className="app-box">
<img
src="/images/[email protected]"
alt="Casa"
/>
</div>
</a>
<div className="app-text-container">
<h3>Casa</h3>
</div>
</div>
<div className="container-fluid app-box-wrap">
<a
href="https://www.openbazaar.org"
className="app-box-container"
>
<div className="app-box">
<img
src="/images/[email protected]"
alt="OpenBazaar"
/>
</div>
</a>
<div className="app-text-container">
<h3>OpenBazaar</h3>
</div>
</div>
<div className="container-fluid app-box-wrap">
<a
href="https://ntzwrk.org/projects/beacon/"
className="app-box-container"
>
<div className="app-box">
<img
src="/images/[email protected]"
alt="Beacon"
/>
</div>
</a>
<div className="app-text-container">
<h3>Beacon</h3>
</div>
</div>
<div className="container-fluid app-box-wrap">
<a
href="http://www.afiabeta.com/"
className="app-box-container"
>
<div className="app-box">
<img
src="/images/[email protected]"
alt="Afia"
function mapStateToProps(state) {
return {
apps: state.apps,
appListLastUpdated: state.apps.lastUpdated,
api: state.settings.api,
instanceIdentifier: state.auth.instanceIdentifier
}
}

function mapDispatchToProps(dispatch) {
return bindActionCreators(Object.assign({}, AppsActions), dispatch)
}

const AppIcon = (props) => (
<div className="container-fluid app-box-wrap">
<a
href={props.launchLink}
className="app-box-container"
>
<div className="app-box">
<img
src={`/images/${props.iconImage}`}
alt={props.displayName}
/>
</div>
</a>
<div className="app-text-container">
<h3>{props.displayName}</h3>
</div>
</div>
)

AppIcon.propTypes = {
launchLink: PropTypes.string.isRequired,
iconImage: PropTypes.string.isRequired,
displayName: PropTypes.string.isRequired
}

class HomeScreenPage extends Component {

static propTypes = {
apps: PropTypes.object.isRequired,
refreshAppList: PropTypes.func.isRequired,
appListLastUpdated: PropTypes.number,
api: PropTypes.object.isRequired,
instanceIdentifier: PropTypes.string
}

componentWillMount() {
// Refresh apps list every 12 hours
if (this.props.appListLastUpdated < (Date.now() - 43200000)) {
this.props.refreshAppList(this.props.api.browserServerUrl, this.props.instanceIdentifier)
}
}

render() {
return (
<div>
<Navbar
hideBackToHomeLink
activeTab="home"
/>
<div className="home-screen">
<div className="container-fluid app-center">
<div className="container app-wrap">
<div className="app-container no-padding">

{appList.apps.map((app) => (
<AppIcon
key={app.name}
iconImage={app.appIcon.small}
displayName={app.displayName}
launchLink={app.launchLink}
/>
</div>
</a>
<div className="app-text-container">
<h3>Afia</h3>
))}

</div>
</div>
</div>
</div>
</div>
</div>
</div>
)
)
}
}

export default HomeScreenPage
export default connect(mapStateToProps, mapDispatchToProps)(HomeScreenPage)
1 change: 1 addition & 0 deletions app/js/account/store/settings/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const DEFAULT_API = {
registerUrl: 'http://localhost:7103/register'
}
},
browserServerUrl: 'https://blockstack-browser-server.appartisan.com',
hostedDataLocation: DROPBOX,
coreHost: 'localhost',
corePort: 6270,
Expand Down
7 changes: 2 additions & 5 deletions app/js/auth/components/AuthModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,8 @@ class AuthModal extends Component {
authRequest,
decodedToken
})
const localIdentities = this.props.localIdentities
const identityIndex = this.state.currentIdentityIndex
const identity = localIdentities[identityIndex]

this.props.loadAppManifest(authRequest, identity.ownerAddress)
this.props.loadAppManifest(authRequest)
}

componentWillReceiveProps(nextProps) {
Expand Down Expand Up @@ -157,7 +154,7 @@ class AuthModal extends Component {
// https://github.com/blockstack/blockstack-browser/issues/864#issuecomment-335035037


const lookupValue = hasUsername ? identity.useranme : ''
const lookupValue = hasUsername ? identity.username : ''


// if profile has no name, lookupUrl will be
Expand Down
Loading

0 comments on commit 1c8bdef

Please sign in to comment.