|
|
# Developing frontend plugins
|
|
|
|
|
|
All plugins are loaded and created dynamically. The folder structure is as follows.
|
|
|
|
|
|
```bash
|
|
|
.
|
|
|
├── plugins
|
|
|
│ ├── {PluginName}
|
|
|
│ │ ├── settings
|
|
|
│ │ ├── wallpapers
|
|
|
│ │ └── widgets
|
|
|
```
|
|
|
|
|
|
A plugin should have its own folder under the `frontend/src/plugins/` folder. The folder name must end with `Plugin` and must be in CamelCase.
|
|
|
|
|
|
Every plugin can then have different types of components in sub folders. Component type folders must be in all lower case. At this moment the supported component types are as follows:
|
|
|
|
|
|
* [Settings](frontend-plugins-settings)
|
|
|
* [Wallpapers](frontend-plugins-wallpapers)
|
|
|
* [Widgets](frontend-plugins-widgets)
|
|
|
|
|
|
You are not required to implement these sub folders. If you only want to provide a widget, that's fine - you don't have to create a Settings and Wallpapers sub-folder in that case.
|
|
|
|
|
|
You are allowed to create multiple Vue components in these sub folders. For example, if you are developing a plugin "Google" and want to provide support for Gmail and Google Photos you might want to create two widgets. That's totally fine.
|
|
|
|
|
|
It's, of course, also totally fine to just include one widget. The Weather plugin, for example, provides one settings page and one widget. The SimpleWallpaper plugin provides only one wallpaper and nothing more.
|
|
|
|
|
|
Every component type (settings, wallpapers, widgets, ...) has their own requirements. You must comply with their requirements for them to automatically load in the application.
|
|
|
|
|
|
Please have a look at the documentation for every component type that you would like to implement for more information on its requirements.
|
|
|
|
|
|
Included below is an example of the directory structure of a simple installation with three plugins:
|
|
|
|
|
|
```bash
|
|
|
.
|
|
|
├── plugins
|
|
|
│ ├── EmailPlugin
|
|
|
│ │ ├── settings
|
|
|
│ │ │ └── EmailSettings.vue
|
|
|
│ │ └── widgets
|
|
|
│ │ └── EmailWidget.vue
|
|
|
│ ├── SimpleWallpaperPlugin
|
|
|
│ │ └── wallpapers
|
|
|
│ │ └── SimpleWallpaper.vue
|
|
|
│ └── WeatherPlugin
|
|
|
│ ├── settings
|
|
|
│ │ └── WeatherSettings.vue
|
|
|
│ └── widgets
|
|
|
│ └── WeatherWidget.vue
|
|
|
``` |
|
|
\ No newline at end of file |