mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Hide windows instead of showing closing page
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
e15649b5a5
commit
3f9ee2a61c
@ -10,7 +10,7 @@ export function exitApp() {
|
||||
const windowManager = WindowManager.getInstance<WindowManager>()
|
||||
const clusterManager = ClusterManager.getInstance<ClusterManager>()
|
||||
appEventBus.emit({ name: "service", action: "close" })
|
||||
windowManager.navigate(closingURL());
|
||||
windowManager?.hide();
|
||||
clusterManager?.stop();
|
||||
logger.info('SERVICE:QUIT');
|
||||
setTimeout(() => {
|
||||
|
||||
@ -9,7 +9,6 @@ import { clusterSettingsURL } from "../renderer/components/+cluster-settings/clu
|
||||
import { extensionsURL } from "../renderer/components/+extensions/extensions.route";
|
||||
import { menuRegistry } from "../extensions/registries/menu-registry";
|
||||
import logger from "./logger";
|
||||
import { appEventBus } from "../common/event-bus";
|
||||
import { exitApp } from "./exit-app";
|
||||
|
||||
export type MenuTopId = "mac" | "file" | "edit" | "view" | "help"
|
||||
|
||||
@ -157,6 +157,11 @@ export class WindowManager extends Singleton {
|
||||
this.splashWindow.show();
|
||||
}
|
||||
|
||||
hide() {
|
||||
if (!this.mainWindow?.isDestroyed()) this.mainWindow.hide();
|
||||
if (!this.splashWindow.isDestroyed()) this.splashWindow.hide();
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.mainWindow.destroy();
|
||||
this.splashWindow.destroy();
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
import type { RouteProps } from "react-router";
|
||||
import { buildURL } from "../../../common/utils/buildUrl";
|
||||
|
||||
export const closingRoute: RouteProps = {
|
||||
path: "/closing"
|
||||
}
|
||||
|
||||
export const closingURL = buildURL(closingRoute.path)
|
||||
@ -1,6 +0,0 @@
|
||||
.ClosingPage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
z-index: 0;
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
import "./closing-page.scss"
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { Icon } from "../icon"
|
||||
|
||||
@observer
|
||||
export class ClosingPage extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="ClosingPage flex">
|
||||
{(
|
||||
<div className="no-clusters flex column gaps box center">
|
||||
<Icon size={72} material="emoji_people" />
|
||||
<h1>
|
||||
<Trans>Bye bye, see you soon!</Trans>
|
||||
</h1>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
export * from "./closing-page.route"
|
||||
export * from "./closing-page"
|
||||
@ -18,7 +18,6 @@ import { hasLoadedView, initView, lensViews, refreshViews } from "./lens-views";
|
||||
import { globalPageRegistry } from "../../../extensions/registries/page-registry";
|
||||
import { Extensions, extensionsRoute } from "../+extensions";
|
||||
import { getMatchedClusterId } from "../../navigation";
|
||||
import { ClosingPage, closingRoute } from "../+closing-page";
|
||||
|
||||
@observer
|
||||
export class ClusterManager extends React.Component {
|
||||
@ -64,7 +63,6 @@ export class ClusterManager extends React.Component {
|
||||
<div id="lens-views"/>
|
||||
<Switch>
|
||||
<Route component={LandingPage} {...landingRoute} />
|
||||
<Route component={ClosingPage} {...closingRoute} />
|
||||
<Route component={Preferences} {...preferencesRoute} />
|
||||
<Route component={Extensions} {...extensionsRoute} />
|
||||
<Route component={Workspaces} {...workspacesRoute} />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user