mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix chat width when switching themes
This commit is contained in:
@ -534,6 +534,11 @@ async function applyTheme(name) {
|
|||||||
{
|
{
|
||||||
key: 'chat_width',
|
key: 'chat_width',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
|
// If chat width is not set, set it to 50
|
||||||
|
if (!power_user.chat_width) {
|
||||||
|
power_user.chat_width = 50;
|
||||||
|
}
|
||||||
|
|
||||||
localStorage.setItem(storage_keys.chat_width, power_user.chat_width);
|
localStorage.setItem(storage_keys.chat_width, power_user.chat_width);
|
||||||
applyChatWidth();
|
applyChatWidth();
|
||||||
}
|
}
|
||||||
@ -660,6 +665,10 @@ function loadPowerUserSettings(settings, data) {
|
|||||||
power_user.waifuMode = false;
|
power_user.waifuMode = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (power_user.chat_width === '') {
|
||||||
|
power_user.chat_width = 50;
|
||||||
|
}
|
||||||
|
|
||||||
$('#trim_spaces').prop("checked", power_user.trim_spaces);
|
$('#trim_spaces').prop("checked", power_user.trim_spaces);
|
||||||
$('#continue_on_send').prop("checked", power_user.continue_on_send);
|
$('#continue_on_send').prop("checked", power_user.continue_on_send);
|
||||||
$('#auto_swipe').prop("checked", power_user.auto_swipe);
|
$('#auto_swipe').prop("checked", power_user.auto_swipe);
|
||||||
|
Reference in New Issue
Block a user