Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor main.js, enable custom screensize #1627

Closed
wants to merge 175 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
0e42520
add localization tags and 3 translation examples
pciavald Mar 23, 2021
79f5a25
build all locales, warn on missing translation
pciavald Mar 23, 2021
2991cd3
Version française V1.0 de la traduction
Mar 25, 2021
5f45a66
delete yarn.lock
pciavald Mar 25, 2021
42fd53a
update package.json with upstream
pciavald Mar 26, 2021
7fe0d10
re-add @angular/localize
pciavald Mar 26, 2021
d0f5b97
merge upstream
pciavald Mar 26, 2021
5a17b8d
fix merge
pciavald Mar 26, 2021
5455084
re-add extract command
pciavald Mar 26, 2021
58bfd22
add ids
pciavald Mar 26, 2021
e85b3ec
replace added spans by ng-containers
pciavald Mar 26, 2021
ff7648a
fix duplicate id
pciavald Mar 26, 2021
aca0c8b
replace spans by ng-containers
pciavald Mar 26, 2021
989c3a7
basic docs
pciavald Mar 27, 2021
50a6370
Prise en compte des review pour la traduction française V1.00
Mar 27, 2021
77fe58c
Merge branch 'i18n' of https://git.iostud.io/vs-projects/octodash int…
Mar 27, 2021
2032b28
remove irrelevant change
pciavald Mar 27, 2021
c25edcb
cleanup angular.json
pciavald Mar 27, 2021
225c7b3
fix FR translations and merge ids
pciavald Mar 27, 2021
a33ea6e
fix package-lock conflict
pciavald Mar 27, 2021
c3dcd51
revert to fr instead of fr-FR
pciavald Mar 27, 2021
165510f
revert fr-FR to fr
pciavald Mar 27, 2021
7394404
fix targets that were sources
pciavald Mar 27, 2021
e8552c8
revert out-file
pciavald Mar 27, 2021
c6673d5
revert package-lock
pciavald Mar 27, 2021
f5cb861
install angular i18n
pciavald Mar 27, 2021
e28498e
fix build issues
pciavald Mar 27, 2021
56cfc57
enable serving custom locales, build detects host lang
pciavald Mar 28, 2021
e4c400b
update command name
pciavald Mar 28, 2021
4bd4017
correct source language
pciavald Mar 28, 2021
97b8477
update locales
pciavald Mar 28, 2021
07e999e
add target language
pciavald Mar 28, 2021
e538f80
add missing semicolons
pciavald Mar 28, 2021
f9be03f
fix duplicate url setting
pciavald Mar 28, 2021
e5a3166
fix sourcelocale basehref
pciavald Mar 28, 2021
2e3105c
fix typo
pciavald Mar 28, 2021
7df620b
save babystepZ to eeprom
pciavald Mar 28, 2021
50c07a7
flex
pciavald Mar 28, 2021
c55ecf9
Nettoyage de coquilles de traduction fance V1.00
Mar 28, 2021
48de237
add optional extruder control
pciavald Mar 28, 2021
c988918
remove irrelevant files
pciavald Mar 28, 2021
0996548
Merge branch 'i18n' into dev
pciavald Mar 28, 2021
a4cd14f
Merge branch 'm500' into dev
pciavald Mar 28, 2021
528bc5a
Merge branch 'e-movement' into dev
pciavald Mar 28, 2021
a331818
refactor main
pciavald Mar 28, 2021
9ec52a2
refactor electron helper for custom size, wip
pciavald Mar 28, 2021
8a40223
Bump rxjs from 6.6.6 to 6.6.7 (#1626)
dependabot-preview[bot] Mar 28, 2021
eed8b39
add showExtruderControl in js config schema
pciavald Mar 29, 2021
9336e1a
get config and fix issues
pciavald Mar 29, 2021
3164aa6
fix non returned config
pciavald Mar 31, 2021
f379ef4
remove unused protocol, refactoring
pciavald Apr 1, 2021
04c1c13
cleanup
pciavald Apr 1, 2021
92cb849
fix false not being copied
pciavald Apr 1, 2021
e8f71b4
add backgroundColor to the customization
pciavald Apr 1, 2021
015156c
save babystepZ to eeprom (#1621)
pciavald Mar 29, 2021
9adfe9d
feature/tasmota (#1581)
jneilliii Mar 29, 2021
cf66cec
Bump @typescript-eslint/parser from 4.19.0 to 4.20.0 (#1628)
dependabot-preview[bot] Mar 29, 2021
af94b99
Bump @typescript-eslint/eslint-plugin from 4.19.0 to 4.20.0 (#1629)
dependabot-preview[bot] Mar 29, 2021
6a8364b
Bump ngx-spinner from 11.0.0 to 11.0.1 (#1630)
dependabot-preview[bot] Mar 30, 2021
787262b
Bump @angular/material from 11.2.6 to 11.2.7 (#1631)
dependabot-preview[bot] Mar 31, 2021
883f07c
Bump @angular/router from 11.2.7 to 11.2.8 (#1633)
dependabot-preview[bot] Apr 1, 2021
9b3c5fa
Bump @angular/language-service from 11.2.7 to 11.2.8 (#1636)
dependabot-preview[bot] Apr 1, 2021
6d4cd71
Bump @angular/forms from 11.2.7 to 11.2.8 (#1637)
dependabot-preview[bot] Apr 1, 2021
8d51c3b
Bump @angular/animations from 11.2.7 to 11.2.8 (#1640)
dependabot-preview[bot] Apr 1, 2021
62f0dea
Bump @angular/platform-browser-dynamic from 11.2.7 to 11.2.8 (#1634)
dependabot-preview[bot] Apr 1, 2021
97e982f
Bump @angular/compiler-cli from 11.2.7 to 11.2.8 (#1638)
dependabot-preview[bot] Apr 1, 2021
5798701
Bump @angular/platform-browser from 11.2.7 to 11.2.8 (#1635)
dependabot-preview[bot] Apr 1, 2021
282237f
Bump @angular/compiler from 11.2.7 to 11.2.8 (#1641)
dependabot-preview[bot] Apr 2, 2021
cefc8b0
Bump @angular/cli from 11.2.6 to 11.2.7 (#1644)
dependabot-preview[bot] Apr 2, 2021
dbfd52a
Bump @angular-devkit/build-angular from 0.1102.6 to 0.1102.7 (#1645)
dependabot-preview[bot] Apr 2, 2021
1ad93f1
Bump lottie-web from 5.7.7 to 5.7.8 (#1648)
dependabot-preview[bot] Apr 5, 2021
1f2366e
Bump @typescript-eslint/parser from 4.20.0 to 4.21.0 (#1649)
dependabot-preview[bot] Apr 5, 2021
3e2b3b2
Bump @typescript-eslint/eslint-plugin from 4.20.0 to 4.21.0 (#1650)
dependabot-preview[bot] Apr 5, 2021
1f0571c
Bump tslib from 2.1.0 to 2.2.0 (#1652)
dependabot-preview[bot] Apr 5, 2021
7008cfc
Bump electron-store from 7.0.2 to 7.0.3 (#1656)
dependabot-preview[bot] Apr 7, 2021
9819818
Update Dependabot config file (#1657)
dependabot-preview[bot] Apr 7, 2021
b2c5d28
update pipeline
UnchartedBull Apr 7, 2021
3344381
Update contributing (closes #1617)
UnchartedBull Apr 7, 2021
0d66612
only save babystep on exit
UnchartedBull Apr 7, 2021
63cd02b
update pipeline
UnchartedBull Apr 7, 2021
3d6346e
use pull_request_target for actions
UnchartedBull Apr 8, 2021
eb7b44e
update auto-merge label
UnchartedBull Apr 8, 2021
47faec0
update needs
UnchartedBull Apr 8, 2021
5b2932d
fix pipeline
UnchartedBull Apr 8, 2021
3287ef4
Update README.md
UnchartedBull Apr 8, 2021
f0f791e
Bump @angular/platform-browser-dynamic from 11.2.8 to 11.2.9 (#1674)
dependabot[bot] Apr 8, 2021
bc45852
Bump @angular/material from 11.2.7 to 11.2.8 (#1666)
dependabot[bot] Apr 8, 2021
34af8ce
Bump @angular/common from 11.2.8 to 11.2.9 (#1663)
dependabot[bot] Apr 8, 2021
3e25660
Bump @angular/router from 11.2.8 to 11.2.9 (#1670)
dependabot[bot] Apr 8, 2021
4f20226
Bump @angular/animations from 11.2.8 to 11.2.9 (#1665)
dependabot[bot] Apr 8, 2021
ed33b58
Bump @angular/forms from 11.2.8 to 11.2.9 (#1668)
dependabot[bot] Apr 8, 2021
1aadd5a
Bump @angular/platform-browser from 11.2.8 to 11.2.9 (#1669)
dependabot[bot] Apr 8, 2021
10b9011
Bump @angular/cli from 11.2.7 to 11.2.8 (#1667)
dependabot[bot] Apr 8, 2021
6918436
Bump @angular/language-service from 11.2.8 to 11.2.9 (#1673)
dependabot[bot] Apr 8, 2021
de0f152
Bump @angular/compiler-cli from 11.2.8 to 11.2.9 (#1671)
dependabot[bot] Apr 8, 2021
de8250c
fix settings, feedrate, add axis inversion (#1676)
UnchartedBull Apr 8, 2021
a3d4c64
i18n + FR (#1610)
pciavald Apr 11, 2021
1c179e8
Bump eslint from 7.23.0 to 7.24.0 (#1678)
dependabot[bot] Apr 13, 2021
86b6806
Update approve-and-merge-dependency-updates.yaml
UnchartedBull Apr 13, 2021
d1a8102
Bump @typescript-eslint/eslint-plugin from 4.21.0 to 4.22.0 (#1680)
dependabot[bot] Apr 13, 2021
462dca6
Bump @typescript-eslint/parser from 4.21.0 to 4.22.0 (#1679)
dependabot[bot] Apr 13, 2021
5cc2c5a
Bump electron from 12.0.2 to 12.0.4 (#1682)
dependabot[bot] Apr 14, 2021
302782d
Bump @angular/router from 11.2.9 to 11.2.10 (#1683)
dependabot[bot] Apr 15, 2021
315543f
Bump @angular/compiler-cli from 11.2.9 to 11.2.10 (#1685)
dependabot[bot] Apr 15, 2021
903c04b
Bump @angular/forms from 11.2.9 to 11.2.10 (#1684)
dependabot[bot] Apr 15, 2021
8bf08cc
Bump eslint-plugin-prettier from 3.3.1 to 3.4.0 (#1690)
dependabot[bot] Apr 15, 2021
ba91de7
Bump @angular/animations from 11.2.9 to 11.2.10 (#1692)
dependabot[bot] Apr 15, 2021
4a61925
Bump @types/node from 14.14.37 to 14.14.39 (#1691)
dependabot[bot] Apr 15, 2021
87c13a2
Bump @angular/platform-browser-dynamic from 11.2.9 to 11.2.10 (#1694)
dependabot[bot] Apr 15, 2021
cc7d419
Bump @angular-devkit/build-angular from 0.1102.8 to 0.1102.9 (#1687)
dependabot[bot] Apr 15, 2021
ed8ab05
Bump @angular/common from 11.2.9 to 11.2.10 (#1695)
dependabot[bot] Apr 15, 2021
77ea23a
Bump @angular/localize from 11.2.9 to 11.2.10 (#1688)
dependabot[bot] Apr 15, 2021
fc2f797
Bump @angular/language-service from 11.2.9 to 11.2.10 (#1689)
dependabot[bot] Apr 15, 2021
1602c4c
Bump @angular/material from 11.2.8 to 11.2.9 (#1686)
dependabot[bot] Apr 15, 2021
df34900
Bump @angular/cli from 11.2.8 to 11.2.9 (#1696)
dependabot[bot] Apr 15, 2021
c82708c
Bump @angular/platform-browser from 11.2.9 to 11.2.10 (#1693)
dependabot[bot] Apr 15, 2021
79c932c
Bump @types/node from 14.14.39 to 14.14.41 (#1699)
dependabot[bot] Apr 16, 2021
76f3e73
Bump electron-store from 7.0.3 to 8.0.0 (#1706)
dependabot[bot] Apr 20, 2021
d959af9
Bump electron from 12.0.4 to 12.0.5 (#1708)
dependabot[bot] Apr 21, 2021
55b5d1a
Bump @angular-devkit/build-angular from 0.1102.9 to 0.1102.10 (#1709)
dependabot[bot] Apr 22, 2021
5310d22
Bump @angular/platform-browser-dynamic from 11.2.10 to 11.2.11 (#1710)
dependabot[bot] Apr 22, 2021
225ece6
Bump @angular/localize from 11.2.10 to 11.2.11 (#1713)
dependabot[bot] Apr 22, 2021
cb53ad1
Bump @angular/animations from 11.2.10 to 11.2.11 (#1718)
dependabot[bot] Apr 22, 2021
cc8e223
Bump @angular/language-service from 11.2.10 to 11.2.11 (#1714)
dependabot[bot] Apr 22, 2021
c867b37
Bump @angular/router from 11.2.10 to 11.2.11 (#1711)
dependabot[bot] Apr 22, 2021
d016cd3
Bump @angular/forms from 11.2.10 to 11.2.11 (#1720)
dependabot[bot] Apr 22, 2021
3e7cf82
Bump @angular/cli from 11.2.9 to 11.2.10 (#1716)
dependabot[bot] Apr 22, 2021
84147ff
Bump @angular/common from 11.2.10 to 11.2.11 (#1717)
dependabot[bot] Apr 22, 2021
ce41f62
Bump @angular/material from 11.2.9 to 11.2.10 (#1712)
dependabot[bot] Apr 22, 2021
931f2b6
Bump @angular/platform-browser from 11.2.10 to 11.2.11 (#1719)
dependabot[bot] Apr 22, 2021
edd692f
Bump @angular/compiler from 11.2.10 to 11.2.11 (#1723)
dependabot[bot] Apr 23, 2021
7e4b154
Bump eslint from 7.24.0 to 7.25.0 (#1726)
dependabot[bot] Apr 26, 2021
0ac5689
Bump @types/node from 14.14.41 to 15.0.0 (#1728)
dependabot[bot] Apr 27, 2021
47e6b8a
Bump @types/node from 15.0.0 to 15.0.1 (#1731)
dependabot[bot] Apr 28, 2021
9b996ce
Bump angular-svg-round-progressbar from 6.0.0 to 6.0.1 (#1732)
dependabot[bot] Apr 28, 2021
f301d5d
Bump @angular/platform-browser-dynamic from 11.2.11 to 11.2.12 (#1734)
dependabot[bot] Apr 29, 2021
01a8fdd
Bump @angular/cli from 11.2.10 to 11.2.11 (#1735)
dependabot[bot] Apr 29, 2021
053cc39
Bump @angular/localize from 11.2.11 to 11.2.12 (#1736)
dependabot[bot] Apr 29, 2021
9df8b95
Bump @angular/animations from 11.2.11 to 11.2.12 (#1739)
dependabot[bot] Apr 29, 2021
f697417
Bump @angular/platform-browser from 11.2.11 to 11.2.12 (#1744)
dependabot[bot] Apr 29, 2021
e82163f
Bump @angular/language-service from 11.2.11 to 11.2.12 (#1743)
dependabot[bot] Apr 29, 2021
b3a3c4c
Bump @angular/router from 11.2.11 to 11.2.12 (#1737)
dependabot[bot] Apr 29, 2021
d4a749d
Bump @angular/forms from 11.2.11 to 11.2.12 (#1745)
dependabot[bot] Apr 29, 2021
7f08d78
Bump @angular-devkit/build-angular from 0.1102.10 to 0.1102.11 (#1740)
dependabot[bot] Apr 29, 2021
ad7fcc6
Bump @angular/material from 11.2.10 to 11.2.11 (#1741)
dependabot[bot] Apr 29, 2021
b4e9163
Bump @angular/common from 11.2.11 to 11.2.12 (#1742)
dependabot[bot] Apr 29, 2021
36d7b1d
Bump @angular/compiler from 11.2.11 to 11.2.12 (#1747)
dependabot[bot] Apr 30, 2021
cb6b362
Bump @angular/core from 11.2.11 to 11.2.12 (#1748)
dependabot[bot] Apr 30, 2021
741263d
Bump electron from 12.0.5 to 12.0.6 (#1754)
dependabot[bot] May 3, 2021
2b018d3
Bump codelyzer from 6.0.1 to 6.0.2 (#1757)
dependabot[bot] May 4, 2021
46d6316
Bump @typescript-eslint/parser from 4.22.0 to 4.22.1 (#1761)
dependabot[bot] May 5, 2021
4a5beea
Bump @types/node from 15.0.1 to 15.0.2 (#1760)
dependabot[bot] May 5, 2021
e5c5dca
Bump electron-builder from 22.10.5 to 22.11.1 (#1762)
dependabot[bot] May 5, 2021
aebd9df
Bump @typescript-eslint/eslint-plugin from 4.22.0 to 4.22.1 (#1763)
dependabot[bot] May 5, 2021
c04a484
Update install.sh (#1701)
Will-wastelander May 5, 2021
b500ea8
Bump @angular/platform-browser-dynamic from 11.2.12 to 11.2.13 (#1765)
dependabot[bot] May 6, 2021
332f012
Bump @angular-devkit/build-angular from 0.1102.11 to 0.1102.12 (#1766)
dependabot[bot] May 6, 2021
dd66259
Bump @angular/forms from 11.2.12 to 11.2.13 (#1769)
dependabot[bot] May 6, 2021
189d986
Bump @angular/material from 11.2.11 to 11.2.12 (#1768)
dependabot[bot] May 6, 2021
41cd45d
Bump @angular/cli from 11.2.11 to 11.2.12 (#1767)
dependabot[bot] May 6, 2021
c9fee0a
Bump @angular/router from 11.2.12 to 11.2.13 (#1773)
dependabot[bot] May 6, 2021
96953ee
Bump @angular/language-service from 11.2.12 to 11.2.13 (#1774)
dependabot[bot] May 6, 2021
094adbc
Bump @angular/common from 11.2.12 to 11.2.13 (#1772)
dependabot[bot] May 6, 2021
a23fcaf
Bump @angular/localize from 11.2.12 to 11.2.13 (#1771)
dependabot[bot] May 6, 2021
6f983cb
update toggles and fix plugin selection (#1780)
UnchartedBull May 8, 2021
b7074b3
Bump electron from 12.0.6 to 12.0.7 (#1783)
dependabot[bot] May 10, 2021
bd27ed1
Bump eslint from 7.25.0 to 7.26.0 (#1784)
dependabot[bot] May 10, 2021
ad8ea04
Bump @typescript-eslint/parser from 4.22.1 to 4.23.0 (#1789)
dependabot[bot] May 11, 2021
3fced9f
Bump electron-builder from 22.11.1 to 22.11.3 (#1790)
dependabot[bot] May 11, 2021
78e7289
Bump @typescript-eslint/eslint-plugin from 4.22.1 to 4.23.0 (#1791)
dependabot[bot] May 11, 2021
4722e61
replace html logo by svg and package fonts (#1654)
pciavald May 11, 2021
54438bf
revert to text based main logo
UnchartedBull May 11, 2021
02a9c7a
add CORS hint
UnchartedBull May 11, 2021
dd53025
reconnect closed socket
UnchartedBull May 11, 2021
7516716
update translation files
UnchartedBull May 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .dependabot/config.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 15
labels:
- dependencies
31 changes: 31 additions & 0 deletions .github/workflows/approve-and-merge-dependency-updates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Dependencies

on:
pull_request_target:
branches:
- main

jobs:
auto-approve:
name: Approve
runs-on: ubuntu-latest
steps:
- name: Auto Approve
uses: hmarr/auto-approve-action@v2
if: github.actor == 'dependabot[bot]'
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
auto-merge:
name: Merge
needs: auto-approve
runs-on: ubuntu-latest
steps:
- name: Auto Merge
uses: pascalgn/automerge-action@v0.13.1
if: github.actor == 'dependabot[bot]'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
MERGE_METHOD: 'squash'
MERGE_LABELS: 'dependencies'
MERGE_RETRIES: 15
MERGE_RETRY_SLEEP: 60000
77 changes: 77 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,86 @@
# Contributing

If you can think of something nice to add or want to change / extend some of the functionality, feel free to create a Pull Request or an Issue. Please make sure to follow the code style (.prettierrc is included in the GitHub) and not break any of the existing functionality. Any help is greatly appreciated!
## Setting up the repository and build the package

## Setting up the repository and build the package

## Prerequisites

- NodeJS v14
- npm 7

## Setup

To setup a local environment you need to do the following steps:

- Fork the repository to your GitHub account, so you can push your changes
- Clone the repository
- Install dependencies: `npm install`
- Run the build `npm run build` (only required once to copy assets)
- Start the Live Server: `npm run start` or `npm run start:big`
- If you want to package OctoDash, so you can install it on your Raspberry Pi: `npm run pack`

## Languages

To launch the app in development mode in a specific locale instead of the source english locale, use

```
npm run start --serve="--configuration=<lang>"
```

For a list of available locales have a look at the `angular.json` (`projects.OctoDash.i18n.locales`) file.

### Add a new language

To add a language to the list of supported languages, follow these steps:

- find your language code in [this list](https://github.com/angular/angular/tree/master/packages/common/locales) (angular country codes are not all standard)
- in src/locale, duplicate an existing locale (or run `npm run locale:extract` to generate a new locale file)
- rename the file to include your language code in the format `messages.<languageCode>.xlf`
- in the `<file>` tag (second line of the xlf file) adapt `source-language="<languageCode>"` to your language code
- add the translations for your language between `target` tags
- add your language reference in `angular.json`

- `Projects.OctoDash.i18n.locales`

- add:

```
"<lang>": {
"translation": "src/locale/messages.<lang>.xlf",
"baseHref": ""
}
```

- `Projects.OctoDash.architect.build.configurations.production.localize`.

- add:

```
"<lang>"
```

- `Projects.OctoDash.architect.build.configurations`.

- add:

```
"<lang>": {
"localize": ["<lang>"]
},
```

- `Projects.OctoDash.architect.serve.configurations`.

- add:

```
"<lang>": {
"browserTarget": "OctoDash:build:<lang>"
},
```

## Update translations IDs and sources

To update translations with the latest codebase and IDs, run `npm run locale:update`. Only commit the files that do not have a date, these are only backups of the locale versions before the update.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<p align="center">
<img width="300" height="300" src="./src/assets/icon/icon-main-dark-title.svg">
<br><br>
<img src="https://travis-ci.org/UnchartedBull/OctoDash.svg?branch=main">
<img src="https://www.codefactor.io/repository/github/unchartedbull/octodash/badge">
<img src="https://img.shields.io/github/issues/UnchartedBull/OctoDash.svg">
<img src="https://img.shields.io/github/package-json/v/UnchartedBull/OctoDash.svg">
<img src="https://img.shields.io/github/downloads/UnchartedBull/OctoDash/total.svg?color=brightgreen">
<img src="https://img.shields.io/github/workflow/status/UnchartedBull/OctoDash/build/main?style=for-the-badge">
<img src="https://img.shields.io/codefactor/grade/github/UnchartedBull/OctoDash/main?style=for-the-badge">
<img src="https://img.shields.io/github/package-json/v/UnchartedBull/OctoDash/main?style=for-the-badge">
<img src="https://img.shields.io/github/downloads/UnchartedBull/OctoDash/latest/total?color=lightgrey&style=for-the-badge">
<br>
<b>OctoDash is a simple, but beautiful dashboard for OctoPrint. Please read the instructions carefully!</b><br />
OctoDash is a User Interface for OctoPrint, it utilizes the OctoPrint API but tries to use modern design principles in order to fully enable the power of your Raspberry Pi attached to your 3D Printer. OctoDash works best with a Touchscreen and will support almost all functions that OctoPrint offers just in a nicer format. Give it a try!
Expand Down Expand Up @@ -65,10 +64,11 @@ For more info have a look at the [wiki](https://github.com/UnchartedBull/OctoDas
- You can press multiple arrows directly after another in the control view. All actions will be executed in series, even if the prior didn't finish
- The six actions on the right in the control view can be customized. They can either send GCode commands to your printer, restart OctoPrint or your Pi and even open iFrames so you can view your camera
- You can adjust the temperatures and fan speed in the home screen by pressing on their icons, if you want to set them to zero, just tap the value once (v1.4.1 and up)
- OctoDash will start in your host's language if it is supported. You can start OctoDash in a different supported language by starting it with `LANG=fr_FR.UTF-8 octodash`. Currently supported languages are: `fr_FR.UTF-8`, english will be used if your requested language isn't available

## Demo

If you want to see OctoDash in action, here is an awesome video from Nick on [YouTube](https://youtu.be/YI_c-DY6zU4)
If you want to see OctoDash in action, here is an awesome video from Nick on [YouTube](https://youtu.be/YI_c-DY6zU4) there is also a video available from Chris Riley, which also shows the installation process on [YouTube](https://youtu.be/kwo3HMBnqC4)

## Screenshots

Expand Down Expand Up @@ -97,7 +97,7 @@ If you encounter an issue, while using OctoDash please have a look at the [wiki]

## Bugs and more

If you find a bug, please open an issue, so I can have a look at it. Please also add the steps to reproduce and the .gcode file. Thank you!
If you find a bug, please open an issue, so I can have a look at it. Please also add the steps to reproduce and the .gcode file (if applicable). Thank you!

## Contributing

Expand Down
25 changes: 22 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,28 @@
"root": "",
"sourceRoot": "src",
"prefix": "app",
"i18n": {
"sourceLocale": {
"code": "en",
"baseHref": ""
},
"locales": {
"fr": {
"translation": "src/locale/messages.fr.xlf",
"baseHref": ""
}
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"allowedCommonJsDependencies": [
"lottie-web"
],
"allowedCommonJsDependencies": ["lottie-web"],
"aot": true,
"outputPath": "dist",
"index": "src/index.html",
"i18nMissingTranslation": "warning",
"localize": ["en"],
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
Expand All @@ -47,7 +59,11 @@
"scripts": []
},
"configurations": {
"fr": {
"localize": ["fr"]
},
"production": {
"localize": ["en", "fr"],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand Down Expand Up @@ -82,6 +98,9 @@
"browserTarget": "OctoDash:build"
},
"configurations": {
"fr": {
"browserTarget": "OctoDash:build:fr"
},
"production": {
"browserTarget": "OctoDash:build:production"
}
Expand Down
18 changes: 14 additions & 4 deletions helper/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,24 @@ let store;
const ajv = new Ajv({ allErrors: true });
const validate = ajv.compile(configSchema);

function readConfig(window) {
function fetchConfig() {
let config;
try {
if (!store) {
store = new Store();
}
const config = store.get('config');
config = store.get('config')
} catch (e) {
console.error(e.message);
}
return config;
}

function readConfig(window) {
const config = fetchConfig()
if (config) {
window.webContents.send('configRead', config);
} catch {
} else {
window.webContents.send('configError', "Can't read config file.");
}
}
Expand Down Expand Up @@ -53,4 +63,4 @@ function getConfigErrors() {
return errors;
}

module.exports = { readConfig, saveConfig, checkConfig };
module.exports = { fetchConfig, readConfig, saveConfig, checkConfig };
94 changes: 94 additions & 0 deletions helper/config.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ const configSchema = {
'printTimeGenius',
'psuControl',
'tpLinkSmartPlug',
'tasmota',
'tasmotaMqtt',
],
properties: {
displayLayerProgress: {
Expand Down Expand Up @@ -215,6 +217,44 @@ const configSchema = {
},
},
},
tasmota: {
$id: '#/properties/plugins/properties/tasmota',
type: 'object',
required: ['enabled', 'ip', 'index'],
properties: {
enabled: {
$id: '#/properties/plugins/properties/tasmota/properties/enabled',
type: 'boolean',
},
ip: {
$id: '#/properties/plugins/properties/tasmota/properties/ip',
type: 'string',
},
index: {
$id: '#/properties/plugins/properties/tasmota/properties/index',
type: ['number', 'null'],
},
},
},
tasmotaMqtt: {
$id: '#/properties/plugins/properties/tasmotaMqtt',
type: 'object',
required: ['enabled', 'topic', 'relayNumber'],
properties: {
enabled: {
$id: '#/properties/plugins/properties/tasmotaMqtt/properties/enabled',
type: 'boolean',
},
topic: {
$id: '#/properties/plugins/properties/tasmotaMqtt/properties/topic',
type: 'string',
},
relayNumber: {
$id: '#/properties/plugins/properties/tasmotaMqtt/properties/relayNumber',
type: ['number', 'null'],
},
},
},
},
},
octodash: {
Expand All @@ -223,6 +263,7 @@ const configSchema = {
required: [
'customActions',
'fileSorting',
'invertAxisControl',
'pollingInterval',
'touchscreen',
'turnScreenOffWhileSleeping',
Expand Down Expand Up @@ -284,6 +325,25 @@ const configSchema = {
},
},
},
invertAxisControl: {
$id: '#/properties/octodash/properties/invertAxisControl',
type: 'object',
required: ['x', 'y', 'z'],
properties: {
x: {
$id: '#/properties/octodash/properties/invertAxisControl/properties/x',
type: 'boolean',
},
y: {
$id: '#/properties/octodash/properties/invertAxisControl/properties/y',
type: 'boolean',
},
z: {
$id: '#/properties/octodash/properties/invertAxisControl/properties/z',
type: 'boolean',
},
},
},
pollingInterval: {
$id: '#/properties/octodash/properties/pollingInterval',
type: 'integer',
Expand Down Expand Up @@ -318,6 +378,40 @@ const configSchema = {
type: 'string',
pattern: '^(.*)$',
},
showExtruderControl: {
$id: '#/properties/octodash/properties/showExtruderControl',
type: 'boolean',
},
window: {
$id: '#/properties/octodash/properties/window',
type: 'object',
properties: {
width: {
$id: '#/properties/octodash/properties/window/width',
type: 'number',
},
height: {
$id: '#/properties/octodash/properties/window/height',
type: 'number',
},
x: {
$id: '#/properties/octodash/properties/window/x',
type: 'number',
},
y: {
$id: '#/properties/octodash/properties/window/y',
type: 'number',
},
fullscreen: {
$id: '#/properties/octodash/properties/window/fullscreen',
type: 'boolean',
},
backgroundColor: {
$id: '#/properties/octodash/properties/window/backgroundColor',
type: 'string',
},
},
},
},
},
},
Expand Down
Loading