File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
src/frontend/src/routes/(new-styling)/recovery-phrase Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 164164 }
165165 };
166166
167- const handleShowAll = () => {
168- showAll = true ;
167+ const toggleAll = () => {
168+ showAll = ! showAll ;
169+ if (! showAll ) {
170+ words .forEach ((word ) => {
171+ word .showContent = false ;
172+ });
173+ }
169174 };
170175
171176 const handleClearAll = () => {
221226 <!-- "data-bwignore" Bitwarden ignore -->
222227 <!-- "data-form-type=other" Non-standard hint to password managers -->
223228 <input
224- type ={showAll || word .showContent ? " text" : " password" }
229+ type ={showAll || word .showContent || ! word .isValid
230+ ? " text"
231+ : " password" }
225232 inputmode =" text"
226233 autocorrect =" off"
227234 autocomplete =" off"
281288 {/each }
282289 </div >
283290 <div class =" flex flex-row gap-2" >
284- <Button class ="w-full" variant ="tertiary" onclick ={handleShowAll }>
285- {$t ` Show all ` }
291+ <Button class ="w-full" variant ="tertiary" onclick ={toggleAll }>
292+ {#if showAll }
293+ {$t ` Hide all ` }
294+ {:else }
295+ {$t ` Show all ` }
296+ {/if }
286297 </Button >
287298 <Button class ="w-full" variant ="tertiary" onclick ={handleClearAll }>
288299 {$t ` Clear all ` }
You can’t perform that action at this time.
0 commit comments