mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
change the information
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
f099489244
commit
ed2e973635
@ -1,15 +1,14 @@
|
|||||||
import { ipcRenderer } from "electron";
|
import { ipcRenderer } from "electron";
|
||||||
import { createBrowserHistory, createMemoryHistory } from "history";
|
import { createBrowserHistory, createMemoryHistory } from "history";
|
||||||
import { createObservableHistory } from "mobx-observable-history";
|
import { createObservableHistory } from "mobx-observable-history";
|
||||||
import { getHostedClusterId } from "../../common/cluster-store";
|
|
||||||
import logger from "../../main/logger";
|
import logger from "../../main/logger";
|
||||||
|
|
||||||
export const history = ipcRenderer ? createBrowserHistory() : createMemoryHistory();
|
export const history = ipcRenderer ? createBrowserHistory() : createMemoryHistory();
|
||||||
export const navigation = createObservableHistory(history);
|
export const navigation = createObservableHistory(history);
|
||||||
|
|
||||||
navigation.listen((location, action) => {
|
navigation.listen((location, action) => {
|
||||||
const clusterId = getHostedClusterId();
|
const isClusterView = !process.isMainFrame;
|
||||||
const frame = clusterId ?? "root";
|
const domain = global.location.href;
|
||||||
|
|
||||||
logger.debug(`[NAVIGATION]: ${action}`, { location, frame });
|
logger.debug(`[NAVIGATION]: ${action}`, { isClusterView, domain, location });
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user