From fcdfd48057db83801d37bc54b1a04c0a328ab24c Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 30 Mar 2018 00:48:37 -0700 Subject: development - screenshotter - capture screens across all locales --- ui/index.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ui/index.js') diff --git a/ui/index.js b/ui/index.js index 1e0e9f1cc..8fb000d85 100644 --- a/ui/index.js +++ b/ui/index.js @@ -69,6 +69,11 @@ async function startApp (metamaskState, accountManager, opts) { store.dispatch(actions.updateMetamaskState(metamaskState)) }) + // used by screenshotter tooling + global.setLocale = (key) => { + store.dispatch(actions.updateCurrentLocale(key)) + } + // start app render( h(Root, { -- cgit From b014133fdc14ca4fe83b9cb59d181a7745af8de7 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 30 Mar 2018 11:16:08 -0700 Subject: development - screens - use localhost for network --- ui/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'ui/index.js') diff --git a/ui/index.js b/ui/index.js index 8fb000d85..746e28eab 100644 --- a/ui/index.js +++ b/ui/index.js @@ -69,9 +69,14 @@ async function startApp (metamaskState, accountManager, opts) { store.dispatch(actions.updateMetamaskState(metamaskState)) }) - // used by screenshotter tooling - global.setLocale = (key) => { - store.dispatch(actions.updateCurrentLocale(key)) + // global metamask api - used by tooling + global.metamask = { + updateCurrentLocale: (code) => { + store.dispatch(actions.updateCurrentLocale(code)) + }, + setProviderType: (type) => { + store.dispatch(actions.setProviderType(type)) + }, } // start app -- cgit