summaryrefslogtreecommitdiffstats
path: root/g4f/gui/client
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/gui/client/css/style.css3
-rw-r--r--g4f/gui/client/html/index.html4
-rw-r--r--g4f/gui/client/js/chat.v1.js15
3 files changed, 22 insertions, 0 deletions
diff --git a/g4f/gui/client/css/style.css b/g4f/gui/client/css/style.css
index 2700de8b..254a4b15 100644
--- a/g4f/gui/client/css/style.css
+++ b/g4f/gui/client/css/style.css
@@ -211,6 +211,9 @@ body {
.convo-title {
color: var(--colour-3);
font-size: 14px;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
}
.message {
diff --git a/g4f/gui/client/html/index.html b/g4f/gui/client/html/index.html
index 66534a51..53c028d7 100644
--- a/g4f/gui/client/html/index.html
+++ b/g4f/gui/client/html/index.html
@@ -88,6 +88,10 @@
<span class="convo-title">github ~ <a href="https://github.com/xtekky/gpt4free">@gpt4free</a>
</span>
</div>
+ <div class="info">
+ <i class="fa-solid fa-star"></i>
+ <span id="version_text" class="convo-title"></span>
+ </div>
</div>
</div>
<div class="conversation">
diff --git a/g4f/gui/client/js/chat.v1.js b/g4f/gui/client/js/chat.v1.js
index 2844b73e..2a1bdd73 100644
--- a/g4f/gui/client/js/chat.v1.js
+++ b/g4f/gui/client/js/chat.v1.js
@@ -628,4 +628,19 @@ observer.observe(message_input, { attributes: true });
option.value = option.text = provider;
select.appendChild(option);
}
+})();
+
+(async () => {
+ response = await fetch('/backend-api/v2/version')
+ versions = await response.json()
+
+ document.title = 'g4f - gui - ' + versions["version"];
+ text = "version ~ "
+ if (versions["version"] != versions["lastet_version"]) {
+ release_url = 'https://github.com/xtekky/gpt4free/releases/tag/' + versions["lastet_version"];
+ text += '<a href="' + release_url +'" target="_blank" title="New version: ' + versions["lastet_version"] +'">' + versions["version"] + ' 🆕</a>';
+ } else {
+ text += versions["version"];
+ }
+ document.getElementById("version_text").innerHTML = text
})(); \ No newline at end of file