Add basic form of editable profile fields to profile tab

This commit is contained in:
Johannes Loher 2021-01-03 23:26:31 +01:00
parent 98ce35f831
commit 2cb0411288
2 changed files with 26 additions and 1 deletions

View file

@ -170,4 +170,19 @@ export const DS4 = {
eyeColor: "DS4.ProfileEyeColor",
specialCharacteristics: "DS4.ProfileSpecialCharacteristics",
},
/**
* Define the profile info types for hanndlebars of a character
*/
profileDTypes: {
gender: "String",
birthday: "String",
birthplace: "String",
age: "Number",
height: "Number",
hairColor: "String",
weight: "Number",
eyeColor: "String",
specialCharacteristics: "String",
},
};

View file

@ -1 +1,11 @@
<div class="tab profile" data-group="primary" data-tab="profile"></div>
<div class="tab profile" data-group="primary" data-tab="profile">
<div class="grid grid-2col">
{{#each data.profile as |profile-data-value profile-data-key|}}
<div class="profile-entry">
<label>{{lookup ../config.profile profile-data-key}}</label>
<input type="text" name="data.profile.{{profile-data-key}}" value="{{profile-data-value}}"
data-dtype="{{lookup ../config/profileDTypes profile-data-key}}" />
</div>
{{/each}}
</div>
</div>