mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Chat: Add button for manual reloading
If automatic reloading doesn't work. Add this button to manually reload the chat window. Only reload if a character chat is loaded. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -2106,6 +2106,9 @@
|
|||||||
</a>
|
</a>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="reload_chat" class="menu_button whitespacenowrap" data-i18n="Reload Chat">
|
||||||
|
Reload Chat</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div name="NameAndAvatar" class="flex-container flexFlowColumn drawer25pWidth">
|
<div name="NameAndAvatar" class="flex-container flexFlowColumn drawer25pWidth">
|
||||||
|
@@ -11,6 +11,7 @@ import {
|
|||||||
updateVisibleDivs,
|
updateVisibleDivs,
|
||||||
eventSource,
|
eventSource,
|
||||||
event_types,
|
event_types,
|
||||||
|
getCurrentChatId,
|
||||||
} from "../script.js";
|
} from "../script.js";
|
||||||
import { favsToHotswap } from "./RossAscends-mods.js";
|
import { favsToHotswap } from "./RossAscends-mods.js";
|
||||||
import {
|
import {
|
||||||
@@ -1156,6 +1157,13 @@ $(document).ready(() => {
|
|||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#reload_chat").on('click', function () {
|
||||||
|
const currentChatId = getCurrentChatId();
|
||||||
|
if (currentChatId !== undefined && currentChatId !== null) {
|
||||||
|
reloadCurrentChat();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$("#allow_name1_display").on("input", function () {
|
$("#allow_name1_display").on("input", function () {
|
||||||
power_user.allow_name1_display = !!$(this).prop('checked');
|
power_user.allow_name1_display = !!$(this).prop('checked');
|
||||||
reloadCurrentChat();
|
reloadCurrentChat();
|
||||||
|
Reference in New Issue
Block a user