This commit is contained in:
@@ -320,19 +320,22 @@
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
|
||||
.editor {
|
||||
.application.sheet .editor,
|
||||
.window-app.sheet .editor {
|
||||
border: 2;
|
||||
height: 300px;
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
.medium-editor {
|
||||
.application.sheet .medium-editor,
|
||||
.window-app.sheet .medium-editor {
|
||||
border: 2;
|
||||
height: 240px;
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
.small-editor {
|
||||
.application.sheet .small-editor,
|
||||
.window-app.sheet .small-editor {
|
||||
border: 2;
|
||||
height: 120px;
|
||||
padding: 0 3px;
|
||||
@@ -849,7 +852,6 @@
|
||||
/* ======================================== */
|
||||
/* Sidebar CSS */
|
||||
#sidebar {
|
||||
font-size: 1rem;
|
||||
background-position: 100%;
|
||||
color: rgba(220, 220, 220, 0.75);
|
||||
}
|
||||
|
||||
@@ -220,14 +220,15 @@ export default class MournbladeActorSheet extends HandlebarsApplicationMixin(fou
|
||||
* Handle editing the actor image
|
||||
* @param {Event} event - The triggering event
|
||||
*/
|
||||
static async #onEditImage(event) {
|
||||
static async #onEditImage(event, target) {
|
||||
event.preventDefault()
|
||||
const sheet = this
|
||||
const attr = target.dataset.edit || "img"
|
||||
const current = foundry.utils.getProperty(this.document, attr) ?? this.document.img
|
||||
const filePicker = new FilePicker({
|
||||
type: "image",
|
||||
current: sheet.document.img,
|
||||
current,
|
||||
callback: (path) => {
|
||||
sheet.document.update({ img: path })
|
||||
this.document.update({ [attr]: path })
|
||||
},
|
||||
})
|
||||
filePicker.browse()
|
||||
|
||||
@@ -121,13 +121,15 @@ export default class MournbladeItemSheet extends HandlebarsApplicationMixin(foun
|
||||
* Handle editing the item image
|
||||
* @param {Event} event - The triggering event
|
||||
*/
|
||||
static async #onEditImage(event) {
|
||||
static async #onEditImage(event, target) {
|
||||
event.preventDefault()
|
||||
const attr = target.dataset.edit || "img"
|
||||
const current = foundry.utils.getProperty(this.document, attr) ?? this.document.img
|
||||
const filePicker = new FilePicker({
|
||||
type: "image",
|
||||
current: this.document.img,
|
||||
current,
|
||||
callback: (path) => {
|
||||
this.document.update({ img: path })
|
||||
this.document.update({ [attr]: path })
|
||||
},
|
||||
})
|
||||
filePicker.browse()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
@@ -266,17 +266,20 @@ table {
|
||||
font-style: italic;
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
.editor {
|
||||
.application.sheet .editor,
|
||||
.window-app.sheet .editor {
|
||||
border: 2;
|
||||
height: 300px;
|
||||
padding: 0 3px;
|
||||
}
|
||||
.medium-editor {
|
||||
.application.sheet .medium-editor,
|
||||
.window-app.sheet .medium-editor {
|
||||
border: 2;
|
||||
height: 240px;
|
||||
padding: 0 3px;
|
||||
}
|
||||
.small-editor {
|
||||
.application.sheet .small-editor,
|
||||
.window-app.sheet .small-editor {
|
||||
border: 2;
|
||||
height: 120px;
|
||||
padding: 0 3px;
|
||||
@@ -703,7 +706,6 @@ li {
|
||||
/* ======================================== */
|
||||
/* Sidebar CSS */
|
||||
#sidebar {
|
||||
font-size: 1rem;
|
||||
background-position: 100%;
|
||||
color: rgba(220, 220, 220, 0.75);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
<header class="sheet-header">
|
||||
<div class="header-fields background-sheet-header">
|
||||
<div class="flexrow">
|
||||
<img class="profile-img" src="{{actor.img}}" data-action="editImage" title="{{actor.name}}" />
|
||||
<img class="profile-img" src="{{actor.img}}" data-action="editImage" data-edit="img" title="{{actor.name}}" />
|
||||
<div class="flexcol header-main-content">
|
||||
<div style="display: flex; align-items: center; gap: 0.3rem; width: 100%;">
|
||||
<h1 class="charname" style="flex: 1; margin: 0; min-width: 0;"><input name="name" type="text" value="{{actor.name}}" placeholder="Name" {{#if isPlayMode}}disabled{{/if}} /></h1>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<header class="sheet-header">
|
||||
<div class="header-fields background-sheet-header-creature">
|
||||
<div class="flexrow">
|
||||
<img class="profile-img" src="{{actor.img}}" data-action="editImage" title="{{actor.name}}" />
|
||||
<img class="profile-img" src="{{actor.img}}" data-action="editImage" data-edit="img" title="{{actor.name}}" />
|
||||
<div class="flexcol header-main-content">
|
||||
<div style="display: flex; align-items: center; gap: 0.3rem; width: 100%;">
|
||||
<h1 class="charname" style="flex: 1; margin: 0; min-width: 0;"><input name="name" type="text" value="{{actor.name}}" placeholder="Name" {{#if isPlayMode}}disabled{{/if}} /></h1>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
class="item-sheet-img"
|
||||
src="{{item.img}}"
|
||||
data-action="editImage"
|
||||
data-edit="img"
|
||||
title="{{item.name}}"
|
||||
/>
|
||||
<div class="header-fields">
|
||||
|
||||
Reference in New Issue
Block a user