mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Rename interface for honesty
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Iku-turso <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
23f7d438f1
commit
a0a181702d
@ -8,7 +8,7 @@ import applicationWindowStateInjectable from "./application-window-state.injecta
|
||||
import { BrowserWindow } from "electron";
|
||||
import { openBrowser } from "../../../../common/utils";
|
||||
import sendToChannelInElectronBrowserWindowInjectable from "./send-to-channel-in-electron-browser-window.injectable";
|
||||
import type { LensWindow } from "./create-lens-window.injectable";
|
||||
import type { ElectronWindow } from "./create-lens-window.injectable";
|
||||
import type { RequireExactlyOne } from "type-fest";
|
||||
|
||||
export type ElectronWindowTitleBarStyle = "hiddenInset" | "hidden" | "default" | "customButtonsOnHover";
|
||||
@ -38,7 +38,7 @@ export interface ElectronWindowConfiguration {
|
||||
onDomReady?: () => void;
|
||||
}
|
||||
|
||||
export type CreateElectronWindow = () => Promise<LensWindow>;
|
||||
export type CreateElectronWindow = () => Promise<ElectronWindow>;
|
||||
export type CreateElectronWindowFor = (config: ElectronWindowConfiguration) => CreateElectronWindow;
|
||||
|
||||
function isFileSource(src: ContentSource): src is FileSource {
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { SendToViewArgs } from "./lens-window-injection-token";
|
||||
import type { LensWindow, SendToViewArgs } from "./lens-window-injection-token";
|
||||
import type { ContentSource, ElectronWindowTitleBarStyle } from "./create-electron-window-for.injectable";
|
||||
import createElectronWindowForInjectable from "./create-electron-window-for.injectable";
|
||||
|
||||
export interface LensWindow {
|
||||
export interface ElectronWindow {
|
||||
show: () => void;
|
||||
close: () => void;
|
||||
send: (args: SendToViewArgs) => void;
|
||||
@ -35,8 +35,8 @@ const createLensWindowInjectable = getInjectable({
|
||||
instantiate: (di) => {
|
||||
const createElectronWindowFor = di.inject(createElectronWindowForInjectable);
|
||||
|
||||
return (configuration: LensWindowConfiguration) => {
|
||||
let browserWindow: LensWindow | undefined;
|
||||
return (configuration: LensWindowConfiguration): LensWindow => {
|
||||
let browserWindow: ElectronWindow | undefined;
|
||||
|
||||
const createElectronWindow = createElectronWindowFor({
|
||||
...configuration,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user