mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-20 14:32:59 +01:00
feat: have save button turn into green checkmark on successful save
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user