1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Remove light icons as never used

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-06-06 13:02:23 -04:00
parent 7c06f0d8fe
commit 79e822a779
7 changed files with 9 additions and 19 deletions

View File

@ -33,21 +33,12 @@ function getSvgStyling(colouring: "dark" | "light"): string {
async function getBaseIconTemplates() { async function getBaseIconTemplates() {
const svgData = await readFile(inputFile, { encoding: "utf-8" }); const svgData = await readFile(inputFile, { encoding: "utf-8" });
const dom = new JSDOM(`<body>${svgData}</body>`);
const root = dom.window.document.body.getElementsByTagName("svg")[0];
const darkDom = new JSDOM(`<body>${svgData}</body>`); root.innerHTML += getSvgStyling("light");
const darkRoot = darkDom.window.document.body.getElementsByTagName("svg")[0];
darkRoot.innerHTML += getSvgStyling("dark"); return root.outerHTML;
const lightDom = new JSDOM(`<body>${svgData}</body>`);
const lightRoot = lightDom.window.document.body.getElementsByTagName("svg")[0];
lightRoot.innerHTML += getSvgStyling("light");
return {
light: lightRoot.outerHTML,
dark: darkRoot.outerHTML,
};
} }
async function generateNormalImages(template: string, size: number, name: string) { async function generateNormalImages(template: string, size: number, name: string) {
@ -154,21 +145,20 @@ async function generateTrayIcons() {
console.log("Generating tray icon pngs"); console.log("Generating tray icon pngs");
await ensureOutputFoler(); await ensureOutputFoler();
const baseTemplates = await getBaseIconTemplates(); const baseTemplate = await getBaseIconTemplates();
const noticeTemplate = await getNoticeSvg(); const noticeTemplate = await getNoticeSvg();
void noticeTemplate; void noticeTemplate;
void generateUpdateAvailableImages; void generateUpdateAvailableImages;
await Promise.all([ await Promise.all([
generateNormalImages(baseTemplates.light, size, "trayIconDarkTemplate"), generateNormalImages(baseTemplate, size, "trayIconTemplate"),
// generateUpdateAvailableImages(baseTemplates.light, size, "trayIconDarkUpdateAvailableTemplate", noticeTemplate), // generateUpdateAvailableImages(baseTemplate, size, "trayIconDarkUpdateAvailableTemplate", noticeTemplate),
generateNormalImages(baseTemplates.dark, size, "trayIconTemplate"),
]); ]);
console.warn("Did not update:", [ console.warn("Did not update:", [
"trayIconDarkUpdateAvailableTemplate.png", "trayIconUpdateAvailableTemplate.png",
"trayIconDarkUpdateAvailableTemplate@2x.png", "trayIconUpdateAvailableTemplate@2x.png",
]); ]);
console.log("Generated all images"); console.log("Generated all images");
} catch (error) { } catch (error) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 717 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 724 B

After

Width:  |  Height:  |  Size: 717 B

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB