feat: implement clean Foundry V13 compliant tab system
- Remove custom tab implementation in favor of official ApplicationV2 tabs - Implement ApplicationTab typedef structure for Actor and Item sheets - Add memory-safe event listener management with proper cleanup - Update all sheet templates to use standard Foundry tab structure - Add template safety checks to prevent undefined access errors - Optimize performance with DOM updates instead of full re-renders - Maintain backward CSS compatibility during transition - Add dynamic tab configuration based on item types Key improvements: - ~200 lines of custom tab code removed - Memory leak prevention with proper event cleanup - Performance optimization (no re-render on tab switch) - Standards-compliant with Foundry V13 ApplicationV2 API - Consistent implementation across Actor and Item sheets - Template safety with Handlebars guards - Dynamic icon and localization support All 31 modified files now use the official Foundry VTT v13 tab system.
This commit is contained in:
parent
2c4dbb2620
commit
40e14d1196
31 changed files with 653 additions and 379 deletions
|
@ -42,7 +42,7 @@ titleKey=titleKey}}
|
|||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
<div class="ds4-sheet-tab tab spells" data-group="primary" data-tab="spells">
|
||||
|
||||
{{#unless (isEmpty itemsByType.spell)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--spell item-list">
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hideDescription=true
|
||||
|
@ -79,6 +79,7 @@ titleKey=titleKey}}
|
|||
'')}}{{item.system.spellModifier.numerical}}{{else}}{{item.system.spellModifier.complex}}{{/if}}
|
||||
</div>
|
||||
|
||||
|
||||
{{!-- max. distance --}}
|
||||
{{> distanceUnit titleKey='DS4.SpellDistance' unitDatum=item.system.maxDistance
|
||||
config=@root/config}}
|
||||
|
@ -96,4 +97,3 @@ titleKey=titleKey}}
|
|||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='spell'}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue