From 8f0f4b168bb49f167bbbcb03163ed22b44eea046 Mon Sep 17 00:00:00 2001
From: Donald Zou
Date: Thu, 24 Apr 2025 19:13:34 +0800
Subject: [PATCH 1/4] Update README.md
Added demo server
---
README.md | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/README.md b/README.md
index 98b1e67..3a1b026 100644
--- a/README.md
+++ b/README.md
@@ -52,6 +52,17 @@
+
+
+# [Demo](https://wgd-demo.donaldzou.dev)
+If you would like to try out WGDashboard, feel free to access the link above. You won't be able to actually connect it with WireGuard since I blocked all Post/Pre script.
+
+Username: `admin`
+
+Password: `admin`
+
+> **Please don't abuse server 🥺, and do not put any personal information on it.** If you can't access it, [please let me know here](https://github.com/donaldzou/WGDashboard/issues/695).
+
# [Official Documentation](https://donaldzou.dev/WGDashboard-Documentations)
From 510f60bdeb8e04e60b863f83079897a42b1ccd72 Mon Sep 17 00:00:00 2001
From: Donald Zou
Date: Fri, 25 Apr 2025 13:39:29 +0800
Subject: [PATCH 2/4] Update Email.py
Fixed to accomodate SMTP service where `username` is not an email address from #702
---
src/modules/Email.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/modules/Email.py b/src/modules/Email.py
index 20dd7b5..05ab5c5 100644
--- a/src/modules/Email.py
+++ b/src/modules/Email.py
@@ -33,8 +33,7 @@ class EmailSender:
return self.DashboardConfig.GetConfig("Email", "send_from")[1]
def ready(self):
- print(self.Server())
- return len(self.Server()) > 0 and len(self.Port()) > 0 and len(self.Encryption()) > 0 and len(self.Username()) > 0 and len(self.Password()) > 0
+ return len(self.Server()) > 0 and len(self.Port()) > 0 and len(self.Encryption()) > 0 and len(self.Username()) > 0 and len(self.Password()) > 0 and len(self.SendFrom())
def send(self, receiver, subject, body, includeAttachment = False, attachmentName = ""):
if self.ready():
@@ -46,7 +45,7 @@ class EmailSender:
self.smtp.login(self.Username(), self.Password())
message = MIMEMultipart()
message['Subject'] = subject
- message['From'] = formataddr((Header(self.SendFrom()).encode(), self.Username()))
+ message['From'] = self.SendFrom()
message["To"] = receiver
message.attach(MIMEText(body, "plain"))
@@ -62,7 +61,7 @@ class EmailSender:
else:
self.smtp.close()
return False, "Attachment does not exist"
- self.smtp.sendmail(self.Username(), receiver, message.as_string())
+ self.smtp.sendmail(self.SendFrom(), receiver, message.as_string())
self.smtp.close()
return True, None
except Exception as e:
From 9fa0d91d0687abc0a64af353cc7360801083d834 Mon Sep 17 00:00:00 2001
From: Donald Zou
Date: Fri, 25 Apr 2025 14:08:45 +0800
Subject: [PATCH 3/4] Update Email.py
Fixed #699
---
src/modules/Email.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/Email.py b/src/modules/Email.py
index 05ab5c5..b459bcd 100644
--- a/src/modules/Email.py
+++ b/src/modules/Email.py
@@ -11,8 +11,8 @@ class EmailSender:
def __init__(self, DashboardConfig):
self.smtp = None
self.DashboardConfig = DashboardConfig
- if not os.path.exists('../attachments'):
- os.mkdir('../attachments')
+ if not os.path.exists('./attachments'):
+ os.mkdir('./attachments')
def Server(self):
return self.DashboardConfig.GetConfig("Email", "server")[1]
From 09cdcf8e535ce2fb71334bf05d78139eaea76949 Mon Sep 17 00:00:00 2001
From: Donald Zou
Date: Fri, 25 Apr 2025 14:23:51 +0800
Subject: [PATCH 4/4] Update version number
---
src/dashboard.py | 2 +-
src/static/app/package.json | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/dashboard.py b/src/dashboard.py
index 91d9444..eead3c6 100644
--- a/src/dashboard.py
+++ b/src/dashboard.py
@@ -25,7 +25,7 @@ from modules.PeerJob import PeerJob
from modules.SystemStatus import SystemStatus
SystemStatus = SystemStatus()
-DASHBOARD_VERSION = 'v4.2.1'
+DASHBOARD_VERSION = 'v4.2.2'
CONFIGURATION_PATH = os.getenv('CONFIGURATION_PATH', '.')
DB_PATH = os.path.join(CONFIGURATION_PATH, 'db')
diff --git a/src/static/app/package.json b/src/static/app/package.json
index 53adf15..199f4df 100644
--- a/src/static/app/package.json
+++ b/src/static/app/package.json
@@ -1,13 +1,13 @@
{
"name": "app",
- "version": "4.2.1",
+ "version": "4.2.2",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"buildcommitpush": "./build.sh",
- "build electron": "vite build && vite build --mode electron && cd ../../../../WGDashboard-Desktop && electron-builder --mac --win",
+ "build electron": "vite build && vite build --mode electron && cd ../../../../WGDashboard-Desktop && /opt/homebrew/bin/npm run \"electron dist\"",
"preview": "vite preview"
},
"dependencies": {