Remember proxy without confirmation

63ecf3b398d41a2a03b0fd147cdada31c78501e0

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

1 files changed, +4 -9Ignore whitespace
public/scripts/openai.js+4 -9
@@ -416,21 +416,16 @@ async function validateReverseProxy() {
416416 const rememberKey = `Proxy_SkipConfirm_${getStringHash(oai_settings.reverse_proxy)}`;
417417 const skipConfirm = localStorage.getItem(rememberKey) === 'true';
418418
419419 const confirmation = skipConfirm || await Popup.show.confirm('Connecting To Proxy', `<span>Are you sure you want to connect to the following proxy URL?</span><var>${DOMPurify.sanitize(oai_settings.reverse_proxy)}</var>`, {);
420- customInputs: [{ id: 'proxy-remember', label: 'Don\'t ask again for this proxy URL' }],
420+
421- onClose: popup => {
422- if (popup.result) {
423- const rememberValue = popup.inputResults.get('proxy-remember');
424- localStorage.setItem(rememberKey, String(rememberValue));
425- }
426- },
427- });
428421 if (!confirmation) {
429422 toastr.error('Update or remove your reverse proxy settings.');
430423 setOnlineStatus('no_connection');
431424 resultCheckStatus();
432425 throw new Error('Proxy connection denied.');
433426 }
427+
428+ localStorage.setItem(rememberKey, String(true));
434429}
435430
436431/**