2022-11-15 16:26:19 +03:00
<div class="gh-content-import-wrapper">
2022-11-17 18:40:19 +03:00
{{ # if ( eq this .state 'INIT' ) }}
2022-11-15 16:26:19 +03:00
<header class="modal-header" data-test-modal="import-content">
<h1>Import content</h1>
</header>
{{ / if }}
2022-11-17 18:40:19 +03:00
{{ # if ( eq this .state 'UPLOADING' ) }}
<header class="modal-header" data-test-modal="import-content">
<h1>Uploading</h1>
</header>
{{ / if }}
2022-11-15 16:26:19 +03:00
{{ # if ( eq this .state 'PROCESSING' ) }}
<header class="modal-header icon-center" data-test-modal="import-content">
{{ svg-jar "import-in-progress" class = "gh-import-content-icon" }}
<h1>Import in progress</h1>
</header>
{{ / if }}
{{ # if ( eq this .state 'ERROR' ) }}
<header class="modal-header" data-test-modal="import-content">
<h1> {{ this .errorHeader }} </h1>
</header>
{{ / if }}
2022-11-16 16:07:37 +03:00
<button class="close" data-test-button="close-import-content" type="button" {{ on "click" @ close }} >
2022-11-15 16:26:19 +03:00
{{ svg-jar "close" }}
<span class="hidden">Close</span>
2022-11-16 16:07:37 +03:00
</button>
2022-11-15 16:26:19 +03:00
<div class="modal-body">
{{ # if ( eq this .state 'INIT' ) }}
2022-11-17 15:05:56 +03:00
<ModalImportContent::ContentFileSelect @setFile= {{ action "setFile" }} />
2022-11-15 16:26:19 +03:00
{{ / if }}
2022-11-17 18:40:19 +03:00
{{ # if ( eq this .state 'UPLOADING' ) }}
<div class="gh-import-content-spinner">
<GhLoadingSpinner />
</div>
{{ / if }}
2022-11-15 16:26:19 +03:00
{{ # if ( eq this .state 'PROCESSING' ) }}
<div class="gh-content-import-resultcontainer">
<div class="gh-content-import-result-summary">
<p>Your import is being processed, and you'll receive a confirmation email as soon as it's complete. Usually this only takes a few minutes, but larger imports may take longer.</p>
</div>
</div>
{{ / if }}
{{ # if ( eq this .state 'ERROR' ) }}
<div class="failed flex items-start gh-content-upload-errorcontainer error">
<div class="mr2"> {{ svg-jar "warning" class = "nudge-top--2 w4 h4 fill-red" }} </div>
<p class="ma0 pa0"> {{ this .errorMessage }} </p>
</div>
{{ / if }}
</div>
<div class="modal-footer">
{{ # if ( eq this .state 'INIT' ) }}
2022-11-16 16:07:37 +03:00
<button class="gh-btn" data-test-button="close-import-content" type="button" {{ on "click" @ close }} >
2022-11-15 16:26:19 +03:00
<span>Close</span>
</button>
{{ / if }}
{{ # if ( eq this .state 'UPLOADING' ) }}
2022-11-17 18:40:19 +03:00
<button class="gh-btn" data-test-button="close-import-content" type="button" {{ on "click" @ close }} >
<span>Cancel</span>
2022-11-15 16:26:19 +03:00
</button>
{{ / if }}
{{ # if ( eq this .state 'PROCESSING' ) }}
2022-11-16 16:07:37 +03:00
<button class="gh-btn gh-btn-black" data-test-button="close-import-content" type="button" {{ on "click" @ close }} >
2022-11-15 16:26:19 +03:00
<span>Got it</span>
</button>
{{ / if }}
{{ # if ( eq this .state 'ERROR' ) }}
{{ # if this .showTryAgainButton }}
2022-11-17 15:05:56 +03:00
<button class="gh-btn" data-test-button="restart-import-content" type="button" {{ action "reset" }} >
2022-11-15 16:26:19 +03:00
<span>Try again</span>
</button>
{{ / if }}
2022-11-16 16:07:37 +03:00
<button class="gh-btn gh-btn-black" data-test-button="close-import-content" type="button" {{ on "click" @ close }} >
2022-11-15 16:26:19 +03:00
<span>OK</span>
</button>
{{ / if }}
</div>
</div>