mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-11-29 22:34:08 +03:00
Add missing styling on phone
This commit is contained in:
parent
f72ea59a99
commit
a82021fecd
@ -838,6 +838,11 @@ ul {
|
|||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settings h3 {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 990px) {
|
@media screen and (max-width: 990px) {
|
||||||
.conversations {
|
.conversations {
|
||||||
display: none;
|
display: none;
|
||||||
@ -1107,11 +1112,6 @@ a:-webkit-any-link {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings h3 {
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.settings .paper {
|
.settings .paper {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-width: 400px;
|
min-width: 400px;
|
||||||
|
@ -17,6 +17,7 @@ const modelSelect = document.getElementById("model");
|
|||||||
const modelProvider = document.getElementById("model2");
|
const modelProvider = document.getElementById("model2");
|
||||||
const systemPrompt = document.getElementById("systemPrompt");
|
const systemPrompt = document.getElementById("systemPrompt");
|
||||||
const settings = document.querySelector(".settings");
|
const settings = document.querySelector(".settings");
|
||||||
|
const chat = document.querySelector(".conversation");
|
||||||
const album = document.querySelector(".images");
|
const album = document.querySelector(".images");
|
||||||
|
|
||||||
let prompt_lock = false;
|
let prompt_lock = false;
|
||||||
@ -132,7 +133,7 @@ const register_message_buttons = async () => {
|
|||||||
speechText = speechText.replaceAll(/\[(.+)\]\(.+\)/gm, "($1)");
|
speechText = speechText.replaceAll(/\[(.+)\]\(.+\)/gm, "($1)");
|
||||||
speechText = speechText.replaceAll(/```[a-z]+/gm, "");
|
speechText = speechText.replaceAll(/```[a-z]+/gm, "");
|
||||||
speechText = filter_message(speechText.replaceAll("`", "").replaceAll("#", ""))
|
speechText = filter_message(speechText.replaceAll("`", "").replaceAll("#", ""))
|
||||||
const lines = speechText.trim().split(/\n|;/).filter(v => v.trim());
|
const lines = speechText.trim().split(/\n|;/).filter(v => count_words(v));
|
||||||
|
|
||||||
window.onSpeechResponse = (url) => {
|
window.onSpeechResponse = (url) => {
|
||||||
if (!el.dataset.stopped) {
|
if (!el.dataset.stopped) {
|
||||||
@ -780,6 +781,7 @@ async function hide_sidebar() {
|
|||||||
sidebar.classList.remove("shown");
|
sidebar.classList.remove("shown");
|
||||||
sidebar_button.classList.remove("rotated");
|
sidebar_button.classList.remove("rotated");
|
||||||
settings.classList.add("hidden");
|
settings.classList.add("hidden");
|
||||||
|
chat.classList.remove("hidden");
|
||||||
if (window.location.pathname == "/menu/" || window.location.pathname == "/settings/") {
|
if (window.location.pathname == "/menu/" || window.location.pathname == "/settings/") {
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
@ -801,11 +803,13 @@ sidebar_button.addEventListener("click", (event) => {
|
|||||||
|
|
||||||
function open_settings() {
|
function open_settings() {
|
||||||
if (settings.classList.contains("hidden")) {
|
if (settings.classList.contains("hidden")) {
|
||||||
|
chat.classList.add("hidden");
|
||||||
sidebar.classList.remove("shown");
|
sidebar.classList.remove("shown");
|
||||||
settings.classList.remove("hidden");
|
settings.classList.remove("hidden");
|
||||||
history.pushState({}, null, "/settings/");
|
history.pushState({}, null, "/settings/");
|
||||||
} else {
|
} else {
|
||||||
settings.classList.add("hidden");
|
settings.classList.add("hidden");
|
||||||
|
chat.classList.remove("hidden");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1262,20 +1266,14 @@ if (SpeechRecognition) {
|
|||||||
recognition.maxAlternatives = 1;
|
recognition.maxAlternatives = 1;
|
||||||
|
|
||||||
let startValue;
|
let startValue;
|
||||||
let shouldStop;
|
|
||||||
let lastDebounceTranscript;
|
let lastDebounceTranscript;
|
||||||
recognition.onstart = function() {
|
recognition.onstart = function() {
|
||||||
microLabel.classList.add("recognition");
|
microLabel.classList.add("recognition");
|
||||||
startValue = messageInput.value;
|
startValue = messageInput.value;
|
||||||
shouldStop = false;
|
|
||||||
lastDebounceTranscript = "";
|
lastDebounceTranscript = "";
|
||||||
};
|
};
|
||||||
recognition.onend = function() {
|
recognition.onend = function() {
|
||||||
if (shouldStop) {
|
|
||||||
messageInput.focus();
|
messageInput.focus();
|
||||||
} else {
|
|
||||||
recognition.start();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
recognition.onresult = function(event) {
|
recognition.onresult = function(event) {
|
||||||
if (!event.results) {
|
if (!event.results) {
|
||||||
@ -1302,7 +1300,6 @@ if (SpeechRecognition) {
|
|||||||
|
|
||||||
microLabel.addEventListener("click", () => {
|
microLabel.addEventListener("click", () => {
|
||||||
if (microLabel.classList.contains("recognition")) {
|
if (microLabel.classList.contains("recognition")) {
|
||||||
shouldStop = true;
|
|
||||||
recognition.stop();
|
recognition.stop();
|
||||||
microLabel.classList.remove("recognition");
|
microLabel.classList.remove("recognition");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user