Update debug menu, theme and MUI naming popups
This commit is contained in:
parent
1188cb46b8
commit
c3461307a0
|
@ -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;
|
||||
|
|
|
@ -1,25 +1,27 @@
|
|||
<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.
|
||||
</div>
|
||||
<table id="debug_table" class="responsiveTable">
|
||||
{{#each functions}}
|
||||
{{#with this}}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="justifyLeft">
|
||||
<b>{{this.name}}</b>
|
||||
</div>
|
||||
<div class="justifyLeft">
|
||||
{{this.description}}
|
||||
</div>
|
||||
<div class="flex-container justifyCenter">
|
||||
<div class="menu_button menu_button_icon" data-debug-function="{{this.functionId}}" data-i18n="Execute">
|
||||
Execute
|
||||
<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.
|
||||
</div>
|
||||
<table id="debug_table" class="responsiveTable">
|
||||
{{#each functions}}
|
||||
{{#with this}}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="justifyLeft">
|
||||
<b>{{this.name}}</b>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
</table>
|
||||
<div class="justifyLeft">
|
||||
{{this.description}}
|
||||
</div>
|
||||
<div class="flex-container justifyCenter">
|
||||
<div class="menu_button menu_button_icon" data-debug-function="{{this.functionId}}" data-i18n="Execute">
|
||||
Execute
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue