Biographie

This commit is contained in:
Byroks committed 2026-10-23 19:03:16 +02:00
1 parent a903476a72
commit 0da6fa67ac
3 files changed
+33 -25

No files matched your search

+2 -1
View File
@@ -93,7 +93,8 @@
"items": "Gegenstände", "items": "Gegenstände",
"effects": "Effekte", "effects": "Effekte",
"zauber": "Zauber", "zauber": "Zauber",
"description": "Beschreibung" "biographie": "Biographie",
"hintergrund": "Hintergrund"
}, },
"spezialisierung": "Spezialisierung" "spezialisierung": "Spezialisierung"
}, },
+14
View File
@@ -61,6 +61,10 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
id: "hintergrund", id: "hintergrund",
icon: "fa-feather-pointed" icon: "fa-feather-pointed"
}, },
{
id: "biographie",
icon: "fa-feather-pointed"
},
{ {
id: "effects", id: "effects",
icon: "fa-bolt" icon: "fa-bolt"
@@ -97,6 +101,10 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
template: systemPath("templates/actor/hintergrund.hbs"), template: systemPath("templates/actor/hintergrund.hbs"),
scrollable: [""] scrollable: [""]
}, },
biographie: {
template: systemPath("templates/actor/biographie.hbs"),
scrollable: [""]
},
effects: { effects: {
template: systemPath("templates/shared/effects.hbs"), template: systemPath("templates/shared/effects.hbs"),
scrollable: [""] scrollable: [""]
@@ -185,6 +193,9 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
break; break;
case "hintergrund": case "hintergrund":
context.fields = await this._getFields(); context.fields = await this._getFields();
context.tab = context.tabs[partId];
break;
case "biographie":
context.enrichedBeschreibung = context.enrichedBeschreibung =
await foundry.applications.ux.TextEditor.implementation.enrichHTML( await foundry.applications.ux.TextEditor.implementation.enrichHTML(
this.actor.system.biographie.beschreibung, this.actor.system.biographie.beschreibung,
@@ -198,6 +209,9 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
} }
); );
context.tab = context.tabs[partId]; context.tab = context.tabs[partId];
break;
default:
context.tab = context.tabs[partId];
} }
return context; return context;
} }
+17 -24
View File
@@ -4,28 +4,21 @@
data-tab="{{tab.id}}" data-tab="{{tab.id}}"
data-group="{{tab.group}}" data-group="{{tab.group}}"
> >
<div class="container"> <fieldset style="height:100%">
<div class="row"> <legend>{{localize "Midgard6.Sheets.Tabs.biographie"}}</legend>
{{! Editors must receive enriched text data from getData to properly handle rolls, UUID links, etc. }} {{#if editable}}
<div class="col-12"> <prose-mirror
<fieldset style="height:100%"> style="height:100%"
<legend>{{localize "Midgard6.Item.Description"}}</legend> name="system.biographie.beschreibung"
{{#if editable}} data-document-u-u-i-d="{{actor.uuid}}"
<prose-mirror value="{{system.biographie.beschreibung}}"
style="height:100%" collaborate="true"
name="system.biographie.beschreibung" toggled="true"
data-document-u-u-i-d="{{actor.uuid}}" >
value="{{system.biographie.beschreibung}}" {{{enrichedBeschreibung}}}
collaborate="true" </prose-mirror>
toggled="true" {{else}}
> {{{enrichedBeschreibung}}}
{{{enrichedBeschreibung}}} {{/if}}
</prose-mirror> </fieldset>
{{else}}
{{{enrichedBeschreibung}}}
{{/if}}
</fieldset>
</div>
</div>
</div>
</section> </section>