Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • luisterdoos luisterdoos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Hanze
  • 4.2 GAC Luisterdoos
  • luisterdoosluisterdoos
  • Wiki
  • Frontend plugins: widgets

Frontend plugins: widgets · Changes

Page history
R.deVries created page: Frontend plugins: widgets authored Dec 14, 2017 by Robert de Vries's avatar Robert de Vries
Hide whitespace changes
Inline Side-by-side
Frontend-plugins:-widgets.md 0 → 100644
View page @ 71cff17f
# Frontend plugins
## Widgets
You may include dashboard widget components for your plugins. They must reside in the `widgets` folder in your plugin.
The naming of your wallpaper components can be anything you want. There's no guidelines on the naming schemes besides being CamelCase, but it's recommended to include at least your plugin name and append `Widget`. This ensures there won't be any naming conflicts with other plugins.
The structure would look like this:
```bash
.
├── plugins
│   └── WeatherPlugin
│   └── widgets
│   └── WeatherWidget.vue
```
A Widget component must specify the following data in its default export object:
* `widget`
Example code:
```javascript
export default {
name: 'WeatherWidget', // must match the filename
widget: {
description: 'Weather widget',
icon: 'wb_sunny'
},
// ... other VueJS code
}
```
Omitting these data points will cause the Widget to not show up in the "Dashboard" system settings page, therefor the user will not be able to use it.
## Dashboard widget templating
We would like to streamline the styling of Widgets on the dashboard. You can use `BaseDashboardComponent` to in your Widget component to use the default styling. The use of this component is as follows:
```html
<base-dashboard-component
icon="wb_sunny"
title="10 C - Sunny"
description="It's sunny in Scheemda">
</base-dashboard-component>
<script type="text/javascript">
import BaseDashboardComponent from '../../../application/templates/BaseDashboardWidget.vue'
export default {
components: { BaseDashboardComponent }
}
</script>
```
You are not required to use this templating component, but it's highly recommended.
Clone repository
  • Frontend plugins: Settings
  • Frontend plugins: speech
  • Frontend plugins: wallpapers
  • Frontend plugins: widgets
  • frontend plugins
  • Home