Added a theme selector

This commit is contained in:
2026-08-26 12:54:38 +02:00
parent fec4c8def5
commit 72a4741cac
19 changed files with 305 additions and 9 deletions
+3 -3
View File
@@ -35,14 +35,14 @@ def save_smtp_settings(values: dict) -> None:
conn.commit()
def smtp_configured() -> bool:
smtp = get_smtp_settings()
def smtp_configured(smtp_values: dict | None = None) -> bool:
smtp = smtp_values or get_smtp_settings()
return bool(smtp['smtp_host'] and smtp['smtp_from'])
def send_message(email: str, subject: str, body: str, smtp_values: dict | None = None) -> None:
smtp = smtp_values or get_smtp_settings()
if not smtp_configured():
if not smtp_configured(smtp):
raise RuntimeError('SMTP is not configured; set LINKLOG_SMTP_HOST and LINKLOG_SMTP_FROM')
message = EmailMessage()