mirror of
https://github.com/rhysd/Mstdn.git
synced 2025-01-21 20:52:11 +01:00
update dependencies and avoid Electron's official type definitions
This commit is contained in:
parent
150b42bcfb
commit
1a7745345b
@ -115,7 +115,7 @@ export default class Window {
|
||||
this.browser.removeAllListeners();
|
||||
if (this.menubar) {
|
||||
// Note:
|
||||
// menubar.windowClear() won't be called because all listners were removed
|
||||
// menubar.windowClear() won't be called because all listeners were removed
|
||||
delete this.menubar.window;
|
||||
}
|
||||
this.browser.close();
|
||||
|
19
package.json
19
package.json
@ -37,22 +37,21 @@
|
||||
},
|
||||
"homepage": "https://github.com/rhysd/Mstdn#readme",
|
||||
"devDependencies": {
|
||||
"@types/electron": "^1.4.37",
|
||||
"@types/electron": "~1.4.37",
|
||||
"@types/electron-window-state": "^2.0.28",
|
||||
"@types/loglevel": "^1.4.29",
|
||||
"@types/menubar": "^5.1.3",
|
||||
"@types/mousetrap": "^1.5.33",
|
||||
"@types/node": "^7.0.18",
|
||||
"browserify": "^14.3.0",
|
||||
"electron-packager": "^8.7.0",
|
||||
"@types/mousetrap": "^1.5.34",
|
||||
"@types/node": "^8.0.0",
|
||||
"browserify": "^14.4.0",
|
||||
"electron-packager": "^8.7.1",
|
||||
"npm-run-all": "^4.0.2",
|
||||
"tslint": "^5.2.0",
|
||||
"typescript": "^2.3.2"
|
||||
"tslint": "^5.4.3",
|
||||
"typescript": "^2.3.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"electron": "^1.6.8-beta",
|
||||
"electron": "1.6.8",
|
||||
"electron-window-state": "^4.1.1",
|
||||
"electron-context-menu": "^0.9.0",
|
||||
"electron-context-menu": "^0.9.1",
|
||||
"loglevel": "^1.4.1",
|
||||
"menubar": "github:rhysd/menubar#mstdn",
|
||||
"mousetrap": "^1.6.1"
|
||||
|
55
typings/menubar.d.ts
vendored
Normal file
55
typings/menubar.d.ts
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
declare namespace Menubar {
|
||||
type Position
|
||||
= "trayLeft"
|
||||
| "trayBottomLeft"
|
||||
| "trayRight"
|
||||
| "trayBottomRight"
|
||||
| "trayCenter"
|
||||
| "trayBottomCenter"
|
||||
| "topLeft"
|
||||
| "topRight"
|
||||
| "bottomLeft"
|
||||
| "bottomRight"
|
||||
| "topCenter"
|
||||
| "bottomCenter"
|
||||
| "center";
|
||||
type TrayBounds
|
||||
= "trayLeft"
|
||||
| "trayBottomLeft"
|
||||
| "trayRight"
|
||||
| "trayBottomRight"
|
||||
| "trayCenter"
|
||||
| "trayBottomCenter";
|
||||
interface ElectronPositioner {
|
||||
move(pos: Position): void;
|
||||
calculate(pos: Position, bounds?: TrayBounds): Electron.Point;
|
||||
}
|
||||
class MenubarApp extends NodeJS.EventEmitter {
|
||||
app: Electron.App;
|
||||
window: Electron.BrowserWindow;
|
||||
tray: Electron.Tray;
|
||||
positioner: ElectronPositioner;
|
||||
|
||||
setOption(opt: string, value: any): void;
|
||||
getOption(opt: string): any;
|
||||
showWindow(): void;
|
||||
hideWindow(): void;
|
||||
}
|
||||
interface MenubarOptions extends Electron.BrowserWindowOptions {
|
||||
dir?: string;
|
||||
index?: string;
|
||||
tooltip?: string;
|
||||
tray?: Electron.Tray;
|
||||
preloadWindow?: boolean;
|
||||
alwaysOnTop?: boolean;
|
||||
showOnAllWorkspaces?: boolean;
|
||||
windowPosition?: Position;
|
||||
showDockIcon?: boolean;
|
||||
showOnRightClick?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "menubar" {
|
||||
const ctor: (opts?: Menubar.MenubarOptions) => Menubar.MenubarApp;
|
||||
export = ctor;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user