Make CatalogEntity labels clickable (#3075)

- Transition workspace's to be labels

- Fix migrations to support multiple migrations for the same version

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-06-18 08:44:28 -04:00
1 parent d812e28639
commit 7f51e3addd
30 files changed
+268 -120

No files matched your search

+5 -5
View File
@@ -22,10 +22,10 @@
// Cleans up a store that had the state related data stored
import type { Hotbar } from "../../common/hotbar-store";
import { ClusterStore } from "../../common/cluster-store";
import { migration } from "../migration-wrapper";
import { v4 as uuid } from "uuid";
import * as uuid from "uuid";
import type { MigrationDeclaration } from "../helpers";
export default migration({
export default {
version: "5.0.0-alpha.0",
run(store) {
const hotbars: Hotbar[] = [];
@@ -38,7 +38,7 @@ export default migration({
let hotbar = hotbars.find((h) => h.name === name);
if (!hotbar) {
hotbar = { id: uuid(), name, items: [] };
hotbar = { id: uuid.v4(), name, items: [] };
hotbars.push(hotbar);
}
@@ -50,4 +50,4 @@ export default migration({
store.set("hotbars", hotbars);
}
});
} as MigrationDeclaration;
+3 -3
View File
@@ -21,10 +21,10 @@
// Cleans up a store that had the state related data stored
import type { Hotbar } from "../../common/hotbar-store";
import { migration } from "../migration-wrapper";
import * as uuid from "uuid";
import type { MigrationDeclaration } from "../helpers";
export default migration({
export default {
version: "5.0.0-alpha.2",
run(store) {
const hotbars = (store.get("hotbars") || []) as Hotbar[];
@@ -34,4 +34,4 @@ export default migration({
...hotbar
})));
}
});
} as MigrationDeclaration;
+3 -3
View File
@@ -20,10 +20,10 @@
*/
import type { Hotbar } from "../../common/hotbar-store";
import { migration } from "../migration-wrapper";
import { catalogEntityRegistry } from "../../renderer/api/catalog-entity-registry";
import type { MigrationDeclaration } from "../helpers";
export default migration({
export default {
version: "5.0.0-beta.5",
run(store) {
const hotbars: Hotbar[] = store.get("hotbars");
@@ -48,4 +48,4 @@ export default migration({
store.set("hotbars", hotbars);
}
});
} as MigrationDeclaration;
+7 -5
View File
@@ -21,12 +21,14 @@
// Hotbar store migrations
import { joinMigrations } from "../helpers";
import version500alpha0 from "./5.0.0-alpha.0";
import version500alpha2 from "./5.0.0-alpha.2";
import version500beta5 from "./5.0.0-beta.5";
export default {
...version500alpha0,
...version500alpha2,
...version500beta5,
};
export default joinMigrations(
version500alpha0,
version500alpha2,
version500beta5,
);