Edit Trackers Pop-up window [done]
This commit is contained in:
+44
-1
@@ -59,5 +59,48 @@
|
||||
"template.settingsModal.advanced.customHtmlPromptNote": "Customize the HTML prompt injected when \"Enable Immersive HTML\" is enabled. The default prompt is shown above - you can edit it directly or replace it entirely. Click \"Restore Default\" to reset. This affects all generation modes (together, separate, and plot progression).",
|
||||
"template.settingsModal.advanced.clearCache": "Clear Extension Cache",
|
||||
"template.settingsModal.advanced.resetFabPositions": "Reset Button Positions",
|
||||
"template.settingsModal.advanced.resetFabPositionsNote": "Resets all floating action buttons (toggle, refresh, debug) to default top-left positions. Useful if buttons are off-screen."
|
||||
"template.settingsModal.advanced.resetFabPositionsNote": "Resets all floating action buttons (toggle, refresh, debug) to default top-left positions. Useful if buttons are off-screen.",
|
||||
"template.trackerEditorModal.title": "Edit Trackers",
|
||||
"template.trackerEditorModal.tabs.userStats": "User Stats",
|
||||
"template.trackerEditorModal.tabs.infoBox": "Info Box",
|
||||
"template.trackerEditorModal.tabs.presentCharacters": "Present Characters",
|
||||
"template.trackerEditorModal.buttons.reset": "Reset to Defaults",
|
||||
"template.trackerEditorModal.buttons.cancel": "Cancel",
|
||||
"template.trackerEditorModal.buttons.save": "Save & Apply",
|
||||
"template.trackerEditorModal.userStatsTab.customStatsTitle": "Custom Stats",
|
||||
"template.trackerEditorModal.userStatsTab.addCustomStatButton": "Add Custom Stat",
|
||||
"template.trackerEditorModal.userStatsTab.rpgAttributesTitle": "RPG Attributes",
|
||||
"template.trackerEditorModal.userStatsTab.enableRpgAttributes": "Enable RPG Attributes Section",
|
||||
"template.trackerEditorModal.userStatsTab.alwaysIncludeAttributes": "Always Include Attributes in Prompt",
|
||||
"template.trackerEditorModal.userStatsTab.alwaysIncludeAttributesNote": "If disabled, attributes are only sent when a dice roll is active.",
|
||||
"template.trackerEditorModal.userStatsTab.addAttributeButton": "Add Attribute",
|
||||
"template.trackerEditorModal.userStatsTab.statusSectionTitle": "Status Section",
|
||||
"template.trackerEditorModal.userStatsTab.enableStatusSection": "Enable Status Section",
|
||||
"template.trackerEditorModal.userStatsTab.showMoodEmoji": "Show Mood Emoji",
|
||||
"template.trackerEditorModal.userStatsTab.statusFieldsLabel": "Status Fields (comma-separated):",
|
||||
"template.trackerEditorModal.userStatsTab.skillsSectionTitle": "Skills Section",
|
||||
"template.trackerEditorModal.userStatsTab.enableSkillsSection": "Enable Skills Section",
|
||||
"template.trackerEditorModal.userStatsTab.skillsLabelLabel": "Skills Label:",
|
||||
"template.trackerEditorModal.userStatsTab.skillsListLabel": "Skills List (comma-separated):",
|
||||
"template.trackerEditorModal.infoBoxTab.widgetsTitle": "Widgets",
|
||||
"template.trackerEditorModal.infoBoxTab.dateWidget": "Date",
|
||||
"template.trackerEditorModal.infoBoxTab.weatherWidget": "Weather",
|
||||
"template.trackerEditorModal.infoBoxTab.temperatureWidget": "Temperature",
|
||||
"template.trackerEditorModal.infoBoxTab.timeWidget": "Time",
|
||||
"template.trackerEditorModal.infoBoxTab.locationWidget": "Location",
|
||||
"template.trackerEditorModal.infoBoxTab.recentEventsWidget": "Recent Events",
|
||||
"template.trackerEditorModal.presentCharactersTab.relationshipStatusTitle": "Relationship Status Fields",
|
||||
"template.trackerEditorModal.presentCharactersTab.relationshipStatusHint": "Define relationship types with corresponding emojis shown on character portraits",
|
||||
"template.trackerEditorModal.presentCharactersTab.newRelationshipButton": "New Relationship",
|
||||
"template.trackerEditorModal.presentCharactersTab.appearanceDemeanorTitle": "Appearance/Demeanor Fields",
|
||||
"template.trackerEditorModal.presentCharactersTab.appearanceDemeanorHint": "Fields shown below character name, separated by |",
|
||||
"template.trackerEditorModal.presentCharactersTab.addCustomFieldButton": "Add Custom Field",
|
||||
"template.trackerEditorModal.presentCharactersTab.thoughtsConfigTitle": "Thoughts Configuration",
|
||||
"template.trackerEditorModal.presentCharactersTab.enableCharacterThoughts": "Enable Character Thoughts",
|
||||
"template.trackerEditorModal.presentCharactersTab.thoughtsLabelLabel": "Thoughts Label:",
|
||||
"template.trackerEditorModal.presentCharactersTab.aiInstructionLabel": "AI Instruction:",
|
||||
"template.trackerEditorModal.presentCharactersTab.characterStatsTitle": "Character Stats",
|
||||
"template.trackerEditorModal.presentCharactersTab.trackCharacterStats": "Track Character Stats",
|
||||
"template.trackerEditorModal.presentCharactersTab.characterStatsHint": "Create stats to track for each character (displayed as colored bars)",
|
||||
"template.trackerEditorModal.presentCharactersTab.addCharacterStatButton": "Add Character Stat"
|
||||
}
|
||||
+44
-1
@@ -59,5 +59,48 @@
|
||||
"template.settingsModal.advanced.customHtmlPromptNote": "自訂啟用“啟用沉浸式 HTML”時注入的 HTML 提示詞。上方顯示預設提示詞 - 您可以直接編輯或完全替換它。點擊“恢復預設”以重置。這會影響所有生成模式(同時、單獨和劇情推進)。",
|
||||
"template.settingsModal.advanced.clearCache": "清除擴充功能快取",
|
||||
"template.settingsModal.advanced.resetFabPositions": "重置按鈕位置",
|
||||
"template.settingsModal.advanced.resetFabPositionsNote": "將所有浮動操作按鈕(切換、刷新、調試)重置為預設的左上位置。如果按鈕在螢幕外,這會很有用。"
|
||||
"template.settingsModal.advanced.resetFabPositionsNote": "將所有浮動操作按鈕(切換、刷新、調試)重置為預設的左上位置。如果按鈕在螢幕外,這會很有用。",
|
||||
"template.trackerEditorModal.title": "追蹤器編輯",
|
||||
"template.trackerEditorModal.tabs.userStats": "User 屬性",
|
||||
"template.trackerEditorModal.tabs.infoBox": "資訊框",
|
||||
"template.trackerEditorModal.tabs.presentCharacters": "在場角色",
|
||||
"template.trackerEditorModal.buttons.reset": "重置為預設值",
|
||||
"template.trackerEditorModal.buttons.cancel": "取消",
|
||||
"template.trackerEditorModal.buttons.save": "保存並應用",
|
||||
"template.trackerEditorModal.userStatsTab.customStatsTitle": "自訂屬性",
|
||||
"template.trackerEditorModal.userStatsTab.addCustomStatButton": "添加自訂屬性",
|
||||
"template.trackerEditorModal.userStatsTab.rpgAttributesTitle": "RPG 屬性",
|
||||
"template.trackerEditorModal.userStatsTab.enableRpgAttributes": "啟用 RPG 屬性",
|
||||
"template.trackerEditorModal.userStatsTab.alwaysIncludeAttributes": "始終發送屬性(prompt)",
|
||||
"template.trackerEditorModal.userStatsTab.alwaysIncludeAttributesNote": "將 RPG 屬性始終包含在提示詞中,即使它們未顯示在面板上也一樣。",
|
||||
"template.trackerEditorModal.userStatsTab.addAttributeButton": "添加屬性",
|
||||
"template.trackerEditorModal.userStatsTab.statusSectionTitle": "狀態欄",
|
||||
"template.trackerEditorModal.userStatsTab.enableStatusSection": "啟用狀態欄",
|
||||
"template.trackerEditorModal.userStatsTab.showMoodEmoji": "顯示心情emoji",
|
||||
"template.trackerEditorModal.userStatsTab.statusFieldsLabel": "狀態欄欄位(以逗號分隔):",
|
||||
"template.trackerEditorModal.userStatsTab.skillsSectionTitle": "技能欄",
|
||||
"template.trackerEditorModal.userStatsTab.enableSkillsSection": "啟用技能欄",
|
||||
"template.trackerEditorModal.userStatsTab.skillsLabelLabel": "技能欄標籤:",
|
||||
"template.trackerEditorModal.userStatsTab.skillsListLabel":" 技能列表(以逗號分隔):",
|
||||
"template.trackerEditorModal.infoBoxTab.widgetsTitle": "小工具",
|
||||
"template.trackerEditorModal.infoBoxTab.dateWidget": "日期",
|
||||
"template.trackerEditorModal.infoBoxTab.weatherWidget": "天氣",
|
||||
"template.trackerEditorModal.infoBoxTab.temperatureWidget": "溫度",
|
||||
"template.trackerEditorModal.infoBoxTab.timeWidget": "時間",
|
||||
"template.trackerEditorModal.infoBoxTab.locationWidget": "位置",
|
||||
"template.trackerEditorModal.infoBoxTab.recentEventsWidget": "近期事件",
|
||||
"template.trackerEditorModal.presentCharactersTab.relationshipStatusTitle": "關係狀態",
|
||||
"template.trackerEditorModal.presentCharactersTab.relationshipStatusHint":"定義關係類型,並在角色頭像上顯示對應的表情符號",
|
||||
"template.trackerEditorModal.presentCharactersTab.newRelationshipButton": "新增關係類型",
|
||||
"template.trackerEditorModal.presentCharactersTab.appearanceDemeanorTitle": "外觀與當前行為舉止",
|
||||
"template.trackerEditorModal.presentCharactersTab.appearanceDemeanorHint":"角色名稱下方顯示的字段,以 | 分隔。",
|
||||
"template.trackerEditorModal.presentCharactersTab.addCustomFieldButton": "添加自訂字段",
|
||||
"template.trackerEditorModal.presentCharactersTab.thoughtsConfigTitle": "內心話配置",
|
||||
"template.trackerEditorModal.presentCharactersTab.enableCharacterThoughts": "啟用角色內心話",
|
||||
"template.trackerEditorModal.presentCharactersTab.thoughtsLabelLabel": "內心話標籤:",
|
||||
"template.trackerEditorModal.presentCharactersTab.aiInstructionLabel": "內心話提示詞:",
|
||||
"template.trackerEditorModal.presentCharactersTab.characterStatsTitle": "角色屬性",
|
||||
"template.trackerEditorModal.presentCharactersTab.trackCharacterStats": "啟用角色屬性",
|
||||
"template.trackerEditorModal.presentCharactersTab.characterStatsHint":"建立統計資料以追蹤每個角色(以彩色長條圖顯示)",
|
||||
"template.trackerEditorModal.presentCharactersTab.addCharacterStatButton": "添加角色屬性"
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Tracker Editor Module
|
||||
* Provides UI for customizing tracker configurations
|
||||
*/
|
||||
|
||||
import { i18n } from '../../core/i18n.js';
|
||||
import { extensionSettings } from '../../core/state.js';
|
||||
import { saveSettings } from '../../core/persistence.js';
|
||||
import { renderUserStats } from '../rendering/userStats.js';
|
||||
@@ -205,7 +205,7 @@ function renderUserStatsTab() {
|
||||
let html = '<div class="rpg-editor-section">';
|
||||
|
||||
// Custom Stats section
|
||||
html += '<h4><i class="fa-solid fa-heart-pulse"></i> Custom Stats</h4>';
|
||||
html += `<h4><i class="fa-solid fa-heart-pulse"></i> ${i18n.getTranslation('template.trackerEditorModal.userStatsTab.customStatsTitle')}</h4>`;
|
||||
html += '<div class="rpg-editor-stats-list" id="rpg-editor-stats-list">';
|
||||
|
||||
config.customStats.forEach((stat, index) => {
|
||||
@@ -219,25 +219,25 @@ function renderUserStatsTab() {
|
||||
});
|
||||
|
||||
html += '</div>';
|
||||
html += '<button class="rpg-btn-secondary" id="rpg-add-stat"><i class="fa-solid fa-plus"></i> Add Custom Stat</button>';
|
||||
html += `<button class="rpg-btn-secondary" id="rpg-add-stat"><i class="fa-solid fa-plus"></i> ${i18n.getTranslation('template.trackerEditorModal.userStatsTab.addCustomStatButton')}</button>`;
|
||||
|
||||
// RPG Attributes section
|
||||
html += '<h4><i class="fa-solid fa-dice-d20"></i> RPG Attributes</h4>';
|
||||
html += `<h4><i class="fa-solid fa-dice-d20"></i> ${i18n.getTranslation('template.trackerEditorModal.userStatsTab.rpgAttributesTitle')}</h4>`;
|
||||
|
||||
// Enable/disable toggle for entire RPG Attributes section
|
||||
const showRPGAttributes = config.showRPGAttributes !== undefined ? config.showRPGAttributes : true;
|
||||
html += '<div class="rpg-editor-toggle-row">';
|
||||
html += `<input type="checkbox" id="rpg-show-rpg-attrs" ${showRPGAttributes ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-show-rpg-attrs">Enable RPG Attributes Section</label>';
|
||||
html += `<label for="rpg-show-rpg-attrs">${i18n.getTranslation('template.trackerEditorModal.userStatsTab.enableRpgAttributes')}</label>`;
|
||||
html += '</div>';
|
||||
|
||||
// Always send attributes toggle
|
||||
const alwaysSendAttributes = config.alwaysSendAttributes !== undefined ? config.alwaysSendAttributes : false;
|
||||
html += '<div class="rpg-editor-toggle-row">';
|
||||
html += `<input type="checkbox" id="rpg-always-send-attrs" ${alwaysSendAttributes ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-always-send-attrs">Always Include Attributes in Prompt</label>';
|
||||
html += `<label for="rpg-always-send-attrs">${i18n.getTranslation('template.trackerEditorModal.userStatsTab.alwaysIncludeAttributes')}</label>`;
|
||||
html += '</div>';
|
||||
html += '<small class="rpg-editor-note">If disabled, attributes are only sent when a dice roll is active.</small>';
|
||||
html += `<small class="rpg-editor-note">${i18n.getTranslation('template.trackerEditorModal.userStatsTab.alwaysIncludeAttributesNote')}</small>`;
|
||||
|
||||
html += '<div class="rpg-editor-stats-list" id="rpg-editor-attrs-list">';
|
||||
|
||||
@@ -268,34 +268,34 @@ function renderUserStatsTab() {
|
||||
});
|
||||
|
||||
html += '</div>';
|
||||
html += '<button class="rpg-btn-secondary" id="rpg-add-attr"><i class="fa-solid fa-plus"></i> Add Attribute</button>';
|
||||
html += `<button class="rpg-btn-secondary" id="rpg-add-attr"><i class="fa-solid fa-plus"></i> ${i18n.getTranslation('template.trackerEditorModal.userStatsTab.addAttributeButton')}</button>`;
|
||||
|
||||
// Status Section
|
||||
html += '<h4><i class="fa-solid fa-face-smile"></i> Status Section</h4>';
|
||||
html += `<h4><i class="fa-solid fa-face-smile"></i> ${i18n.getTranslation('template.trackerEditorModal.userStatsTab.statusSectionTitle')}</h4>`;
|
||||
html += '<div class="rpg-editor-toggle-row">';
|
||||
html += `<input type="checkbox" id="rpg-status-enabled" ${config.statusSection.enabled ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-status-enabled">Enable Status Section</label>';
|
||||
html += `<label for="rpg-status-enabled">${i18n.getTranslation('template.trackerEditorModal.userStatsTab.enableStatusSection')}</label>`;
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="rpg-editor-toggle-row">';
|
||||
html += `<input type="checkbox" id="rpg-mood-emoji" ${config.statusSection.showMoodEmoji ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-mood-emoji">Show Mood Emoji</label>';
|
||||
html += `<label for="rpg-mood-emoji">${i18n.getTranslation('template.trackerEditorModal.userStatsTab.showMoodEmoji')}</label>`;
|
||||
html += '</div>';
|
||||
|
||||
html += '<label>Status Fields (comma-separated):</label>';
|
||||
html += `<label>${i18n.getTranslation('template.trackerEditorModal.userStatsTab.statusFieldsLabel')}</label>`;
|
||||
html += `<input type="text" id="rpg-status-fields" value="${config.statusSection.customFields.join(', ')}" class="rpg-text-input" placeholder="e.g., Conditions, Appearance">`;
|
||||
|
||||
// Skills Section
|
||||
html += '<h4><i class="fa-solid fa-star"></i> Skills Section</h4>';
|
||||
html += `<h4><i class="fa-solid fa-star"></i> ${i18n.getTranslation('template.trackerEditorModal.userStatsTab.skillsSectionTitle')}</h4>`;
|
||||
html += '<div class="rpg-editor-toggle-row">';
|
||||
html += `<input type="checkbox" id="rpg-skills-enabled" ${config.skillsSection.enabled ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-skills-enabled">Enable Skills Section</label>';
|
||||
html += `<label for="rpg-skills-enabled">${i18n.getTranslation('template.trackerEditorModal.userStatsTab.enableSkillsSection')}</label>`;
|
||||
html += '</div>';
|
||||
|
||||
html += '<label>Skills Label:</label>';
|
||||
html += `<label>${i18n.getTranslation('template.trackerEditorModal.userStatsTab.skillsLabelLabel')}</label>`;
|
||||
html += `<input type="text" id="rpg-skills-label" value="${config.skillsSection.label}" class="rpg-text-input" placeholder="Skills">`;
|
||||
|
||||
html += '<label>Skills List (comma-separated):</label>';
|
||||
html += `<label>${i18n.getTranslation('template.trackerEditorModal.userStatsTab.skillsListLabel')}</label>`;
|
||||
const skillFields = config.skillsSection.customFields || [];
|
||||
html += `<input type="text" id="rpg-skills-fields" value="${skillFields.join(', ')}" class="rpg-text-input" placeholder="e.g., Stealth, Persuasion, Combat">`;
|
||||
|
||||
@@ -436,12 +436,12 @@ function renderInfoBoxTab() {
|
||||
const config = extensionSettings.trackerConfig.infoBox;
|
||||
let html = '<div class="rpg-editor-section">';
|
||||
|
||||
html += '<h4><i class="fa-solid fa-info-circle"></i> Widgets</h4>';
|
||||
html += `<h4><i class="fa-solid fa-info-circle"></i> ${i18n.getTranslation('template.trackerEditorModal.infoBoxTab.widgetsTitle')}</h4>`;
|
||||
|
||||
// Date widget
|
||||
html += '<div class="rpg-editor-widget-row">';
|
||||
html += `<input type="checkbox" id="rpg-widget-date" ${config.widgets.date.enabled ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-widget-date">Date</label>';
|
||||
html += `<label for="rpg-widget-date">${i18n.getTranslation('template.trackerEditorModal.infoBoxTab.dateWidget')}</label>`;
|
||||
html += '<select id="rpg-date-format" class="rpg-select-mini">';
|
||||
html += `<option value="Weekday, Month, Year" ${config.widgets.date.format === 'Weekday, Month, Year' ? 'selected' : ''}>Weekday, Month, Year</option>`;
|
||||
html += `<option value="dd/mm/yyyy" ${config.widgets.date.format === 'dd/mm/yyyy' ? 'selected' : ''}>dd/mm/yyyy</option>`;
|
||||
@@ -453,13 +453,13 @@ function renderInfoBoxTab() {
|
||||
// Weather widget
|
||||
html += '<div class="rpg-editor-widget-row">';
|
||||
html += `<input type="checkbox" id="rpg-widget-weather" ${config.widgets.weather.enabled ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-widget-weather">Weather</label>';
|
||||
html += `<label for="rpg-widget-weather">${i18n.getTranslation('template.trackerEditorModal.infoBoxTab.weatherWidget')}</label>`;
|
||||
html += '</div>';
|
||||
|
||||
// Temperature widget
|
||||
html += '<div class="rpg-editor-widget-row">';
|
||||
html += `<input type="checkbox" id="rpg-widget-temperature" ${config.widgets.temperature.enabled ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-widget-temperature">Temperature</label>';
|
||||
html += `<label for="rpg-widget-temperature">${i18n.getTranslation('template.trackerEditorModal.infoBoxTab.temperatureWidget')}</label>`;
|
||||
html += '<div class="rpg-radio-group">';
|
||||
html += `<label><input type="radio" name="temp-unit" value="C" ${config.widgets.temperature.unit === 'C' ? 'checked' : ''}> °C</label>`;
|
||||
html += `<label><input type="radio" name="temp-unit" value="F" ${config.widgets.temperature.unit === 'F' ? 'checked' : ''}> °F</label>`;
|
||||
@@ -469,19 +469,19 @@ function renderInfoBoxTab() {
|
||||
// Time widget
|
||||
html += '<div class="rpg-editor-widget-row">';
|
||||
html += `<input type="checkbox" id="rpg-widget-time" ${config.widgets.time.enabled ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-widget-time">Time</label>';
|
||||
html += `<label for="rpg-widget-time">${i18n.getTranslation('template.trackerEditorModal.infoBoxTab.timeWidget')}</label>`;
|
||||
html += '</div>';
|
||||
|
||||
// Location widget
|
||||
html += '<div class="rpg-editor-widget-row">';
|
||||
html += `<input type="checkbox" id="rpg-widget-location" ${config.widgets.location.enabled ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-widget-location">Location</label>';
|
||||
html += `<label for="rpg-widget-location">${i18n.getTranslation('template.trackerEditorModal.infoBoxTab.locationWidget')}</label>`;
|
||||
html += '</div>';
|
||||
|
||||
// Recent Events widget
|
||||
html += '<div class="rpg-editor-widget-row">';
|
||||
html += `<input type="checkbox" id="rpg-widget-events" ${config.widgets.recentEvents.enabled ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-widget-events">Recent Events</label>';
|
||||
html += `<label for="rpg-widget-events">${i18n.getTranslation('template.trackerEditorModal.infoBoxTab.recentEventsWidget')}</label>`;
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
@@ -537,8 +537,8 @@ function renderPresentCharactersTab() {
|
||||
let html = '<div class="rpg-editor-section">';
|
||||
|
||||
// Relationship Fields Section
|
||||
html += '<h4><i class="fa-solid fa-heart"></i> Relationship Status Fields</h4>';
|
||||
html += '<p class="rpg-editor-hint">Define relationship types with corresponding emojis shown on character portraits</p>';
|
||||
html += `<h4><i class="fa-solid fa-heart"></i> ${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.relationshipStatusTitle')}</h4>`;
|
||||
html += `<p class="rpg-editor-hint">${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.relationshipStatusHint')}</p>`;
|
||||
|
||||
html += '<div class="rpg-relationship-mapping-list" id="rpg-relationship-mapping-list">';
|
||||
// Show existing relationships as field → emoji pairs
|
||||
@@ -561,11 +561,11 @@ function renderPresentCharactersTab() {
|
||||
`;
|
||||
}
|
||||
html += '</div>';
|
||||
html += '<button class="rpg-btn-secondary" id="rpg-add-relationship"><i class="fa-solid fa-plus"></i> New Relationship</button>';
|
||||
html += `<button class="rpg-btn-secondary" id="rpg-add-relationship"><i class="fa-solid fa-plus"></i> ${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.newRelationshipButton')}</button>`;
|
||||
|
||||
// Custom Fields Section
|
||||
html += '<h4><i class="fa-solid fa-list"></i> Appearance/Demeanor Fields</h4>';
|
||||
html += '<p class="rpg-editor-hint">Fields shown below character name, separated by |</p>';
|
||||
html += `<h4><i class="fa-solid fa-list"></i> ${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.appearanceDemeanorTitle')}</h4>`;
|
||||
html += `<p class="rpg-editor-hint">${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.appearanceDemeanorHint')}</p>`;
|
||||
|
||||
html += '<div class="rpg-editor-fields-list" id="rpg-editor-fields-list">';
|
||||
|
||||
@@ -585,34 +585,34 @@ function renderPresentCharactersTab() {
|
||||
});
|
||||
|
||||
html += '</div>';
|
||||
html += '<button class="rpg-btn-secondary" id="rpg-add-field"><i class="fa-solid fa-plus"></i> Add Custom Field</button>';
|
||||
html += `<button class="rpg-btn-secondary" id="rpg-add-field"><i class="fa-solid fa-plus"></i> ${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.addCustomFieldButton')}</button>`;
|
||||
|
||||
// Thoughts Section
|
||||
html += '<h4><i class="fa-solid fa-comment-dots"></i> Thoughts Configuration</h4>';
|
||||
html += `<h4><i class="fa-solid fa-comment-dots"></i> ${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.thoughtsConfigTitle')}</h4>`;
|
||||
html += '<div class="rpg-editor-toggle-row">';
|
||||
html += `<input type="checkbox" id="rpg-thoughts-enabled" ${config.thoughts?.enabled ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-thoughts-enabled">Enable Character Thoughts</label>';
|
||||
html += `<label for="rpg-thoughts-enabled">${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.enableCharacterThoughts')}</label>`;
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="rpg-thoughts-config">';
|
||||
html += '<div class="rpg-editor-input-group">';
|
||||
html += '<label>Thoughts Label:</label>';
|
||||
html += `<label>${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.thoughtsLabelLabel')}</label>`;
|
||||
html += `<input type="text" id="rpg-thoughts-name" value="${config.thoughts?.name || 'Thoughts'}" placeholder="e.g., Thoughts, Inner Voice, Feelings">`;
|
||||
html += '</div>';
|
||||
html += '<div class="rpg-editor-input-group">';
|
||||
html += '<label>AI Instruction:</label>';
|
||||
html += `<label>${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.aiInstructionLabel')}</label>`;
|
||||
html += `<input type="text" id="rpg-thoughts-description" value="${config.thoughts?.description || 'Internal monologue (in first person POV, up to three sentences long)'}" placeholder="Description of what to generate">`;
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
||||
// Character Stats
|
||||
html += '<h4><i class="fa-solid fa-chart-bar"></i> Character Stats</h4>';
|
||||
html += `<h4><i class="fa-solid fa-chart-bar"></i> ${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.characterStatsTitle')}</h4>`;
|
||||
html += '<div class="rpg-editor-toggle-row">';
|
||||
html += `<input type="checkbox" id="rpg-char-stats-enabled" ${config.characterStats?.enabled ? 'checked' : ''}>`;
|
||||
html += '<label for="rpg-char-stats-enabled">Track Character Stats</label>';
|
||||
html += `<label for="rpg-char-stats-enabled">${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.trackCharacterStats')}</label>`;
|
||||
html += '</div>';
|
||||
|
||||
html += '<p class="rpg-editor-hint">Create stats to track for each character (displayed as colored bars)</p>';
|
||||
html += `<p class="rpg-editor-hint">${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.characterStatsHint')}</p>`;
|
||||
html += '<div class="rpg-editor-fields-list" id="rpg-char-stats-list">';
|
||||
|
||||
const charStats = config.characterStats?.customStats || [];
|
||||
@@ -627,7 +627,7 @@ function renderPresentCharactersTab() {
|
||||
});
|
||||
|
||||
html += '</div>';
|
||||
html += '<button class="rpg-btn-secondary" id="rpg-add-char-stat"><i class="fa-solid fa-plus"></i> Add Character Stat</button>';
|
||||
html += `<button class="rpg-btn-secondary" id="rpg-add-char-stat"><i class="fa-solid fa-plus"></i> ${i18n.getTranslation('template.trackerEditorModal.presentCharactersTab.addCharacterStatButton')}</button>`;
|
||||
|
||||
html += '</div>';
|
||||
|
||||
|
||||
+7
-7
@@ -375,7 +375,7 @@
|
||||
<header class="rpg-settings-popup-header">
|
||||
<h3 id="rpg-editor-title">
|
||||
<i class="fa-solid fa-sliders" aria-hidden="true"></i>
|
||||
<span>Edit Trackers</span>
|
||||
<span data-i18n-key="template.trackerEditorModal.title">Edit Trackers</span>
|
||||
</h3>
|
||||
<button id="rpg-close-tracker-editor" class="rpg-popup-close" type="button" aria-label="Close tracker editor">×</button>
|
||||
</header>
|
||||
@@ -383,13 +383,13 @@
|
||||
<!-- Tabs -->
|
||||
<div class="rpg-editor-tabs">
|
||||
<button class="rpg-editor-tab active" data-tab="userStats">
|
||||
<i class="fa-solid fa-heart-pulse"></i> User Stats
|
||||
<i class="fa-solid fa-heart-pulse"></i> <span data-i18n-key="template.trackerEditorModal.tabs.userStats">User Stats</span>
|
||||
</button>
|
||||
<button class="rpg-editor-tab" data-tab="infoBox">
|
||||
<i class="fa-solid fa-info-circle"></i> Info Box
|
||||
<i class="fa-solid fa-info-circle"></i> <span data-i18n-key="template.trackerEditorModal.tabs.infoBox">Info Box</span>
|
||||
</button>
|
||||
<button class="rpg-editor-tab" data-tab="presentCharacters">
|
||||
<i class="fa-solid fa-users"></i> Present Characters
|
||||
<i class="fa-solid fa-users"></i> <span data-i18n-key="template.trackerEditorModal.tabs.presentCharacters">Present Characters</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -402,12 +402,12 @@
|
||||
|
||||
<footer class="rpg-settings-popup-footer">
|
||||
<button id="rpg-editor-reset" class="rpg-btn-secondary" type="button">
|
||||
<i class="fa-solid fa-rotate-left"></i> Reset to Defaults
|
||||
<i class="fa-solid fa-rotate-left"></i> <span data-i18n-key="template.trackerEditorModal.buttons.reset">Reset to Defaults</span>
|
||||
</button>
|
||||
<div class="rpg-footer-right">
|
||||
<button id="rpg-editor-cancel" class="rpg-btn-secondary" type="button">Cancel</button>
|
||||
<button id="rpg-editor-cancel" class="rpg-btn-secondary" type="button" data-i18n-key="template.trackerEditorModal.buttons.cancel">Cancel</button>
|
||||
<button id="rpg-editor-save" class="rpg-btn-primary" type="button">
|
||||
<i class="fa-solid fa-save"></i> Save & Apply
|
||||
<i class="fa-solid fa-save"></i> <span data-i18n-key="template.trackerEditorModal.buttons.save">Save & Apply</span>
|
||||
</button>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user