mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Implement creator's note style tag preferences (#3979)
* Implement creator's note style tag preferences * Decouple external media preference from style preference * Allow explicitly empty prefixes in decodeStyleTags * Fix Copilot comments * Refactor global styles management into StylesPreference class * Refactor openAttachmentManager to return an object instead of an array * Unify header structure * Re-render characters panel on setting initial preference * Add note about classname prefixing * Rename event handler
This commit is contained in:
27
public/scripts/templates/globalStylesPopup.html
Normal file
27
public/scripts/templates/globalStylesPopup.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="flex-container flexFlowColumn">
|
||||
<h3 data-i18n="Creator's Notes contain CSS style tags. Do you want to apply them just to Creator's Notes or to the entire application?" class="margin0">
|
||||
Creator's Notes contain CSS style tags. Do you want to apply them just to Creator's Notes or to the entire application?
|
||||
</h3>
|
||||
<h4 data-i18n="CAUTION: Malformed styles may cause issues." class="neutral_warning">
|
||||
CAUTION: Malformed styles may cause issues.
|
||||
</h4>
|
||||
<hr>
|
||||
<small>
|
||||
<span data-i18n="To change the preference later, use the">
|
||||
To change the preference later, use the
|
||||
</span>
|
||||
<code class="fa-solid fa-palette"></code>
|
||||
<span data-i18n="button in the Creator's Notes block.">
|
||||
button in the Creator's Notes block.
|
||||
</span>
|
||||
</small>
|
||||
<textarea class="text_pole textarea_compact monospace" rows="8" readonly></textarea>
|
||||
<small class="justifyLeft">
|
||||
<b data-i18n="Note:">
|
||||
Note:
|
||||
</b>
|
||||
<span data-i18n="Class names will be automatically prefixed with 'custom-'.">
|
||||
Class names will be automatically prefixed with 'custom-'.
|
||||
</span>
|
||||
</small>
|
||||
</div>
|
16
public/scripts/templates/globalStylesPreference.html
Normal file
16
public/scripts/templates/globalStylesPreference.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="flex-container flexFlowColumn">
|
||||
<h3 data-i18n="Choose how to apply CSS style tags if they are defined in Creator's Notes of this character:" class="margin0">
|
||||
Choose how to apply CSS style tags if they are defined in Creator's Notes of this character:
|
||||
</h3>
|
||||
<h4 data-i18n="CAUTION: Malformed styles may cause issues." class="neutral_warning">
|
||||
CAUTION: Malformed styles may cause issues.
|
||||
</h4>
|
||||
<label class="checkbox_label" for="global_styles_forbidden">
|
||||
<input type="radio" id="global_styles_forbidden" name="global_styles_preference" />
|
||||
<span data-i18n="Just to Creator's Notes">Just to Creator's Notes</span>
|
||||
</label>
|
||||
<label class="checkbox_label" for="global_styles_allowed">
|
||||
<input type="radio" id="global_styles_allowed" name="global_styles_preference" />
|
||||
<span data-i18n="Apply to the entire app">Apply to the entire app</span>
|
||||
</label>
|
||||
</div>
|
Reference in New Issue
Block a user