Skip to content

Commit 966d98e

Browse files
committed
tweak: showWorking -> showSpinner
1 parent 0980f7c commit 966d98e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/dev-center/js/dev-center.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,9 @@ $(document).on('click', '.edit-app-save-btn', async function (e) {
952952
return;
953953
}
954954

955+
// show working spinner
956+
puter.ui.showSpinner();
957+
955958
// parse filetype_associations
956959
filetype_associations = filetype_associations.split(',').map(element => element.trim());
957960
// disable submit button
@@ -1010,14 +1013,15 @@ $(document).on('click', '.edit-app-save-btn', async function (e) {
10101013
$(`[data-app-uid="${uid}"]`).attr('data-app-title', html_encode(app.title));
10111014
$(`[data-app-name="${uid}"]`).attr('data-app-name', html_encode(app.name));
10121015
}).catch((err) => {
1013-
10141016
$('#edit-app-success').hide();
10151017
$('#edit-app-error').show();
10161018
$('#edit-app-error').html(err.error?.message);
10171019
// scroll to top so that user sees error message
10181020
document.body.scrollTop = document.documentElement.scrollTop = 0;
10191021
// re-enable submit button
10201022
$('.edit-app-save-btn').prop('disabled', false);
1023+
}).finally(() => {
1024+
puter.ui.hideSpinner();
10211025
})
10221026
})
10231027

src/puter-js/src/modules/UI.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@ class UI extends EventListener {
12821282
}
12831283
}
12841284

1285-
showWorking() {
1285+
showSpinner() {
12861286
if (this.#overlayActive) return;
12871287

12881288
// Create and add stylesheet for spinner if it doesn't exist
@@ -1361,7 +1361,7 @@ class UI extends EventListener {
13611361
}, 1000);
13621362
}
13631363

1364-
hideWorking() {
1364+
hideSpinner() {
13651365
if (!this.#overlayActive) return;
13661366

13671367
if (this.#overlayTimer) {

0 commit comments

Comments
 (0)