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

XFEstudio/gpt4free

Add missing styling on phone

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

代码差异

2 个文件 +11 -14
Modified g4f/gui/client/static/css/style.css +5 -5
@@ -838,6 +838,11 @@ ul {
838 838 transform: rotate(360deg);
839 839 }
840 840
841 .settings h3 {
842 padding-left: 10px;
843 padding-top: 10px;
844 }
845
841 846 @media screen and (max-width: 990px) {
842 847 .conversations {
843 848 display: none;
@@ -1107,11 +1112,6 @@ a:-webkit-any-link {
1107 1112 overflow: auto;
1108 1113 }
1109 1114
1110 .settings h3 {
1111 padding-left: 10px;
1112 padding-top: 10px;
1113 }
1114
1115 1115 .settings .paper {
1116 1116 flex-direction: column;
1117 1117 min-width: 400px;
Modified g4f/gui/client/static/js/chat.v1.js +6 -9
@@ -17,6 +17,7 @@ const modelSelect = document.getElementById("model");
17 17 const modelProvider = document.getElementById("model2");
18 18 const systemPrompt = document.getElementById("systemPrompt");
19 19 const settings = document.querySelector(".settings");
20 const chat = document.querySelector(".conversation");
20 21 const album = document.querySelector(".images");
21 22
22 23 let prompt_lock = false;
@@ -132,7 +133,7 @@ const register_message_buttons = async () => {
132 133 speechText = speechText.replaceAll(/\[(.+)\]\(.+\)/gm, "($1)");
133 134 speechText = speechText.replaceAll(/```[a-z]+/gm, "");
134 135 speechText = filter_message(speechText.replaceAll("`", "").replaceAll("#", ""))
135 const lines = speechText.trim().split(/\n|;/).filter(v => v.trim());
136 const lines = speechText.trim().split(/\n|;/).filter(v => count_words(v));
136 137
137 138 window.onSpeechResponse = (url) => {
138 139 if (!el.dataset.stopped) {
@@ -780,6 +781,7 @@ async function hide_sidebar() {
780 781 sidebar.classList.remove("shown");
781 782 sidebar_button.classList.remove("rotated");
782 783 settings.classList.add("hidden");
784 chat.classList.remove("hidden");
783 785 if (window.location.pathname == "/menu/" || window.location.pathname == "/settings/") {
784 786 history.back();
785 787 }
@@ -801,11 +803,13 @@ sidebar_button.addEventListener("click", (event) => {
801 803
802 804 function open_settings() {
803 805 if (settings.classList.contains("hidden")) {
806 chat.classList.add("hidden");
804 807 sidebar.classList.remove("shown");
805 808 settings.classList.remove("hidden");
806 809 history.pushState({}, null, "/settings/");
807 810 } else {
808 811 settings.classList.add("hidden");
812 chat.classList.remove("hidden");
809 813 }
810 814 }
811 815
@@ -1262,20 +1266,14 @@ if (SpeechRecognition) {
1262 1266 recognition.maxAlternatives = 1;
1263 1267
1264 1268 let startValue;
1265 let shouldStop;
1266 1269 let lastDebounceTranscript;
1267 1270 recognition.onstart = function() {
1268 1271 microLabel.classList.add("recognition");
1269 1272 startValue = messageInput.value;
1270 shouldStop = false;
1271 1273 lastDebounceTranscript = "";
1272 1274 };
1273 1275 recognition.onend = function() {
1274 if (shouldStop) {
1275 messageInput.focus();
1276 } else {
1277 recognition.start();
1278 }
1276 messageInput.focus();
1279 1277 };
1280 1278 recognition.onresult = function(event) {
1281 1279 if (!event.results) {
@@ -1302,7 +1300,6 @@ if (SpeechRecognition) {
1302 1300
1303 1301 microLabel.addEventListener("click", () => {
1304 1302 if (microLabel.classList.contains("recognition")) {
1305 shouldStop = true;
1306 1303 recognition.stop();
1307 1304 microLabel.classList.remove("recognition");
1308 1305 } else {