Hotbar command palette + switching (#2552)

* fix initial hotbar not showing

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* hotbar command palette + switching

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* lint fix

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* add clickable index to switcher

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fixes

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* refactor

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix typo

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fixes

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* remote notifications

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix add to hotbar

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* don't show remove-from-hotbar on catalog context menu

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix bad merge

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix bad merge

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix bad merge

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2021-04-22 10:07:14 +03:00
1 parent b63fdfaff3
commit da8cc889c4
14 files changed
+350 -24

No files matched your search

+6 -2
View File
@@ -2,6 +2,7 @@
import { Hotbar } from "../../common/hotbar-store";
import { ClusterStore } from "../../common/cluster-store";
import { migration } from "../migration-wrapper";
import { v4 as uuid } from "uuid";
export default migration({
version: "5.0.0-alpha.0",
@@ -9,11 +10,14 @@ export default migration({
const hotbars: Hotbar[] = [];
ClusterStore.getInstance().enabledClustersList.forEach((cluster: any) => {
const name = cluster.workspace || "default";
const name = cluster.workspace;
if (!name) return;
let hotbar = hotbars.find((h) => h.name === name);
if (!hotbar) {
hotbar = { name, items: [] };
hotbar = { id: uuid(), name, items: [] };
hotbars.push(hotbar);
}
@@ -0,0 +1,16 @@
// Cleans up a store that had the state related data stored
import { Hotbar } from "../../common/hotbar-store";
import { migration } from "../migration-wrapper";
import * as uuid from "uuid";
export default migration({
version: "5.0.0-alpha.2",
run(store) {
const hotbars = (store.get("hotbars") || []) as Hotbar[];
store.set("hotbars", hotbars.map((hotbar) => ({
id: uuid.v4(),
...hotbar
})));
}
});
+2
View File
@@ -1,7 +1,9 @@
// Hotbar store migrations
import version500alpha0 from "./5.0.0-alpha.0";
import version500alpha2 from "./5.0.0-alpha.2";
export default {
...version500alpha0,
...version500alpha2
};