summaryrefslogtreecommitdiffstats
path: root/g4f/gui/webview.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-19 18:48:32 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-19 18:48:32 +0100
commit486e43dabd1198e6f3c94a4040fc01f5b2fe824c (patch)
treed328bf845d35e875c3c10964ac3b44d047ac352c /g4f/gui/webview.py
parentFix abort in webview (diff)
downloadgpt4free-486e43dabd1198e6f3c94a4040fc01f5b2fe824c.tar
gpt4free-486e43dabd1198e6f3c94a4040fc01f5b2fe824c.tar.gz
gpt4free-486e43dabd1198e6f3c94a4040fc01f5b2fe824c.tar.bz2
gpt4free-486e43dabd1198e6f3c94a4040fc01f5b2fe824c.tar.lz
gpt4free-486e43dabd1198e6f3c94a4040fc01f5b2fe824c.tar.xz
gpt4free-486e43dabd1198e6f3c94a4040fc01f5b2fe824c.tar.zst
gpt4free-486e43dabd1198e6f3c94a4040fc01f5b2fe824c.zip
Diffstat (limited to 'g4f/gui/webview.py')
-rw-r--r--g4f/gui/webview.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/g4f/gui/webview.py b/g4f/gui/webview.py
index ba764947..36ad0e60 100644
--- a/g4f/gui/webview.py
+++ b/g4f/gui/webview.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import sys
import os.path
import webview
@@ -20,6 +22,8 @@ def run_webview(
dirname = sys._MEIPASS
else:
dirname = os.path.dirname(__file__)
+ webview.settings['OPEN_EXTERNAL_LINKS_IN_BROWSER'] = False
+ webview.settings['ALLOW_DOWNLOADS'] = True
webview.create_window(
f"g4f - {g4f.version.utils.current_version}",
os.path.join(dirname, "client/index.html"),