Updated GUI version to reflect core changes. And reflect the change in logistical flow with a launcher doing database schema checks, to then load the main UI

This commit is contained in:
SimplifiedPrivacy 2026-06-29 15:16:15 -04:00
parent c508dddcac
commit 80c1d2c4e6
3 changed files with 32 additions and 12 deletions

View file

@ -32,25 +32,34 @@ if is_compatable:
# SCREEN FAILED TABLES # SCREEN FAILED TABLES
if not made_tables: if not made_tables:
logger.error(f"[DB MANAGEMENT] Critical Failure with starting the models of the database.") custom_error = "Critical Failure with starting the models of the database."
logger.error(f"[DB MANAGEMENT] {custom_error}")
close_session() close_session()
from v2.ui.popups.Database_version import show_recovery_dialog
choice = show_recovery_dialog({"message": custom_error, "db_version": 0, "status": "cant_make"})
logger.info(f"[DB MANAGEMENT] From the database error options, the user picked {choice}")
sys.exit() sys.exit()
# ASSUME TABLES CREATED # ASSUME TABLES CREATED
logger.info("[DB MANAGEMENT] Tables successfully made or initialized if pre-existing") logger.info("[DB MANAGEMENT] Tables successfully made or initialized if pre-existing")
# original reason was he had no database, now tag it that he's got the new version,
if reason == "no_database":
logger.info(f"[DB MANAGEMENT] User had no database to begin with, so after we created the database, we are about to insert the new version in the DB metadata table for next time.")
# UPDATE DATA # UPDATE DATA
did_it_insert = insert_new_version(session, Constants.DB_VERSION_THIS_APP_WANTS) did_it_insert = insert_new_version(session, Constants.DB_VERSION_THIS_APP_WANTS)
if not did_it_insert: if not did_it_insert:
logger.error(f"[DB MANAGEMENT] Critical Failure with updating/inserting the new DB version into the database.") logger.error(f"[DB MANAGEMENT] Critical Failure with updating/inserting the new DB version into the database.")
logger.info(f"[DB MANAGEMENT] Launcher is now passing it off to launch the main GUI window...") # Load GUI either way:
from main_ui import start_ui from main_ui import start_ui
# If the user lacks a database, we want to force them to sync the new data, to avoid NoneType errors when enabling existing profiles,
if reason == "no_database":
logger.info(f"[DB MANAGEMENT] User had no database to begin with, so now we're entering GUI with sync on..")
force_sync = False force_sync = False
else:
logger.info(f"[DB MANAGEMENT] Launcher is now passing it off to launch the main GUI window WITHOUT force sync..")
force_sync = False
# Start GUI either way:
start_ui(force_sync) start_ui(force_sync)
# ============================================================================ # ============================================================================

View file

@ -52,15 +52,26 @@ class DatabaseConflictDialog(QDialog):
icon_label.setFont(QFont("Segoe UI", 48)) icon_label.setFont(QFont("Segoe UI", 48))
header_layout.addWidget(icon_label, 0, Qt.AlignmentFlag.AlignLeft | Qt.AlignmentFlag.AlignVCenter) header_layout.addWidget(icon_label, 0, Qt.AlignmentFlag.AlignLeft | Qt.AlignmentFlag.AlignVCenter)
# Title ######## Title Section. ##############
# First which messages to display,
if check["status"] == "version_mismatch":
error_title = "Database Compatibility"
error_subtitle = "Your App version and Database don't match"
else:
error_title = "Database Error"
error_subtitle = "The Database can't properly start"
# then display them:
title_layout = QVBoxLayout() title_layout = QVBoxLayout()
title_layout.setSpacing(5) title_layout.setSpacing(5)
title = QLabel("Database Compatibility")
title = QLabel(error_title)
title.setFont(QFont("Segoe UI", 18, QFont.Weight.Bold)) title.setFont(QFont("Segoe UI", 18, QFont.Weight.Bold))
title.setStyleSheet("color: white;") title.setStyleSheet("color: white;")
title_layout.addWidget(title) title_layout.addWidget(title)
subtitle = QLabel("Your App version and Database don't match") subtitle = QLabel(error_subtitle)
subtitle.setFont(QFont("Segoe UI", 11)) subtitle.setFont(QFont("Segoe UI", 11))
subtitle.setStyleSheet("color: rgba(255, 255, 255, 0.8);") subtitle.setStyleSheet("color: rgba(255, 255, 255, 0.8);")
title_layout.addWidget(subtitle) title_layout.addWidget(subtitle)

View file

@ -1,6 +1,6 @@
[project] [project]
name = "sp-hydra-veil-gui" name = "sp-hydra-veil-gui"
version = "2.4.3" version = "2.4.4"
authors = [ authors = [
{ name = "Simplified Privacy" }, { name = "Simplified Privacy" },
] ]
@ -12,7 +12,7 @@ classifiers = [
"Operating System :: POSIX :: Linux", "Operating System :: POSIX :: Linux",
] ]
dependencies = [ dependencies = [
"sp-hydra-veil-core == 2.3.6", "sp-hydra-veil-core == 2.3.7",
"pyperclip ~= 1.9.0", "pyperclip ~= 1.9.0",
"pyqt6 ~= 6.7.1", "pyqt6 ~= 6.7.1",
"qrcode[pil] ~= 8.2" "qrcode[pil] ~= 8.2"