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