mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-22 16:26:18 +08:00
updated notifications
This commit is contained in:
parent
156fb99713
commit
277f26b15a
|
@ -83,7 +83,7 @@ function apply() {
|
|||
Loader.hide();
|
||||
let status = e.data.resultCode;
|
||||
if (status === 1) {
|
||||
Notifications.add("Preset Added", 1, 2);
|
||||
Notifications.add("Preset added", 1, 2);
|
||||
DB.getSnapshot().presets.push({
|
||||
name: inputVal,
|
||||
config: configChanges,
|
||||
|
@ -110,13 +110,13 @@ function apply() {
|
|||
Loader.hide();
|
||||
let status = e.data.resultCode;
|
||||
if (status === 1) {
|
||||
Notifications.add("Tag updated", 1);
|
||||
Notifications.add("Preset updated", 1);
|
||||
DB.getSnapshot().presets.filter(
|
||||
(preset) => preset.id == presetid
|
||||
)[0].name = inputVal;
|
||||
Settings.update();
|
||||
} else if (status === -1) {
|
||||
Notifications.add("Invalid tag name", 0);
|
||||
Notifications.add("Invalid preset name", 0);
|
||||
} else if (status < -1) {
|
||||
Notifications.add("Unknown error: " + e.data.message, -1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue