https://github.com/electron-utils/electron-panel
Manipulate panels in window for Electron.
https://github.com/electron-utils/electron-panel
electron panel
Last synced: about 1 month ago
JSON representation
Manipulate panels in window for Electron.
- Host: GitHub
- URL: https://github.com/electron-utils/electron-panel
- Owner: electron-utils
- License: mit
- Created: 2017-01-19T16:47:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-27T05:14:43.000Z (about 8 years ago)
- Last Synced: 2025-03-28T22:42:09.993Z (2 months ago)
- Topics: electron, panel
- Language: JavaScript
- Homepage:
- Size: 43 KB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# electron-panel
[](https://travis-ci.org/electron-utils/electron-panel)
[](https://ci.appveyor.com/project/jwu/electron-panel)
[](https://david-dm.org/electron-utils/electron-panel)
[](https://david-dm.org/electron-utils/electron-panel#info=devDependencies)Manipulate panels in window for Electron.
**NOTE**
This module use Custom Element v1 which only support in Electron 1.15.x or above version.
## Install
```bash
npm install --save electron-panel
```## Run Examples
```bash
npm start examples/${name}
```## Usage
**main process**
```javascript
// init panel in main process
const panel = require('electron-panel');
const protocols = require('electron-protocols');// register a protocol so that the panel can load by it.
protocols.register('app', protocols.basepath(app.getAppPath()));
```**renderer process**
**panel.js**
```javascript
module.exports = {
style: `
:host {
.layout-vertical();padding: 5px;
box-sizing: border-box;
}h2 {
color: #f90;
text-align: center;
}
`,template: `
Panel
`,ready () {
// do something
},
};
```**index.html**
```html
Panel Example
```
## Documentation
- Main Process
- [Panel](docs/panel-main.md)
- Renderer Process
- [Panel](docs/panel-renderer.md)
- [Panel Frame](docs/panel-frame.md)## TODO
- [New Feature] Warnning/Error notification at panel-frame.
- [New Feature] Out of date notification at panel-frame, and a reload button for user.
- [Test] main2panel-reply
- [Test] panel2panel-reply
- [Test] panelFrame.close()
- [Test] panel.closeAll()## License
MIT © 2017 Johnny Wu