feat: Add preset management system for tracker configurations
- Add preset selector dropdown in tracker editor modal - Support creating, loading, and deleting presets - Add per-character/group preset associations with auto-switch - Add default preset functionality with star button - Update import to offer 'Apply to Current' or 'Create New Preset' options - Add preset management UI styles and import dialog styles
This commit is contained in:
@@ -22,7 +22,7 @@ import {
|
||||
updateCommittedTrackerData,
|
||||
$musicPlayerContainer
|
||||
} from '../../core/state.js';
|
||||
import { saveChatData, loadChatData } from '../../core/persistence.js';
|
||||
import { saveChatData, loadChatData, autoSwitchPresetForEntity } from '../../core/persistence.js';
|
||||
import { i18n } from '../../core/i18n.js';
|
||||
|
||||
// Generation & Parsing
|
||||
@@ -297,6 +297,12 @@ export function onCharacterChanged() {
|
||||
$(window).off('resize.thoughtPanel');
|
||||
$(document).off('click.thoughtPanel');
|
||||
|
||||
// Auto-switch to the preset associated with this character/group (if any)
|
||||
const presetSwitched = autoSwitchPresetForEntity();
|
||||
// if (presetSwitched) {
|
||||
// console.log('[RPG Companion] Auto-switched preset for character');
|
||||
// }
|
||||
|
||||
// Load chat-specific data when switching chats
|
||||
loadChatData();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user