-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from emqx/develop
Release v1.1.0
- Loading branch information
Showing
23 changed files
with
513 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,20 +2,36 @@ | |
|
||
Cross-platform MQTT desktop client | ||
|
||
## Installation | ||
|
||
Download from [GitHub Releases](https://github.com/emqx/MQTTX/releases) and install it. | ||
|
||
## Project setup | ||
``` | ||
|
||
``` shell | ||
# Clone | ||
|
||
git clone [email protected]:emqx/MQTTX.git | ||
|
||
cd MQTTX | ||
|
||
# Install dependencies | ||
|
||
yarn install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
# Compiles and hot-reloads for development | ||
|
||
yarn run electron:serve | ||
``` | ||
|
||
### Compiles and minifies for production | ||
``` | ||
# Compiles and minifies for production | ||
|
||
yarn run electron:build | ||
``` | ||
|
||
### Customize configuration | ||
|
||
See [Configuration Reference](https://cli.vuejs.org/config/). | ||
|
||
## License | ||
|
||
Apache License 2.0, see [LICENSE](https://github.com/emqx/MQTTX/blob/master/LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
import { shell, BrowserWindow } from 'electron' | ||
import updateChecker from './updateChecker' | ||
|
||
const isMac = process.platform === 'darwin' | ||
|
||
const getMenuTemplate = (win: BrowserWindow): $TSFixed => { | ||
return [ | ||
// App | ||
...(isMac | ||
? [ | ||
{ | ||
label: 'MQTTX', | ||
submenu: [ | ||
{ role: 'about' }, | ||
{ type: 'separator' }, | ||
{ | ||
label: 'Preferences', | ||
accelerator: 'cmd + ,', | ||
click: () => { | ||
win.webContents.send('preferences') | ||
}, | ||
}, | ||
{ | ||
label: 'Check for update', | ||
click: () => { | ||
updateChecker(false) | ||
}, | ||
}, | ||
{ type: 'separator' }, | ||
{ role: 'hide' }, | ||
{ role: 'hideothers' }, | ||
{ role: 'unhide' }, | ||
{ type: 'separator' }, | ||
{ role: 'quit' }, | ||
], | ||
}, | ||
] | ||
: []), | ||
// File | ||
{ | ||
label: 'File', | ||
submenu: [isMac ? { role: 'close' } : { role: 'quit' }], | ||
}, | ||
// EditMenu | ||
{ | ||
label: 'Edit', | ||
submenu: [ | ||
{ role: 'undo' }, | ||
{ role: 'redo' }, | ||
{ type: 'separator' }, | ||
{ role: 'cut' }, | ||
{ role: 'copy' }, | ||
{ role: 'paste' }, | ||
...(isMac | ||
? [ | ||
{ role: 'pasteAndMatchStyle' }, | ||
{ role: 'delete' }, | ||
{ role: 'selectAll' }, | ||
{ type: 'separator' }, | ||
{ | ||
label: 'Speech', | ||
submenu: [{ role: 'startspeaking' }, { role: 'stopspeaking' }], | ||
}, | ||
] | ||
: [{ role: 'delete' }, { type: 'separator' }, { role: 'selectAll' }]), | ||
], | ||
}, | ||
{ | ||
label: 'View', | ||
submenu: [ | ||
{ role: 'reload' }, | ||
{ role: 'forcereload' }, | ||
{ role: 'toggledevtools' }, | ||
{ type: 'separator' }, | ||
{ role: 'resetzoom' }, | ||
{ role: 'zoomin' }, | ||
{ role: 'zoomout' }, | ||
{ type: 'separator' }, | ||
{ role: 'togglefullscreen' }, | ||
], | ||
}, | ||
// windowMenu | ||
{ | ||
label: 'Window', | ||
submenu: [ | ||
{ role: 'minimize' }, | ||
{ role: 'zoom' }, | ||
...(isMac | ||
? [ | ||
{ type: 'separator' }, | ||
{ role: 'front' }, | ||
{ type: 'separator' }, | ||
{ role: 'window' }, | ||
] | ||
: [{ role: 'close' }]), | ||
], | ||
}, | ||
{ | ||
role: 'help', | ||
submenu: [ | ||
{ | ||
label: 'Learn more MQTTX', | ||
click: async () => { | ||
await shell.openExternal('https://github.com/emqx/MQTTX') | ||
}, | ||
}, | ||
{ | ||
label: 'Report problem', | ||
click: async () => { | ||
await shell.openExternal('https://github.com/emqx/MQTTX/issues') | ||
}, | ||
}, | ||
{ type: 'separator' }, | ||
{ | ||
label: 'EMQ X Website', | ||
click: async () => { | ||
await shell.openExternal('https://emqx.io') | ||
}, | ||
}, | ||
], | ||
}, | ||
] | ||
} | ||
|
||
export default getMenuTemplate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.