mirror of
https://github.com/podman-desktop/podman-desktop
synced 2026-04-21 17:47:22 +00:00
feat: kubernetes icon
I was never happy with the 'server' icon for Kubernetes context and wanted to put the new icon contributions to good use. I spent a while finding a path to convert the official Kubernetes SVG to woff2 - and my icon looked awful. I tried the entire path again today with the same ugly result, until I realized it's because all custom icons are set to italics :), which I think is wrong so I have also fixed it here. Signed-off-by: Tim deBoer <git@tdeboer.ca>
This commit is contained in:
parent
e8a97bbf1e
commit
04be4dd5b8
4 changed files with 12 additions and 3 deletions
BIN
extensions/kube-context/kube.woff2
Normal file
BIN
extensions/kube-context/kube.woff2
Normal file
Binary file not shown.
|
|
@ -16,7 +16,16 @@
|
|||
"command": "kubecontext.switch",
|
||||
"title": "Kube Context: switch context"
|
||||
}
|
||||
]
|
||||
],
|
||||
"icons": {
|
||||
"kube-icon": {
|
||||
"description": "Kubernetes icon",
|
||||
"default": {
|
||||
"fontPath": "kube.woff2",
|
||||
"fontCharacter": "\\0041"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup --bundleConfigAsCjs --config rollup.config.js --compact --environment BUILD:production && node ./scripts/build.js",
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ export async function updateContext(
|
|||
statusBarItem = extensionApi.window.createStatusBarItem();
|
||||
statusBarItem.command = 'kubecontext.quickpick';
|
||||
statusBarItem.tooltip = 'Current Kubernetes context';
|
||||
statusBarItem.iconClass = 'fa fa-server';
|
||||
statusBarItem.iconClass = '${kube-icon}';
|
||||
statusBarItem.show();
|
||||
extensionContext.subscriptions.push(statusBarItem);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ async function executeCommand(entry: StatusBarEntry) {
|
|||
class="{opacity(entry)} px-1 {hoverBackground(entry)} {hoverCursor(entry)}"
|
||||
title="{tooltipText(entry)}">
|
||||
{#if iconClass(entry)}
|
||||
<i class="{iconClass(entry)}" aria-hidden="true"></i>
|
||||
<i class="{iconClass(entry)} not-italic" aria-hidden="true"></i>
|
||||
{/if}
|
||||
{#if entry.text}
|
||||
<span class="ml-1">{entry.text}</span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue