mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Use the default hotbar as the hotbar for the default workspace
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
006f005184
commit
c632c3db0d
@ -56,6 +56,18 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
// grab the default named hotbar or the first.
|
||||
const defaultHotbarIndex = Math.max(0, hotbars.findIndex(hotbar => hotbar.name === "default"));
|
||||
const [{ name, id, items }] = hotbars.splice(defaultHotbarIndex, 1);
|
||||
|
||||
workspaceHotbars.set("default", {
|
||||
name,
|
||||
id,
|
||||
items: items.filter(Boolean),
|
||||
});
|
||||
}
|
||||
|
||||
for (const cluster of clusters) {
|
||||
const workspaceHotbar = workspaceHotbars.get(cluster.workspace);
|
||||
|
||||
|
||||
@ -23,8 +23,8 @@ import { computed, observable, reaction, makeObservable } from "mobx";
|
||||
import { autoBind, iter, Singleton } from "./utils";
|
||||
import { UserStore } from "../common/user-store";
|
||||
import logger from "../main/logger";
|
||||
import darkThemeBase from "./themes/lens-dark.json";
|
||||
import lightThemeBase from "./themes/lens-light.json";
|
||||
import darkTheme from "./themes/lens-dark.json";
|
||||
import lightTheme from "./themes/lens-light.json";
|
||||
|
||||
export type ThemeId = string;
|
||||
|
||||
@ -41,16 +41,6 @@ export interface Theme {
|
||||
author: string;
|
||||
}
|
||||
|
||||
const darkTheme: Theme = {
|
||||
...darkThemeBase,
|
||||
type: darkThemeBase.type as ThemeType,
|
||||
};
|
||||
|
||||
const lightTheme: Theme = {
|
||||
...lightThemeBase,
|
||||
type: lightThemeBase.type as ThemeType,
|
||||
};
|
||||
|
||||
export interface ThemeItems extends Theme {
|
||||
id: string;
|
||||
}
|
||||
@ -60,8 +50,8 @@ export class ThemeStore extends Singleton {
|
||||
|
||||
// bundled themes from `themes/${themeId}.json`
|
||||
private allThemes = observable.map<string, Theme>([
|
||||
["lens-dark", darkTheme],
|
||||
["lens-light", lightTheme],
|
||||
["lens-dark", { ...darkTheme, type: ThemeType.DARK }],
|
||||
["lens-light", { ...lightTheme, type: ThemeType.LIGHT }],
|
||||
]);
|
||||
|
||||
@computed get themes(): ThemeItems[] {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user