Update debug menu, theme and MUI naming popups
This commit is contained in:
parent
1188cb46b8
commit
c3461307a0
|
@ -2,7 +2,6 @@ import {
|
||||||
saveSettingsDebounced,
|
saveSettingsDebounced,
|
||||||
scrollChatToBottom,
|
scrollChatToBottom,
|
||||||
characters,
|
characters,
|
||||||
callPopup,
|
|
||||||
reloadMarkdownProcessor,
|
reloadMarkdownProcessor,
|
||||||
reloadCurrentChat,
|
reloadCurrentChat,
|
||||||
getRequestHeaders,
|
getRequestHeaders,
|
||||||
|
@ -1433,7 +1432,7 @@ export function registerDebugFunction(functionId, name, description, func) {
|
||||||
|
|
||||||
async function showDebugMenu() {
|
async function showDebugMenu() {
|
||||||
const template = await renderTemplateAsync('debug', { functions: debug_functions });
|
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();
|
switchUiMode();
|
||||||
|
@ -2297,11 +2296,13 @@ async function importTheme(file) {
|
||||||
*/
|
*/
|
||||||
async function saveTheme(name = undefined, theme = undefined) {
|
async function saveTheme(name = undefined, theme = undefined) {
|
||||||
if (typeof name !== 'string') {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
name = String(newName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof theme !== 'object') {
|
if (typeof theme !== 'object') {
|
||||||
|
@ -2399,7 +2400,7 @@ function getNewTheme(parsed) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveMovingUI() {
|
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) {
|
if (!name) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,25 +1,27 @@
|
||||||
<h3 data-i18n="Debug Menu">Debug Menu</h3>
|
<div class="scrollY height100p paddingLeftRight5">
|
||||||
<div data-i18n="Debug Warning">
|
<h3 data-i18n="Debug Menu">Debug Menu</h3>
|
||||||
Functions in this category are for advanced users only. Don't click anything if you're not sure about the consequences.
|
<div data-i18n="Debug Warning">
|
||||||
</div>
|
Functions in this category are for advanced users only. Don't click anything if you're not sure about the consequences.
|
||||||
<table id="debug_table" class="responsiveTable">
|
</div>
|
||||||
{{#each functions}}
|
<table id="debug_table" class="responsiveTable">
|
||||||
{{#with this}}
|
{{#each functions}}
|
||||||
<tr>
|
{{#with this}}
|
||||||
<td>
|
<tr>
|
||||||
<div class="justifyLeft">
|
<td>
|
||||||
<b>{{this.name}}</b>
|
<div class="justifyLeft">
|
||||||
</div>
|
<b>{{this.name}}</b>
|
||||||
<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>
|
||||||
</div>
|
<div class="justifyLeft">
|
||||||
</td>
|
{{this.description}}
|
||||||
</tr>
|
</div>
|
||||||
{{/with}}
|
<div class="flex-container justifyCenter">
|
||||||
{{/each}}
|
<div class="menu_button menu_button_icon" data-debug-function="{{this.functionId}}" data-i18n="Execute">
|
||||||
</table>
|
Execute
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{/with}}
|
||||||
|
{{/each}}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue