mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Add animated sandwich button
This commit is contained in:
parent
06557d7900
commit
d18d9a8f97
@ -37,6 +37,7 @@
|
|||||||
"identicon.js": "^1.2.1",
|
"identicon.js": "^1.2.1",
|
||||||
"inject-css": "^0.1.1",
|
"inject-css": "^0.1.1",
|
||||||
"jazzicon": "^1.1.3",
|
"jazzicon": "^1.1.3",
|
||||||
|
"menu-droppo": "^1.0.2",
|
||||||
"metamask-logo": "^1.1.5",
|
"metamask-logo": "^1.1.5",
|
||||||
"multiplex": "^6.7.0",
|
"multiplex": "^6.7.0",
|
||||||
"once": "^1.3.3",
|
"once": "^1.3.3",
|
||||||
@ -52,6 +53,7 @@
|
|||||||
"redux": "^3.0.5",
|
"redux": "^3.0.5",
|
||||||
"redux-logger": "^2.3.1",
|
"redux-logger": "^2.3.1",
|
||||||
"redux-thunk": "^1.0.2",
|
"redux-thunk": "^1.0.2",
|
||||||
|
"sandwich-expando": "^1.0.4",
|
||||||
"textarea-caret": "^3.0.1",
|
"textarea-caret": "^3.0.1",
|
||||||
"three.js": "^0.73.2",
|
"three.js": "^0.73.2",
|
||||||
"through2": "^2.0.1",
|
"through2": "^2.0.1",
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
var actions = {
|
var actions = {
|
||||||
GO_HOME: 'GO_HOME',
|
GO_HOME: 'GO_HOME',
|
||||||
goHome: goHome,
|
goHome: goHome,
|
||||||
|
// menu state
|
||||||
|
TOGGLE_MENU: 'TOGGLE_MENU',
|
||||||
|
toggleMenu: toggleMenu,
|
||||||
// remote state
|
// remote state
|
||||||
UPDATE_METAMASK_STATE: 'UPDATE_METAMASK_STATE',
|
UPDATE_METAMASK_STATE: 'UPDATE_METAMASK_STATE',
|
||||||
updateMetamaskState: updateMetamaskState,
|
updateMetamaskState: updateMetamaskState,
|
||||||
@ -105,6 +108,14 @@ function goHome() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// menu state
|
||||||
|
|
||||||
|
function toggleMenu() {
|
||||||
|
return {
|
||||||
|
type: this.TOGGLE_MENU,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// async actions
|
// async actions
|
||||||
|
|
||||||
function tryUnlockMetamask(password) {
|
function tryUnlockMetamask(password) {
|
||||||
|
@ -24,6 +24,8 @@ const ConfigScreen = require('./config')
|
|||||||
const InfoScreen = require('./info')
|
const InfoScreen = require('./info')
|
||||||
const LoadingIndicator = require('./loading')
|
const LoadingIndicator = require('./loading')
|
||||||
const txHelper = require('../lib/tx-helper')
|
const txHelper = require('../lib/tx-helper')
|
||||||
|
const SandwichExpando = require('sandwich-expando')
|
||||||
|
const MenuDroppo = require('menu-droppo')
|
||||||
|
|
||||||
module.exports = connect(mapStateToProps)(App)
|
module.exports = connect(mapStateToProps)(App)
|
||||||
|
|
||||||
@ -42,6 +44,7 @@ function mapStateToProps(state) {
|
|||||||
seedWords: state.metamask.seedWords,
|
seedWords: state.metamask.seedWords,
|
||||||
unconfTxs: state.metamask.unconfTxs,
|
unconfTxs: state.metamask.unconfTxs,
|
||||||
unconfMsgs: state.metamask.unconfMsgs,
|
unconfMsgs: state.metamask.unconfMsgs,
|
||||||
|
menuOpen: state.appState.menuOpen,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,12 +146,17 @@ App.prototype.renderAppBar = function(){
|
|||||||
src: '/images/icon-128.png',
|
src: '/images/icon-128.png',
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// metamask name
|
// metamask namlterChangese
|
||||||
h('h1', 'MetaMask'),
|
h('h1', 'MetaMask'),
|
||||||
|
|
||||||
// hamburger
|
// hamburger
|
||||||
h('i.fa.fa-bars.cursor-pointer.color-orange', {
|
h(SandwichExpando, {
|
||||||
onClick: (event) => state.dispatch(actions.showConfigPage()),
|
width: 16,
|
||||||
|
barHeight: 2,
|
||||||
|
padding: 0,
|
||||||
|
isOpen: state.menuOpen,
|
||||||
|
color: 'rgb(247,146,30)',
|
||||||
|
onClick: () => this.props.dispatch(actions.toggleMenu()),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
])
|
])
|
||||||
|
@ -22,6 +22,7 @@ function reduceApp(state, action) {
|
|||||||
var seedWords = state.metamask.seedWords
|
var seedWords = state.metamask.seedWords
|
||||||
|
|
||||||
var appState = extend({
|
var appState = extend({
|
||||||
|
menuOpen: false,
|
||||||
currentView: seedWords ? seedConfView : defaultView,
|
currentView: seedWords ? seedConfView : defaultView,
|
||||||
accountDetail: {
|
accountDetail: {
|
||||||
subview: 'transactions',
|
subview: 'transactions',
|
||||||
@ -34,6 +35,11 @@ function reduceApp(state, action) {
|
|||||||
|
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
|
|
||||||
|
case actions.TOGGLE_MENU:
|
||||||
|
return extend(appState, {
|
||||||
|
menuOpen: !appState.menuOpen,
|
||||||
|
})
|
||||||
|
|
||||||
// intialize
|
// intialize
|
||||||
|
|
||||||
case actions.SHOW_CREATE_VAULT:
|
case actions.SHOW_CREATE_VAULT:
|
||||||
|
Loading…
Reference in New Issue
Block a user