File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9999 }}
100100 >
101101 <IconPlus />
102- Add Line
102+ Add line
103103 </button >
104104</main >
105105
Original file line number Diff line number Diff line change 5252 }
5353 json [key ] = new Map (Object .entries (value as { [key : string ]: [string , string ] }));
5454 }
55+ const oldSection = section ;
56+ section = null ;
57+ // wait for the section to save before overwriting
58+ await new Promise ((r ) => setTimeout (r , 500 ));
5559 $textCache = { strings: json };
5660 importSuccess = true ;
61+ section = oldSection ;
5762 setTimeout (() => (importSuccess = false ), 1000 );
5863 };
5964 input .click ();
129134 <IconDownload />
130135 Export Text as JSON
131136 </button >
132- <button on:click ={importText } style =" color: var(--danger)" >
137+ <button on:click ={importText } style ={ importSuccess ? " " : " color: var(--danger)" } >
133138 {#if importSuccess }
134139 <IconCheck />
135140 Import successful!
You can’t perform that action at this time.
0 commit comments