XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Remove generate images button

d2d8d7fb
Heiner Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

2 个文件 +9 -2
Modified g4f/gui/client/html/index.html +2 -0
@@ -189,11 +189,13 @@
189 189 <label for="switch" title="Add the pages of the first 5 search results to the query."></label>
190 190 <span class="about">Web Access</span>
191 191 </div>
192 <!--
192 193 <div class="field">
193 194 <input type="checkbox" id="patch" />
194 195 <label for="patch" title="Enable create images with Bing."></label>
195 196 <span class="about">Image Generator</span>
196 197 </div>
198 -->
197 199 <div class="field">
198 200 <input type="checkbox" id="history" />
199 201 <label for="history" title="To improve the reaction time or if you have trouble with large conversations."></label>
Modified g4f/gui/client/js/chat.v1.js +7 -2
@@ -245,7 +245,7 @@ const ask_gpt = async () => {
245 245 jailbreak: jailbreak.options[jailbreak.selectedIndex].value,
246 246 web_search: document.getElementById(`switch`).checked,
247 247 provider: provider.options[provider.selectedIndex].value,
248 patch_provider: document.getElementById('patch').checked,
248 patch_provider: document.getElementById('patch')?.checked,
249 249 messages: messages
250 250 });
251 251 const headers = {
@@ -669,6 +669,9 @@ sidebar_button.addEventListener("click", (event) => {
669 669 const register_settings_localstorage = async () => {
670 670 for (id of ["switch", "model", "jailbreak", "patch", "provider", "history"]) {
671 671 element = document.getElementById(id);
672 if (!element) {
673 continue;
674 }
672 675 element.addEventListener('change', async (event) => {
673 676 switch (event.target.type) {
674 677 case "checkbox":
@@ -687,7 +690,9 @@ const register_settings_localstorage = async () => {
687 690 const load_settings_localstorage = async () => {
688 691 for (id of ["switch", "model", "jailbreak", "patch", "provider", "history"]) {
689 692 element = document.getElementById(id);
690 value = appStorage.getItem(element.id);
693 if (!element || !(value = appStorage.getItem(element.id))) {
694 continue;
695 }
691 696 if (value) {
692 697 switch (element.type) {
693 698 case "checkbox":