feat: have save button turn into green checkmark on successful save

This commit is contained in:
Julian Lam
2022-10-24 11:51:30 -04:00
parent 19c2be6b0b
commit 3e355be245
2 changed files with 23 additions and 0 deletions

View File

@@ -270,4 +270,22 @@ form small {
border-top: 4px dashed;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
}
#save {
width: 64px;
height: 64px;
transition: background-color 250ms linear;
i {
font-size: 1.5em;
}
&.saved {
background-color: $success;
i {
@include fa-icon-solid($fa-var-check);
}
}
}

View File

@@ -79,6 +79,11 @@ define('admin/settings', ['uploader', 'mousetrap', 'hooks', 'alerts'], function
app.flags._unsaved = false;
saveBtn.get(0).classList.toggle('saved', true);
setTimeout(() => {
saveBtn.get(0).classList.toggle('saved', false);
}, 5000);
alerts.alert({
alert_id: 'config_status',
timeout: 2500,