File tree Expand file tree Collapse file tree 1 file changed +32
-10
lines changed
apps/remix-ide/src/app/ui/landing-page Expand file tree Collapse file tree 1 file changed +32
-10
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ const css = csjs`
100100 transition: .5s ease-out;
101101 z-index: 1000;
102102 }
103+ .migrationBtn {
104+ width: 100px;
105+ }
103106}
104107`
105108
@@ -414,23 +417,42 @@ export class LandingPage extends ViewPlugin {
414417 } , 1000 )
415418 }
416419 }
420+ const onAcceptDownloadn = async ( ) => {
421+ await downloadFiles ( )
422+ const el = document . getElementById ( 'modal-dialog' )
423+ el . parentElement . removeChild ( el )
424+ migrate ( )
425+ }
426+
427+ const onDownload = ( ) => {
428+ const el = document . getElementById ( 'modal-dialog' )
429+ el . parentElement . removeChild ( el )
430+ migrate ( )
431+ }
432+
433+ const onCancel = ( ) => {
434+ const el = document . getElementById ( 'modal-dialog' )
435+ el . parentElement . removeChild ( el )
436+ }
417437
418438 const migrateWorkspace = async ( ) => {
419439 modalDialog (
420440 'File system Migration' ,
421- yo `<span>Do you want to download your files to local device first?</span>` ,
441+ yo `
442+ <span>Do you want to download your files to local device first?</span>
443+ <div class="d-flex justify-content-around pt-3 mt-3 border-top">
444+ <button class="btn btn-sm btn-primary" onclick=${ async ( ) => onAcceptDownloadn ( ) } >Download and Migrate</button>
445+ <button class="btn btn-sm btn-secondary ${ css . migrationBtn } " onclick=${ ( ) => onDownload ( ) } >Migrate</button>
446+ <button class="btn btn-sm btn-secondary ${ css . migrationBtn } " onclick=${ ( ) => onCancel ( ) } >Cancel</button>
447+ </div>
448+ ` ,
422449 {
423- label : 'Download and Migrate' ,
424- fn : async ( ) => {
425- await downloadFiles ( )
426- migrate ( )
427- }
450+ label : '' ,
451+ fn : null
428452 } ,
429453 {
430- label : 'Migrate' ,
431- fn : ( ) => {
432- migrate ( )
433- }
454+ label : '' ,
455+ fn : null
434456 }
435457 )
436458 }
You can’t perform that action at this time.
0 commit comments