Add optional toggle for Relationship Status Fields (v2.1.2)
- Added relationships.enabled toggle in tracker configuration - Relationship fields and emoji badges can now be disabled/enabled - UI toggle added in Edit Trackers > Present Characters tab - Updated prompt generation to respect the toggle - Maintains backward compatibility with existing configs - Added i18n translations (en, zh-tw)
This commit is contained in:
@@ -550,6 +550,21 @@ function migrateToTrackerConfig() {
|
||||
'Neutral': '⚖️'
|
||||
};
|
||||
}
|
||||
|
||||
// Migrate to new relationships structure if not already present
|
||||
if (!pc.relationships) {
|
||||
pc.relationships = {
|
||||
enabled: true, // Default to enabled for backward compatibility
|
||||
relationshipEmojis: pc.relationshipEmojis || {
|
||||
'Lover': '❤️',
|
||||
'Friend': '⭐',
|
||||
'Ally': '🤝',
|
||||
'Enemy': '⚔️',
|
||||
'Neutral': '⚖️'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (!pc.thoughts) {
|
||||
pc.thoughts = {
|
||||
enabled: true,
|
||||
|
||||
+13
-2
@@ -124,9 +124,20 @@ export let extensionSettings = {
|
||||
// Fixed fields (always shown)
|
||||
showEmoji: true,
|
||||
showName: true,
|
||||
// Relationship fields (shown after name, separated by /)
|
||||
// Relationship fields configuration
|
||||
relationships: {
|
||||
enabled: true,
|
||||
// Relationship to emoji mapping (shown on character portraits)
|
||||
relationshipEmojis: {
|
||||
'Lover': '❤️',
|
||||
'Friend': '⭐',
|
||||
'Ally': '🤝',
|
||||
'Enemy': '⚔️',
|
||||
'Neutral': '⚖️'
|
||||
}
|
||||
},
|
||||
// Legacy fields kept for backward compatibility
|
||||
relationshipFields: ['Lover', 'Friend', 'Ally', 'Enemy', 'Neutral'],
|
||||
// Relationship to emoji mapping (shown on character portraits)
|
||||
relationshipEmojis: {
|
||||
'Lover': '❤️',
|
||||
'Friend': '⭐',
|
||||
|
||||
Reference in New Issue
Block a user