some fixes about the UI and some hashing ; disclaimers

This commit is contained in:
2025-11-26 14:10:44 +01:00
parent 560c6715e1
commit db012563b9
2 changed files with 18 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ import wx
import sys import sys
import os import os
def get_resource_path(relative_path): def get_resource_path(relative_path):
"""Get absolute path to resource, works for dev and for PyInstaller""" """Get absolute path to resource, works for dev and for PyInstaller"""
try: try:
@@ -30,18 +31,30 @@ class AboutDialog(wx.Dialog):
info_text = wx.StaticText(self, label="wxIRC Client") info_text = wx.StaticText(self, label="wxIRC Client")
info_font = wx.Font(14, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD) info_font = wx.Font(14, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD)
info_text.SetFont(info_font) info_text.SetFont(info_font)
version_text = wx.StaticText(self, label="V 1.1.1.0") import base64, hashlib
self.encoded = base64.b64encode(
hashlib.sha256(f"{self.GetId()}-{self.GetHandle()}".encode()).digest()
).decode('utf-8')
version_text = wx.StaticText(self, label=f"wxIRC V:e1")
version_font = wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL) version_font = wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
version_text.SetFont(version_font) version_text.SetFont(version_font)
contrubutors_text = wx.StaticText(self, label="MiT License")
rand_hash = wx.StaticText(self, label=f"{self.encoded}")
rand_hash.SetFont(version_font)
contrubutors_text = wx.StaticText(self, label="This software may not be used for commercial purposes. \n And may not be distributed for commercial purposes.")
contrubutors_font = wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL) contrubutors_font = wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
contrubutors_text.SetFont(contrubutors_font) contrubutors_text.SetFont(contrubutors_font)
# Add info to sizer # Add info to sizer
sizer.Add(info_text, 0, wx.ALL | wx.ALIGN_CENTER, 5) sizer.Add(info_text, 0, wx.ALL | wx.ALIGN_CENTER, 5)
sizer.Add(version_text, 0, wx.ALL | wx.ALIGN_CENTER, 5) sizer.Add(version_text, 0, wx.ALL | wx.ALIGN_CENTER, 5)
sizer.Add(rand_hash, 0, wx.ALL | wx.ALIGN_CENTER, 5)
sizer.Add(contrubutors_text, 0, wx.ALL | wx.ALIGN_CENTER, 5) sizer.Add(contrubutors_text, 0, wx.ALL | wx.ALIGN_CENTER, 5)
# OK button # OK button
@@ -54,4 +67,3 @@ class AboutDialog(wx.Dialog):
self.SetSizer(sizer) self.SetSizer(sizer)
self.Fit() self.Fit()
self.Centre() self.Centre()

View File

@@ -101,6 +101,7 @@ class PrivacyNoticeDialog(wx.Dialog):
f"{security_warnings}\n\n" f"{security_warnings}\n\n"
"Important Reminders:\n" "Important Reminders:\n"
"If running a LAN Scan with wxScan. Be aware that this might give away who you are! It can compromise you!\n"
"Your system contains hardware level security processors that operate independently\n" "Your system contains hardware level security processors that operate independently\n"
" Network traffic may be monitored by various entities\n" " Network traffic may be monitored by various entities\n"
" Never discuss or plan illegal activities through any communication platform\n" " Never discuss or plan illegal activities through any communication platform\n"