summaryrefslogtreecommitdiffstats
path: root/g4f/gui
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-11-19 20:26:00 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-11-19 20:26:00 +0100
commit1fe59623b22790dc2db36f106112795859bc6a25 (patch)
tree261867c0894205b5de213fc5816d6f405ea8759a /g4f/gui
parentFix aliases to gui arguments (diff)
downloadgpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar.gz
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar.bz2
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar.lz
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar.xz
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar.zst
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.zip
Diffstat (limited to '')
-rw-r--r--g4f/gui/client/static/css/style.css14
-rw-r--r--g4f/gui/gui_parser.py4
-rw-r--r--g4f/gui/run.py2
3 files changed, 18 insertions, 2 deletions
diff --git a/g4f/gui/client/static/css/style.css b/g4f/gui/client/static/css/style.css
index 5dc8c9c2..e435094f 100644
--- a/g4f/gui/client/static/css/style.css
+++ b/g4f/gui/client/static/css/style.css
@@ -500,14 +500,24 @@ body {
animation: show_popup 0.4s;
}
+.toolbar .regenerate {
+ left: 50%;
+ transform: translateX(-50%);
+ right: auto;
+}
+
+.toolbar .regenerate span {
+ display: none;
+}
+
@media only screen and (min-width: 40em) {
.stop_generating {
left: 50%;
transform: translateX(-50%);
right: auto;
}
- .toolbar .regenerate {
- right: 5px;
+ .toolbar .regenerate span {
+ display: block;
}
}
diff --git a/g4f/gui/gui_parser.py b/g4f/gui/gui_parser.py
index d47dd508..bc8cf9b7 100644
--- a/g4f/gui/gui_parser.py
+++ b/g4f/gui/gui_parser.py
@@ -1,9 +1,13 @@
from argparse import ArgumentParser
+from ..cookies import browsers
+
def gui_parser():
parser = ArgumentParser(description="Run the GUI")
parser.add_argument("--host", type=str, default="0.0.0.0", help="hostname")
parser.add_argument("--port", "-p", type=int, default=8080, help="port")
parser.add_argument("--debug", "-d", "-debug", action="store_true", help="debug mode")
parser.add_argument("--ignore-cookie-files", action="store_true", help="Don't read .har and cookie files.")
+ parser.add_argument("--cookie-browsers", nargs="+", choices=[browser.__name__ for browser in browsers],
+ default=[], help="List of browsers to access or retrieve cookies from.")
return parser \ No newline at end of file
diff --git a/g4f/gui/run.py b/g4f/gui/run.py
index 9b1c527c..7acc5d9a 100644
--- a/g4f/gui/run.py
+++ b/g4f/gui/run.py
@@ -1,5 +1,6 @@
from .gui_parser import gui_parser
from ..cookies import read_cookie_files
+import g4f.cookies
import g4f.debug
def run_gui_args(args):
@@ -11,6 +12,7 @@ def run_gui_args(args):
host = args.host
port = args.port
debug = args.debug
+ g4f.cookies.browsers = [g4f.cookies[browser] for browser in args.cookie_browsers]
run_gui(host, port, debug)
if __name__ == "__main__":