RPG Companion index [done]
This commit is contained in:
+9
-1
@@ -102,5 +102,13 @@
|
||||
"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"
|
||||
"template.trackerEditorModal.presentCharactersTab.addCharacterStatButton": "Add Character Stat",
|
||||
"template.mainPanel.title": "RPG Companion",
|
||||
"template.mainPanel.lastRoll": "Last Roll:",
|
||||
"template.mainPanel.clearLastRoll": "Clear last roll",
|
||||
"template.mainPanel.enableImmersiveHtml": "Enable Immersive HTML",
|
||||
"template.mainPanel.refreshRpgInfo": "Refresh RPG Info",
|
||||
"template.mainPanel.editTrackersButton": "Edit Trackers",
|
||||
"template.mainPanel.settingsButton": "Settings",
|
||||
"global.none": "None"
|
||||
}
|
||||
+9
-1
@@ -102,5 +102,13 @@
|
||||
"template.trackerEditorModal.presentCharactersTab.characterStatsTitle": "角色屬性",
|
||||
"template.trackerEditorModal.presentCharactersTab.trackCharacterStats": "啟用角色屬性",
|
||||
"template.trackerEditorModal.presentCharactersTab.characterStatsHint": "建立統計資料以追蹤每個角色(以彩色長條圖顯示)",
|
||||
"template.trackerEditorModal.presentCharactersTab.addCharacterStatButton": "添加角色屬性"
|
||||
"template.trackerEditorModal.presentCharactersTab.addCharacterStatButton": "添加角色屬性",
|
||||
"template.mainPanel.title": "RPG Companion",
|
||||
"template.mainPanel.lastRoll": "上次擲骰:",
|
||||
"template.mainPanel.clearLastRoll": "清除上次擲骰",
|
||||
"template.mainPanel.enableImmersiveHtml": "啟用沉浸式 HTML",
|
||||
"template.mainPanel.refreshRpgInfo": "刷新資訊",
|
||||
"template.mainPanel.editTrackersButton": "追蹤器編輯",
|
||||
"template.mainPanel.settingsButton": "設定",
|
||||
"global.none": "None"
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
setPendingDiceRoll
|
||||
} from '../../core/state.js';
|
||||
import { saveSettings } from '../../core/persistence.js';
|
||||
import { i18n } from '../../core/i18n.js';
|
||||
|
||||
/**
|
||||
* Rolls the dice and displays result.
|
||||
@@ -85,10 +86,13 @@ export async function executeRollCommand(command) {
|
||||
*/
|
||||
export function updateDiceDisplay() {
|
||||
const lastRoll = extensionSettings.lastDiceRoll;
|
||||
const label = i18n.getTranslation('template.mainPanel.lastRoll') || 'Last Roll: ';
|
||||
const noneValue = i18n.getTranslation('global.none') || 'None';
|
||||
|
||||
if (lastRoll) {
|
||||
$('#rpg-last-roll-text').text(`Last Roll (${lastRoll.formula}): ${lastRoll.total}`);
|
||||
$('#rpg-last-roll-text').text(`${label}(${lastRoll.formula}): ${lastRoll.total}`);
|
||||
} else {
|
||||
$('#rpg-last-roll-text').text('Last Roll: None');
|
||||
$('#rpg-last-roll-text').text(label + noneValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
$thoughtsContainer,
|
||||
$inventoryContainer
|
||||
} from '../../core/state.js';
|
||||
import { i18n } from '../../core/i18n.js';
|
||||
|
||||
/**
|
||||
* Toggles the visibility of plot buttons based on settings.
|
||||
@@ -92,6 +93,7 @@ export function updateCollapseToggleIcon() {
|
||||
*/
|
||||
export function setupCollapseToggle() {
|
||||
const $collapseToggle = $('#rpg-collapse-toggle');
|
||||
$collapseToggle.attr('title', i18n.getTranslation('template.mainPanel.collapseExpand'));
|
||||
const $panel = $('#rpg-companion-panel');
|
||||
const $icon = $collapseToggle.find('i');
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
updateDiceDisplay as updateDiceDisplayCore,
|
||||
addDiceQuickReply as addDiceQuickReplyCore
|
||||
} from '../features/dice.js';
|
||||
import { i18n } from '../../core/i18n.js';
|
||||
|
||||
/**
|
||||
* Modern DiceModal ES6 Class
|
||||
@@ -318,6 +319,7 @@ export function setupDiceRoller() {
|
||||
e.stopPropagation(); // Prevent opening the dice popup
|
||||
clearDiceRollCore();
|
||||
});
|
||||
$('#rpg-clear-dice').attr('title', i18n.getTranslation('template.mainPanel.clearLastRoll'));
|
||||
|
||||
return diceModal;
|
||||
}
|
||||
|
||||
+7
-7
@@ -10,7 +10,7 @@
|
||||
<div class="rpg-panel-header">
|
||||
<h3>
|
||||
<i class="fa-solid fa-dice-d20"></i>
|
||||
RPG Companion
|
||||
<span data-i18n-key="template.mainPanel.title">RPG Companion</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<!-- Dice Roll Display -->
|
||||
<div id="rpg-dice-display" class="rpg-dice-display">
|
||||
<i class="fa-solid fa-dice"></i>
|
||||
<span id="rpg-last-roll-text">Last Roll: None</span>
|
||||
<button id="rpg-clear-dice" class="rpg-clear-dice-btn" title="Clear last roll">×</button>
|
||||
<span id="rpg-last-roll-text"></span>
|
||||
<button id="rpg-clear-dice" class="rpg-clear-dice-btn">×</button>
|
||||
</div>
|
||||
|
||||
<!-- Unified Game Content Box -->
|
||||
@@ -64,22 +64,22 @@
|
||||
<label class="rpg-toggle-label">
|
||||
<input type="checkbox" id="rpg-toggle-html-prompt">
|
||||
<i class="fa-solid fa-code"></i>
|
||||
<span>Enable Immersive HTML</span>
|
||||
<span data-i18n-key="template.mainPanel.enableImmersiveHtml">Enable Immersive HTML</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Manual Update Button -->
|
||||
<button id="rpg-manual-update" class="rpg-btn-primary rpg-manual-update-btn">
|
||||
<i class="fa-solid fa-sync"></i> Refresh RPG Info
|
||||
<i class="fa-solid fa-sync"></i> <span data-i18n-key="template.mainPanel.refreshRpgInfo">Refresh RPG Info</span>
|
||||
</button>
|
||||
|
||||
<!-- Settings and Edit Trackers Buttons Row -->
|
||||
<div class="rpg-settings-buttons-row">
|
||||
<button id="rpg-open-tracker-editor" class="rpg-btn-settings rpg-btn-half">
|
||||
<i class="fa-solid fa-sliders"></i> Edit Trackers
|
||||
<i class="fa-solid fa-sliders"></i> <span data-i18n-key="template.mainPanel.editTrackersButton">Edit Trackers</span>
|
||||
</button>
|
||||
<button id="rpg-open-settings" class="rpg-btn-settings rpg-btn-half">
|
||||
<i class="fa-solid fa-gear"></i> Settings
|
||||
<i class="fa-solid fa-gear"></i> <span data-i18n-key="template.mainPanel.settingsButton">Settings</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user