rewrite init
This commit is contained in:
@@ -1295,12 +1295,4 @@ body:not(.no-theme) #interface:not(.theme-light) #action-bar .slot.full:hover {
|
||||
|
||||
.strike {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.settings-menu {
|
||||
footer {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
bottom: 10px;
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -22,7 +22,7 @@ const SettingForm = class extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||
config: false,
|
||||
name: game.i18n.localize(`DG.Settings.${settingID}.name`),
|
||||
hint: game.i18n.localize(`DG.Settings.${settingID}.hint`),
|
||||
...setting,
|
||||
...settings[settingID],
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,7 @@ const SettingForm = class extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||
|
||||
static PARTS = {
|
||||
form: { template: `systems/${DG.ID}/templates/settings.hbs` },
|
||||
footer: { template: `systems/${DG.ID}/templates/save.hbs` },
|
||||
}
|
||||
|
||||
/** @override */
|
||||
@@ -52,7 +53,7 @@ const SettingForm = class extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||
|
||||
const settingsPromises = [];
|
||||
for (const [key, value] of Object.entries(data)) {
|
||||
settingsPromises.push(game.settings.set(DG.ID, key, value);
|
||||
settingsPromises.push(game.settings.set(DG.ID, key, value));
|
||||
}
|
||||
|
||||
Promise.allSettled(settingsPromises).then((values) => {
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<footer class="form-footer">
|
||||
<button type="submit"><i class="fa-solid fa-floppy-disk" inert=""></i> {{localize "SETTINGS.Save"}}</button>
|
||||
</footer>
|
||||
@@ -18,8 +18,4 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
<footer class="form-footer">
|
||||
<button type="submit"><i class="fa-solid fa-floppy-disk" inert=""></i> {{localize "SETTINGS.Save"}}</button>
|
||||
</footer>
|
||||
</section>
|
||||
Reference in New Issue
Block a user