mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Complete a majority of the rest of DI
- All KubeApi and KubeObjectStore's - All of Catalog - ApiManager - KubeObjectDetailRegistry - All BaseStore's and their migrations - LensProxy and Router - WindowManager - App Menu - Tray Icon - ThemeStore Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
6cba82c491
commit
1747cbf6c8
1345 files changed
+34694
-27702
No files matched your search
@@ -5,11 +5,11 @@
|
||||
|
||||
import fs from "fs-extra";
|
||||
import path from "path";
|
||||
import defaultBaseLensTheme from "../src/renderer/themes/lens-dark.json";
|
||||
import defaultBaseLensTheme from "../src/renderer/internal-themes/lens-dark.json";
|
||||
|
||||
const outputCssFile = path.resolve("src/renderer/themes/theme-vars.css");
|
||||
const outputCssFile = path.resolve("src/renderer/internal-themes/theme-vars.css");
|
||||
|
||||
const banner = `/*
|
||||
const banner = `/*
|
||||
Generated Lens theme CSS-variables, don't edit manually.
|
||||
To refresh file run $: yarn run ts-node build/${path.basename(__filename)}
|
||||
*/`;
|
||||
@@ -28,4 +28,4 @@ ${themeCssVars.join("\n")}
|
||||
// Run
|
||||
console.info(`"Saving default Lens theme css-variables to "${outputCssFile}""`);
|
||||
fs.ensureFileSync(outputCssFile);
|
||||
fs.writeFile(outputCssFile, content);
|
||||
fs.writeFileSync(outputCssFile, content);
|
||||
@@ -38,7 +38,7 @@ export async function generateTrayIcon(
|
||||
await fs.writeFile(pngIconDestPath, pngIconBuffer);
|
||||
console.info(`[DONE]: Tray icon saved at "${pngIconDestPath}"`);
|
||||
} catch (err) {
|
||||
console.error(`[ERROR]: ${err}`);
|
||||
console.error(`[ERROR]: ${String(err)}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,9 @@ const iconSizes: Record<string, number> = {
|
||||
"3x": 48,
|
||||
};
|
||||
|
||||
Object.entries(iconSizes).forEach(([dpiSuffix, pixelSize]) => {
|
||||
for (const dpiSuffix in iconSizes) {
|
||||
const pixelSize = iconSizes[dpiSuffix];
|
||||
|
||||
generateTrayIcon({ dpiSuffix, pixelSize, shouldUseDarkColors: false });
|
||||
generateTrayIcon({ dpiSuffix, pixelSize, shouldUseDarkColors: true });
|
||||
});
|
||||
}
|
||||
@@ -32,7 +32,7 @@ class KubectlDownloader {
|
||||
method: "HEAD",
|
||||
uri: this.url,
|
||||
resolveWithFullResponse: true,
|
||||
}).catch(console.error);
|
||||
});
|
||||
|
||||
if (response.headers["etag"]) {
|
||||
return response.headers["etag"].replace(/"/g, "");
|
||||
|
||||
Reference in new issue
Block a user