From 1a8516d1231b05b6982da57306df7ebd7b10704c Mon Sep 17 00:00:00 2001 From: Jordon Date: Mon, 23 Mar 2026 19:37:12 +0000 Subject: [PATCH 1/5] Added icon and author --- Frontend/public/OpenVCS-128.png | 3 +++ Frontend/src/modals/about.html | 9 ++++++--- Frontend/src/scripts/features/about.ts | 9 +++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 Frontend/public/OpenVCS-128.png diff --git a/Frontend/public/OpenVCS-128.png b/Frontend/public/OpenVCS-128.png new file mode 100644 index 00000000..8559a671 --- /dev/null +++ b/Frontend/public/OpenVCS-128.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a4a6b119f87467433b608ae03556077e163da86ad8e667f3abcaf601d0e3bad +size 12600 diff --git a/Frontend/src/modals/about.html b/Frontend/src/modals/about.html index 6d609298..2ab352fd 100644 --- a/Frontend/src/modals/about.html +++ b/Frontend/src/modals/about.html @@ -8,12 +8,15 @@

About OpenVCS

-
- OV -
+ OpenVCS logo
OpenVCS
+
diff --git a/Frontend/src/scripts/features/about.ts b/Frontend/src/scripts/features/about.ts index c0d8f26f..b5e3679b 100644 --- a/Frontend/src/scripts/features/about.ts +++ b/Frontend/src/scripts/features/about.ts @@ -9,6 +9,7 @@ function q(sel: string, root: ParentNode): T | null { return root.querySelector(sel) as T | null; } +/** Opens the About modal and hydrates its build metadata. */ export async function openAbout(): Promise { // Ensure the fragment is injected & visible openModal("about-modal"); @@ -21,6 +22,7 @@ export async function openAbout(): Promise { | { version?: string; build?: string; + authors?: string; homepage?: string; repository?: string; } @@ -28,12 +30,19 @@ export async function openAbout(): Promise { const aboutVersion = q("#about-version", modal); const aboutBuild = q("#about-build", modal); + const aboutAuthor = q("#about-author", modal); const aboutHome = q("#about-home", modal); const aboutRepo = q("#about-repo", modal); const aboutLicenses = q("#about-licenses", modal); + const authors = info?.authors + ?.split(":") + .map((author) => author.trim()) + .filter(Boolean) + .join(", "); if (aboutVersion) aboutVersion.textContent = info?.version ? `v${info.version}` : ""; if (aboutBuild) aboutBuild.textContent = info?.build ?? ""; + if (aboutAuthor) aboutAuthor.textContent = authors ? `By ${authors}` : ""; if (aboutHome) { aboutHome.href = info?.homepage || "#"; From 064535fb475de062e9afd10dc6317e40f4491e12 Mon Sep 17 00:00:00 2001 From: Jordon Date: Mon, 23 Mar 2026 19:42:05 +0000 Subject: [PATCH 2/5] Update about.ts --- Frontend/src/scripts/features/about.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Frontend/src/scripts/features/about.ts b/Frontend/src/scripts/features/about.ts index b5e3679b..0d112655 100644 --- a/Frontend/src/scripts/features/about.ts +++ b/Frontend/src/scripts/features/about.ts @@ -28,6 +28,7 @@ export async function openAbout(): Promise { } | null; + const aboutLogo = q("#about-logo", modal); const aboutVersion = q("#about-version", modal); const aboutBuild = q("#about-build", modal); const aboutAuthor = q("#about-author", modal); @@ -40,6 +41,7 @@ export async function openAbout(): Promise { .filter(Boolean) .join(", "); + if (aboutLogo) aboutLogo.src = `${import.meta.env.BASE_URL}OpenVCS-128.png`; if (aboutVersion) aboutVersion.textContent = info?.version ? `v${info.version}` : ""; if (aboutBuild) aboutBuild.textContent = info?.build ?? ""; if (aboutAuthor) aboutAuthor.textContent = authors ? `By ${authors}` : ""; From 0d8d10369d037d7515bacb2740a361f3c98fb4f7 Mon Sep 17 00:00:00 2001 From: Jordon Date: Mon, 23 Mar 2026 19:42:07 +0000 Subject: [PATCH 3/5] Update about.html --- Frontend/src/modals/about.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Frontend/src/modals/about.html b/Frontend/src/modals/about.html index 2ab352fd..40be8362 100644 --- a/Frontend/src/modals/about.html +++ b/Frontend/src/modals/about.html @@ -9,7 +9,8 @@

About OpenVCS

From 2e62c562c18e71f5bb21950b3446536be5975db7 Mon Sep 17 00:00:00 2001 From: Jordon Date: Mon, 23 Mar 2026 19:48:00 +0000 Subject: [PATCH 4/5] Fixed issues --- Frontend/public/OpenVCS-128.png | 3 --- Frontend/public/OpenVCS-40.png | 3 +++ Frontend/src/scripts/features/about.ts | 20 +++++++++++++++++--- docs/images/logos/OpenVCS-40.png | 3 +++ 4 files changed, 23 insertions(+), 6 deletions(-) delete mode 100644 Frontend/public/OpenVCS-128.png create mode 100644 Frontend/public/OpenVCS-40.png create mode 100644 docs/images/logos/OpenVCS-40.png diff --git a/Frontend/public/OpenVCS-128.png b/Frontend/public/OpenVCS-128.png deleted file mode 100644 index 8559a671..00000000 --- a/Frontend/public/OpenVCS-128.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5a4a6b119f87467433b608ae03556077e163da86ad8e667f3abcaf601d0e3bad -size 12600 diff --git a/Frontend/public/OpenVCS-40.png b/Frontend/public/OpenVCS-40.png new file mode 100644 index 00000000..6ad1758e --- /dev/null +++ b/Frontend/public/OpenVCS-40.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbeae2ec07c2a22e4ef8f282c0f375b6307e88ba1970f34771c6ef3e75c0fb51 +size 2996 diff --git a/Frontend/src/scripts/features/about.ts b/Frontend/src/scripts/features/about.ts index 0d112655..b6e8bad7 100644 --- a/Frontend/src/scripts/features/about.ts +++ b/Frontend/src/scripts/features/about.ts @@ -9,6 +9,14 @@ function q(sel: string, root: ParentNode): T | null { return root.querySelector(sel) as T | null; } +/** Sets an element's text content and hides it when the value is empty. */ +function setOptionalText(element: HTMLElement | null, value: string): void { + if (!element) return; + + element.textContent = value; + element.style.display = value ? "" : "none"; +} + /** Opens the About modal and hydrates its build metadata. */ export async function openAbout(): Promise { // Ensure the fragment is injected & visible @@ -41,10 +49,16 @@ export async function openAbout(): Promise { .filter(Boolean) .join(", "); - if (aboutLogo) aboutLogo.src = `${import.meta.env.BASE_URL}OpenVCS-128.png`; + if (aboutLogo) { + aboutLogo.onerror = () => { + aboutLogo.style.display = "none"; + }; + aboutLogo.style.display = "block"; + aboutLogo.src = `${import.meta.env.BASE_URL}OpenVCS-40.png`; + } if (aboutVersion) aboutVersion.textContent = info?.version ? `v${info.version}` : ""; - if (aboutBuild) aboutBuild.textContent = info?.build ?? ""; - if (aboutAuthor) aboutAuthor.textContent = authors ? `By ${authors}` : ""; + setOptionalText(aboutBuild, info?.build ?? ""); + setOptionalText(aboutAuthor, authors ? `By ${authors}` : ""); if (aboutHome) { aboutHome.href = info?.homepage || "#"; diff --git a/docs/images/logos/OpenVCS-40.png b/docs/images/logos/OpenVCS-40.png new file mode 100644 index 00000000..6ad1758e --- /dev/null +++ b/docs/images/logos/OpenVCS-40.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbeae2ec07c2a22e4ef8f282c0f375b6307e88ba1970f34771c6ef3e75c0fb51 +size 2996 From 0344808099cd18a1a7e1d0d1c7e4df9e3e255291 Mon Sep 17 00:00:00 2001 From: Jordon Date: Mon, 23 Mar 2026 19:50:13 +0000 Subject: [PATCH 5/5] Update about.ts --- Frontend/src/scripts/features/about.ts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Frontend/src/scripts/features/about.ts b/Frontend/src/scripts/features/about.ts index b6e8bad7..7ac46898 100644 --- a/Frontend/src/scripts/features/about.ts +++ b/Frontend/src/scripts/features/about.ts @@ -17,6 +17,15 @@ function setOptionalText(element: HTMLElement | null, value: string): void { element.style.display = value ? "" : "none"; } +/** Sets an optional link and hides it when no URL is available. */ +function setOptionalLink(element: HTMLAnchorElement | null, href: string): void { + if (!element) return; + + element.href = href; + element.toggleAttribute("disabled", !href); + element.style.display = href ? "" : "none"; +} + /** Opens the About modal and hydrates its build metadata. */ export async function openAbout(): Promise { // Ensure the fragment is injected & visible @@ -53,28 +62,20 @@ export async function openAbout(): Promise { aboutLogo.onerror = () => { aboutLogo.style.display = "none"; }; - aboutLogo.style.display = "block"; aboutLogo.src = `${import.meta.env.BASE_URL}OpenVCS-40.png`; } if (aboutVersion) aboutVersion.textContent = info?.version ? `v${info.version}` : ""; setOptionalText(aboutBuild, info?.build ?? ""); setOptionalText(aboutAuthor, authors ? `By ${authors}` : ""); - if (aboutHome) { - aboutHome.href = info?.homepage || "#"; - aboutHome.toggleAttribute("disabled", !info?.homepage); - } - if (aboutRepo) { - aboutRepo.href = info?.repository || "#"; - aboutRepo.toggleAttribute("disabled", !info?.repository); - } + setOptionalLink(aboutHome, info?.homepage || ""); + setOptionalLink(aboutRepo, info?.repository || ""); if (aboutLicenses) { const rawRepo = info?.repository || ""; const repo = rawRepo.replace(/\.git$/, "").replace(/\/+$/, ""); - const licenseUrl = repo ? `${repo}/blob/HEAD/LICENSE` : "#"; - aboutLicenses.href = licenseUrl; - aboutLicenses.toggleAttribute("disabled", !repo); + const licenseUrl = repo ? `${repo}/blob/HEAD/LICENSE` : ""; + setOptionalLink(aboutLicenses, licenseUrl); } } catch { notify("Unable to load About");