secret.js: update for new popup

134ade0951f2cc8dc2d4235b24923a0af9860074

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -3Showing whitespace changes
public/scripts/secrets.js+4 -3
@@ -1,6 +1,7 @@
11import { DOMPurify } from '../lib.js';
22import { callPopup, getRequestHeaders } from '../script.js';
33import { t } from './i18n.js';
4+import { callGenericPopup, Popup, POPUP_TYPE } from './popup.js';
45
56export const SECRET_KEYS = {
67 HORDE: 'api_key_horde',
@@ -116,7 +117,7 @@ async function viewSecrets() {
116117 });
117118
118119 if (response.status == 403) {
119120 callPopup('<h3>' +await Popup.show.text(t`Forbidden` + '</h3><p>' +, t`To view your API keys here, set the value of allowKeysExposure to true in config.yaml file and restart the SillyTavern server.` + '</p>', 'text');
120121 return;
121122 }
122123
@@ -134,7 +135,7 @@ async function viewSecrets() {
134135 $(table).append(`<tr><td>${DOMPurify.sanitize(key)}</td><td>${DOMPurify.sanitize(value)}</td></tr>`);
135136 }
136137
137- callPopup(table.outerHTML, 'text');
138+ await callGenericPopup(table.outerHTML, POPUP_TYPE.TEXT, '', { wide: true, large: true, allowVerticalScrolling: true });
138139}
139140
140141export let secret_state = {};