Skip to content

Commit 53dccf9

Browse files
cmarmojnywong
andauthored
Apply suggestions from code review
Co-authored-by: Jenny Wong <jnywong.pro@gmail.com>
1 parent a195692 commit 53dccf9

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

nbgitpuller/static/js/gitsyncview.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,14 @@ export class GitSyncView{
5959
setProgressError(isError) {
6060
if (isError) {
6161
this.progress.classList.add('progress-bar-danger');
62-
this.recovery.classList.remove('hidden');
6362
} else {
6463
this.progress.classList.remove('progress-bar-danger');
65-
this.recovery.classList.add('hidden');
64+
}
65+
}
66+
67+
setRecoveryLink(isError) {
68+
if (isError) {
69+
this.recovery.classList.toggle('hidden', !visible);
6670
}
6771
}
6872
}

nbgitpuller/static/js/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ gs.addHandler('error', function(data) {
4646
gsv.setProgressValue(100);
4747
gsv.setProgressText('Error: ' + data.message);
4848
gsv.setProgressError(true);
49+
gsv.setRecoveryLink(true);
4950
gsv.setTerminalVisibility(true);
5051
if (data.output) {
5152
gsv.term.write(data.output);

nbgitpuller/templates/status.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
<div class="panel-body hidden" id="status-details-container">
3030
<div id="status-details"></div>
3131
</div>
32-
<div id="recovery-link" class="hidden"><small>Go back to the <a href="{{ base_url }}">Jupyter root</a></small></div>
33-
</div>
32+
</div>
33+
<div id="recovery-link" class="hidden">
34+
<a class="btn btn-warning" href="{{ base_url }}" aria-label="Go to the Jupyter server without synchronizing content">Proceed to server without synchronizing</a>
35+
</div>
3436
</div>
3537
{% endblock %}
3638

0 commit comments

Comments
 (0)