mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Pass config file for app to configure screen
This commit is contained in:
parent
82a7059b6a
commit
f63f11186f
2 changed files with 6 additions and 5 deletions
|
@ -15,8 +15,9 @@ class ConfigureScreen(QtWidgets.QDialog):
|
|||
3. Save the configuration to khoj.yml and start the server
|
||||
"""
|
||||
|
||||
def __init__(self, parent=None):
|
||||
def __init__(self, config_file, parent=None):
|
||||
super(ConfigureScreen, self).__init__(parent=parent)
|
||||
self.config_file = config_file
|
||||
|
||||
# Initialize Configure Window
|
||||
self.setWindowFlags(Qt.WindowType.WindowStaysOnTopHint)
|
||||
|
|
|
@ -24,16 +24,16 @@ app.include_router(router)
|
|||
|
||||
|
||||
def run():
|
||||
# Load config from CLI
|
||||
args = cli(sys.argv[1:])
|
||||
|
||||
# Setup Base GUI
|
||||
gui = QtWidgets.QApplication([])
|
||||
gui.setQuitOnLastWindowClosed(False)
|
||||
configure_screen = ConfigureScreen()
|
||||
configure_screen = ConfigureScreen(args.config_file)
|
||||
tray = create_system_tray(gui, configure_screen)
|
||||
tray.show()
|
||||
|
||||
# Load config from CLI
|
||||
args = cli(sys.argv[1:])
|
||||
|
||||
# Trigger First Run Experience, if required
|
||||
if args.config is None:
|
||||
configure_screen.show()
|
||||
|
|
Loading…
Add table
Reference in a new issue