fix: Windows path handling, light theme default, file viewer in editor, first-user admin logic
Config: - Fixed SQLite path parsing on Windows (handle drive letters without prepending /) - Changed default theme from dark to light - Updated OAuth test credentials (gitea_oauth_client_id/secret) Auth: - First real user (excluding default admin with no password) becomes admin - Changed user count query to exclude users without password_hash File viewer: - Removed separate _render_file_viewer() —
This commit is contained in:
+8
-3
@@ -13,8 +13,8 @@ class Settings(BaseSettings):
|
||||
# Gitea
|
||||
gitea_url: str = "https://git.dracodev.net"
|
||||
gitea_token: str = "change-me"
|
||||
gitea_oauth_client_id: str = ""
|
||||
gitea_oauth_client_secret: str = ""
|
||||
gitea_oauth_client_id: str = "test-id"
|
||||
gitea_oauth_client_secret: str = "test-secret"
|
||||
gitea_webhook_secret: str = ""
|
||||
|
||||
# GitHub
|
||||
@@ -53,7 +53,12 @@ class Settings(BaseSettings):
|
||||
if self.database_url == "sqlite:///:memory:":
|
||||
return Path(":memory:") # Special SQLite in-memory
|
||||
if self.database_url.startswith("sqlite:///"):
|
||||
return Path(self.database_url.replace("sqlite:///", "/"))
|
||||
p = self.database_url.replace("sqlite:///", "", 1)
|
||||
# On Windows, don't prepend / if path starts with a drive letter
|
||||
import re
|
||||
if re.match(r'^[a-zA-Z]:', p):
|
||||
return Path(p)
|
||||
return Path("/" + p)
|
||||
return Path("/data/flowdeck.db")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user