generated from ubiquity/ts-template
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' of https://github.com/ubiquity/work.ubq.fi …
…into add-labels-to-preview
- Loading branch information
Showing
16 changed files
with
388 additions
and
6,068 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ node_modules | |
.pnp.loader.mjs | ||
static/dist | ||
.env | ||
.wrangler/ | ||
|
||
cypress/screenshots | ||
cypress/videos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { organizationImageCache } from "../fetch-github/fetch-issues-full"; | ||
|
||
export function renderOrgHeaderLabel(orgName: string): void { | ||
const brandingDiv = document.getElementById("branding"); | ||
if (!brandingDiv) return; | ||
|
||
// Fetch the organization logo from the cache | ||
const logoBlob = organizationImageCache.get(orgName); | ||
|
||
if (logoBlob) { | ||
// Convert Blob to a URL | ||
const logoUrl = URL.createObjectURL(logoBlob); | ||
|
||
const img = document.createElement("img"); | ||
img.src = logoUrl; | ||
img.alt = `${orgName} Logo`; | ||
console.log("oi"); | ||
img.id = "logo"; | ||
|
||
// Replace the existing SVG with the new image | ||
const svgLogo = brandingDiv.querySelector("svg#logo"); | ||
if (svgLogo) brandingDiv.replaceChild(img, svgLogo); | ||
} | ||
|
||
// Update the organization name inside the span with class 'full' | ||
const orgNameSpan = brandingDiv.querySelector("span.full"); | ||
if (orgNameSpan) orgNameSpan.textContent = `${orgName} | `; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.