From b5220e8675d3b570e7190036977f01ec00c37f72 Mon Sep 17 00:00:00 2001 From: Peter Jensen Date: Tue, 16 Jan 2018 17:48:06 +0100 Subject: [PATCH] apps/management/reset_device: add icons and warning --- assets/dontcopy.png | Bin 0 -> 1293 bytes src/apps/management/reset_device.py | 9 ++++++--- src/trezor/res/nocopy.toig | Bin 0 -> 147 bytes src/trezor/ui/style.py | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 assets/dontcopy.png create mode 100644 src/trezor/res/nocopy.toig diff --git a/assets/dontcopy.png b/assets/dontcopy.png new file mode 100644 index 0000000000000000000000000000000000000000..4a1480f22b14dc1262269216aff65e81838020f4 GIT binary patch literal 1293 zcmXX_4>;3l9Diq~XwqnG{X>Qoq75OX8L>o*Y3Iq9EkrVZVz!w5d8|{q%0=2vs!OM- zkknnvtYaOX&Yz=`x?)9Fxr%c~WPbPC-F=_u`}us{&-3}d@AJIR^DU)Eg;`pxvH$>B z(!xWcVYW8*QWy}Xm-TC5HqQ!=%LQPWjj<6x@eK|DBrc6grPB}cj_`61^0FLgRH{Q( z4lgAwBN>2#r(8Ds!swfqW8DO;mQH6xkF6WS;W7AHt>}W}q~yHBSdN>2_+Go&L3_-o zJ%c$)l=-daUGo$(`Vh$WH-MCTSicv`;SPA z$wecPvhe8qe>K9W^TSV*VIR)e?4hNH!WpD2S42tPn6uN^)Px+-UW#Zhhn8*uhX8d^}eF6r1ruDM^a$<)|>FUzNGj*rWejVsi;pyQ~6nu5}KGsZS ze9iq63-%>9j+g8b?&4JpsaDo0>J}MW>t57iRM)P|Q6|JQglY!MZ5ySPIUk0$#r?WU zhkK^zRFae$Z#7#pz$qO!tq+)pSNc8Mv6XrB&=PLgT34S`XFC*Aum#0Ww#wVX^0eWt zw&#zq+f1Pa@w~Q_5+UQ4#G{MwJu4mU(y&+z3qvO7@A*w;dMD)hmBumoS)XfL2K-6x zBy#iXl*C8Lz0JK1#3zhTH@{F5>W{<@D=iG&SxZ7*%!Iw~JDxn%@B z-S9kiu;?DMrJ)J>5Tc|tyF%5gg5FP}Po6h4YkFx_M}?X>Y3+#++q;|Q?zrd9wN^OR zM>S-}sd=sA^25sAzP#b|TZca{udn{hSAXzVduBi~ng21-y0jn{QK61D5%YTwp~jFW z`X%&zL|6kM!N4!-iB#_Ae;gc%(GVr_C>iL2B-YKXUSOP2W`N}C4yf_Zr@aRYYgw6nnWdO`UFuw&L&kKNeYybkP0I=hg zC+c>>yT+r1P#6VIIexnK_DKjTHhZXo;{ZSqXH=iWKESTKY4+c7a;|q0vTHAvLlFM| zMBkYHb<(E>t)YejwFM$&Gq<2W(ay1t;m3_P03sNI0kVfR+vsc}LK}??AWt(G++a0* zx9Y3n{M(QRq0_^92OTHx{|=wqc5v;1F0+iCE8@vB7l*|+o`~1aUn_IKb-VdZH7dxt zDVSF@qNFMP7_A#KVA&D;m%
    5|X3?GXB+TUh;!du6w$G&AFQg^W%|D@691pY*-D zXAl$nAiG4(k!BvR%L;AmBE9#$zvQDh@^6#A3>P6no}>4b5DKw68~dDbtax95Js3@@ zK9z|{xE1(@{Ku?`(}2LR&(=hr($-3(swm9v2*7Z@60jK26?KZ#_X%s0cCY*bVv$p} z5^*~j+0uUi{BAV7 literal 0 HcmV?d00001 diff --git a/src/apps/management/reset_device.py b/src/apps/management/reset_device.py index 689b76dfcf..05c39c7971 100644 --- a/src/apps/management/reset_device.py +++ b/src/apps/management/reset_device.py @@ -56,7 +56,10 @@ async def layout_reset_device(ctx, msg): entropy = ehash.digest() mnemonic = bip39.from_data(entropy[:msg.strength // 8]) - await show_mnemonic_by_word(ctx, mnemonic) + warning_content = Text('Backup your seed', ui.ICON_NOCOPY, ui.NORMAL, 'Never make a digital', 'copy of your recovery', 'seed and never upload', 'it online!') + await require_confirm(ctx, warning_content, ButtonRequestType.ResetDevice) + + await show_mnemonic(ctx, mnemonic) if curpin != newpin: config.change_pin(curpin, newpin) @@ -96,7 +99,7 @@ async def show_mnemonic_by_word(ctx, mnemonic): ConfirmWord, confirm='Next', cancel=None) -async def show_mnemonic(mnemonic): +async def show_mnemonic(ctx, mnemonic): from trezor.ui.scroll import paginate first_page = const(0) @@ -111,7 +114,7 @@ async def show_mnemonic_page(page, page_count, mnemonic): from trezor.ui.scroll import render_scrollbar, animate_swipe ui.display.clear() - ui.header('Write down your seed', ui.ICON_RESET, ui.BG, ui.LIGHT_GREEN) + ui.header('Write down seed', ui.ICON_RESET, ui.FG, ui.BG) render_scrollbar(page, page_count) for pi, (wi, word) in enumerate(mnemonic[page]): diff --git a/src/trezor/res/nocopy.toig b/src/trezor/res/nocopy.toig new file mode 100644 index 0000000000000000000000000000000000000000..eeb3029ebf3fa26c4ef2f5f5b6dc8d7a22f097e8 GIT binary patch literal 147 zcmV;E0BrwMPf2GI01^O)0000xr@#OPjPD;YFu1n@S-SrO825;u-hclUbpHc2GX4Lr!1Dhggu(S6s1d~A|GNJX12d4p_nGIv z0!W1Yf7Snw3~fLy>;HpP0U0dqhUXtK{NFjVy}W$?e}(-25b%k)91Qw_s=$Eh4FC{p BO~wEK literal 0 HcmV?d00001 diff --git a/src/trezor/ui/style.py b/src/trezor/ui/style.py index 59ae73aae4..42cef048d1 100644 --- a/src/trezor/ui/style.py +++ b/src/trezor/ui/style.py @@ -55,6 +55,7 @@ ICON_LOCK = 'trezor/res/lock.toig' ICON_SEND = 'trezor/res/send.toig' ICON_CLICK = 'trezor/res/click.toig' ICON_BACK = 'trezor/res/left.toig' +ICON_NOCOPY = 'trezor/res/nocopy.toig' # buttons BTN_DEFAULT = { @@ -153,5 +154,5 @@ LDR_DEFAULT_ACTIVE = { 'bg-color': BG, 'fg-color': GREEN, 'icon': ICON_SEND, - 'icon-fg-color': GREEN, + 'icon-fg-color': WHITE, }