From 615ee73801588fdda28494e490a7525719a3d835 Mon Sep 17 00:00:00 2001 From: pataar Date: Wed, 16 Feb 2022 22:10:16 +0100 Subject: [PATCH] style: use prettier on other file formats as well (#648) --- .eslintrc.json | 11 +- .github/CODE_OF_CONDUCT.md | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/feature_request.md | 3 +- .github/workflows/build.yml | 4 +- .github/workflows/build_size_report.yml | 8 +- .github/workflows/code_style.yml | 6 +- .prettierrc | 24 +- CONTRIBUTING.md | 11 +- README.md | 24 +- docker-compose.yml | 6 +- index.html | 51 ++-- package.json | 195 +++++++-------- public/manifest.json | 44 ++-- src/components/CommandHelpModal.vue | 24 +- src/components/TheConnectingDialog.vue | 12 +- src/components/TheEditor.vue | 50 ++-- src/components/TheSelectPrinterDialog.vue | 92 ++++--- src/components/TheSettingsMenu.vue | 15 +- src/components/TheSidebar.vue | 29 +-- src/components/TheThrottledStates.vue | 27 +-- .../TheTimelapseRenderingSnackbar.vue | 3 +- src/components/TheTopCornerMenu.vue | 84 ++++--- src/components/TheTopbar.vue | 40 ++- src/components/TheUpdateDialog.vue | 9 +- .../charts/HistoryAllPrintStatus.vue | 3 +- .../charts/HistoryFilamentUsage.vue | 3 +- src/components/charts/HistoryPrinttimeAvg.vue | 3 +- src/components/charts/TempChart.vue | 3 +- src/components/console/ConsoleTable.vue | 3 +- src/components/console/ConsoleTableEntry.vue | 3 +- src/components/gcodeviewer/Viewer.vue | 80 +++--- src/components/inputs/FilamentSensor.vue | 6 +- .../FirmwareRetractionSettingsInput.vue | 6 +- src/components/inputs/MacroButton.vue | 6 +- src/components/inputs/MiscellaneousSlider.vue | 9 +- src/components/inputs/MotionSettingsInput.vue | 6 +- src/components/inputs/NumberInput.vue | 9 +- .../inputs/PressureAdvanceSettingsInput.vue | 6 +- src/components/inputs/ToolInput.vue | 4 +- src/components/inputs/ToolSlider.vue | 8 +- src/components/modals/AboutModal.vue | 9 +- src/components/panels/ControlPanel.vue | 3 +- .../panels/ControlPanelBarsControl.vue | 73 +++--- .../panels/ControlPanelCircleControl.vue | 225 ++++++----------- .../panels/ControlPanelCrossControl.vue | 57 ++--- .../panels/ControlPanelExtruder.vue | 53 ++-- src/components/panels/DependenciesPanel.vue | 6 +- src/components/panels/FarmPrinterPanel.vue | 47 ++-- src/components/panels/GcodefilesPanel.vue | 227 ++++++++---------- src/components/panels/HistoryListPanel.vue | 166 ++++++------- .../panels/HistoryStatisticsPanel.vue | 3 +- src/components/panels/JobqueuePanel.vue | 27 +-- .../panels/KlipperWarningsPanel.vue | 17 +- src/components/panels/KlippyStatePanel.vue | 18 +- .../panels/Machine/ConfigFilesPanel.vue | 201 +++++++--------- .../panels/Machine/EndstopPanel.vue | 13 +- .../panels/Machine/LogfilesPanel.vue | 20 +- src/components/panels/Machine/SystemPanel.vue | 118 ++++----- src/components/panels/Machine/UpdatePanel.vue | 107 ++++----- .../FirmwareRetractionSettings.vue | 12 +- .../MachineSettings/MachineSettingsPanel.vue | 12 +- .../panels/MachineSettings/MotionSettings.vue | 12 +- .../PressureAdvanceSettings.vue | 13 +- src/components/panels/MacrogroupPanel.vue | 6 +- src/components/panels/MacrosPanel.vue | 6 +- src/components/panels/MinSettingsPanel.vue | 14 +- src/components/panels/MiniconsolePanel.vue | 24 +- src/components/panels/MiscellaneousPanel.vue | 9 +- src/components/panels/MoonrakerStatePanel.vue | 14 +- src/components/panels/PowerControlPanel.vue | 21 +- src/components/panels/PrintsettingsPanel.vue | 11 +- src/components/panels/StatusPanel.vue | 227 +++++++++--------- .../panels/StatusPanelExcludeObject.vue | 39 ++- .../panels/StatusPanelExcludeObjectDialog.vue | 9 +- .../StatusPanelExcludeObjectDialogList.vue | 18 +- .../StatusPanelExcludeObjectDialogMap.vue | 18 +- .../panels/Timelapse/TimelapseFilesPanel.vue | 149 ++++++------ .../panels/Timelapse/TimelapseStatusPanel.vue | 55 ++--- src/components/panels/ToolsPanel.vue | 177 ++++++-------- src/components/panels/WebcamPanel.vue | 6 +- src/components/panels/ZoffsetPanel.vue | 79 +++--- .../settings/SettingsConsoleTab.vue | 31 ++- .../settings/SettingsControlTab.vue | 30 +-- .../settings/SettingsDashboardTabDesktop.vue | 30 ++- .../settings/SettingsDashboardTabMobile.vue | 15 +- .../settings/SettingsDashboardTabTablet.vue | 30 ++- .../SettingsDashboardTabWidescreen.vue | 45 ++-- src/components/settings/SettingsEditorTab.vue | 6 +- .../settings/SettingsGCodeViewerTab.vue | 36 +-- .../settings/SettingsGeneralTab.vue | 75 +++--- src/components/settings/SettingsMacrosTab.vue | 3 +- .../settings/SettingsMacrosTabExpert.vue | 60 ++--- .../settings/SettingsMacrosTabSimple.vue | 3 +- .../settings/SettingsPresetsTab.vue | 34 +-- .../settings/SettingsRemotePrintersTab.vue | 33 ++- .../settings/SettingsTimelapseTab.vue | 189 +++++---------- .../settings/SettingsUiSettingsTab.vue | 60 ++--- .../settings/SettingsWebcamsTab.vue | 37 ++- src/components/ui/ConnectionStatus.vue | 57 ++--- src/components/ui/MainsailLogo.vue | 12 +- src/components/ui/Panel.vue | 6 +- src/components/ui/PrinterSelector.vue | 3 +- src/components/ui/SubPanel.vue | 6 +- .../webcams/MjpegstreamerAdaptive.vue | 9 +- src/pages/Console.vue | 24 +- src/pages/Dashboard.vue | 24 +- src/pages/Heightmap.vue | 163 ++++++------- 108 files changed, 1874 insertions(+), 2402 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index e0e42097..f6720b8e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,12 +5,7 @@ "es6": true, "node": true }, - "extends": [ - "plugin:vue/essential", - "eslint:recommended", - "@vue/typescript", - "prettier" - ], + "extends": ["plugin:vue/essential", "eslint:recommended", "@vue/typescript", "prettier"], "globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" @@ -20,7 +15,5 @@ "parser": "@typescript-eslint/parser", "sourceType": "module" }, - "plugins": [ - "vue" - ] + "plugins": ["vue"] } diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index fe13d482..b39f08e2 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -10,4 +10,4 @@ Project maintainers have the right and responsibility to remove, edit, or reject Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/) \ No newline at end of file +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ed4f4559..882c3530 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,7 +4,6 @@ about: Create a report to help us improve title: '' labels: bug assignees: '' - --- **Describe the bug:**\ @@ -18,5 +17,6 @@ If applicable, add screenshots to help explain your problem. **Logfiles:**\ Please upload your Logfiles here or upload them to [pastebin.com](http://pastebin.com) and paste your log links here. + - klippy.log - moonraker.log diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 9e8ab6a6..db3237b1 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- name: Feature request about: Suggest an idea for this project -title: "[FR]" +title: '[FR]' labels: '' assignees: '' - --- **Is your feature request related to a problem? Please describe.** diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1c406c2..3ee24c06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,9 +6,9 @@ name: Build on: # Triggers the workflow on push or pull request events but only for the develop branch push: - branches: [ develop ] + branches: [develop] pull_request: - branches: [ develop ] + branches: [develop] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/.github/workflows/build_size_report.yml b/.github/workflows/build_size_report.yml index d75a9e91..b25edd6c 100644 --- a/.github/workflows/build_size_report.yml +++ b/.github/workflows/build_size_report.yml @@ -1,7 +1,7 @@ name: Build Size Report on: pull_request_target: - types: [ labeled ] + types: [labeled] jobs: check: runs-on: ubuntu-latest @@ -14,8 +14,8 @@ jobs: - uses: preactjs/compressed-size-action@v2 with: strip-hash: "\\b\\w{8}\\." - pattern: "./dist/**/*.{js,css,html,json,woff2,svg,png}" - exclude: "{./dist/manifest.json,./dist/build.zip,**/*.map,**/node_modules/**}" + pattern: './dist/**/*.{js,css,html,json,woff2,svg,png}' + exclude: '{./dist/manifest.json,./dist/build.zip,**/*.map,**/node_modules/**}' - uses: actions-ecosystem/action-remove-labels@v1 with: - labels: analyze # analyze complete, remote the label afterwards \ No newline at end of file + labels: analyze # analyze complete, remote the label afterwards diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index 9e7571ae..486343ef 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -6,10 +6,10 @@ name: Code style check on: # Triggers the workflow on push or pull request events but only for the develop branch push: - branches: [ develop ] + branches: [develop] pull_request: branches: - - "*" + - '*' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -40,4 +40,4 @@ jobs: prettier: true eslint_dir: src eslint_extensions: ts,vue - prettier_dir: src \ No newline at end of file + prettier_dir: src diff --git a/.prettierrc b/.prettierrc index d4888a43..9e605d90 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,22 @@ { - "tabWidth": 4, - "singleQuote": true, - "semi": false, - "printWidth": 120 + "tabWidth": 4, + "singleQuote": true, + "semi": false, + "printWidth": 120, + "bracketSameLine": true, + "htmlWhitespaceSensitivity": "ignore", + "overrides": [ + { + "files": "*.yml", + "options": { + "tabWidth": 2 + } + }, + { + "files": "*.md", + "options": { + "tabWidth": 2 + } + } + ] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94956a2d..c8e212d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,12 +19,13 @@ Hi! I'm really excited that you are interested in contributing to Mainsail. Befo - It's OK to have multiple small commits as you work on the PR - GitHub will automatically squash it before merging. - If adding a new feature: - - Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it. + + - Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it. - If fixing bug: - - If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`. - - Provide a detailed description of the bug in the PR. Live demo preferred. - - Add appropriate test coverage if applicable. + - If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`. + - Provide a detailed description of the bug in the PR. Live demo preferred. + - Add appropriate test coverage if applicable. ## Committing Changes @@ -39,4 +40,4 @@ As a pure community-driven project without major corporate backing, we also welc ## Credits -Thank you to all the people who have already contributed to Mainsail! \ No newline at end of file +Thank you to all the people who have already contributed to Mainsail! diff --git a/README.md b/README.md index 2178dd09..b5f607ba 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@

# Mainsail + [![downloads](https://img.shields.io/github/downloads/mainsail-crew/mainsail/total?style=flat-square)](https://github.com/mainsail-crew/mainsail/releases) [![localizations](https://shields-staging.herokuapp.com/github/directory-file-count/mainsail-crew/mainsail/src%2Flocales?label=localizations&extension=json&type=file&style=flat-square)](https://docs.mainsail.xyz/development/localization) [![stars](https://img.shields.io/github/stars/meteyou/mainsail?style=flat-square)](https://github.com/mainsail-crew/mainsail/stargazers) [![forks](https://img.shields.io/github/forks/meteyou/mainsail?style=flat-square)](https://github.com/mainsail-crew/mainsail/network/members) [![license](https://img.shields.io/github/license/meteyou/mainsail?style=flat-square)](https://github.com/mainsail-crew/mainsail/blob/develop/LICENSE) [![last-commit](https://img.shields.io/github/last-commit/meteyou/mainsail?style=flat-square)](https://github.com/mainsail-crew/mainsail/commits/) ![size](https://img.shields.io/github/repo-size/meteyou/mainsail?style=flat-square) [![discord](https://img.shields.io/discord/758059413700345988?color=%235865F2&label=discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/skWTwTD) [![patreons](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dmeteyou%26type%3Dpatrons&style=flat-square)](https://www.patreon.com/meteyou) @@ -17,10 +18,12 @@ Mainsail is also available in remote mode on [http://my.mainsail.xyz](http://my. [Release Notes](https://github.com/mainsail-crew/mainsail/releases) ## Screenshots + ![screenshot-dashboard](https://raw.githubusercontent.com/mainsail-crew/docs/master/assets/img/screenshot.png) ![Features](https://raw.githubusercontent.com/mainsail-crew/docs/master/assets/img/features.png) -## Features +## Features + - Responsive web interface, optimized for desktops, tablets and mobile devices - Supports multiple 3D printers (Printer Farm) - Localization (i18n) @@ -40,21 +43,24 @@ Mainsail is also available in remote mode on [http://my.mainsail.xyz](http://my. - Exclude objects (not yet officially supported by Klipper) ## Help and Support -Do you need help or just want to talk? Join our active community on [Discord](https://discord.gg/skWTwTD). + +Do you need help or just want to talk? Join our active community on [Discord](https://discord.gg/skWTwTD). Have you found a bug? Please create an [Issue](https://github.com/mainsail-crew/mainsail/issues) in GitHub and let us know. ## Support Mainsail + Mainsail is primarily developed and maintained by meteyou. To keep the project going he invests his free time, almost every day. To motivate him (β˜•πŸΊπŸ˜œ) there are several ways to support him: -[![patreon](https://img.shields.io/badge/patreon-participate-yellow.svg?style=flat-square)](https://www.patreon.com/meteyou) -[![kofi](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=flat-square)](https://ko-fi.com/mainsail) +[![patreon](https://img.shields.io/badge/patreon-participate-yellow.svg?style=flat-square)](https://www.patreon.com/meteyou) +[![kofi](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=flat-square)](https://ko-fi.com/mainsail) ## Credit, sources and inspiration -* [Kevin O'Connor](https://github.com/KevinOConnor) for the awesome 3D printer firmware [Klipper](https://github.com/KevinOConnor/klipper) -* [Eric Callahan (arksine)](https://github.com/Arksine) for [Moonraker (Klipper API)](https://github.com/Arksine/moonraker). Without Moonraker, Mainsail would not be possible. -* [lixxbox](https://github.com/lixxbox) for the Mainsail logo & Docs -* [Vue.js](https://vuejs.org/): The Progressive JavaScript Framework -* [Vuetify](https://vuetifyjs.com/): Material Design Component Framework for Vue.js + +- [Kevin O'Connor](https://github.com/KevinOConnor) for the awesome 3D printer firmware [Klipper](https://github.com/KevinOConnor/klipper) +- [Eric Callahan (arksine)](https://github.com/Arksine) for [Moonraker (Klipper API)](https://github.com/Arksine/moonraker). Without Moonraker, Mainsail would not be possible. +- [lixxbox](https://github.com/lixxbox) for the Mainsail logo & Docs +- [Vue.js](https://vuejs.org/): The Progressive JavaScript Framework +- [Vuetify](https://vuetifyjs.com/): Material Design Component Framework for Vue.js Massive thanks to the whole [Voron Design](http://vorondesign.com/) community. Without them such a project would not be possible. diff --git a/docker-compose.yml b/docker-compose.yml index 0515cf76..b14fe680 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: "3.8" +version: '3.8' services: api: build: @@ -12,7 +12,7 @@ services: - ./docker/config/moonraker:/home/node/.moonraker_database container_name: mainsail-stack-api ports: - - "7125:7125" + - '7125:7125' networks: - dev_net npm: @@ -30,7 +30,7 @@ services: - ./index.html:/home/node/mainsail/index.html container_name: mainsail-stack-npm ports: - - "8080:8080" + - '8080:8080' depends_on: - api networks: diff --git a/index.html b/index.html index ff992e66..26f6a356 100644 --- a/index.html +++ b/index.html @@ -1,30 +1,31 @@ - - - - - Mainsail + + + + + Mainsail - - - - - - - - - - - + + + + + + + + + + + - - - - -
- + + + + +
+ diff --git a/package.json b/package.json index 48725dd9..b302ff7e 100644 --- a/package.json +++ b/package.json @@ -1,100 +1,101 @@ { - "name": "mainsail", - "version": "2.2.0-alpha", - "private": true, - "decription": "a klipper web interface", - "author": { - "name": "Stefan Dej" - }, - "scripts": { - "serve": "vite serve", - "build": "vite build && npm run build.zip", - "format": "prettier --write src vite.config.ts", - "format:check": "prettier --check src vite.config.ts", - "lint": "eslint --ext .ts,.vue --ignore-path .gitignore src", - "lint:fix": "eslint --ext .ts,.vue --ignore-path .gitignore src --fix", - "build.zip": "cd ./dist && zip -r mainsail.zip ./ && cd ..", - "i18n-extract": "vue-i18n-extract use-config" - }, - "dependencies": { - "@codemirror/basic-setup": "^0.19.0", - "@codemirror/highlight": "^0.19.6", - "@codemirror/lang-javascript": "^0.19.3", - "@codemirror/lang-json": "^0.19.1", - "@codemirror/language": "^0.19.7", - "@codemirror/legacy-modes": "^0.19.0", - "@codemirror/search": "^0.19.4", - "@codemirror/state": "^0.19.6", - "@codemirror/stream-parser": "^0.19.2", - "@codemirror/view": "^0.19.28", - "@sindarius/gcodeviewer": "^2.1.17", - "@types/node": "^16.11.22", - "@types/overlayscrollbars": "^1.12.1", - "axios": "^0.26.0", - "core-js": "^3.16.0", - "echarts": "^5.2.2", - "echarts-for-vue": "^1.4.1", - "echarts-gl": "^2.0.8", - "js-sha256": "^0.9.0", - "overlayscrollbars": "^1.13.1", - "overlayscrollbars-vue": "^0.2.2", - "regenerator-runtime": "^0.13.9", - "semver": "^7.3.5", - "uuid": "^8.3.2", - "vue": "^2.6.14", - "vue-class-component": "^7.2.6", - "vue-i18n": "^8.25.0", - "vue-load-image": "^0.2.0", - "vue-meta": "^2.4.0", - "vue-observe-visibility": "^1.0.0", - "vue-property-decorator": "^9.1.2", - "vue-toast-notification": "^0.6.1", - "vuedraggable": "^2.24.3", - "vuetify": "^2.6.1", - "vuex": "^3.6.2" - }, - "devDependencies": { - "@intlify/vite-plugin-vue-i18n": "^2.5.0", - "@mdi/font": "^6.2.95", - "@types/semver": "^7.3.8", - "@types/uuid": "^8.3.1", - "@typescript-eslint/eslint-plugin": "^5.11.0", - "@typescript-eslint/parser": "^5.11.0", - "@vue/composition-api": "^1.0.5", - "@vue/eslint-config-typescript": "^10.0.0", - "autoprefixer": "^10.4.2", - "eslint": "^8.9.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-vue": "^8.4.1", - "prettier": "^2.5.1", - "sass": "~1.32", - "typescript": "^4.5.5", - "unplugin-vue-components": "0.17.11", - "vite": "^2.7.13", - "vite-plugin-checker": "^0.4.2", - "vite-plugin-package-version": "^1.0.2", - "vite-plugin-vue2": "^1.9.3", - "vue-debounce-decorator": "^1.0.1", - "vue-i18n-extract": "^1.2.3", - "vue-router": "^3.5.2", - "vue-template-compiler": "^2.6.14" - }, - "postcss": { - "plugins": { - "autoprefixer": {} + "name": "mainsail", + "version": "2.2.0-alpha", + "private": true, + "decription": "a klipper web interface", + "author": { + "name": "Stefan Dej" + }, + "scripts": { + "serve": "vite serve", + "build": "vite build && npm run build.zip", + "format": "npm run format:base -- --write", + "format:base": "prettier .prettierrc src vite.config.ts package.json public/manifest.json .eslintrc.json .github/ index.html *.yml *.md", + "format:check": "npm run format:base -- --check", + "lint": "eslint --ext .ts,.vue --ignore-path .gitignore src", + "lint:fix": "eslint --ext .ts,.vue --ignore-path .gitignore src --fix", + "build.zip": "cd ./dist && zip -r mainsail.zip ./ && cd ..", + "i18n-extract": "vue-i18n-extract use-config" + }, + "dependencies": { + "@codemirror/basic-setup": "^0.19.0", + "@codemirror/highlight": "^0.19.6", + "@codemirror/lang-javascript": "^0.19.3", + "@codemirror/lang-json": "^0.19.1", + "@codemirror/language": "^0.19.7", + "@codemirror/legacy-modes": "^0.19.0", + "@codemirror/search": "^0.19.4", + "@codemirror/state": "^0.19.6", + "@codemirror/stream-parser": "^0.19.2", + "@codemirror/view": "^0.19.28", + "@sindarius/gcodeviewer": "^2.1.17", + "@types/node": "^16.11.22", + "@types/overlayscrollbars": "^1.12.1", + "axios": "^0.26.0", + "core-js": "^3.16.0", + "echarts": "^5.2.2", + "echarts-for-vue": "^1.4.1", + "echarts-gl": "^2.0.8", + "js-sha256": "^0.9.0", + "overlayscrollbars": "^1.13.1", + "overlayscrollbars-vue": "^0.2.2", + "regenerator-runtime": "^0.13.9", + "semver": "^7.3.5", + "uuid": "^8.3.2", + "vue": "^2.6.14", + "vue-class-component": "^7.2.6", + "vue-i18n": "^8.25.0", + "vue-load-image": "^0.2.0", + "vue-meta": "^2.4.0", + "vue-observe-visibility": "^1.0.0", + "vue-property-decorator": "^9.1.2", + "vue-toast-notification": "^0.6.1", + "vuedraggable": "^2.24.3", + "vuetify": "^2.6.1", + "vuex": "^3.6.2" + }, + "devDependencies": { + "@intlify/vite-plugin-vue-i18n": "^2.5.0", + "@mdi/font": "^6.2.95", + "@types/semver": "^7.3.8", + "@types/uuid": "^8.3.1", + "@typescript-eslint/eslint-plugin": "^5.11.0", + "@typescript-eslint/parser": "^5.11.0", + "@vue/composition-api": "^1.0.5", + "@vue/eslint-config-typescript": "^10.0.0", + "autoprefixer": "^10.4.2", + "eslint": "^8.9.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-vue": "^8.4.1", + "prettier": "^2.5.1", + "sass": "~1.32", + "typescript": "^4.5.5", + "unplugin-vue-components": "0.17.11", + "vite": "^2.7.13", + "vite-plugin-checker": "^0.4.2", + "vite-plugin-package-version": "^1.0.2", + "vite-plugin-vue2": "^1.9.3", + "vue-debounce-decorator": "^1.0.1", + "vue-i18n-extract": "^1.2.3", + "vue-router": "^3.5.2", + "vue-template-compiler": "^2.6.14" + }, + "postcss": { + "plugins": { + "autoprefixer": {} + } + }, + "browserslist": [ + "> 1%", + "not dead", + "not op_mini all", + "last 2 chrome major versions", + "last 2 firefox major versions", + "last 2 safari major versions", + "last 2 opera major versions", + "last 2 edge major versions" + ], + "engines": { + "node": "^16" } - }, - "browserslist": [ - "> 1%", - "not dead", - "not op_mini all", - "last 2 chrome major versions", - "last 2 firefox major versions", - "last 2 safari major versions", - "last 2 opera major versions", - "last 2 edge major versions" - ], - "engines": { - "node": "^16" - } } diff --git a/public/manifest.json b/public/manifest.json index fbd2c661..0d4cc118 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,23 +1,23 @@ { - "short_name": "Mainsail", - "name": "Mainsail", - "display": "standalone", - "scope" : "/", - "start_url" : "/", - "theme_color": "#D51F26", - "background_color": "#121212", - "icons": [ - { - "src": "/img/icons/icon-196-maskable.png", - "sizes": "196x196", - "type": "image/png", - "purpose": "any maskable" - }, - { - "src": "/img/icons/icon-512-maskable.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "any maskable" - } - ] -} \ No newline at end of file + "short_name": "Mainsail", + "name": "Mainsail", + "display": "standalone", + "scope": "/", + "start_url": "/", + "theme_color": "#D51F26", + "background_color": "#121212", + "icons": [ + { + "src": "/img/icons/icon-196-maskable.png", + "sizes": "196x196", + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "/img/icons/icon-512-maskable.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any maskable" + } + ] +} diff --git a/src/components/CommandHelpModal.vue b/src/components/CommandHelpModal.vue index e78d149f..37894b82 100644 --- a/src/components/CommandHelpModal.vue +++ b/src/components/CommandHelpModal.vue @@ -10,8 +10,7 @@ color="lightgray" :small="isMini" v-bind="attrs" - v-on="on" - > + v-on="on"> mdi-help @@ -21,8 +20,7 @@ :title="$t('Console.CommandList')" icon="mdi-help" card-class="command-help-dialog" - :margin-bottom="false" - > + :margin-bottom="false"> @@ -35,8 +33,7 @@ outlined hide-details clearable - dense - > + dense> @@ -50,20 +47,19 @@ v-for="cmd of helplistFiltered" :key="cmd.commandLow" class="px-0" - two-line - > + two-line> {{ cmd.command }} - {{ - cmd.description - }} + "> + {{ cmd.command }} + + + {{ cmd.description }} + diff --git a/src/components/TheConnectingDialog.vue b/src/components/TheConnectingDialog.vue index 8bac6dc2..71552933 100644 --- a/src/components/TheConnectingDialog.vue +++ b/src/components/TheConnectingDialog.vue @@ -7,12 +7,12 @@ - - + + diff --git a/src/components/TheEditor.vue b/src/components/TheEditor.vue index 29a4565c..a1934360 100644 --- a/src/components/TheEditor.vue +++ b/src/components/TheEditor.vue @@ -9,8 +9,7 @@ hide-overlay :transition="false" @close="close" - @keydown.esc="escClose" - > + @keydown.esc="escClose"> + "> @@ -58,27 +58,26 @@ ref="editor" v-model="sourcecode" :name="filename" - v-bind:file-extension="fileExtension" - > + v-bind:file-extension="fileExtension">
- {{ snackbarHeadline }}
+ {{ snackbarHeadline }} +
{{ filename }}
@@ -114,15 +110,14 @@ :to="category.path" class="small-list-item" v-bind="attrs" - v-on="on" - > + v-on="on"> mdi-{{ category.icon }} - {{ - $t(`Router.${category.title}`) - }} + + {{ $t(`Router.${category.title}`) }} + diff --git a/src/components/TheThrottledStates.vue b/src/components/TheThrottledStates.vue index 5039e37d..3cf05bb9 100644 --- a/src/components/TheThrottledStates.vue +++ b/src/components/TheThrottledStates.vue @@ -6,8 +6,7 @@ :offset-y="true" :close-on-content-click="false" v-model="showMenu" - v-if="throttledStateFlags.length" - > + v-if="throttledStateFlags.length"> @@ -117,20 +114,22 @@ - {{ - this.dialogPowerDeviceChange.value === 'off' - ? $t('PowerDeviceChangeDialog.TurnDeviceOn', { device: dialogPowerDeviceChange.device }) - : $t('PowerDeviceChangeDialog.TurnDeviceOff', { device: dialogPowerDeviceChange.device }) - }} + + {{ + this.dialogPowerDeviceChange.value === 'off' + ? $t('PowerDeviceChangeDialog.TurnDeviceOn', { device: dialogPowerDeviceChange.device }) + : $t('PowerDeviceChangeDialog.TurnDeviceOff', { device: dialogPowerDeviceChange.device }) + }} + {{ $t('PowerDeviceChangeDialog.AreYouSure') }} - {{ - $t('PowerDeviceChangeDialog.No') - }} - {{ - $t('PowerDeviceChangeDialog.Yes') - }} + + {{ $t('PowerDeviceChangeDialog.No') }} + + + {{ $t('PowerDeviceChangeDialog.Yes') }} + @@ -139,8 +138,7 @@ card-class="confirm-top-corner-menu-dialog" icon="mdi-alert" :title="dialogConfirmation.title" - :margin-bottom="false" - > + :margin-bottom="false"> diff --git a/src/components/TheTopbar.vue b/src/components/TheTopbar.vue index 32ff946a..78d6fc5a 100644 --- a/src/components/TheTopbar.vue +++ b/src/components/TheTopbar.vue @@ -32,8 +32,7 @@ :src="sidebarLogo" style="height: 32px" class="nav-logo ml-4 mr-1 d-none d-sm-flex" - alt="Logo" - /> + alt="Logo" /> {{ printerName }} @@ -55,8 +53,7 @@ ref="fileUploadAndStart" :accept="validGcodeExtensions.join(', ')" style="display: none" - @change="uploadAndStart" - /> + @change="uploadAndStart" /> - mdi-content-save{{ $t('App.TopBar.SAVE_CONFIG') }} + @click="saveConfig"> + mdi-content-save + {{ $t('App.TopBar.SAVE_CONFIG') }} - mdi-file-upload{{ $t('App.TopBar.UploadPrint') }} + @click="btnUploadAndStart"> + mdi-file-upload + {{ $t('App.TopBar.UploadPrint') }} - mdi-alert-circle-outline{{ $t('App.TopBar.EmergencyStop') }} + @click="btnEmergencyStop"> + mdi-alert-circle-outline + {{ $t('App.TopBar.EmergencyStop') }} - {{ $t('App.TopBar.Uploading') }} {{ uploadSnackbar.filename }}
- {{ Math.round(uploadSnackbar.percent) }} % @ {{ formatFilesize(Math.round(uploadSnackbar.speed)) }}/s
+ {{ $t('App.TopBar.Uploading') }} {{ uploadSnackbar.filename }} +
+ {{ Math.round(uploadSnackbar.percent) }} % @ {{ formatFilesize(Math.round(uploadSnackbar.speed)) }}/s +