Fix multiple UI and functionality issues
- Fixed together mode: Render panels before cleaning DOM so trackers display properly - Fixed temperature unit toggle: Changed from 'celsius'/'fahrenheit' to 'C'/'F' to match config - Fixed temperature widget: Thermometer color thresholds now use Celsius internally for consistency - Fixed relationship remove buttons: Removed duplicate class causing wrong fields to be deleted - Added styling for relationship remove buttons to match custom field buttons - Added mobile font sizes for Past Events widget for better readability - Added parsing debug log to help troubleshoot together mode issues
This commit is contained in:
@@ -99,6 +99,7 @@ export async function onMessageReceived(data) {
|
||||
// console.log('[RPG Companion] Parsing together mode response:', responseText);
|
||||
|
||||
const parsedData = parseResponse(responseText);
|
||||
// console.log('[RPG Companion] Parsed data:', parsedData);
|
||||
|
||||
// Update stored data
|
||||
if (parsedData.userStats) {
|
||||
@@ -158,15 +159,24 @@ export async function onMessageReceived(data) {
|
||||
lastMessage.swipes[currentSwipeId] = cleanedMessage.trim();
|
||||
}
|
||||
|
||||
// console.log('[RPG Companion] Cleaned message, removed tracker code blocks');
|
||||
|
||||
// Render the updated data
|
||||
// Render the updated data FIRST (before cleaning DOM)
|
||||
renderUserStats();
|
||||
renderInfoBox();
|
||||
renderThoughts();
|
||||
renderInventory();
|
||||
renderQuests();
|
||||
|
||||
// Then update the DOM to reflect the cleaned message
|
||||
const lastMessageElement = $('#chat').children('.mes').last();
|
||||
if (lastMessageElement.length) {
|
||||
const messageText = lastMessageElement.find('.mes_text');
|
||||
if (messageText.length) {
|
||||
messageText.html(substituteParams(cleanedMessage.trim()));
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('[RPG Companion] Cleaned message, removed tracker code blocks from DOM');
|
||||
|
||||
// Save to chat metadata
|
||||
saveChatData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user