Browse Source

Only MacOS support app.dock (#410)

Domain 7 years ago
parent
commit
f81bda1686
1 changed files with 9 additions and 7 deletions
  1. 9 7
      app/lib/index.ts

+ 9 - 7
app/lib/index.ts

@@ -47,13 +47,15 @@ if (argv.d) {
 }
 
 app.on('ready', () => {
-    app.dock.setMenu(Menu.buildFromTemplate([
-        {
-            label: 'New window',
-            click () {
-                this.app.newWindow()
+    if (process.platform === 'darwin') {
+        app.dock.setMenu(Menu.buildFromTemplate([
+            {
+                label: 'New window',
+                click () {
+                    this.app.newWindow()
+                }
             }
-        }
-    ]))
+        ]))
+    }
     application.newWindow()
 })