@64mb/freelens-power 2.21.2 → 2.21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/renderer.js +18 -1
- package/dist/renderer.js.map +1 -1
- package/package.json +1 -1
package/dist/renderer.js
CHANGED
|
@@ -16952,6 +16952,7 @@ function startClusterIconSettingsMenu() {
|
|
|
16952
16952
|
let stopped = false;
|
|
16953
16953
|
let request = 0;
|
|
16954
16954
|
const open = async (id) => {
|
|
16955
|
+
if (stopped) return;
|
|
16955
16956
|
const current = ++request;
|
|
16956
16957
|
try {
|
|
16957
16958
|
const entries = await ipcRenderer.invoke(CLUSTER_ICONS_CHANNEL, { operation: "list" });
|
|
@@ -16967,6 +16968,20 @@ function startClusterIconSettingsMenu() {
|
|
|
16967
16968
|
if (!stopped && current === request) Renderer$1.Component.Notifications.error("Unable to open the cluster icon editor. Try again.");
|
|
16968
16969
|
}
|
|
16969
16970
|
};
|
|
16971
|
+
const addMenu = (entity, context) => {
|
|
16972
|
+
if (!Renderer$1.Catalog.getClusterById(entity.getId())) return;
|
|
16973
|
+
context.menuItems.push({
|
|
16974
|
+
title: "Edit icon",
|
|
16975
|
+
icon: "palette",
|
|
16976
|
+
onClick: () => void open(entity.getId())
|
|
16977
|
+
});
|
|
16978
|
+
};
|
|
16979
|
+
let category;
|
|
16980
|
+
const stopCategory = reaction(() => Renderer$1.Catalog.catalogCategories.getForGroupKind("entity.k8slens.dev", "KubernetesCluster"), (next) => {
|
|
16981
|
+
category?.off("contextMenuOpen", addMenu);
|
|
16982
|
+
category = next;
|
|
16983
|
+
category?.on("contextMenuOpen", addMenu);
|
|
16984
|
+
}, { fireImmediately: true });
|
|
16970
16985
|
const remove = (menu, button) => {
|
|
16971
16986
|
unmountContainer(button);
|
|
16972
16987
|
button.remove();
|
|
@@ -17027,6 +17042,8 @@ function startClusterIconSettingsMenu() {
|
|
|
17027
17042
|
stopped = true;
|
|
17028
17043
|
request++;
|
|
17029
17044
|
observer.disconnect();
|
|
17045
|
+
stopCategory();
|
|
17046
|
+
category?.off("contextMenuOpen", addMenu);
|
|
17030
17047
|
window.removeEventListener("keydown", onKeyDown, true);
|
|
17031
17048
|
for (const [menu, button] of owned) remove(menu, button);
|
|
17032
17049
|
unmountContainer(modal);
|
|
@@ -21199,7 +21216,7 @@ function startExtensionUpdateNotifications() {
|
|
|
21199
21216
|
};
|
|
21200
21217
|
const started = () => {
|
|
21201
21218
|
attempt = {
|
|
21202
|
-
version: current?.installedVersion ?? "2.21.
|
|
21219
|
+
version: current?.installedVersion ?? "2.21.3",
|
|
21203
21220
|
startedAt: Date.now()
|
|
21204
21221
|
};
|
|
21205
21222
|
try {
|