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() {
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>`);
const darkRoot = darkDom.window.document.body.getElementsByTagName("svg")[0];
root.innerHTML += getSvgStyling("light");
darkRoot.innerHTML += getSvgStyling("dark");
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,
};
return root.outerHTML;
}
async function generateNormalImages(template: string, size: number, name: string) {
@ -154,21 +145,20 @@ async function generateTrayIcons() {
console.log("Generating tray icon pngs");
await ensureOutputFoler();
const baseTemplates = await getBaseIconTemplates();
const baseTemplate = await getBaseIconTemplates();
const noticeTemplate = await getNoticeSvg();
void noticeTemplate;
void generateUpdateAvailableImages;
await Promise.all([
generateNormalImages(baseTemplates.light, size, "trayIconDarkTemplate"),
// generateUpdateAvailableImages(baseTemplates.light, size, "trayIconDarkUpdateAvailableTemplate", noticeTemplate),
generateNormalImages(baseTemplates.dark, size, "trayIconTemplate"),
generateNormalImages(baseTemplate, size, "trayIconTemplate"),
// generateUpdateAvailableImages(baseTemplate, size, "trayIconDarkUpdateAvailableTemplate", noticeTemplate),
]);
console.warn("Did not update:", [
"trayIconDarkUpdateAvailableTemplate.png",
"trayIconDarkUpdateAvailableTemplate@2x.png",
"trayIconUpdateAvailableTemplate.png",
"trayIconUpdateAvailableTemplate@2x.png",
]);
console.log("Generated all images");
} 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