Add support for the "collapse" input type
This commit is contained in:
parent
bc286ce06a
commit
1d43be188e
4 changed files with 22 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
const validInputTypes = [
|
const validInputTypes = [
|
||||||
`checkbox`,
|
`checkbox`,
|
||||||
|
`collapse`,
|
||||||
`details`,
|
`details`,
|
||||||
`divider`,
|
`divider`,
|
||||||
`error`,
|
`error`,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-content {
|
.input-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|
@ -52,4 +52,11 @@
|
||||||
justify-self: right;
|
justify-self: right;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
summary {
|
||||||
|
font-size: var(--font-size-14);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
color-scheme: var(--color-scheme);
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="dialog-content">
|
<div class="input-list">
|
||||||
{{#if description}}
|
{{#if description}}
|
||||||
<p>
|
<p>
|
||||||
{{ description }}
|
{{ description }}
|
||||||
|
|
|
||||||
12
templates/Ask/inputs/collapse.hbs
Normal file
12
templates/Ask/inputs/collapse.hbs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<details>
|
||||||
|
<summary>
|
||||||
|
{{ summary }}
|
||||||
|
</summary>
|
||||||
|
<div class="input-list">
|
||||||
|
{{#each inputs as | i |}}
|
||||||
|
{{> (concat (systemFilePath "templates/Ask/inputs/" ) i.type ".hbs") i}}
|
||||||
|
{{else}}
|
||||||
|
{{ content }}
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue