Update debug menu, theme and MUI naming popups

This commit is contained in:
Cohee 2024-06-26 00:24:21 +03:00
parent 1188cb46b8
commit c3461307a0
2 changed files with 32 additions and 29 deletions

View File

@ -2,7 +2,6 @@ import {
saveSettingsDebounced,
scrollChatToBottom,
characters,
callPopup,
reloadMarkdownProcessor,
reloadCurrentChat,
getRequestHeaders,
@ -1433,7 +1432,7 @@ export function registerDebugFunction(functionId, name, description, func) {
async function showDebugMenu() {
const template = await renderTemplateAsync('debug', { functions: debug_functions });
callPopup(template, 'text', '', { wide: true, large: true });
callGenericPopup(template, POPUP_TYPE.TEXT, '', { wide: true, large: true });
}
switchUiMode();
@ -2297,11 +2296,13 @@ async function importTheme(file) {
*/
async function saveTheme(name = undefined, theme = undefined) {
if (typeof name !== 'string') {
name = await callPopup('Enter a theme preset name:', 'input', power_user.theme);
const newName = await callGenericPopup('Enter a theme preset name:', POPUP_TYPE.INPUT, power_user.theme);
if (!name) {
if (!newName) {
return;
}
name = String(newName);
}
if (typeof theme !== 'object') {
@ -2399,7 +2400,7 @@ function getNewTheme(parsed) {
}
async function saveMovingUI() {
const name = await callPopup('Enter a name for the MovingUI Preset:', 'input');
const name = await callGenericPopup('Enter a name for the MovingUI Preset:', POPUP_TYPE.INPUT);
if (!name) {
return;

View File

@ -1,3 +1,4 @@
<div class="scrollY height100p paddingLeftRight5">
<h3 data-i18n="Debug Menu">Debug Menu</h3>
<div data-i18n="Debug Warning">
Functions in this category are for advanced users only. Don't click anything if you're not sure about the consequences.
@ -23,3 +24,4 @@
{{/with}}
{{/each}}
</table>
</div>