-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#2138] Rebuild RollConfigurationDialog using Application V2
- Loading branch information
Showing
9 changed files
with
192 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Application5e } from "./application.mjs"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api; | ||
|
||
/** | ||
* Base application from which all system applications should be based. | ||
*/ | ||
export default class Application5e extends HandlebarsApplicationMixin(ApplicationV2) { | ||
/** @override */ | ||
static DEFAULT_OPTIONS = { | ||
classes: ["dnd5e"] | ||
}; | ||
|
||
/* -------------------------------------------- */ | ||
/* Rendering */ | ||
/* -------------------------------------------- */ | ||
|
||
/** @inheritDoc */ | ||
async _prepareContext(options) { | ||
const context = await super._prepareContext(options); | ||
context.CONFIG = CONFIG.DND5E; | ||
return context; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<nav class="dialog-buttons"> | ||
{{#each buttons}} | ||
<button type="submit" data-action="{{ @key }}">{{{ icon }}} {{{ label }}}</button> | ||
{{/each}} | ||
</nav> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<fieldset> | ||
<legend>{{ localize "DND5E.RollConfiguration.Configuration" }}</legend> | ||
<div class="form-group"> | ||
<label>{{ localize "DND5E.RollMode" }}</label> | ||
<select name="rollMode"> | ||
{{ selectOptions rollModesOptions selected=rollMode localize=true }} | ||
</select> | ||
</div> | ||
</fieldset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<fieldset class="roll-formulas"> | ||
<legend>{{ localize "DND5E.RollConfiguration.Rolls" }}</legend> | ||
{{#each rolls}} | ||
<div class="form-group"> | ||
<label>{{ localize "DND5E.Formula" }} {{#if type}}({{ type }}){{/if}}</label> | ||
<input type="text" name="formula" value="{{ formula }}" disabled> | ||
</div> | ||
{{/each}} | ||
<div class="form-group"> | ||
<label>{{ localize "DND5E.RollSituationalBonus" }}</label> | ||
<input type="text" name="situational" value="{{ situational }}" | ||
placeholder="{{ localize 'DND5E.RollExample' }}"> | ||
</div> | ||
</fieldset> |