1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

development - fix ui dev

This commit is contained in:
kumavis 2017-09-29 11:50:24 -07:00
parent cdf41c2857
commit 19e7adad19
2 changed files with 75 additions and 72 deletions

View File

@ -3,31 +3,25 @@
<head>
<meta charset="utf-8">
<title>MetaMask</title>
</head>
<body>
<!-- app content -->
<div id="app-content" style="height: 100%"></div>
<script src="./bundle.js" type="text/javascript" charset="utf-8"></script>
</body>
<style>
html, body, #test-container, .super-dev-container {
<style>
html, body, #test-container, .super-dev-container {
height: 100%;
width: 100%;
position: relative;
background: white;
}
#app-content {
}
#app-content {
background: #F7F7F7;
}
</style>
}
</style>
<script>
liveReloadCode(Date.now(), 300)
function liveReloadCode(lastUpdate, updateRate) {
<script>
liveReloadCode(Date.now(), 300)
function liveReloadCode(lastUpdate, updateRate) {
setTimeout(iter, updateRate)
function iter() {
@ -55,10 +49,12 @@ function liveReloadCode(lastUpdate, updateRate) {
xhr.send(null)
}
}
}
function reload() {
function reload() {
window.location.reload()
}
}
</script>
</body>
</html>

View File

@ -61,13 +61,19 @@ const actions = {
var css = MetaMaskUiCss()
injectCss(css)
const container = document.querySelector('#test-container')
// parse opts
var store = configureStore(states[selectedView])
// start app
render(
startApp()
function startApp(){
const body = document.body
const container = document.createElement('div')
container.id = 'test-container'
body.appendChild(container)
render(
h('.super-dev-container', [
h(Selector, { actions, selectedKey: selectedView, states, store }),
@ -86,5 +92,6 @@ render(
]),
]
), container)
), container)
}