summaryrefslogtreecommitdiffstats
path: root/g4f/gui/client
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-01-23 02:17:02 +0100
committerGitHub <noreply@github.com>2024-01-23 02:17:02 +0100
commit2a35052687e9026d90607c7db915e7c5b4e4018e (patch)
treec28dfef872f8dda791553fe1ae46418990d1c6b1 /g4f/gui/client
parentMerge pull request #1501 from eltociear/patch-5 (diff)
parentFix create copilot comment (diff)
downloadgpt4free-2a35052687e9026d90607c7db915e7c5b4e4018e.tar
gpt4free-2a35052687e9026d90607c7db915e7c5b4e4018e.tar.gz
gpt4free-2a35052687e9026d90607c7db915e7c5b4e4018e.tar.bz2
gpt4free-2a35052687e9026d90607c7db915e7c5b4e4018e.tar.lz
gpt4free-2a35052687e9026d90607c7db915e7c5b4e4018e.tar.xz
gpt4free-2a35052687e9026d90607c7db915e7c5b4e4018e.tar.zst
gpt4free-2a35052687e9026d90607c7db915e7c5b4e4018e.zip
Diffstat (limited to 'g4f/gui/client')
-rw-r--r--g4f/gui/client/html/index.html4
-rw-r--r--g4f/gui/client/js/chat.v1.js8
2 files changed, 9 insertions, 3 deletions
diff --git a/g4f/gui/client/html/index.html b/g4f/gui/client/html/index.html
index 95489ba4..5edb55e8 100644
--- a/g4f/gui/client/html/index.html
+++ b/g4f/gui/client/html/index.html
@@ -115,11 +115,11 @@
<textarea id="message-input" placeholder="Ask a question" cols="30" rows="10"
style="white-space: pre-wrap;resize: none;"></textarea>
<label for="image" title="Works only with Bing and OpenaiChat">
- <input type="file" id="image" name="image" accept="image/png, image/gif, image/jpeg" required/>
+ <input type="file" id="image" name="image" accept="image/png, image/gif, image/jpeg, image/svg+xml" required/>
<i class="fa-regular fa-image"></i>
</label>
<label for="file">
- <input type="file" id="file" name="file" accept="text/plain, text/html, text/xml, application/json, text/javascript, .sh, .py, .php, .css, .yaml, .sql, .svg, .log, .csv, .twig, .md" required/>
+ <input type="file" id="file" name="file" accept="text/plain, text/html, text/xml, application/json, text/javascript, .sh, .py, .php, .css, .yaml, .sql, .log, .csv, .twig, .md" required/>
<i class="fa-solid fa-paperclip"></i>
</label>
<div id="send-button">
diff --git a/g4f/gui/client/js/chat.v1.js b/g4f/gui/client/js/chat.v1.js
index 8b9bc181..d62c040b 100644
--- a/g4f/gui/client/js/chat.v1.js
+++ b/g4f/gui/client/js/chat.v1.js
@@ -660,7 +660,13 @@ observer.observe(message_input, { attributes: true });
}
document.getElementById("version_text").innerHTML = text
})()
-
+imageInput.addEventListener('click', async (event) => {
+ imageInput.value = '';
+});
+fileInput.addEventListener('click', async (event) => {
+ fileInput.value = '';
+ delete fileInput.dataset.text;
+});
fileInput.addEventListener('change', async (event) => {
if (fileInput.files.length) {
type = fileInput.files[0].type;