Remove the button from the settings config list when the default attributes have been successfully removed & send a notification (closes #92)
This commit is contained in:
parent
7603e79e42
commit
d04985b5b7
2 changed files with 4 additions and 1 deletions
|
|
@ -160,7 +160,8 @@
|
|||
"migration-in-progress": "Applying data migrations for version {version}. Please do NOT refresh the window while this warning is present."
|
||||
},
|
||||
"success": {
|
||||
"saved-default-attributes": "Successfully saved default Actor attributes",
|
||||
"saved-default-attributes": "Successfully saved default Actor attributes.",
|
||||
"removed-default-attributes": "The default attributes for Actors have been removed.",
|
||||
"migration-successful": "Data migrations for version {version} were successful."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ Hooks.on(`renderSettingsConfig`, (app, html) => {
|
|||
button.innerHTML = _loc(`taf.settings.actorDefaultAttributes.label`);
|
||||
button.addEventListener(`click`, () => {
|
||||
game.settings.set(__ID__, `actorDefaultAttributes`, undefined);
|
||||
formGroup.remove();
|
||||
ui.notifications.success(_loc(`taf.notifs.success.removed-default-attributes`));
|
||||
});
|
||||
|
||||
const hint = document.createElement(`p`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue