diff --git a/docs/alternate-views.md b/docs/alternate-views.md index 5bde691c..c80e73b7 100644 --- a/docs/alternate-views.md +++ b/docs/alternate-views.md @@ -3,6 +3,7 @@ ## Views Dashy has three different views: + - Default View - This is the main homepage with sections in a grid layout - Workspace View - Items displayed on the side, and are launched within Dashy - Minimal View - A clean + simple tabbed view @@ -10,6 +11,7 @@ Dashy has three different views: You can switch between views using the dropdown in the top-right corner. Set your chosen Starting View with `appConfig.startingView`. Click the page title at any time to go back to your selected starting view. ### Default + This is the main page that you will land on when you first launch the application. Here all of your sections (with items + widgets) are visible in a grid layout.
@@ -18,6 +20,7 @@ This is the main page that you will land on when you first launch the applicatio
### Workspace + The workspace view displays your links in a sidebar on the left-hand side, and apps are launched inside an iframe without having to leave Dashy. This enables you to use all of your self-hosted apps from one place, and makes multi-tasking easy. You can specify a default app to be opened when you land on the workspace, by setting `appConfig.workspaceLandingUrl: https://app-to-open/`. If this app exists within your sections.items, then the corresponding section will also be expanded. @@ -30,6 +33,7 @@ You can also opt to keep previously opened websites/ apps open in the background ### Minimal View + The minimal view aims to be super fast and simple, and can be used as a browser startpage. Items are grouped into a tab view, and the last opened tab will be remembered. Similar to the main view, you can search and launch items just by typing, and right-clicking will show more options (like open in modal, workspace or new tab).@@ -49,7 +53,7 @@ Dashy supports several different ways to launch your apps. The primary opening m You can also set a default opening method, which will be applied to all items that don't have a specified target, using `appConfig.defaultOpeningMethod`, to one of the above values. -Even if the target is not set (or is set to `sametab`), you can still launch any given app in an alternative method. Either right-click to see all options, or use one of the keyboard shortcuts: Alt + Click will open the modal, and Ctrl + Click will open in a new tab. +Even if the target is not set (or is set to `sametab`), you can still launch any given app in an alternative method. Either right-click to see all options, or use one of the keyboard shortcuts: Alt + Click will open the modal, and Ctrl + Click will open in a new tab.
@@ -57,4 +61,4 @@ Even if the target is not set (or is set to `sametab`), you can still launch any
If you don't like the custom context menu, it can be disabled by setting `appConfig.disableContextMenu: true`.
-If you get a 'Refused to Connect' error in the modal or workspace views, then the target app has it's X-Frame-Options HTTP set to block requests from embedded content. You can easily fix this by setting this header to ALLOW, for instructions on how to do so, see the [Troubleshooting Docs](/docs/troubleshooting#refused-to-connect-in-modal-or-workspace-view).
+If you get a 'Refused to Connect' error in the modal or workspace views, then the target app has it's X-Frame-Options HTTP set to block requests from embedded content. You can easily fix this by setting this header to ALLOW, for instructions on how to do so, see the [Troubleshooting Docs](/docs/troubleshootingrefused-to-connect-in-modal-or-workspace-view).
diff --git a/docs/assets/CONTRIBUTORS.svg b/docs/assets/CONTRIBUTORS.svg
index 1a583d00..b3dfa6da 100644
--- a/docs/assets/CONTRIBUTORS.svg
+++ b/docs/assets/CONTRIBUTORS.svg
@@ -1,120 +1,279 @@
-
| @@ -18,82 +18,67 @@ |
-
- - Stephen Rigney + Anand Chowdhary |
-
- - Robert Ernst + David Young + + |
+
+
+ + Carol Ouellet + + |
+
+
+ + Zach Biles + + | |
|
+
+ + Ulises Gascón + + |
+
+
+ + Brian McGonagill |
- Vlad Timofeev |
-
- - Kit L. - - | ||
|
-
- - Byolock + Jason Ash |
-
- - Mickael Asseline - - |
-
-
- - Hugalafutro - - |
-
-
- - LawrenceP. - - |
-
-
- - Kieren Connell - - |
-
-
- - Robin Candau - - |
|
-
- - Kyforker148 + Null |
@@ -102,24 +87,25 @@
Ratty222 - |
-
-
- - Undefined - - |
+ |||
|
Jtfinley72 + |
+
+
+ + Null + |
| @@ -379,7 +830,7 @@ |
|
@@ -428,7 +879,7 @@
> The above section is auto-generated, using [contribute-list](https://github.com/marketplace/actions/contribute-list) by @akhilmhdh.
-### Newest Stargazers
+## Newest Stargazers
[](https://github.com/Lissy93/dashy/stargazers)
@@ -440,17 +891,20 @@
This app definitely wouldn't have been quite so possible without the making use of the following package and components. Full credit and big kudos to their respective authors, who've done an amazing job in building and maintaining them. For a full breakdown of dependency licenses, please see [Legal](https://github.com/Lissy93/dashy/blob/master/.github/LEGAL.md)
-#### Core
+### Core
+
At it's core, the application uses [**Vue.js**](https://github.com/vuejs/vue), as well as it's services with [**VueX**](https://vuex.vuejs.org/) for state management. Styling is done with [**SCSS**](https://github.com/sass/sass), JavaScript is currently [**Babel**](https://github.com/babel/babel), (but I am in the process of converting to [**TypeScript**](https://github.com/Microsoft/TypeScript)). Linting is done with [**ESLint**](https://github.com/eslint/eslint) and [**Prettier**](https://prettier.io/), both following the [**AirBnB Styleguide**](https://github.com/airbnb/javascript). The config is defined in [**YAML**](https://github.com/yaml/yaml), with a simple [**Node.js**](https://github.com/nodejs/node) server to serve up the static app and the optional API endpoints, and container deployment is done with [**Docker**](https://www.docker.com/).
-#### Utilities
+### Utilities
+
- [`crypto-js`](https://github.com/brix/crypto-js) - Encryption implementations by @evanvosberg and community `MIT`
- [`axios`](https://github.com/axios/axios) - Promise based HTTP client by @mzabriskie and community `MIT`
- [`ajv`](https://github.com/ajv-validator/ajv) - JSON schema Validator by @epoberezkin and community `MIT`
- [`i18n`](https://github.com/kazupon/vue-i18n) - Internationalization plugin by @kazupon and community `MIT`
- [`frappe-charts`](https://github.com/frappe/charts) - Lightweight charting library by @frappe `MIT`
-#### Frontend Components
+### Frontend Components
+
- [`vue-select`](https://github.com/sagalbot/vue-select) - Dropdown component by @sagalbot `MIT`
- [`vue-js-modal`](https://github.com/euvl/vue-js-modal) - Modal component by @euvl `MIT`
- [`v-tooltip`](https://github.com/Akryum/v-tooltip) - Tooltip component by @Akryum `MIT`
@@ -460,13 +914,16 @@ At it's core, the application uses [**Vue.js**](https://github.com/vuejs/vue), a
- [`vue-toasted`](https://github.com/shakee93/vue-toasted) - Toast notification component by @shakee93 `MIT`
- [`vue-swatches`](https://github.com/saintplay/vue-swatches) - Color palete picker by @saintplay `MIT`
-#### Backup & Sync Server
+### Backup & Sync Server
+
Although the app is purely frontend, there is an optional cloud sync feature, for off-site backup and restore. This is built as a serverless function on [Cloudflare workers](https://workers.cloudflare.com/) using [KV](https://developers.cloudflare.com/workers/runtime-apis/kv) and [web crypto](https://developers.cloudflare.com/workers/runtime-apis/web-crypto)
-#### External Services
+### External Services
+
The 1-Click deploy demo uses [Play-with-Docker Labs](https://play-with-docker.com/). Code is hosted on [GitHub](https://github.com), Docker images are hosted on [DockerHub](https://hub.docker.com/), and the demos are hosted on [Netlify](https://www.netlify.com/).
-#### Actions
+### Actions
+
This repo makes heavy use of [GitHub actions](https://github.com/features/actions) to run automated workflows. The following base actions are totally awesome, and have been extremely useful. Full credit to their respective authors
- [`action-autotag`](https://github.com/butlerlogic/action-autotag) by @butlerlogic - Tags new versions when app version changes
@@ -488,5 +945,6 @@ This repo makes heavy use of [GitHub actions](https://github.com/features/action
---
-## You!
+## You
+
Would you like to be listed here? Whatever your skill set, Dashy needs people like you to help support future development. Check out the [Contributing Page](/docs/contributing) for ways that you can get involved. Huge thank you to everyone who has already contributed! 💖
diff --git a/docs/deployment.md b/docs/deployment.md
index 37025d96..050baadb 100644
--- a/docs/deployment.md
+++ b/docs/deployment.md
@@ -2,9 +2,11 @@
Welcome to Dashy, so glad you're here :) Deployment is super easy, and there are several methods available depending on what type of system you're using. If you're self-hosting, then deploying with Docker (or similar container engine) is the recommended approach.
-#### Quick Start
+## Quick Start
+
If you want to skip the fuss, and [get straight down to it](/docs/quick-start), then you can spin up a new instance of Dashy by running:
-```
+
+```bash
docker run -p 8080:80 lissy93/dashy
```
@@ -44,8 +46,7 @@ Once you've got Dashy up and running, you'll want to configure it with your own
Dashy has a built container image hosted on [Docker Hub](https://hub.docker.com/r/lissy93/dashy). You will need [Docker](https://docs.docker.com/get-docker/) installed on your system.
-
-```docker
+```bash
docker run -d \
-p 8080:80 \
-v /root/my-local-conf.yml:/app/public/conf.yml \
@@ -55,6 +56,7 @@ docker run -d \
```
Explanation of the above options:
+
- `-d` Detached mode (not running in the foreground of your terminal)
- `-p` The port that should be exposed, and the port it should be mapped to in your host system `[host-port][container-port]`, leave the container port as is
- `-v` Specify volumes, to pass data from your host system to the container, in the format of `[host-path]:[container-path]`, you can use this to pass your config file, directory of assets (like icons), custom CSS or web assets (like favicon.ico, manifest.json etc)
@@ -66,7 +68,7 @@ For all available options, and to learn more, see the [Docker Run Docs](https://
Dashy is also available through GHCR: `docker pull ghcr.io/lissy93/dashy:latest`
-If you're deploying Dashy on a modern ARM-based board, such as a Raspberry Pi (2+), then you'll need to use one of Dashy's ARM images. Set the base image + tag to either `lissy93/dashy:arm64v8` or `lissy93/dashy:arm32v7`, depending on your system architecture. You can also use the `multi-arch` image, which should work on all system architectures.
+If you're deploying Dashy on a modern ARM-based board, such as a Raspberry Pi (2+), then you'll need to use one of Dashy's ARM images. Set the base image + tag to either `lissy93/dashy:arm64v8` or `lissy93/dashy:arm32v7`, depending on your system architecture. You can also use the `multi-arch` image, which should work on all system architectures.
The image defaults to `:latest`, but you can instead specify a specific version, e.g. `docker pull lissy93/dashy:release-1.5.0`
@@ -108,6 +110,7 @@ services:
retries: 3
start_period: 40s
```
+
You can use a different tag, by for example setting `image: lissy93/dashy:arm64v8`, or pull from GHCR instead by setting `image: ghcr.io/lissy93/dashy`.
If you are building from source, and would like to use one of the [other Dockerfiles](https://github.com/Lissy93/dashy/tree/master/docker), then under `services.dashy` first set `context: .`, then specify the the path to the dockerfile, e.g. `dockerfile: ./docker/Dockerfile-arm32v7`
@@ -126,15 +129,17 @@ Installing dashy is really simply and fast:
1. Install Docker via Synology ```Package Center```.
2. Go to ```File Station``` and open the ```docker``` folder. Inside the docker folder, create one new folder and name it ```dashy```.
- > Note: Be careful to enter only lowercase, not uppercase letters.
-3. Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script.
-4. Once you click on ```User-defined``` script a new window will open.
-5. Follow the instructions below:
-6. General: In the Task field type in Install dashy. Uncheck “Enabled” option. Select root User.
-7. Schedule: Select Run on the following date then select “Do not repeat“.
-8. Task Settings: Check “Send run details by email“, add your email then copy paste the code below in the Run command area. After that click OK.
-```
+ > Note: Be careful to enter only lowercase, not uppercase letters.
+
+3. Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script.
+4. Once you click on ```User-defined``` script a new window will open.
+5. Follow the instructions below:
+6. General: In the Task field type in Install dashy. Uncheck "Enabled" option. Select root User.
+7. Schedule: Select Run on the following date then select "Do not repeat".
+8. Task Settings: Check "Send run details by email", add your email then copy paste the code below in the Run command area. After that click OK.
+
+```bash
docker run -d \
-p 4000:80 \
-v /volume1/docker/dashy/my-local-conf.yml:/app/public/conf.yml \
@@ -142,7 +147,9 @@ docker run -d \
--restart=always \
lissy93/dashy:latest
```
+
dashy should be up within 1-2min after you've started the install task procedure
+
---
## Build from Source
@@ -157,121 +164,142 @@ If you do not want to use Docker, you can run Dashy directly on your host system
---
-### Deploy to cloud service
+## Deploy to cloud service
If you don't have a home server, then fear not - Dashy can be deployed to pretty much any cloud provider. The above Docker and NPM guides will work exactly the same on a VPS, but I've also setup some 1-Click deploy links for 10+ of the most common cloud providers, to make things easier. Note that if your instance is exposed to the internet, it will be your responsibility to adequately secure it.
Some hosting providers required a bit of extra configuration, which was why I've made separate branches for deploying to those services (named: [`deploy_cloudflare`](https://github.com/Lissy93/dashy/tree/deploy_cloudflare), [`deploy_digital-ocean`](https://github.com/Lissy93/dashy/tree/deploy_digital-ocean), [`deploy_platform-sh`](https://github.com/Lissy93/dashy/tree/deploy_platform-sh) and [`deploy_render`](https://github.com/Lissy93/dashy/tree/deploy_render)). If there's another cloud service which you'd like 1-click deployment to be supported for, feel free to raise an issue.
-**Note** If you use a static hosting provider, then status checks, writing new config changes to disk from the UI, and triggering a rebuild through the UI will not be availible. This is because these features need endpoints provided by Dashy's local Node server. Everything else should work just the same though.
+**Note** If you use a static hosting provider, then status checks, writing new config changes to disk from the UI, and triggering a rebuild through the UI will not be available. This is because these features need endpoints provided by Dashy's local Node server. Everything else should work just the same though.
+
+### Netlify
-#### Netlify
[](https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/dashy)
[Netlify](https://www.netlify.com/) offers Git-based serverless cloud hosting for web applications. Their services are free to use for personal use, and they support deployment from both public and private repos, as well as direct file upload. The free plan also allows you to use your own custom domain or sub-domain, and is easy to setup.
To deploy Dashy to Netlify, use the following link
-```
+
+```text
https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/dashy
```
-#### Heroku
+### Heroku
+
[](https://heroku.com/deploy?template=https://github.com/Lissy93/dashy)
-[Heroku](https://www.heroku.com/) is a fully managed cloud platform as a service. You define app settings in a Procfile and app.json, which specifying how the app should be build and how the server should be started. Heroku is free to use for unlimited, non-commercial, single dyno apps, and supports custom domains. Heroku's single-dyno service is not as quite performant as some other providers, and the app will have a short wake-up time when not visited for a while
+[Heroku](https://www.heroku.com/) is a fully managed cloud platform as a service. You define app settings in a Procfile and app.json, which specifying how the app should be build and how the server should be started. Heroku costs a minimum of $5 for 1,000 dyno hours per month (there are around 720 hours in a month), and supports custom domains. Heroku's single-dyno service is not as quite performant as some other providers, and the app will have a short wake-up time when not visited for a while
To deploy Dashy to Heroku, use the following link
-```
+
+```text
https://heroku.com/deploy?template=https://github.com/Lissy93/dashy
```
-#### Cloudflare Workers
+### Cloudflare Workers
+
[](https://deploy.workers.cloudflare.com/?url=https://github.com/lissy93/dashy/tree/deploy_cloudflare)
[Cloudflare Workers](https://workers.cloudflare.com/) is a simple yet powerful service for running cloud functions and hosting web content. It requires a Cloudflare account, but is completely free for smaller projects, and very reasonably priced ($0.15/million requests per month) for large applications. You can use your own domain, and applications are protected with Cloudflare's state of the art DDoS protection. For more info, see the docs on [Worker Sites](https://developers.cloudflare.com/workers/platform/sites)
To deploy Dashy to Cloudflare, use the following link
-```
+
+```text
https://deploy.workers.cloudflare.com/?url=https://github.com/lissy93/dashy/tree/deploy_cloudflare
```
-#### Vercel
+### Vercel
+
[](https://vercel.com/new/project?template=https://github.com/lissy93/dashy)
-[Vercel](https://vercel.com/) is a performance-focused platform for hosting static frontend apps. It comes bundled with some useful tools for monitoring and anaylzing application performance and other metrics. Vercel is free for personal use, allows for custom domains and has very reasonable limits.
+[Vercel](https://vercel.com/) is a performance-focused platform for hosting static frontend apps. It comes bundled with some useful tools for monitoring and analyzing application performance and other metrics. Vercel is free for personal use, allows for custom domains and has very reasonable limits.
To deploy Dashy to Vercel, use the following link
-```
+
+```text
https://vercel.com/new/project?template=https://github.com/lissy93/dashy
```
-#### DigitalOcean
+### DigitalOcean
+
[](https://cloud.digitalocean.com/apps/new?repo=https://github.com/lissy93/dashy/tree/deploy_digital-ocean&refcode=3838338e7f79)
[DigitalOcean](https://www.digitalocean.com/) is a cloud service providing affordable developer-friendly virtual machines from $5/month. But they also have an app platform, where you can run web apps, static sites, APIs and background workers. CDN-backed static sites are free for personal use.
-```
+```text
https://cloud.digitalocean.com/apps/new?repo=https://github.com/lissy93/dashy/tree/deploy_digital-ocean
```
-#### Google Cloud Platform
+### Google Cloud Platform
+
[](https://deploy.cloud.run/?git_repo=https://github.com/lissy93/dashy.git)
[Cloud Run](https://cloud.google.com/run/) is a service offered by [Google Cloud](https://cloud.google.com/). It's a fully managed serverless platform, for developing and deploying highly scalable containerized applications. Similar to AWS and Azure, GCP offers a wide range of cloud services, which are billed on a pay‐per‐use basis, but Cloud Run has a [free tier](https://cloud.google.com/run/pricing) offering 180,000 vCPU-seconds, 360,000 GiB-seconds, and 2 million requests per month.
To deploy Dashy to GCP, use the following link
-```
+
+```text
https://deploy.cloud.run/?git_repo=https://github.com/lissy93/dashy.git
```
-#### Platform.sh
+### Platform.sh
+
[](https://console.platform.sh/projects/create-project/?template=https://github.com/lissy93/dashy&utm_campaign=deploy_on_platform?utm_medium=button&utm_source=affiliate_links&utm_content=https://github.com/lissy93/dashy)
[Platform.sh](https://platform.sh) is an end-to-end solution for developing and deploying applications. It is geared towards enterprise users with large teams, and focuses on allowing applications to scale up and down. Unlike the above providers, Platform.sh is not free, although you can deploy a test app to it without needing a payment method
To deploy Dashy to Platform.sh, use the following link
-```
+
+```text
https://console.platform.sh/projects/create-project/?template=https://github.com/lissy93/dashy
```
-#### Render
+### Render
+
[](https://render.com/deploy?repo=https://github.com/lissy93/dashy/tree/deploy_render)
[Render](https://render.com) is cloud provider that provides easy deployments for static sites, Docker apps, web services, databases and background workers. Render is great for developing applications, and very easy to use. Static sites are free, and services start at $7/month. Currently there are only 2 server locations - Oregon, USA and Frankfurt, Germany. For more info, see the [Render Docs](https://render.com/docs)
To deploy Dashy to Render, use the following link
-```
+
+```text
https://render.com/deploy?repo=https://github.com/lissy93/dashy/tree/deploy_render
```
-#### Scalingo
+### Scalingo
+
[](https://my.scalingo.com/deploy?source=https://github.com/lissy93/dashy#master)
-[Scalingo](https://scalingo.com/) is a scalable container-based cloud platform as a service. It's focus is on compliance and uptime, and is geared towards enterprise users. Scalingo is also not free, although they do have a 3-day free trial that does not require a payment method
+[Scalingo](https://scalingo.com/) is a scalable container-based cloud platform as a service. It's focus is on compliance and uptime, and is geared towards enterprise users. Scalingo is also not free, although they do have a 3-day free trial that does not require a payment method.
To deploy Dashy to Scalingo, use the following link
-```
+
+```text
https://my.scalingo.com/deploy?source=https://github.com/lissy93/dashy#master
```
-#### Play-with-Docker
+### Play-with-Docker
+
[](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml)
[Play with Docker](https://labs.play-with-docker.com/) is a community project by Marcos Liljedhal and Jonathan Leibiusky and sponsored by Docker, intended to provide a hands-on learning environment. Their labs let you quickly spin up a Docker container or stack, and test out the image in a temporary, sandboxed environment. There's no need to sign up, and it's completely free.
To run Dashy in PWD, use the following URL:
-```
+
+```text
https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml
```
-#### Surge.sh
+### Surge.sh
+

[Surge.sh](http://surge.sh/) is quick and easy static web publishing platform for frontend-apps.
Surge supports [password-protected projects](https://surge.sh/help/adding-password-protection-to-a-project). You can also [add a custom domain](https://surge.sh/help/adding-a-custom-domain) and then [force HTTPS by default](https://surge.sh/help/using-https-by-default) and optionally [set a custom SSL certificate](https://surge.sh/help/securing-your-custom-domain-with-ssl)
To deploy Dashy to Surge.sh, first clone and cd into Dashy, install dependencies, and then use the following commands
-```
+
+```bash
yarn add -g surge
yarn build
surge ./dist
@@ -281,13 +309,12 @@ surge ./dist
## Hosting with CDN
-Once Dashy has been built, it is effectivley just a static web app. This means that it can be served up with pretty much any static host, CDN or web server. To host Dashy through a CDN, the steps are very similar to building from source: clone the project, cd into it, install dependencies, write your config file and build the app. Once build is complete you will have a `./dist` directory within Dashy's root, and this is the build application which is ready to be served up.
+Once Dashy has been built, it is effectively just a static web app. This means that it can be served up with pretty much any static host, CDN or web server. To host Dashy through a CDN, the steps are very similar to building from source: clone the project, cd into it, install dependencies, write your config file and build the app. Once build is complete you will have a `./dist` directory within Dashy's root, and this is the build application which is ready to be served up.
-However without Dashy's node server, there are a couple of features that will be unavailible to you, including: Writing config changes to disk through the UI, triggering a rebuild through the UI and application status checks. Everything else will work fine.
+However without Dashy's node server, there are a couple of features that will be unavailable to you, including: Writing config changes to disk through the UI, triggering a rebuild through the UI and application status checks. Everything else will work fine.
---
-
## Requirements
### System Requirements
@@ -295,13 +322,16 @@ However without Dashy's node server, there are a couple of features that will be
Dashy works well on a Raspberry Pi (tested on Pi 3 and later), but should also run well on any system.
### Docker
-Initial app build causes a spike in resource usage, but once the built app is running it is fairly steady. For this reason, Dashy works best with a minimum of 1GB of memory, and 1GB of disk space.
+
+Initial app build causes a spike in resource usage, but once the built app is running it is fairly steady. For this reason, Dashy works best with a minimum of 1GB of memory, and 1GB of disk space.
### Bare Metal
-Minimum 526mb mem, 2GB disk space,
+
+Minimum 526mb mem, 2GB disk space.
### CDN / Cloud Deploy
-No specific requirements. The built application alone (without the Node server) is very light-weight, and can be handled smoothly by pretty much any CDN or cloud deployment service (see [this list](/docs/deployment#deploy-to-cloud-service) or natively supported cloud providers).
+
+No specific requirements. The built application alone (without the Node server) is very light-weight, and can be handled smoothly by pretty much any CDN or cloud deployment service (see [this list](/docs/deploymentdeploy-to-cloud-service) or natively supported cloud providers).
If you're using your own icons, or other assets, additional disk space will be required for those resources.
diff --git a/docs/developing.md b/docs/developing.md
index 886d3c83..f96b0249 100644
--- a/docs/developing.md
+++ b/docs/developing.md
@@ -24,6 +24,7 @@ If you're adding new features, you may want to check out the [Development Guides
## Setting up the Dev Environment
### Prerequisites
+
You will need either the latest or LTS version of **[Node.js](https://nodejs.org/)** to build and serve the application and **[Git](https://git-scm.com/downloads)** to easily fetch the code, and push any changes. If you plan on running or deploying the container, you'll also need **[Docker](https://docs.docker.com/get-docker/)**. To avoid any unexpected issues, ensure you've got at least **[NPM](https://www.npmjs.com/get-npm)** V 7.5 or **[Yarn](https://classic.yarnpkg.com/en/docs/install/#windows-stable)** 1.22 (you may find [NVM](https://github.com/nvm-sh/nvm) helpful for switching/ managing versions).
### Running the Project
@@ -33,34 +34,40 @@ You will need either the latest or LTS version of **[Node.js](https://nodejs.org
3. Install dependencies: `yarn`
4. Start dev server: `yarn dev`
-Dashy should now be being served on http://localhost:8080/. Hot reload is enabled, so making changes to any of the files will trigger them to be rebuilt and the page refreshed.
+Dashy should now be being served on
@@ -297,18 +311,19 @@ export default {
```
All widgets extend from the [Widget](https://github.com/Lissy93/dashy/blob/master/src/mixins/WidgetMixin.js) mixin. This provides some basic functionality that is shared by all widgets. The mixin includes the following `options`, `startLoading()`, `finishLoading()`, `error()` and `update()`.
+
- **Getting user options: `options`**
- - Any user-specific config can be accessed with `this.options.something` (where something is the data key your accessing)
+ - Any user-specific config can be accessed with `this.options.something` (where something is the data key your accessing)
- **Loading state: `startLoading()` and `finishLoading()`**
- - You can show the loader with `this.startLoading()`, then when your data request completes, hide it again with `this.finishLoading()`
+ - You can show the loader with `this.startLoading()`, then when your data request completes, hide it again with `this.finishLoading()`
- **Error handling: `error()`**
- - If something goes wrong (such as API error, or missing user parameters), then call `this.error()` to show message to user
+ - If something goes wrong (such as API error, or missing user parameters), then call `this.error()` to show message to user
- **Updating data: `update()`**
- - When the user clicks the update button, or if continuous updates are enabled, then the `update()` method within your widget will be called
+ - When the user clicks the update button, or if continuous updates are enabled, then the `update()` method within your widget will be called
### Step 2 - Adding Functionality
-**Accessing User Options**
+#### **Accessing User Options**
If your widget is going to accept any parameters from the user, then we can access these with `this.options.[parmName]`. It's best to put these as computed properties, which will enable us to check it exists, is valid, and if needed format it. For example, if we have an optional property called `count` (to determine number of results), we can do the following, and then reference it within our component with `this.count`
@@ -324,7 +339,7 @@ computed: {
},
```
-**Adding an API Endpoint**
+#### **Adding an API Endpoint**
If your widget makes a data request, then add the URL for the API under point to the `widgetApiEndpoints` array in [`defaults.js`](https://github.com/Lissy93/dashy/blob/master/src/utils/defaults.js#L207)
@@ -349,7 +364,7 @@ endpoint() {
},
```
-**Making an API Request**
+#### **Making an API Request**
Axios is used for making data requests, so import it into your component: `import axios from 'axios';`
@@ -362,11 +377,12 @@ fetchData() {
```
There are three things happening here:
+
- If the response completes successfully, we'll pass the results to another function that will handle them
- If there's an error, then we call `this.error()`, which will show a message to the user
- Whatever the result, once the request has completed, we call `this.finishLoading()`, which will hide the loader
-**Processing Response**
+#### **Processing Response**
In the above example, we call the `processData()` method with the result from the API, so we need to create that under the `methods` section. How you handle this data will vary depending on what's returned by the API, and what you want to render to the user. But however you do it, you will likely need to create a data variable to store the response, so that it can be easily displayed in the HTML.
@@ -384,7 +400,7 @@ And then, inside your `processData()` method, you can set the value of this, wit
`this.myResults = 'whatever'`
```
-**Rendering Response**
+#### **Rendering Response**
Now that the results are in the correct format, and stored as data variables, we can use them within the `` to render results to the user. Again, how you do this will depend on the structure of your data, and what you want to display, but at it's simplest, it might look something like this:
@@ -392,12 +408,11 @@ Now that the results are in the correct format, and stored as data variables, we
{{ myResults }} ``` -**Styling** +#### **Styling** Styles can be written your your widget within the ` |