An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

        

# electron-panel

[![Linux Build Status](https://travis-ci.org/electron-utils/electron-panel.svg?branch=master)](https://travis-ci.org/electron-utils/electron-panel)
[![Windows Build status](https://ci.appveyor.com/api/projects/status/xso2kaq1d4nyjjmm?svg=true)](https://ci.appveyor.com/project/jwu/electron-panel)
[![Dependency Status](https://david-dm.org/electron-utils/electron-panel.svg)](https://david-dm.org/electron-utils/electron-panel)
[![devDependency Status](https://david-dm.org/electron-utils/electron-panel/dev-status.svg)](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