mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Consolidate naming
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
89c08dd76f
commit
a241b582fb
@ -1,12 +1,12 @@
|
|||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { action } from "mobx";
|
import { action } from "mobx";
|
||||||
import activeDockTabIdInjectable from "./active-dock-tab-id.injectable";
|
import activeDockTabIdStateInjectable from "./active-dock-tab-id-state.injectable";
|
||||||
|
|
||||||
const activateDockTabInjectable = getInjectable({
|
const activateDockTabInjectable = getInjectable({
|
||||||
id: "activate-dock-tab",
|
id: "activate-dock-tab",
|
||||||
|
|
||||||
instantiate: (di) => {
|
instantiate: (di) => {
|
||||||
const activeDockTabId = di.inject(activeDockTabIdInjectable);
|
const activeDockTabId = di.inject(activeDockTabIdStateInjectable);
|
||||||
|
|
||||||
return action((tabId: string) => activeDockTabId.set(tabId));
|
return action((tabId: string) => activeDockTabId.set(tabId));
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { observable } from "mobx";
|
import { observable } from "mobx";
|
||||||
|
|
||||||
const activeDockTabIdInjectable = getInjectable({
|
const activeDockTabIdStateInjectable = getInjectable({
|
||||||
id: "active-dock-tab-id",
|
id: "active-dock-tab-id",
|
||||||
instantiate: () => observable.box<string | null>(),
|
instantiate: () => observable.box<string | null>(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default activeDockTabIdInjectable;
|
export default activeDockTabIdStateInjectable;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { computed } from "mobx";
|
import { computed } from "mobx";
|
||||||
import activeDockTabIdInjectable from "./active-dock-tab-id.injectable";
|
import activeDockTabIdStateInjectable from "./active-dock-tab-id-state.injectable";
|
||||||
import { pipeline } from "@ogre-tools/fp";
|
import { pipeline } from "@ogre-tools/fp";
|
||||||
import { defaults, find, first } from "lodash/fp";
|
import { defaults, find, first } from "lodash/fp";
|
||||||
import dockTabsInjectable, { DockTabViewModel } from "./dock-tabs.injectable";
|
import dockTabsInjectable, { DockTabViewModel } from "./dock-tabs.injectable";
|
||||||
@ -22,7 +22,7 @@ const activeDockTabInjectable = getInjectable({
|
|||||||
|
|
||||||
instantiate: (di) => {
|
instantiate: (di) => {
|
||||||
const dockTabs = di.inject(dockTabsInjectable);
|
const dockTabs = di.inject(dockTabsInjectable);
|
||||||
const activeDockTabId = di.inject(activeDockTabIdInjectable);
|
const activeDockTabId = di.inject(activeDockTabIdStateInjectable);
|
||||||
|
|
||||||
return computed(() => {
|
return computed(() => {
|
||||||
const tabs = dockTabs.get();
|
const tabs = dockTabs.get();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user