Compare commits

..
70 Commits
Author SHA1 Message Date
Stefan Dej e8755fa3fc chore: update check_locale.yml to new github workflow output (#1584) 2023-11-18 23:58:56 +01:00
Stefan Dej ec399c2b78 fix: fix ETA 12hour detection if the user use default setting (#1657) 2023-11-18 23:58:14 +01:00
Stefan Dej 46c9d6f627 fix: fix wrong output in temp chart tooltip (#1646) 2023-11-18 23:57:43 +01:00
Stefan Dej 8f96faa9ef fix: fix adding multiple presets (#1636) 2023-11-14 23:04:40 +01:00
dependabot[bot] 3c0b537609 build(deps): bump axios from 0.27.2 to 1.6.0 (#1647)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-12 21:42:40 +01:00
Stefan Dej 182d9541f1 fix: fix hide/show navi points in different languages (#1638) 2023-11-08 20:46:03 +01:00
Stefan Dej 3a651c99a1 fix: fix round issue in git commit list diff calculation (#1637) 2023-11-08 20:45:50 +01:00
Stefan Dej 6ed57fc0d3 feat: add buttons for PURGE_FILAMENT and CLEAN_NOZZLE (#1641) 2023-11-06 20:14:39 +01:00
Pieter Willekens 3666e294e9 build(cliff): add a new way to sort the commit groups (#1592) 2023-11-06 20:13:41 +01:00
Stefan Dej af547b35fe refactor: also allow FILAMENT_LOAD and FILAMENT_UNLOAD macros (#1639) 2023-11-03 23:44:54 +01:00
Stefan Dej 049997a01b chore: add workflow to check PR title for conventional commits (#1640) 2023-11-03 23:43:44 +01:00
srbjessenandStefan Dej e31e8ec2dd locale(da): Update Danish locale (#1634)
Co-authored-by: Stefan Dej <meteyou@gmail.com>
2023-11-02 23:56:39 +01:00
Stefan Dej 6481c6fa25 chore: disable workbox logs (#1629) 2023-10-29 08:37:57 +01:00
BahoueandStefan Dej b445c8d5b8 locale(fr):Correction of the term Unretract (#1628)
Co-authored-by: Stefan Dej <meteyou@gmail.com>
2023-10-26 18:23:06 +02:00
Stefan Dej c14873a8a5 fix: fix filament type check in StartPrintDialog (#1620) 2023-10-22 20:48:02 +02:00
Bahoue 6e21642deb locale(fr):correction of several errors (#1614) 2023-10-19 20:12:53 +02:00
dependabot[bot] 6001c9210f build(deps-dev): bump @babel/traverse from 7.23.0 to 7.23.2 (#1615)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-19 20:12:05 +02:00
Stefan Dej f35252ec8b fix: allow null as spool id response from spoolman (#1611) 2023-10-18 20:23:36 +02:00
Bahoue 5cd5aa42a4 locale(fr): French full translation (#1613) 2023-10-17 22:49:26 +02:00
GiadejandStefan Dej 07795429a9 locale(it): fix several old translation errors (#1609)
Co-authored-by: Stefan Dej <meteyou@gmail.com>
2023-10-16 22:21:06 +02:00
rackrick 789a4c2f6a feat: rework spoolman change dialog to display spool ids (#1605)
* fix: show spool id as tooltip

Signed-off-by: Patrick Stainbrook <patrick@hohestadt.de>

* feat: rework spoolman change dialog to display spool ids

Signed-off-by: Patrick Stainbrook <patrick@hohestadt.de>

* refact: move digit calculation to SpoolmanChangeSpoolDialog

Signed-off-by: Patrick Stainbrook <patrick@hohestadt.de>

---------

Signed-off-by: Patrick Stainbrook <patrick@hohestadt.de>
2023-10-15 20:09:11 +02:00
GiadejandStefan Dej edc2af4d4c locale(it): Italian translation completed and more fixes (#1608)
Co-authored-by: Stefan Dej <meteyou@gmail.com>
2023-10-15 18:25:09 +02:00
Giadej e1a754abdc locale(it): Italian translation of the Spoolman module (#1606) 2023-10-14 14:32:36 +02:00
Bahoué 4d2caeb3e7 locale(fr): French translation of the Spoolman module (#1598) 2023-10-12 21:05:57 +02:00
DaviteuszandStefan Dej b6f32c077c locale(pl): Update Polish translations (#1593)
Co-authored-by: Stefan Dej <meteyou@gmail.com>
2023-10-12 21:04:43 +02:00
Samuel Wang 932a2c35b1 locale(zh): Update Chinese (zh) localization (#1595) 2023-10-08 09:54:34 +02:00
Pieter Willekens 32122348b3 perf(vite): chunk webcams, locales and large libraries (#1578) 2023-10-07 23:00:35 +02:00
Pieter Willekens 817efba0d8 ci(docker): ensure that the docker images are tagged correctly (#1591) 2023-10-07 21:50:06 +02:00
meteyou 298eae8cbf docs(changelog): update changelog 2023-10-07 18:51:44 +00:00
Stefan Dej 5b62b97420 chore: fix ftp upload in release workflow (#1590) 2023-10-07 20:48:29 +02:00
github-actions c8a1e8cb79 chore: push version number to v2.8.0 2023-10-07 18:29:49 +00:00
Stefan Dej e445fbe5cc fix: fix webcam switch button (#1589) 2023-10-07 20:28:46 +02:00
Samuel Wang 09a994d854 locale(zh): Update Chinese (zh) localization (#1588) 2023-10-07 19:05:11 +02:00
Stefan Dej 1a7aca6680 fix: fix webcam flip in timelapse preview (#1587) 2023-10-07 17:16:00 +02:00
Stefan Dej a3e74aa57a fix: fix WebRTC (camera-streamer) port with external instance (#1586) 2023-10-07 15:16:31 +02:00
Stefan Dej cd1b9b85bd locale(en): remove unused keys in english locale (#1585) 2023-10-07 14:36:40 +02:00
Stefan Dej 4970d0218a locale(de): update german translations (#1583) 2023-10-07 14:34:45 +02:00
Stefan Dejanddw-0 82e3dd8b18 feat: add optional background color for big gcode thumbnails (#1535)
Co-authored-by: dw-0 <domwil1091+github@gmail.com>
2023-10-07 12:54:41 +02:00
Stefan Dej 3994a8ebe8 refactor: update webcam "WebRTC MediaMTX" client (#1558) 2023-10-07 12:08:49 +02:00
Pieter Willekens 8a43ecafd1 build(dependabot): add Dependabot to the repository (#1577) 2023-10-06 22:19:52 +02:00
Stefan Dej d8430f54ed feat: add spoolman support (#1542) 2023-10-06 21:22:46 +02:00
Stefan Dej 5734f1cd1d feat: add monitors (like TMC2240) to Temperature Panel (#1532) 2023-10-06 21:12:07 +02:00
Stefan Dej 7d86df0c81 fix: fix wrong date function in multiple files (#1568) 2023-10-04 22:27:01 +02:00
Stefan Dej 2670eb6447 refactor: rework tool color in extruder panel (#1576) 2023-10-04 22:26:48 +02:00
Stefan Dej 5eb50bbcec refactor: remove unused import in store/printer/getters.ts (#1574) 2023-10-04 22:26:33 +02:00
Pieter Willekens 79a5f9a7e4 build: update toolchain to the latest version (#1575) 2023-10-02 20:35:28 +02:00
Daviteusz 8fc0d5c23c locale(pl): Update Polish translations (#1573) 2023-10-01 10:07:36 +02:00
Stefan Dej a28c6fdb03 feat: add 12-hour time format in printers overview (#1571) 2023-10-01 09:54:22 +02:00
Stefan Dej b7914f8de6 fix: fix gcode command for generic_heater in presets (#1569) 2023-10-01 07:47:34 +02:00
Stefan Dej 2b73cce47a fix: fix webcam (camera-streamer) stop autorestart beforeDestory (#1556) 2023-10-01 07:47:22 +02:00
Stefan Dej 890b9969ae refactor: split ExtruderControlPanel.vue in multiple SFC (#1565) 2023-09-24 01:16:59 +02:00
Alejandro Ramos 79014acf7f locale(es): update spanish locale (#1548) 2023-09-23 10:58:42 +02:00
Daviteusz f3fcce3252 locale(pl): update polish locale (#1554) 2023-09-23 10:52:52 +02:00
Stefan Dej e1dd59db15 fix: fix type issue in TemperaturePanelListItem (#1563) 2023-09-20 21:34:33 +02:00
dependabot[bot] 7ae958934f build(deps): bump @cypress/request and cypress (#1560)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 20:22:43 +02:00
dependabot[bot] bf04ec312e build(deps): bump tough-cookie and @cypress/request (#1517)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 20:05:35 +02:00
Stefan Dej 09c2526642 feat: add option to block autoscroll in console (#1519) 2023-09-19 20:04:36 +02:00
Stefan Dej a0ad7e84ab feat: hide Moonraker power devices with a _ as first char (#1545) 2023-09-19 20:04:22 +02:00
Stefan Dej 9a2328ba69 feat: automatic selection of the gcode offset save gcode (#1531) 2023-09-19 20:03:14 +02:00
Stefan Dej 5007646ff0 feat: add warning for outdated browsers (#1537) 2023-09-19 20:01:07 +02:00
Stefan Dej c87586aebb fix: fix macro parameter with spaces (#1551) 2023-09-14 18:35:31 +02:00
Stefan Dej ecaa894fbb refactor: refactor ToolheadControlPanel (#1530) 2023-09-05 07:34:18 +02:00
Stefan Dej e0f51667eb fix: fix some issues with the presets (#1529) 2023-09-05 07:33:56 +02:00
Stefan Dej 9f08afc138 fix: fix missing reset options for print history data (#1534) 2023-09-05 07:33:43 +02:00
Stefan Dej fd293d21ec fix: fix autorestart of webcam camerastreamer (#1546) 2023-09-04 12:05:08 +02:00
Stefan Dej 1aa9f341fa fix: fix min/max positions in heightmap current mesh data panel (#1533) 2023-09-04 12:04:54 +02:00
Daviteusz 98d99d2d11 locale(pl): Update Polish translations (#1544) 2023-09-01 22:43:47 +02:00
rackrick 18a5c732b2 fix: eta time format detection from browser (#1522) 2023-08-22 23:25:12 +02:00
rackrick 871688f3c8 fix: show confirm emergency stop dialog only when turned on (#1526) 2023-08-21 21:45:28 +02:00
meteyou c725fb09f5 docs(changelog): update changelog 2023-08-16 15:15:58 +00:00
159 changed files with 8877 additions and 13408 deletions

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
# Set update schedule for GitHub Actions
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
# Check for updates to GitHub Actions every week
interval: 'weekly'
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
allow:
# Ignore major updates to all dependencies. We're using old versions of some packages that are incompatible with newer versions of other packages.
- dependency-name: '*'
update-type: 'semver:non-major'
dependency-type: 'direct'
assignees:
- 'meteyou'
+2 -2
View File
@@ -12,7 +12,7 @@ jobs:
auto-analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
@@ -27,7 +27,7 @@ jobs:
uses: actions/setup-node@v3
if: contains(steps.changed-file-package-json.outputs.modified_files, 'package.json')
with:
node-version: '16'
node-version: 20
cache: 'npm'
- uses: preactjs/compressed-size-action@v2
+3 -3
View File
@@ -23,12 +23,12 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Fetch repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 20
- name: Install dependencies
run: npm ci
@@ -39,7 +39,7 @@ jobs:
- name: Copy output
run: cp ${{ github.workspace }}/dist/mainsail.zip mainsail-latest.zip
- uses: actions/upload-artifact@v2.2.4
- uses: actions/upload-artifact@v3
with:
name: mainsail-latest.zip
path: mainsail-latest.zip
+1 -1
View File
@@ -8,7 +8,7 @@ jobs:
if: contains(github.event.pull_request.labels.*.name, 'analyze')
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: preactjs/compressed-size-action@v2
+19
View File
@@ -0,0 +1,19 @@
name: Check PR title
on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize
jobs:
lint:
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- uses: aslafy-z/conventional-pr-title-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+4 -4
View File
@@ -13,7 +13,7 @@ jobs:
run: sudo apt install -y jq
- name: Fetch repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
@@ -21,7 +21,7 @@ jobs:
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
- name: Install dependencies
run: npm ci
@@ -43,10 +43,10 @@ jobs:
npm run i18n-extract -- --languageFiles=src/locales/${file##*/} --output=i18n-extract/${file##*/}
MISSING=$(cat i18n-extract/${file##*/} | jq '.missingKeys | length')
UNUSED=$(cat i18n-extract/${file##*/} | jq '.unusedKeys | length')
echo "::set-output name=$file::|${file##*/}|${MISSING}|${UNUSED}|"
echo "$file=|${file##*/}|${MISSING}|${UNUSED}|" >> $GITHUB_OUTPUT
done
- name: Comment PR
uses: thollander/actions-comment-pull-request@v1
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Language file analysis report:
+4 -4
View File
@@ -25,22 +25,22 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Fetch repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run linters
uses: wearerequired/lint-action@v1
uses: wearerequired/lint-action@v2
with:
eslint: true
prettier: true
eslint_dir: src
eslint_extensions: ts,vue
eslint_extensions: ts,vue,json
+1 -1
View File
@@ -16,4 +16,4 @@ jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/label-actions@v2
- uses: dessant/label-actions@v3
+10 -8
View File
@@ -4,7 +4,7 @@ on:
push:
branches: ['master', 'develop']
tags:
- '*'
- 'v*'
pull_request:
branches:
- '*'
@@ -22,10 +22,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
@@ -33,21 +33,23 @@ jobs:
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
type=edge,branch=develop
type=ref,event=tag
type=semver,pattern=v{{major}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
+4 -4
View File
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone develop repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
ref: 'develop'
@@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Fetch repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: 'master'
fetch-depth: 0
@@ -61,7 +61,7 @@ jobs:
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- name: Install dependencies
run: npm ci
@@ -80,7 +80,7 @@ jobs:
echo "TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT
- name: Generate a changelog
uses: orhun/git-cliff-action@v1
uses: orhun/git-cliff-action@v2
id: generate-changelog
with:
config: ./cliff-release.toml
+2 -2
View File
@@ -14,12 +14,12 @@ jobs:
# container: cypress/browsers:node16.13.2-chrome97-ff96
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- name: Install dependencies
run: npm ci
+1
View File
@@ -4,6 +4,7 @@
"semi": false,
"printWidth": 120,
"bracketSameLine": true,
"trailingComma": "es5",
"htmlWhitespaceSensitivity": "ignore",
"overrides": [
{
+1115 -1055
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -1,7 +1,7 @@
#
# Builder stage, builds the application in node
#
FROM --platform=$BUILDPLATFORM node:18-alpine as builder
FROM --platform=$BUILDPLATFORM node:20-alpine as builder
RUN apk add zip
+28 -14
View File
@@ -9,11 +9,11 @@ header = """
# https://tera.netlify.app/docs/#introduction
body = """
{% for group, commits in commits | group_by(attribute="group") %}\
### {{ group | split(pat="$") | last | upper_first }}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits
| filter(attribute="scope")
| sort(attribute="scope") %}
- **{{commit.scope}}**: {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }})\
- **{{commit.scope}}**: {{ commit.message | upper_first | trim }}\
{%- if commit.breaking %}
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
{%- endif -%}
@@ -23,7 +23,7 @@ body = """
{%- if commit.scope -%}
{% else -%}
{% raw %}\n{% endraw %}\
- {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }})\
- {{ commit.message | upper_first | trim }}\
{%- if commit.breaking %}
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
{%- endif -%}
@@ -39,6 +39,12 @@ trim = true
footer = """
"""
# postprocessors
postprocessors = [
{ pattern = '<REPO>', replace = "https://github.com/mainsail-crew/mainsail" }, # replace repository URL
]
[git]
# allow only conventional commits
# https://www.conventionalcommits.org
@@ -46,21 +52,29 @@ conventional_commits = true
filter_unconventional = true
# regex for parsing and grouping commits
commit_parsers = [
# Commits to skip
{ message = "^docs\\(changelog\\):", group = "Changelog", skip = true}, # Old redundant commits
{ message = "^chore\\(changelog\\): update changelog", group = "Changelog", skip = true}, # Old redundant commits
{ message = "^chore: push version number to", group = "9$Other", skip = true}, # Old redundant commits
{ message = "^feat(\\(.*\\))?:", group = "1$Features"},
{ message = "^feature(\\(.*\\))?:", group = "1$Features"},
{ message = "^fix(\\(.*\\))?:", group = "2$Bug Fixes and Improvements"},
{ message = "^docs(\\(.*\\))?:", group = "7$Documentation"},
{ message = "^perf(\\(.*\\))?:", group = "3$Performance"},
{ message = "^refactor(\\(.*\\))?:", group = "4$Refactor"},
{ message = "^style(\\(.*\\))?:", group = "5$Styling"},
{ message = "^test(\\(.*\\))?:", group = "9$Other"},
{ message = "^locale(\\(.*\\))?:", group = "6$Localization"},
{ message = "^chore(\\(.*\\))?:", group = "9$Other"},
{ message = "^chore\\(changelog\\): update changelog", group = "Changelog", skip = true}, # Old redundant commits
# Commits to parse
{ message = "^feat(\\(.*\\))?:", group = "<!-- 1 -->Features"},
{ message = "^feature(\\(.*\\))?:", group = "<!-- 1 -->Features"},
{ message = "^fix(\\(.*\\))?:", group = "<!-- 2 -->Bug Fixes and Improvements"},
{ message = "^perf(\\(.*\\))?:", group = "<!-- 3 -->Performance"},
{ message = "^refactor(\\(.*\\))?:", group = "<!-- 4 -->Refactor"},
{ message = "^style(\\(.*\\))?:", group = "<!-- 5 -->Styling"},
{ message = "^locale(\\(.*\\))?:", group = "<!-- 6 -->Localization"},
{ message = "^docs(\\(.*\\))?:", group = "<!-- 7 -->Documentation"},
{ message = "^test(\\(.*\\))?:", group = "<!-- 8 -->Other"},
{ message = "^chore(\\(.*\\))?:", group = "<!-- 8 -->Other"},
{ body = ".*security", group = "Security"},
]
commit_preprocessors = [
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/pull/${2}))" },
]
# filter out the commits that are not matched by commit parsers
filter_commits = true
ignore_tags="v*-(beta|rc)*"
+29 -15
View File
@@ -17,11 +17,11 @@ body = """
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}\
### {{ group | split(pat="$") | last | upper_first }}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits
| filter(attribute="scope")
| sort(attribute="scope") %}
- **{{commit.scope}}**: {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }})\
- **{{commit.scope}}**: {{ commit.message | upper_first | trim }}\
{%- if commit.breaking %}
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
{%- endif -%}
@@ -30,7 +30,7 @@ body = """
{%- if commit.scope -%}
{% else -%}
{% raw %}\n{% endraw %}\
- {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }})\
- {{ commit.message | upper_first | trim }}\
{%- if commit.breaking %}
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
{%- endif -%}
@@ -45,6 +45,11 @@ trim = true
footer = """
"""
# postprocessors
postprocessors = [
{ pattern = '<REPO>', replace = "https://github.com/mainsail-crew/mainsail" }, # replace repository URL
]
[git]
# allow only conventional commits
# https://www.conventionalcommits.org
@@ -52,21 +57,30 @@ conventional_commits = true
filter_unconventional = false
# regex for parsing and grouping commits
commit_parsers = [
# Commits to skip
{ message = "^docs\\(changelog\\):", group = "Changelog", skip = true}, # Old redundant commits
{ message = "^chore\\(changelog\\): update changelog", group = "Changelog", skip = true}, # Old redundant commits
{ message = "^chore: push version number to", group = "9$Other", skip = true}, # Old redundant commits
{ message = "^feat(\\(.*\\))?:", group = "1$Features"},
{ message = "^feature(\\(.*\\))?:", group = "1$Features"},
{ message = "^fix(\\(.*\\))?:", group = "2$Bug Fixes and Improvements"},
{ message = "^docs(\\(.*\\))?:", group = "7$Documentation"},
{ message = "^perf(\\(.*\\))?:", group = "3$Performance"},
{ message = "^refactor(\\(.*\\))?:", group = "4$Refactor"},
{ message = "^style(\\(.*\\))?:", group = "5$Styling"},
{ message = "^test(\\(.*\\))?:", group = "9$Other"},
{ message = "^locale(\\(.*\\))?:", group = "6$Localization"},
{ message = "^chore(\\(.*\\))?:", group = "9$Other"},
{ body = ".*security", group = "Security"},
{ message = "^chore\\(changelog\\): update changelog", group = "Changelog", skip = true}, # Old redundant commits
# Commits to parse
{ message = "^feat(\\(.*\\))?:", group = "<!-- 1 -->Features"},
{ message = "^feature(\\(.*\\))?:", group = "<!-- 1 -->Features"},
{ message = "^fix(\\(.*\\))?:", group = "<!-- 2 -->Bug Fixes and Improvements"},
{ message = "^perf(\\(.*\\))?:", group = "<!-- 3 -->Performance"},
{ message = "^refactor(\\(.*\\))?:", group = "<!-- 4 -->Refactor"},
{ message = "^style(\\(.*\\))?:", group = "<!-- 5 -->Styling"},
{ message = "^locale(\\(.*\\))?:", group = "<!-- 6 -->Localization"},
{ message = "^docs(\\(.*\\))?:", group = "<!-- 7 -->Documentation"},
{ message = "^test(\\(.*\\))?:", group = "<!-- 8 -->Other"},
{ message = "^chore(\\(.*\\))?:", group = "<!-- 8 -->Other"},
{ message = "release v2.1.2", group = "Release"}, # workaround for v2.1.2 release
{ body = ".*security", group = "Security"},
]
commit_preprocessors = [
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/pull/${2}))" },
]
# filter out the commits that are not matched by commit parsers
filter_commits = true
+1 -1
View File
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
+2200 -9594
View File
File diff suppressed because it is too large. Load diff
+20 -17
View File
@@ -1,6 +1,6 @@
{
"name": "mainsail",
"version": "2.7.1",
"version": "2.8.0",
"private": true,
"decription": "a klipper web interface",
"author": {
@@ -34,22 +34,21 @@
"@jaames/iro": "^5.5.2",
"@lezer/highlight": "^1.0.0",
"@sindarius/gcodeviewer": "^3.2.2",
"@types/node": "^18.0.0",
"@types/overlayscrollbars": "^1.12.1",
"@uiw/codemirror-theme-vscode": "^4.19.11",
"axios": "^0.27.0",
"axios": "^1.6.0",
"codemirror": "^6.0.1",
"core-js": "^3.16.0",
"detect-browser": "^5.3.0",
"echarts": "^5.2.2",
"echarts-gl": "^2.0.8",
"hls.js": "^1.3.3",
"jmuxer": "^2.0.5",
"js-sha256": "^0.9.0",
"js-sha256": "^0.10.0",
"lodash.kebabcase": "^4.1.1",
"lodash.throttle": "^4.1.1",
"overlayscrollbars": "^1.13.1",
"overlayscrollbars-vue": "^0.2.2",
"regenerator-runtime": "^0.13.9",
"regenerator-runtime": "^0.14.0",
"resize-observer-polyfill": "^1.5.1",
"semver": "^7.5.2",
"typed_janus_js": "^1.0.14",
@@ -75,24 +74,28 @@
"@types/jmuxer": "^2.0.3",
"@types/lodash.kebabcase": "^4.1.6",
"@types/lodash.throttle": "^4.1.6",
"@types/node": "^20.0.0",
"@types/overlayscrollbars": "^1.12.1",
"@types/semver": "^7.3.8",
"@types/uuid": "^8.3.1",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"@vue/eslint-config-typescript": "^11.0.0",
"@types/uuid": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"autoprefixer": "^10.4.2",
"cypress": "^10.0.0",
"cypress": "^13.2.0",
"eslint": "^8.9.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jsonc": "^2.2.1",
"eslint-plugin-vue": "^9.0.0",
"prettier": "^2.5.1",
"postcss": "^8.4.31",
"postcss-nesting": "^12.0.1",
"prettier": "^3.0.0",
"sass": "~1.32",
"start-server-and-test": "^1.14.0",
"start-server-and-test": "^2.0.0",
"typescript": "^4.5.5",
"unplugin-vue-components": "^0.22.12",
"vite": "^3.2.7",
"vite-plugin-checker": "^0.5.0",
"vite": "^4.4.9",
"vite-plugin-checker": "^0.6.0",
"vite-plugin-package-version": "^1.0.2",
"vite-plugin-pwa": "^0.16.4",
"vite-plugin-vue2": "^2.0.1",
@@ -118,6 +121,6 @@
"last 2 edge major versions"
],
"engines": {
"node": "^16 || ^18"
"node": "^18 || ^20"
}
}
+14 -6
View File
@@ -40,6 +40,7 @@ import TheUploadSnackbar from '@/components/TheUploadSnackbar.vue'
import TheManualProbeDialog from '@/components/dialogs/TheManualProbeDialog.vue'
import TheBedScrewsDialog from '@/components/dialogs/TheBedScrewsDialog.vue'
import TheScrewsTiltAdjustDialog from '@/components/dialogs/TheScrewsTiltAdjustDialog.vue'
import { setAndLoadLocale } from './plugins/i18n'
Component.registerHooks(['metaInfo'])
@@ -162,8 +163,8 @@ export default class App extends Mixins(BaseMixin) {
}
@Watch('language')
languageChanged(newVal: string): void {
this.$i18n.locale = newVal
async languageChanged(newVal: string): Promise<void> {
await setAndLoadLocale(newVal)
}
@Watch('customStylesheet')
@@ -277,6 +278,7 @@ export default class App extends Mixins(BaseMixin) {
@Watch('print_percent')
print_percentChanged(newVal: number): void {
this.drawFavicon(newVal)
this.refreshSpoolman()
}
@Watch('printerIsPrinting')
@@ -284,6 +286,12 @@ export default class App extends Mixins(BaseMixin) {
this.drawFavicon(this.print_percent)
}
refreshSpoolman(): void {
if (this.moonrakerComponents.includes('spoolman')) {
this.$store.dispatch('server/spoolman/refreshActiveSpool', null, { root: true })
}
}
appHeight() {
this.$nextTick(() => {
const doc = document.documentElement
@@ -303,10 +311,10 @@ export default class App extends Mixins(BaseMixin) {
<style>
@import './assets/styles/fonts.css';
@import './assets/styles/toastr.css';
@import './assets/styles/page.scss';
@import './assets/styles/sidebar.scss';
@import './assets/styles/utils.scss';
@import './assets/styles/updateManager.scss';
@import './assets/styles/page.css';
@import './assets/styles/sidebar.css';
@import './assets/styles/utils.css';
@import './assets/styles/updateManager.css';
:root {
--app-height: 100%;
+28 -7
View File
@@ -4,7 +4,10 @@
font-style: normal;
font-display: swap;
font-weight: 100;
src: local('Roboto Thin'), local('Roboto-Thin'), url(/fonts/roboto-thin.woff2) format('woff2');
src:
local('Roboto Thin'),
local('Roboto-Thin'),
url(/fonts/roboto-thin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@@ -14,7 +17,10 @@
font-style: normal;
font-display: swap;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto-light.woff2) format('woff2');
src:
local('Roboto Light'),
local('Roboto-Light'),
url(/fonts/roboto-light.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@@ -24,7 +30,10 @@
font-style: normal;
font-display: swap;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto-regular.woff2) format('woff2');
src:
local('Roboto'),
local('Roboto-Regular'),
url(/fonts/roboto-regular.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@@ -34,7 +43,10 @@
font-style: normal;
font-display: swap;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto-medium.woff2) format('woff2');
src:
local('Roboto Medium'),
local('Roboto-Medium'),
url(/fonts/roboto-medium.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@@ -44,7 +56,10 @@
font-style: normal;
font-display: swap;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto-bold.woff2) format('woff2');
src:
local('Roboto Bold'),
local('Roboto-Bold'),
url(/fonts/roboto-bold.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@@ -54,7 +69,10 @@
font-style: normal;
font-display: swap;
font-weight: 900;
src: local('Roboto Black'), local('Roboto-Black'), url(/fonts/roboto-black.woff2) format('woff2');
src:
local('Roboto Black'),
local('Roboto-Black'),
url(/fonts/roboto-black.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@@ -64,7 +82,10 @@
font-style: normal;
font-display: swap;
font-weight: 400;
src: local('Roboto Mono'), local('Roboto-Mono'), url(/fonts/robotoMono-regular.woff) format('woff');
src:
local('Roboto Mono'),
local('Roboto-Mono'),
url(/fonts/robotoMono-regular.woff) format('woff');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,12 +1,3 @@
@mixin no-select {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.user-select-none {
-webkit-touch-callout: none;
-webkit-user-select: none;
+1 -1
View File
@@ -124,7 +124,7 @@ export default class CommandHelpModal extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
.command-help-content {
overflow-x: hidden;
+1 -1
View File
@@ -341,7 +341,7 @@ export default class TheEditor extends Mixins(BaseMixin) {
}
}
</script>
<style lang="scss" scoped>
<style scoped>
::v-deep .ͼ1 .cm-panel.cm-search *:focus:not(.focus-visible) {
outline: none;
}
+8 -2
View File
@@ -116,8 +116,14 @@ export default class TheFullscreenUpload extends Mixins(BaseMixin) {
z-index: 99999;
visibility: hidden;
opacity: 0;
transition: visibility 200ms, opacity 200ms;
font: bold 42px Oswald, DejaVu Sans, Tahoma, sans-serif;
transition:
visibility 200ms,
opacity 200ms;
font:
bold 42px Oswald,
DejaVu Sans,
Tahoma,
sans-serif;
}
/*noinspection CssUnusedSymbol*/
+3 -1
View File
@@ -238,7 +238,9 @@ export default class TheTopCornerMenu extends Mixins(BaseMixin) {
}
get powerDevices() {
return this.$store.getters['server/power/getDevices']
const devices = this.$store.getters['server/power/getDevices'] ?? []
return devices.filter((device: ServerPowerStateDevice) => !device.device.startsWith('_'))
}
get service_states() {
+5 -2
View File
@@ -267,9 +267,12 @@ export default class TheTopbar extends Mixins(BaseMixin) {
btnEmergencyStop() {
const confirmOnEmergencyStop = this.$store.state.gui.uiSettings.confirmOnEmergencyStop
if (!confirmOnEmergencyStop) this.emergencyStop()
if (confirmOnEmergencyStop) {
this.showEmergencyStopDialog = true
return
}
this.showEmergencyStopDialog = true
this.emergencyStop()
}
emergencyStop() {
+16 -4
View File
@@ -313,15 +313,23 @@ export default class TempChart extends Mixins(BaseMixin) {
const seriesNameTemperature = `${baseSeriesName}-temperature`
const seriesNameTarget = `${baseSeriesName}-target`
if (seriesNameTemperature in dataset.value) output += dataset.value[seriesNameTemperature].toFixed(1)
if (seriesNameTarget in dataset.value) output += ' / ' + dataset.value[seriesNameTarget].toFixed(1)
if (seriesNameTemperature in dataset.value) {
const value = dataset.value[seriesNameTemperature]
output += value !== null ? value.toFixed(1) : '--'
}
if (seriesNameTarget in dataset.value) {
output += ' / '
const value = dataset.value[seriesNameTarget]
output += value !== null ? value.toFixed(1) : '--'
}
output += '°C'
datasetTypesInPercents.forEach((attrKey) => {
const seriesName = `${baseSeriesName}-${attrKey}`
if (!(seriesName in dataset.value)) return
const value = (dataset.value[seriesName] * 100).toFixed(0)
let value = dataset.value[seriesName]
value = value !== null ? (dataset.value[seriesName] * 100).toFixed(0) : '--'
output += ` [ ${value}% ]`
})
@@ -356,7 +364,11 @@ export default class TempChart extends Mixins(BaseMixin) {
// reset tempHistory if working sources are smaller than 80%
if (newVal.length > 0 && newSource.length < this.maxHistory * 0.8) {
this.$socket.emit('server.temperature_store', {}, { action: 'printer/tempHistory/init' })
this.$socket.emit(
'server.temperature_store',
{ include_monitors: true },
{ action: 'printer/tempHistory/init' }
)
}
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
<style scoped lang="scss"></style>
<style scoped></style>
<template>
<div :class="'consoleTable ' + (isMini ? 'mini' : '')">
+1 -1
View File
@@ -1,4 +1,4 @@
<style scoped lang="scss">
<style scoped>
.consoleTableRow {
font-family: 'Roboto Mono', monospace;
font-size: 0.95em;
@@ -0,0 +1,187 @@
<template>
<div>
<v-dialog v-model="showDialog" width="800" persistent :fullscreen="isMobile">
<panel
:title="$t('Panels.SpoolmanPanel.ChangeSpool')"
:icon="mdiAdjust"
card-class="spoolman-change-spool-dialog"
:margin-bottom="false">
<template #buttons>
<v-btn icon tile @click="close">
<v-icon>{{ mdiCloseThick }}</v-icon>
</v-btn>
</template>
<v-card-title>
<v-text-field
v-model="search"
:append-icon="mdiMagnify"
:label="$t('Panels.SpoolmanPanel.Search')"
outlined
dense
hide-details
style="max-width: 300px" />
<v-spacer />
<v-btn
:title="$t('Panels.SpoolmanPanel.Refresh')"
class="px-2 minwidth-0 ml-3"
:loading="loadings.includes('refreshSpools')"
@click="refreshSpools">
<v-icon>{{ mdiRefresh }}</v-icon>
</v-btn>
<v-btn
:title="$t('Panels.SpoolmanPanel.OpenSpoolManager')"
class="px-2 minwidth-0 ml-3"
@click="openSpoolManager">
<v-icon>{{ mdiDatabase }}</v-icon>
</v-btn>
</v-card-title>
<v-card-text class="px-0 pb-0">
<v-data-table
:headers="headers"
:items="spools"
item-key="id"
:search="search"
sort-by="last_used"
:sort-desc="true"
:custom-filter="customFilter">
<template #no-data>
<div class="text-center">{{ $t('Panels.SpoolmanPanel.NoSpools') }}</div>
</template>
<template #no-results>
<div class="text-center">{{ $t('Panels.SpoolmanPanel.NoResults') }}</div>
</template>
<template #item="{ item }">
<SpoolmanChangeSpoolDialogRow
:key="item.id"
:spool="item"
:max_id_digits="max_spool_id_digits"
@set-spool="setSpool" />
</template>
</v-data-table>
</v-card-text>
</panel>
</v-dialog>
</div>
</template>
<script lang="ts">
import Component from 'vue-class-component'
import { Mixins, Prop, Watch } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import Panel from '@/components/ui/Panel.vue'
import { mdiCloseThick, mdiAdjust, mdiDatabase, mdiMagnify, mdiRefresh } from '@mdi/js'
import { ServerSpoolmanStateSpool } from '@/store/server/spoolman/types'
import SpoolmanChangeSpoolDialogRow from '@/components/dialogs/SpoolmanChangeSpoolDialogRow.vue'
@Component({
components: { SpoolmanChangeSpoolDialogRow, Panel },
})
export default class SpoolmanChangeSpoolDialog extends Mixins(BaseMixin) {
mdiAdjust = mdiAdjust
mdiCloseThick = mdiCloseThick
mdiDatabase = mdiDatabase
mdiMagnify = mdiMagnify
mdiRefresh = mdiRefresh
@Prop({ required: true }) declare readonly showDialog: boolean
search = ''
get spools(): ServerSpoolmanStateSpool[] {
return this.$store.state.server.spoolman.spools ?? []
}
get max_spool_id_digits(): number {
const max_id = this.$store.state.server.spoolman.spools.reduce(
(x: number, s: ServerSpoolmanStateSpool) => Math.max(x, s.id),
0
)
return max_id.toString().length
}
get headers() {
return [
{
text: ' ',
align: 'start',
sortable: false,
},
{
text: this.$t('Panels.SpoolmanPanel.Filament'),
align: 'start',
value: 'filament.name',
sortable: false,
},
{
text: this.$t('Panels.SpoolmanPanel.Material'),
align: 'center',
value: 'filament.material',
},
{
text: this.$t('Panels.SpoolmanPanel.LastUsed'),
align: 'end',
value: 'last_used',
},
{
text: this.$t('Panels.SpoolmanPanel.Weight'),
align: 'end',
value: 'remaining_weight',
},
]
}
get spoolManagerUrl() {
return this.$store.state.server.config.config?.spoolman?.server ?? null
}
openSpoolManager() {
window.open(this.spoolManagerUrl, '_blank')
}
mounted() {
this.refresh()
}
refresh() {
this.$store.dispatch('server/spoolman/refreshSpools')
}
close() {
this.$emit('close')
}
refreshSpools() {
this.$store.dispatch('server/spoolman/refreshSpools')
}
customFilter(value: any, search: string, item: ServerSpoolmanStateSpool): boolean {
const querySplits = search.toLowerCase().split(' ')
const searchArray = [
item.comment,
item.filament.name,
item.filament.vendor.name,
item.filament.material,
item.location,
]
for (const query of querySplits) {
const result = searchArray.some((q) => q?.toLowerCase().includes(query))
if (!result) return false
}
return true
}
setSpool(spool: ServerSpoolmanStateSpool) {
this.$store.dispatch('server/spoolman/setActiveSpool', spool.id)
this.close()
}
@Watch('showDialog')
onShowDialogChanged(newVal: boolean) {
if (newVal) this.search = ''
}
}
</script>
@@ -0,0 +1,134 @@
<template>
<tr class="cursor-pointer" @click="setSpoolRow">
<td style="width: 50px" class="pr-0 py-2">
<spool-icon :color="color" style="width: 50px; float: left" class="mr-3" />
</td>
<td class="py-2" style="min-width: 300px">
<v-list-item two-line>
<v-list-item-content class="no--padding">
<div class="text--disabled mb-1">#{{ id }} | {{ vendor }}</div>
<v-list-item-title class="mb-1">
<span class="text--filament">{{ name }}</span>
</v-list-item-title>
</v-list-item-content>
</v-list-item>
<template v-if="location">
<br />
{{ $t('Panels.SpoolmanPanel.Location') }}: {{ location }}
</template>
<template v-if="spool.comment">
<br />
{{ spool.comment }}
</template>
</td>
<td class="text-center text-no-wrap">{{ material }}</td>
<td class="text-right text-no-wrap">{{ last_used }}</td>
<td class="text-right text-no-wrap">
<strong>{{ remaining_weight_format }}</strong>
<small class="ml-1">/ {{ total_weight_format }}</small>
</td>
</tr>
</template>
<script lang="ts">
import Component from 'vue-class-component'
import { Mixins, Prop } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import { ServerSpoolmanStateSpool } from '@/store/server/spoolman/types'
@Component({})
export default class SpoolmanChangeSpoolDialogRow extends Mixins(BaseMixin) {
@Prop({ required: true }) declare readonly spool: ServerSpoolmanStateSpool
@Prop({ required: false }) declare readonly max_id_digits: number
get color() {
const color = this.spool.filament?.color_hex ?? '000'
return `#${color}`
}
get id() {
// add leading zeros depending on max_id digit count
let id: string = this.spool.id.toString()
while (id.length < this.max_id_digits) {
id = '0' + id
}
return id
}
get vendor() {
return this.spool.filament?.vendor?.name ?? 'Unknown'
}
get name() {
return this.spool.filament?.name ?? 'Unknown'
}
get location() {
return this.spool.location
}
get material() {
return this.spool.filament?.material ?? '--'
}
get remaining_weight() {
return this.spool.remaining_weight ?? 0
}
get total_weight() {
return this.spool.filament?.weight ?? 0
}
get remaining_weight_format() {
return `${this.remaining_weight.toFixed(0)}g`
}
get total_weight_format() {
if (this.total_weight < 1000) {
return `${this.total_weight.toFixed(0)}g`
}
let totalRound = Math.round(this.total_weight / 1000)
if (totalRound !== this.total_weight / 1000) {
totalRound = Math.round(this.total_weight / 100) / 10
}
return `${totalRound}kg`
}
get last_used() {
const last_used = this.spool.last_used ?? null
if (!last_used) return this.$t('Panels.SpoolmanPanel.Never')
const date = new Date(this.spool.last_used)
const now = new Date()
const diff = now.getTime() - date.getTime()
if (diff <= 1000 * 60 * 60 * 24) return this.$t('Panels.SpoolmanPanel.Today')
if (diff <= 1000 * 60 * 60 * 24 * 2) return this.$t('Panels.SpoolmanPanel.Yesterday')
if (diff <= 1000 * 60 * 60 * 24 * 14) {
const days = Math.floor(diff / (1000 * 60 * 60 * 24))
return this.$t('Panels.SpoolmanPanel.DaysAgo', { days })
}
return date.toLocaleDateString()
}
setSpoolRow() {
this.$emit('set-spool', this.spool)
}
}
</script>
<style scoped>
.text--filament {
font-size: 1.1rem;
}
.no--padding {
padding: 0;
}
</style>
@@ -0,0 +1,55 @@
<template>
<v-dialog v-model="showDialog" width="400" persistent :fullscreen="isMobile">
<panel
:title="$t('Panels.SpoolmanPanel.EjectSpool')"
:icon="mdiEject"
card-class="spoolman-eject-spool-dialog"
:margin-bottom="false">
<template #buttons>
<v-btn icon tile @click="close">
<v-icon>{{ mdiCloseThick }}</v-icon>
</v-btn>
</template>
<v-card-text>
<v-row>
<v-col>
<p class="body-2">{{ $t('Panels.SpoolmanPanel.EjectSpoolQuestion') }}</p>
</v-col>
</v-row>
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn text @click="close">{{ $t('Panels.SpoolmanPanel.Cancel') }}</v-btn>
<v-btn color="primary" text @click="removeSpool">
{{ $t('Panels.SpoolmanPanel.EjectSpool') }}
</v-btn>
</v-card-actions>
</panel>
</v-dialog>
</template>
<script lang="ts">
import Component from 'vue-class-component'
import { Mixins, Prop } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import Panel from '@/components/ui/Panel.vue'
import { mdiCloseThick, mdiEject } from '@mdi/js'
@Component({
components: { Panel },
})
export default class SpoolmanEjectSpoolDialog extends Mixins(BaseMixin) {
mdiEject = mdiEject
mdiCloseThick = mdiCloseThick
@Prop({ required: true }) declare readonly showDialog: boolean
close() {
this.$emit('close')
}
removeSpool() {
this.$store.dispatch('server/spoolman/setActiveSpool', null)
this.close()
}
}
</script>
+55 -10
View File
@@ -1,23 +1,26 @@
<template>
<v-dialog v-model="bool" :max-width="dialogWidth">
<v-dialog v-model="bool" :max-width="dialogWidth" @click:outside="closeDialog" @keydown.esc="closeDialog">
<v-card>
<v-img v-if="file.big_thumbnail" contain :src="file.big_thumbnail"></v-img>
<v-card-title class="headline">{{ $t('Dialogs.StartPrint.Headline') }}</v-card-title>
<v-img v-if="file.big_thumbnail" contain :src="file.big_thumbnail" :style="bigThumbnailStyle" />
<v-card-title class="text-h5">{{ $t('Dialogs.StartPrint.Headline') }}</v-card-title>
<v-card-text class="pb-0">
{{ $t('Dialogs.StartPrint.DoYouWantToStartFilename', { filename: file.filename }) }}
<p class="body-2">
{{ question }}
</p>
</v-card-text>
<start-print-dialog-spoolman v-if="moonrakerComponents.includes('spoolman')" :file="file" />
<template v-if="moonrakerComponents.includes('timelapse')">
<v-divider class="mt-3 mb-2"></v-divider>
<v-card-text class="pb-0">
<v-divider v-if="!moonrakerComponents.includes('spoolman')" class="mt-3 mb-2" />
<v-card-text class="py-0">
<settings-row :title="$t('Dialogs.StartPrint.Timelapse')">
<v-switch v-model="timelapseEnabled" hide-details class="mt-0"></v-switch>
<v-switch v-model="timelapseEnabled" hide-details class="mt-0" />
</settings-row>
</v-card-text>
<v-divider class="mt-2 mb-0"></v-divider>
<v-divider class="mt-2 mb-0" />
</template>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="" text @click="closeDialog">{{ $t('Dialogs.StartPrint.Cancel') }}</v-btn>
<v-spacer />
<v-btn text @click="closeDialog">{{ $t('Dialogs.StartPrint.Cancel') }}</v-btn>
<v-btn
color="primary"
text
@@ -35,6 +38,9 @@ import { Component, Mixins, Prop } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import { FileStateGcodefile } from '@/store/files/types'
import SettingsRow from '@/components/settings/SettingsRow.vue'
import { mdiPrinter3d } from '@mdi/js'
import { ServerSpoolmanStateSpool } from '@/store/server/spoolman/types'
import { defaultBigThumbnailBackground } from '@/store/variables'
@Component({
components: {
@@ -42,6 +48,8 @@ import SettingsRow from '@/components/settings/SettingsRow.vue'
},
})
export default class StartPrintDialog extends Mixins(BaseMixin) {
mdiPrinter3d = mdiPrinter3d
@Prop({ required: true, default: false })
declare readonly bool: boolean
@@ -67,6 +75,43 @@ export default class StartPrintDialog extends Mixins(BaseMixin) {
return this.file.big_thumbnail_width ?? 400
}
get bigThumbnailBackground() {
return this.$store.state.gui.uiSettings.bigThumbnailBackground ?? defaultBigThumbnailBackground
}
get bigThumbnailStyle() {
if (defaultBigThumbnailBackground.toLowerCase() === this.bigThumbnailBackground.toLowerCase()) {
return {}
}
return { backgroundColor: this.bigThumbnailBackground }
}
get active_spool(): ServerSpoolmanStateSpool | null {
return this.$store.state.server.spoolman.active_spool ?? null
}
get filamentVendor() {
return this.active_spool?.filament?.vendor?.name ?? 'Unknown'
}
get filamentName() {
return this.active_spool?.filament.name ?? 'Unknown'
}
get filament() {
return `${this.filamentVendor} - ${this.filamentName}`
}
get question() {
if (this.active_spool)
return this.$t('Dialogs.StartPrint.DoYouWantToStartFilenameFilament', {
filename: this.file?.filename ?? 'unknown',
})
return this.$t('Dialogs.StartPrint.DoYouWantToStartFilename', { filename: this.file?.filename ?? 'unknown' })
}
startPrint(filename = '') {
filename = (this.currentPath + '/' + filename).substring(1)
this.closeDialog()
@@ -0,0 +1,107 @@
<template>
<div>
<v-divider class="mt-3 mb-0" />
<v-card-text class="py-0 px-2">
<spoolman-panel-active-spool
v-if="activeSpoolId !== null"
:small="true"
class="my-0"
@change-spool="showChangeSpoolDialog = true" />
<v-alert v-for="alert in alerts" :key="alert.text" text :color="alert.color" class="mt-4 mx-3">
{{ alert.text }}
</v-alert>
<div class="text-center">
<v-btn color="primary" small class="mx-auto" @click="showChangeSpoolDialog = true">
{{ buttonText }}
</v-btn>
</div>
</v-card-text>
<v-divider :class="classSecondDivider" />
<spoolman-change-spool-dialog :show-dialog="showChangeSpoolDialog" @close="showChangeSpoolDialog = false" />
</div>
</template>
<script lang="ts">
import { Component, Mixins, Prop } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import SpoolmanPanelActiveSpool from '@/components/panels/Spoolman/SpoolmanPanelActiveSpool.vue'
import { FileStateGcodefile } from '@/store/files/types'
@Component({
components: { SpoolmanPanelActiveSpool },
})
export default class StartPrintDialogSpoolman extends Mixins(BaseMixin) {
@Prop({ required: true }) readonly file!: FileStateGcodefile
showChangeSpoolDialog = false
get activeSpoolId() {
let spoolId = this.$store.state.server.spoolman?.active_spool_id ?? null
if (spoolId === 0) spoolId = null
return spoolId
}
get activeSpool() {
return this.$store.state.server.spoolman?.active_spool ?? null
}
get classSecondDivider() {
const classes = ['mt-4']
classes.push(this.moonrakerComponents.includes('timelapse') ? 'mb-2' : 'mb-0')
return classes
}
get buttonText() {
if (this.activeSpoolId === null) return this.$t('Panels.SpoolmanPanel.SelectSpool') as string
return this.$t('Panels.SpoolmanPanel.ChangeSpool') as string
}
get alerts() {
let alerts = []
if (this.activeSpoolId === null) {
alerts.push({
text: this.$t('Panels.SpoolmanPanel.NoSpoolSelected'),
color: 'orange',
})
// No need to check for filament type mismatch if no spool is selected
return alerts
}
let gcodeFilamentType = this.file.filament_type ?? ''
if (gcodeFilamentType.includes(';')) gcodeFilamentType = gcodeFilamentType.split(';')[0]
if (
gcodeFilamentType !== '' &&
this.activeSpool?.filament?.material?.toLowerCase() !== gcodeFilamentType.toLowerCase()
) {
alerts.push({
text: this.$t('Panels.SpoolmanPanel.FilamentTypeMismatch', {
fileType: gcodeFilamentType,
spoolType: this.activeSpool?.filament?.material,
}),
color: 'warning',
})
}
const fileWeight = Math.round(this.file.filament_weight_total ?? 0)
const spoolWeight = Math.round(this.activeSpool?.remaining_weight ?? 0)
if (spoolWeight < fileWeight) {
alerts.push({
text: this.$t('Panels.SpoolmanPanel.TooLessFilament', {
fileWeight,
spoolWeight,
}),
color: 'warning',
})
}
return alerts
}
}
</script>
@@ -173,4 +173,4 @@ export default class TheBedScrewsDialog extends Mixins(BaseMixin, ControlMixin)
}
</script>
<style lang="scss" scoped></style>
<style scoped></style>
@@ -181,7 +181,7 @@ export default class TheManualProbeDialog extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
.v-btn-toggle {
width: 100%;
}
+11 -5
View File
@@ -59,7 +59,7 @@
<v-icon>{{ mdiMenuDown }}</v-icon>
</v-btn>
<v-dialog v-model="paramsDialog">
<panel :title="macro.name" :card-class="`macro-params-mobile-${macro.name}`" :margin-bottom="0">
<panel :title="macro.name" :card-class="`macro-params-mobile-${macro.name}`" :margin-bottom="false">
<template #buttons>
<v-btn icon tile @click="paramsDialog = false">
<v-icon>{{ mdiCloseThick }}</v-icon>
@@ -101,6 +101,8 @@ import BaseMixin from '@/components/mixins/base'
import { GuiMacrosStateMacrogroupMacro } from '@/store/gui/macros/types'
import { mdiCloseThick, mdiMenuDown, mdiRefresh } from '@mdi/js'
import Panel from '@/components/ui/Panel.vue'
import { TranslateResult } from 'vue-i18n'
import { PrinterStateMacro } from '@/store/printer/types'
interface param {
type: 'int' | 'double' | 'string' | null
@@ -128,13 +130,13 @@ export default class MacroButton extends Mixins(BaseMixin) {
private paramsDialog = false
@Prop({ required: true })
declare readonly macro: GuiMacrosStateMacrogroupMacro
declare readonly macro: GuiMacrosStateMacrogroupMacro | PrinterStateMacro
@Prop({ default: 'primary' })
declare readonly color: string
@Prop({ default: null })
declare readonly alias: string
declare readonly alias: string | TranslateResult
@Prop({ default: false })
declare readonly disabled: boolean
@@ -199,9 +201,13 @@ export default class MacroButton extends Mixins(BaseMixin) {
sendWithParams() {
let params: string[] = []
this.paramArray.forEach((paramname: string) => {
if (this.params[paramname].value !== null && this.params[paramname].value !== '') {
let value = this.params[paramname].value?.toString().trim()
if (this.params[paramname].value !== null && value !== '') {
let tmp: string = paramname
tmp += this.isGcodeStyle ? this.params[paramname].value : `=${this.params[paramname].value}`
if (value?.includes(' ')) value = `"${value}"`
tmp += this.isGcodeStyle ? value : `=${value}`
params.push(tmp)
}
+14 -38
View File
@@ -53,6 +53,7 @@ import Component from 'vue-class-component'
import { Mixins, Prop, Watch } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import { mdiChevronDown, mdiChevronUp, mdiRestart } from '@mdi/js'
import { TranslateResult } from 'vue-i18n'
@Component
export default class NumberInput extends Mixins(BaseMixin) {
@@ -65,48 +66,23 @@ export default class NumberInput extends Mixins(BaseMixin) {
private invalidChars: string[] = ['e', 'E', '+']
// input field name and identifier
@Prop({ type: String, required: true })
declare readonly label: string
@Prop({ type: String, required: true })
declare readonly param: string
@Prop({ required: true }) declare readonly label: TranslateResult | string
@Prop({ type: String, required: true }) declare readonly param: string
// props defining incoming data
@Prop({ type: Number, required: true })
declare readonly target: number
@Prop({ type: Number, required: false })
declare readonly defaultValue: number
@Prop({ type: Number, required: true }) declare readonly target: number
@Prop({ type: Number, required: false }) declare readonly defaultValue: number
// props for internal processing
@Prop({ type: Number, required: true })
declare readonly min: number
@Prop({ type: Number, default: null })
declare readonly max: number | null
@Prop({ type: Number, required: true })
declare readonly dec: number
@Prop({ type: Number, required: false, default: 1 })
declare readonly step: number
@Prop({ type: String, required: false })
declare readonly unit: string
@Prop({ type: Number, required: true }) declare readonly min: number
@Prop({ default: null }) declare readonly max: number | null
@Prop({ type: Number, required: true }) declare readonly dec: number
@Prop({ type: Number, required: false, default: 1 }) declare readonly step: number
@Prop({ type: String, required: false }) declare readonly unit: string
// spinner related props
@Prop({ type: Boolean, required: false, default: false })
declare readonly hasSpinner: boolean
@Prop({ type: Number, required: false, default: 1 })
declare readonly spinnerFactor: number
@Prop({ type: Boolean, required: false, default: false }) declare readonly hasSpinner: boolean
@Prop({ type: Number, required: false, default: 1 }) declare readonly spinnerFactor: number
// props for general internal behaviour
@Prop({ type: Boolean, required: false, default: false })
declare readonly disabled: boolean
@Prop({ type: Boolean, required: false, default: false })
declare readonly outputErrorMsg: boolean
@Prop({ type: Boolean, required: false, default: false }) declare readonly disabled: boolean
@Prop({ type: Boolean, required: false, default: false }) declare readonly outputErrorMsg: boolean
created(): void {
this.value = this.target.toString()
+2 -1
View File
@@ -85,6 +85,7 @@ import { Component, Mixins, Prop, Watch } from 'vue-property-decorator'
import { Debounce } from 'vue-debounce-decorator'
import BaseMixin from '@/components/mixins/base'
import { mdiLockOpenVariantOutline, mdiLockOutline, mdiMinus, mdiPlus, mdiRestart } from '@mdi/js'
import { TranslateResult } from 'vue-i18n'
@Component
export default class ToolSlider extends Mixins(BaseMixin) {
@@ -107,7 +108,7 @@ export default class ToolSlider extends Mixins(BaseMixin) {
@Prop({ type: Number, required: true }) declare readonly target: number
@Prop({ type: String, required: true }) declare readonly command: string
@Prop({ type: String, default: '' }) declare readonly attributeName: string
@Prop({ type: String, default: '' }) declare readonly label: string
@Prop({ default: '' }) declare readonly label: string | TranslateResult
@Prop({ type: String, default: '' }) declare readonly icon: string
@Prop({ type: String, default: '%' }) declare readonly unit: string
@Prop({ type: Number, default: 1 }) declare readonly attributeScale: number
+5 -5
View File
@@ -47,6 +47,10 @@ export default class BaseMixin extends Vue {
return this.klipperReadyForGui && ['printing', 'paused'].includes(this.printer_state)
}
get printerIsPrintingOnly() {
return this.klipperReadyForGui && this.printer_state === 'printing'
}
get printerPowerDevice(): string {
let deviceName = this.$store.state.gui.uiSettings.powerDeviceName ?? null
if (deviceName === null) deviceName = 'printer'
@@ -179,11 +183,7 @@ export default class BaseMixin extends Vue {
}
get hours12Format() {
const setting = this.$store.state.gui.general.timeFormat
if (setting === '12hours') return true
if (setting === null && this.browserLocale === 'en-US') return true
return false
return this.$store.getters['gui/getHours12Format']
}
formatDate(value: number | Date): string {
+40
View File
@@ -0,0 +1,40 @@
import Vue from 'vue'
import { Component } from 'vue-property-decorator'
@Component
export default class ExtruderMixin extends Vue {
get activeExtruder(): string {
return this.$store.state.printer.toolhead?.extruder
}
get activeExtruderSettings(): any {
return this.$store.state.printer.configfile?.settings?.[this.activeExtruder]
}
get filamentDiameter(): number {
return this.activeExtruderSettings?.filament_diameter ?? 1.75
}
get nozzleDiameter(): number {
return this.activeExtruderSettings?.nozzle_diameter ?? 0.4
}
get feedamount(): number {
return parseFloat(this.$store.state.gui.control.extruder.feedamount)
}
get feedrate(): number {
return parseFloat(this.$store.state.gui.control.extruder.feedrate)
}
get extrudeFactor() {
return this.$store.state.printer?.gcode_move?.extrude_factor ?? 1
}
get extrudePossible(): boolean {
return this.$store.getters['printer/getExtrudePossible']
}
get minExtrudeTemp(): number {
return this.activeExtruderSettings?.min_extrude_temp ?? 170
}
}
+2
View File
@@ -9,6 +9,7 @@ import { GuiNavigationStateEntry } from '@/store/gui/navigation/types'
export interface NaviPoint {
type: 'link' | 'route'
title: string
orgTitle?: string
to?: string
href?: string
target?: string
@@ -53,6 +54,7 @@ export default class NavigationMixin extends Mixins(BaseMixin) {
points.push({
type: 'route',
title: this.$t(`Router.${element.title}`),
orgTitle: element.title,
icon: element.icon,
to: element.path,
position,
@@ -0,0 +1,42 @@
<template>
<v-container v-if="showEstimatedExtrusion" class="pa-0 ma-0 pb-1">
<div style="font-size: 0.8em" class="text--disabled text-caption font-weight-light d-flex justify-center">
<span>
{{ $t('Panels.ExtruderControlPanel.EstimatedExtrusion') }} ~ {{ extrudedLength }} mm @
{{ volumetricFlow }} mm³/s -
<v-icon x-small style="opacity: 0.4; margin-top: -2px">
{{ mdiDiameterVariant }}
</v-icon>
{{ nozzleDiameter }} mm
</span>
</div>
</v-container>
</template>
<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import { mdiDiameterVariant } from '@mdi/js'
import ExtruderMixin from '@/components/mixins/extruder'
@Component({})
export default class PressureAdvanceSettings extends Mixins(BaseMixin, ExtruderMixin) {
mdiDiameterVariant = mdiDiameterVariant
get showEstimatedExtrusion() {
return this.$store.state.gui.control.extruder.showEstimatedExtrusionInfo ?? true
}
get extrudedLength(): number {
return Math.round(
this.feedamount *
this.extrudeFactor *
(Math.pow(this.filamentDiameter, 2) / Math.pow(this.nozzleDiameter, 2))
)
}
get volumetricFlow(): number {
return Math.round(Math.pow(this.filamentDiameter / 2, 2) * Math.PI * this.feedrate * 10) / 10
}
}
</script>
@@ -0,0 +1,320 @@
<template>
<responsive :breakpoints="{ large: (el) => el.width >= 640 }">
<template #default="{ el }">
<v-container>
<v-row>
<v-col>
<number-input
:label="$t('Panels.ExtruderControlPanel.FilamentLength')"
param="feedamount"
:target="feedamount"
:disabled="printerIsPrintingOnly"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="100"
:step="0.01"
:min="0.01"
:max="maxExtrudeOnlyDistance"
:dec="2"
unit="mm"
:submit-on-blur="true"
@submit="setFeedamount" />
<v-item-group class="_btn-group pt-3">
<v-btn
v-for="value in feedamountsSorted"
:key="value"
:disabled="printerIsPrintingOnly"
dense
class="_btn-qs flex-grow-1 px-0"
@click="setFeedamount({ value })">
{{ value }}
</v-btn>
</v-item-group>
</v-col>
<v-col>
<number-input
:label="$t('Panels.ExtruderControlPanel.ExtrusionFeedrate')"
param="feedrate"
:target="feedrate"
:disabled="printerIsPrintingOnly"
:has-spinner="true"
:output-error-msg="true"
:spinner-factor="100"
:step="0.01"
:min="0.01"
:max="null"
:dec="2"
type="number"
unit="mm/s"
@submit="setFeedrate" />
<v-item-group class="_btn-group pt-3">
<v-btn
v-for="value in feedratesSorted"
:key="value"
:disabled="printerIsPrintingOnly"
dense
class="_btn-qs flex-grow-1 px-0"
@click="setFeedrate({ value })">
{{ value }}
</v-btn>
</v-item-group>
</v-col>
<!-- EXTRUDE AND RETRACT BUTTON LARGE SIZED PANEL -->
<v-col v-if="el.is.large" class="col-3 d-flex align-center flex-column justify-center">
<!-- RETRACT -->
<v-tooltip left :disabled="extrudePossible && !tooLargeExtrusion" color="secondary">
<template #activator="{ on }">
<div class="mb-4" v-on="on">
<v-btn
:loading="loadings.includes('btnRetract')"
:disabled="!extrudePossible || tooLargeExtrusion || printerIsPrintingOnly"
small
class="_btn-extruder-cmd"
@click="sendRetract()">
<v-icon small class="mr-1">{{ mdiArrowUpBold }}</v-icon>
{{ $t('Panels.ExtruderControlPanel.Retract') }}
</v-btn>
</div>
</template>
<span v-show="!extrudePossible">
{{ $t('Panels.ExtruderControlPanel.ExtruderTempTooLow') }}
{{ minExtrudeTemp }} °C
</span>
<span v-show="tooLargeExtrusion">
{{ $t('Panels.ExtruderControlPanel.TooLargeExtrusion') }}
<br />
{{ $t('Panels.ExtruderControlPanel.Requested') }}: {{ feedamount * extrudeFactor }} mm
<br />
{{ $t('Panels.ExtruderControlPanel.Allowed') }}: {{ maxExtrudeOnlyDistance }} mm
</span>
</v-tooltip>
<!-- EXTRUDE -->
<v-tooltip left :disabled="extrudePossible && !tooLargeExtrusion" color="secondary">
<template #activator="{ on }">
<div v-on="on">
<v-btn
:loading="loadings.includes('btnDetract')"
:disabled="!extrudePossible || tooLargeExtrusion || printerIsPrintingOnly"
small
class="_btn-extruder-cmd"
@click="sendExtrude()">
<v-icon small class="mr-1">{{ mdiArrowDownBold }}</v-icon>
{{ $t('Panels.ExtruderControlPanel.Extrude') }}
</v-btn>
</div>
</template>
<span v-show="!extrudePossible">
{{ $t('Panels.ExtruderControlPanel.ExtruderTempTooLow') }}
{{ minExtrudeTemp }} °C
</span>
<span v-show="tooLargeExtrusion">
{{ $t('Panels.ExtruderControlPanel.TooLargeExtrusion') }}
<br />
{{ $t('Panels.ExtruderControlPanel.Requested') }}: {{ feedamount * extrudeFactor }} mm
<br />
{{ $t('Panels.ExtruderControlPanel.Allowed') }}: {{ maxExtrudeOnlyDistance }} mm
</span>
</v-tooltip>
</v-col>
</v-row>
<!-- EXTRUDE AND RETRACT BUTTON SMALL AND MEDIUM SIZED PANEL -->
<v-row v-if="!el.is.large">
<v-col class="pa-0">
<div class="d-flex justify-space-around">
<div class="d-flex align-center">
<!-- RETRACT -->
<v-tooltip top :disabled="extrudePossible && !tooLargeExtrusion" color="secondary">
<template #activator="{ on }">
<div class="pt-1 pb-2 px-3" v-on="on">
<v-btn
:loading="loadings.includes('btnRetract')"
:disabled="
!extrudePossible || tooLargeExtrusion || printerIsPrintingOnly
"
small
class="_btn-extruder-cmd"
@click="sendRetract()">
<v-icon small class="mr-1">{{ mdiArrowUpBold }}</v-icon>
{{ $t('Panels.ExtruderControlPanel.Retract') }}
</v-btn>
</div>
</template>
<span v-show="!extrudePossible">
{{ $t('Panels.ExtruderControlPanel.ExtruderTempTooLow') }}
{{ minExtrudeTemp }} °C
</span>
<span v-show="tooLargeExtrusion">
{{ $t('Panels.ExtruderControlPanel.TooLargeExtrusion') }}
<br />
{{ $t('Panels.ExtruderControlPanel.Requested') }}:
{{ feedamount * extrudeFactor }} mm
<br />
{{ $t('Panels.ExtruderControlPanel.Allowed') }}: {{ maxExtrudeOnlyDistance }} mm
</span>
</v-tooltip>
<!-- EXTRUDE -->
<v-tooltip top :disabled="extrudePossible && !tooLargeExtrusion" color="secondary">
<template #activator="{ on }">
<div class="pt-1 pb-2 px-3" v-on="on">
<v-btn
:loading="loadings.includes('btnDetract')"
:disabled="
!extrudePossible || tooLargeExtrusion || printerIsPrintingOnly
"
small
class="_btn-extruder-cmd"
@click="sendExtrude()">
<v-icon small class="mr-1">{{ mdiArrowDownBold }}</v-icon>
{{ $t('Panels.ExtruderControlPanel.Extrude') }}
</v-btn>
</div>
</template>
<span v-show="!extrudePossible">
{{ $t('Panels.ExtruderControlPanel.ExtruderTempTooLow') }}
{{ minExtrudeTemp }} °C
</span>
<span v-show="tooLargeExtrusion">
{{ $t('Panels.ExtruderControlPanel.TooLargeExtrusion') }}
<br />
{{ $t('Panels.ExtruderControlPanel.Requested') }}:
{{ feedamount * extrudeFactor }} mm
<br />
{{ $t('Panels.ExtruderControlPanel.Allowed') }}: {{ maxExtrudeOnlyDistance }} mm
</span>
</v-tooltip>
</div>
</div>
</v-col>
</v-row>
</v-container>
</template>
</responsive>
</template>
<script lang="ts">
import { mdiArrowDownBold, mdiArrowUpBold, mdiPrinter3dNozzle } from '@mdi/js'
import { Component, Mixins, Watch } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import NumberInput from '@/components/inputs/NumberInput.vue'
import Responsive from '@/components/ui/Responsive.vue'
import ToolSlider from '@/components/inputs/ToolSlider.vue'
import ExtruderMixin from '@/components/mixins/extruder'
@Component({
components: {
NumberInput,
Responsive,
ToolSlider,
},
})
export default class ExtruderControlPanel extends Mixins(BaseMixin, ExtruderMixin) {
mdiArrowDownBold = mdiArrowDownBold
mdiArrowUpBold = mdiArrowUpBold
mdiPrinter3dNozzle = mdiPrinter3dNozzle
get feedamounts(): number[] {
return this.$store.state.gui.control.extruder?.feedamounts ?? []
}
get feedrates(): number[] {
return this.$store.state.gui.control.extruder?.feedrates ?? []
}
get feedamountsSorted(): number[] {
return [...this.feedamounts].sort((a, b) => {
return b - a
})
}
get feedratesSorted(): number[] {
return [...this.feedrates].sort((a, b) => {
return b - a
})
}
setFeedamount(params: { value: number }): void {
this.$store.dispatch('gui/saveSetting', { name: 'control.extruder.feedamount', value: params.value })
}
setFeedrate(params: { value: number }): void {
this.$store.dispatch('gui/saveSetting', { name: 'control.extruder.feedrate', value: params.value })
}
get maxExtrudeOnlyDistance(): number {
return this.activeExtruderSettings?.max_extrude_only_distance ?? 50
}
get tooLargeExtrusion(): boolean {
return this.feedamount * this.extrudeFactor > this.maxExtrudeOnlyDistance
}
@Watch('maxExtrudeOnlyDistance', { immediate: true })
onMaxExtrudeOnlyDistanceChange(): void {
/**
* If, while switching from ex. A to ex. B, the feedamount
* from ex. an exceeds the maxExtrudeOnlyDistance of ex. B,
* set the feedamount to maxExtrudeOnlyDistance of ex. B
*/
if (this.feedamount > this.maxExtrudeOnlyDistance) {
this.setFeedamount({ value: this.maxExtrudeOnlyDistance })
}
}
sendRetract(): void {
const gcode = `M83\nG1 E-${this.feedamount} F${this.feedrate * 60}`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'btnRetract' })
}
sendExtrude(): void {
const gcode = `M83\nG1 E${this.feedamount} F${this.feedrate * 60}`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'btnDetract' })
}
}
</script>
<style scoped>
._btn-group {
border-radius: 4px;
display: inline-flex;
flex-wrap: nowrap;
max-width: 100%;
min-width: 100%;
width: 100%;
.v-btn {
border-radius: 0;
border-color: rgba(255, 255, 255, 0.12);
border-style: solid;
border-width: thin;
box-shadow: none;
height: 28px;
opacity: 0.8;
min-width: auto !important;
}
.v-btn:first-child {
border-top-left-radius: inherit;
border-bottom-left-radius: inherit;
}
.v-btn:last-child {
border-top-right-radius: inherit;
border-bottom-right-radius: inherit;
}
.v-btn:not(:first-child) {
border-left-width: 0;
}
}
._btn-qs {
font-size: 0.8rem !important;
max-height: 24px;
}
._btn-extruder-cmd {
min-width: 135px !important;
}
</style>
@@ -0,0 +1,85 @@
<template>
<div v-if="toolchangeMacros.length > 1">
<v-row v-for="(row, index) in rows" :key="'row_' + index" class="mt-0">
<v-col>
<v-item-group class="_btn-group py-0 px-3">
<extruder-control-panel-tools-item v-for="macro in row" :key="macro.name" :macro="macro" />
</v-item-group>
</v-col>
</v-row>
</div>
</template>
<script lang="ts">
import { mdiPrinter3dNozzle } from '@mdi/js'
import { Component, Mixins } from 'vue-property-decorator'
import { PrinterStateMacro, PrinterStateToolchangeMacro } from '@/store/printer/types'
import BaseMixin from '@/components/mixins/base'
import ControlMixin from '@/components/mixins/control'
@Component({})
export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin) {
mdiPrinter3dNozzle = mdiPrinter3dNozzle
get macros() {
return this.$store.getters['printer/getMacros']
}
get toolchangeMacros(): PrinterStateToolchangeMacro[] {
return this.macros
.filter((macro: PrinterStateMacro) => macro.name.toUpperCase().match(/^T\d+/))
.sort((a: PrinterStateMacro, b: PrinterStateMacro) => {
const numberA = parseInt(a.name.slice(1))
const numberB = parseInt(b.name.slice(1))
return numberA - numberB
})
}
get rows() {
const cols = 6
let rows = []
for (let i = 0; i < this.toolchangeMacros.length; i += cols) {
rows.push(this.toolchangeMacros.slice(i, i + cols))
}
return rows
}
}
</script>
<style scoped>
._btn-group {
border-radius: 4px;
display: inline-flex;
flex-wrap: nowrap;
max-width: 100%;
min-width: 100%;
.v-btn {
border-radius: 0;
border-color: rgba(255, 255, 255, 0.12);
border-style: solid;
border-width: thin;
box-shadow: none;
height: 28px;
opacity: 0.8;
min-width: auto !important;
}
.v-btn:first-child {
border-top-left-radius: inherit;
border-bottom-left-radius: inherit;
}
.v-btn:last-child {
border-top-right-radius: inherit;
border-bottom-right-radius: inherit;
}
.v-btn:not(:first-child) {
border-left-width: 0;
}
}
</style>
@@ -0,0 +1,88 @@
<template>
<v-btn
:disabled="printerIsPrintingOnly"
dense
class="flex-grow-1 px-0"
:style="buttonStyle"
@click="doSend(macro.name)">
<span v-if="color != null" class="_extruderColorState mr-1" :style="dotStyle" />
{{ macro.name }}
</v-btn>
</template>
<script lang="ts">
import { Component, Mixins, Prop } from 'vue-property-decorator'
import { PrinterStateMacro } from '@/store/printer/types'
import BaseMixin from '@/components/mixins/base'
import ControlMixin from '@/components/mixins/control'
@Component({
components: {},
})
export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin) {
@Prop({ type: Object }) macro!: PrinterStateMacro
get active() {
return this.macro.variables.active ?? false
}
get color() {
const color = this.macro.variables.color ?? this.macro.variables.colour ?? null
if (color === '' || color === 'undefined') return null
return color
}
get primaryColor(): string {
return this.$store.state.gui.uiSettings.primary
}
get primaryTextColor(): string {
let splits = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(this.primaryColor)
if (splits) {
const r = parseInt(splits[1], 16) * 0.2126
const g = parseInt(splits[2], 16) * 0.7152
const b = parseInt(splits[3], 16) * 0.0722
const perceivedLightness = (r + g + b) / 255
return perceivedLightness > 0.7 ? '#222' : '#fff'
}
return '#ffffff'
}
get warningColor(): string {
return this.$vuetify?.theme?.currentTheme?.warning?.toString() ?? '#ff8300'
}
get buttonStyle() {
let backgroundColor = ''
if (this.active) {
backgroundColor = this.homedAxes.includes('xyz') ? this.primaryColor : this.warningColor
}
const textColor = this.active ? this.primaryTextColor : ''
return {
color: textColor,
'background-color': backgroundColor,
}
}
get dotStyle() {
return {
'border-color': this.active ? this.primaryTextColor : '',
'background-color': '#' + this.color,
}
}
}
</script>
<style lang="scss" scoped>
._extruderColorState {
width: 15px;
height: 15px;
border-radius: 50%;
border: 1px solid lightgray;
}
</style>
@@ -0,0 +1,27 @@
<template>
<v-container class="pb-1">
<tool-slider
:label="$t('Panels.ExtruderControlPanel.ExtrusionFactor')"
:icon="mdiPrinter3dNozzleOutline"
:target="extrudeFactor"
:min="1"
:max="200"
:multi="100"
:step="1"
:has-input-field="true"
command="M221"
attribute-name="S" />
</v-container>
</template>
<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import { mdiPrinter3dNozzleOutline } from '@mdi/js'
import ExtruderMixin from '@/components/mixins/extruder'
@Component({})
export default class PressureAdvanceSettings extends Mixins(BaseMixin, ExtruderMixin) {
mdiPrinter3dNozzleOutline = mdiPrinter3dNozzleOutline
}
</script>
@@ -0,0 +1,148 @@
<template>
<div v-if="existsFirmwareRetraction">
<v-divider />
<v-container>
<responsive
:breakpoints="{
small: (el) => el.width <= 350,
}">
<template #default="{ el }">
<v-row>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="$t('Panels.ExtruderControlPanel.FirmwareRetractionSettings.RetractLength')"
param="RETRACT_LENGTH"
:target="retractLength"
:default-value="defaultRetractLength"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="10"
:step="0.01"
:min="0"
:max="null"
:dec="2"
unit="mm"
@submit="sendCmd" />
</v-col>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="$t('Panels.ExtruderControlPanel.FirmwareRetractionSettings.RetractSpeed')"
param="RETRACT_SPEED"
:target="retractSpeed"
:default-value="defaultRetractSpeed"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="5"
:step="1"
:min="1"
:max="null"
:dec="0"
unit="mm/s"
@submit="sendCmd" />
</v-col>
</v-row>
<v-row>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="
$t('Panels.ExtruderControlPanel.FirmwareRetractionSettings.UnretractExtraLength')
"
param="UNRETRACT_EXTRA_LENGTH"
:target="unretractExtraLength"
:default-value="defaultUnretractExtraLength"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="10"
:step="0.01"
:min="0"
:max="null"
:dec="2"
unit="mm"
@submit="sendCmd" />
</v-col>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="$t('Panels.ExtruderControlPanel.FirmwareRetractionSettings.UnretractSpeed')"
param="UNRETRACT_SPEED"
:target="unretractSpeed"
:default-value="defaultUnretractSpeed"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="5"
:step="1"
:min="1"
:max="null"
:dec="0"
unit="mm/s"
@submit="sendCmd" />
</v-col>
</v-row>
</template>
</responsive>
</v-container>
</div>
</template>
<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator'
import { Debounce } from 'vue-debounce-decorator'
import BaseMixin from '@/components/mixins/base'
import Panel from '@/components/ui/Panel.vue'
import NumberInput from '@/components/inputs/NumberInput.vue'
import Responsive from '@/components/ui/Responsive.vue'
import ControlMixin from '@/components/mixins/control'
@Component({
components: { Panel, NumberInput, Responsive },
})
export default class FirmwareRetractionSettings extends Mixins(BaseMixin, ControlMixin) {
get retractLength(): number {
return Math.floor((this.$store.state.printer?.firmware_retraction?.retract_length ?? 0) * 100) / 100
}
get retractSpeed(): number {
return Math.trunc(this.$store.state.printer?.firmware_retraction?.retract_speed ?? 20)
}
get unretractExtraLength(): number {
return Math.floor((this.$store.state.printer?.firmware_retraction?.unretract_extra_length ?? 0) * 100) / 100
}
get unretractSpeed(): number {
return Math.trunc(this.$store.state.printer?.firmware_retraction?.unretract_speed ?? 10)
}
get defaultRetractLength(): number {
return (
Math.floor(
(this.$store.state.printer?.configfile?.settings?.firmware_retraction?.retract_length ?? 0) * 100
) / 100
)
}
get defaultRetractSpeed(): number {
return Math.trunc(this.$store.state.printer?.configfile?.settings?.firmware_retraction?.retract_speed ?? 20)
}
get defaultUnretractExtraLength(): number {
return (
Math.floor(
(this.$store.state.printer?.configfile?.settings?.firmware_retraction?.unretract_extra_length ?? 0) *
100
) / 100
)
}
get defaultUnretractSpeed(): number {
return Math.trunc(this.$store.state.printer?.configfile?.settings?.firmware_retraction?.unretract_speed ?? 0)
}
@Debounce(500)
sendCmd(params: { name: string; value: number }): void {
const gcode = `SET_RETRACTION ${params.name}=${params.value}`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
this.$socket.emit('printer.gcode.script', { script: gcode })
}
}
</script>
@@ -0,0 +1,144 @@
<template>
<div v-if="show">
<v-divider />
<v-container>
<responsive
:breakpoints="{
small: (el) => el.width <= 350,
medium: (el) => el.width > 350 && el.width <= 500,
}">
<template #default="{ el }">
<v-row>
<v-col v-if="allExtruders.length > 1" :class="{ 'col-12': el.is.small || el.is.medium }">
<div class="d-flex align-center">
<v-btn
v-if="selectedExtruder !== activeExtruder"
icon
plain
@click="resetToActiveExtruder">
<v-icon>{{ mdiRestart }}</v-icon>
</v-btn>
<v-select
v-model="selectedExtruder"
:label="$t('Panels.ExtruderControlPanel.PressureAdvanceSettings.Extruder')"
:items="allExtruders"
:value="activeExtruder"
hide-details
outlined
dense />
</div>
</v-col>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="$t('Panels.ExtruderControlPanel.PressureAdvanceSettings.Advance')"
param="ADVANCE"
:target="pressureAdvance"
:default-value="defaultPressureAdvance"
:extruder="selectedExtruder"
:output-error-msg="true"
:has-spinner="true"
:min="0"
:max="null"
:step="0.001"
:dec="3"
unit="s"
@submit="sendCmd" />
</v-col>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="$t('Panels.ExtruderControlPanel.PressureAdvanceSettings.SmoothTime')"
param="SMOOTH_TIME"
:target="smoothTime"
:default-value="defaultSmoothTime"
:extruder="selectedExtruder"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="10"
:min="0"
:max="0.2"
:step="0.001"
:dec="3"
unit="s"
@submit="sendCmd" />
</v-col>
</v-row>
</template>
</responsive>
</v-container>
</div>
</template>
<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator'
import { Debounce } from 'vue-debounce-decorator'
import BaseMixin from '@/components/mixins/base'
import NumberInput from '@/components/inputs/NumberInput.vue'
import Panel from '@/components/ui/Panel.vue'
import Responsive from '@/components/ui/Responsive.vue'
import { mdiRestart } from '@mdi/js'
@Component({
components: { NumberInput, Panel, Responsive },
})
export default class PressureAdvanceSettings extends Mixins(BaseMixin) {
mdiRestart = mdiRestart
private extruders: string[] = []
private selectedExtruder = ''
resetToActiveExtruder(): void {
this.selectedExtruder = this.$store.state.printer.toolhead?.extruder
}
get show(): boolean {
return !(this.$store.getters['printer/getExtruderSteppers'].length > 0)
}
get allExtruders(): string[] {
Object.keys(this.$store.state.printer).forEach((e) => {
if (e.startsWith('extruder') && !this.extruders.includes(e)) this.extruders.push(e)
})
this.extruders.length === 1 ? this.resetToActiveExtruder() : {}
return this.extruders
}
get activeExtruder(): string {
this.resetToActiveExtruder()
return this.$store.state.printer.toolhead?.extruder
}
get pressureAdvance(): number {
return Math.floor((this.$store.state.printer?.[this.selectedExtruder]?.pressure_advance ?? 0) * 1000) / 1000
}
get smoothTime(): number {
return Math.floor((this.$store.state.printer?.[this.selectedExtruder]?.smooth_time ?? 0.04) * 1000) / 1000
}
get defaultPressureAdvance(): number {
return (
Math.floor(
(this.$store.state.printer.configfile?.settings?.[this.selectedExtruder]?.pressure_advance ?? 0) * 1000
) / 1000
)
}
get defaultSmoothTime(): number {
return (
Math.floor(
(this.$store.state.printer.configfile?.settings?.[this.selectedExtruder]
?.pressure_advance_smooth_time ?? 0.04) * 1000
) / 1000
)
}
@Debounce(500)
sendCmd(params: { name: string; value: number }): void {
const gcode = `SET_PRESSURE_ADVANCE EXTRUDER=${this.selectedExtruder} ${params.name}=${params.value}`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
this.$socket.emit('printer.gcode.script', { script: gcode })
}
}
</script>
+82 -454
View File
@@ -1,10 +1,11 @@
<template>
<panel
v-if="klipperReadyForGui && extruders.length"
v-if="showPanel"
:icon="mdiPrinter3dNozzle"
:title="$t('Panels.ExtruderControlPanel.Headline').toString()"
:title="$t('Panels.ExtruderControlPanel.Headline')"
:collapsible="true"
card-class="extruder-control-panel">
card-class="extruder-control-panel"
class="pb-1">
<!-- PANEL-HEADER 3-DOT-MENU -->
<template #buttons>
<v-menu v-if="showFilamentMacros" :offset-y="true" :close-on-content-click="false" left>
@@ -21,8 +22,8 @@
<div v-on="on">
<macro-button
:macro="unloadFilamentMacro"
:alias="$t('Panels.ExtruderControlPanel.UnloadFilament').toString()"
:disabled="!canExecuteUnloadMacro || isPrinting"
:alias="$t('Panels.ExtruderControlPanel.UnloadFilament')"
:disabled="!canExecuteUnloadMacro || printerIsPrintingOnly"
color="#272727" />
</div>
</template>
@@ -39,8 +40,8 @@
<div v-on="on">
<macro-button
:macro="loadFilamentMacro"
:alias="$t('Panels.ExtruderControlPanel.LoadFilament').toString()"
:disabled="!canExecuteLoadMacro || isPrinting"
:alias="$t('Panels.ExtruderControlPanel.LoadFilament')"
:disabled="!canExecuteLoadMacro || printerIsPrintingOnly"
color="#272727" />
</div>
</template>
@@ -50,323 +51,101 @@
</span>
</v-tooltip>
</v-list-item>
<!-- FILAMENT PURGE -->
<v-list-item v-if="purgeFilamentMacro">
<v-tooltip top :disabled="canExecutePurgeMacro" color="secondary">
<template #activator="{ on }">
<div v-on="on">
<macro-button
:macro="purgeFilamentMacro"
:alias="$t('Panels.ExtruderControlPanel.PurgeFilament')"
:disabled="!canExecutePurgeMacro || printerIsPrintingOnly"
color="#272727" />
</div>
</template>
<span>
{{ $t('Panels.ExtruderControlPanel.ExtruderTempTooLow') }}
{{ minExtrudeTemp }} °C
</span>
</v-tooltip>
</v-list-item>
<!-- NOZZLE CLEAN -->
<v-list-item v-if="cleanNozzleMacro">
<macro-button
:macro="cleanNozzleMacro"
:alias="$t('Panels.ExtruderControlPanel.CleanNozzle')"
:disabled="printerIsPrintingOnly"
color="#272727" />
</v-list-item>
</v-list>
</v-menu>
</template>
<responsive :breakpoints="{ large: (el) => el.width >= 640 }">
<template #default="{ el }">
<!-- TOOL SELECTOR BUTTONS -->
<v-container v-if="toolchangeMacros.length > 1" class="pb-1">
<v-item-group class="_btn-group py-0">
<v-btn
v-for="tool in toolchangeMacros"
:key="tool.name"
:class="tool.active ? 'primary--text' : {}"
:disabled="isPrinting"
:style="{ 'background-color': '#' + tool.color }"
dense
class="flex-grow-1 px-0"
@click="doSend(tool.name)">
{{ tool.name }}
</v-btn>
</v-item-group>
</v-container>
<!-- EXTRUSION FACTOR SLIDER -->
<v-container class="pb-1">
<tool-slider
:label="$t('Panels.ExtruderControlPanel.ExtrusionFactor').toString()"
:icon="mdiPrinter3dNozzleOutline"
:target="extrudeFactor"
:min="1"
:max="200"
:multi="100"
:step="1"
:has-input-field="true"
command="M221"
attribute-name="S"></tool-slider>
</v-container>
<!-- PRESSURE ADVANCE SETTINGS -->
<template v-if="!(extruderSteppers.length > 0)">
<v-divider></v-divider>
<pressure-advance-settings></pressure-advance-settings>
</template>
<!-- FIRMWARE RETRACTION SETTINGS -->
<template v-if="existsFirmwareRetraction">
<v-divider></v-divider>
<firmware-retraction-settings></firmware-retraction-settings>
</template>
<v-divider class="pb-1"></v-divider>
<!-- EXTRUDER INPUTS AND QUICKSELECTS -->
<v-container>
<v-row>
<v-col>
<number-input
:label="$t('Panels.ExtruderControlPanel.FilamentLength').toString()"
param="feedamount"
:target="feedamount"
:disabled="isPrinting"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="100"
:step="0.01"
:min="0.01"
:max="maxExtrudeOnlyDistance"
:dec="2"
unit="mm"
:submit-on-blur="true"
@submit="setFeedamount"></number-input>
<v-item-group class="_btn-group pt-3">
<v-btn
v-for="value in feedamountsSorted"
:key="value"
:disabled="isPrinting"
dense
class="_btn-qs flex-grow-1 px-0"
@click="setFeedamount({ value })">
{{ value }}
</v-btn>
</v-item-group>
</v-col>
<v-col>
<number-input
:label="$t('Panels.ExtruderControlPanel.ExtrusionFeedrate').toString()"
param="feedrate"
:target="feedrate"
:disabled="isPrinting"
:has-spinner="true"
:output-error-msg="true"
:spinner-factor="100"
:step="0.01"
:min="0.01"
:max="null"
:dec="2"
type="number"
unit="mm/s"
@submit="setFeedrate"></number-input>
<v-item-group class="_btn-group pt-3">
<v-btn
v-for="value in feedratesSorted"
:key="value"
:disabled="isPrinting"
dense
class="_btn-qs flex-grow-1 px-0"
@click="setFeedrate({ value })">
{{ value }}
</v-btn>
</v-item-group>
</v-col>
<!-- EXTRUDE AND RETRACT BUTTON LARGE SIZED PANEL -->
<v-col v-if="el.is.large" class="col-3 d-flex align-center flex-column justify-center">
<!-- RETRACT -->
<v-tooltip left :disabled="extrudePossible && !tooLargeExtrusion" color="secondary">
<template #activator="{ on }">
<div class="mb-4" v-on="on">
<v-btn
:loading="loadings.includes('btnRetract')"
:disabled="!extrudePossible || tooLargeExtrusion || isPrinting"
small
class="_btn-extruder-cmd"
@click="sendRetract()">
<v-icon small class="mr-1">{{ mdiArrowUpBold }}</v-icon>
{{ $t('Panels.ExtruderControlPanel.Retract') }}
</v-btn>
</div>
</template>
<span v-show="!extrudePossible">
{{ $t('Panels.ExtruderControlPanel.ExtruderTempTooLow') }}
{{ minExtrudeTemp }} °C
</span>
<span v-show="tooLargeExtrusion">
{{ $t('Panels.ExtruderControlPanel.TooLargeExtrusion') }}
<br />
{{ $t('Panels.ExtruderControlPanel.Requested') }}:
{{ feedamount * extrudeFactor }} mm
<br />
{{ $t('Panels.ExtruderControlPanel.Allowed') }}: {{ maxExtrudeOnlyDistance }} mm
</span>
</v-tooltip>
<!-- EXTRUDE -->
<v-tooltip left :disabled="extrudePossible && !tooLargeExtrusion" color="secondary">
<template #activator="{ on }">
<div v-on="on">
<v-btn
:loading="loadings.includes('btnDetract')"
:disabled="!extrudePossible || tooLargeExtrusion || isPrinting"
small
class="_btn-extruder-cmd"
@click="sendExtrude()">
<v-icon small class="mr-1">{{ mdiArrowDownBold }}</v-icon>
{{ $t('Panels.ExtruderControlPanel.Extrude') }}
</v-btn>
</div>
</template>
<span v-show="!extrudePossible">
{{ $t('Panels.ExtruderControlPanel.ExtruderTempTooLow') }}
{{ minExtrudeTemp }} °C
</span>
<span v-show="tooLargeExtrusion">
{{ $t('Panels.ExtruderControlPanel.TooLargeExtrusion') }}
<br />
{{ $t('Panels.ExtruderControlPanel.Requested') }}:
{{ feedamount * extrudeFactor }} mm
<br />
{{ $t('Panels.ExtruderControlPanel.Allowed') }}: {{ maxExtrudeOnlyDistance }} mm
</span>
</v-tooltip>
</v-col>
</v-row>
<!-- EXTRUDE AND RETRACT BUTTON SMALL AND MEDIUM SIZED PANEL -->
<v-row v-if="!el.is.large" :class="{ 'pb-1': !showEstimatedExtrusion }">
<v-col class="pa-0">
<div class="d-flex justify-space-around">
<div class="d-flex align-center">
<!-- RETRACT -->
<v-tooltip top :disabled="extrudePossible && !tooLargeExtrusion" color="secondary">
<template #activator="{ on }">
<div class="pt-1 pb-2 px-3" v-on="on">
<v-btn
:loading="loadings.includes('btnRetract')"
:disabled="!extrudePossible || tooLargeExtrusion || isPrinting"
small
class="_btn-extruder-cmd"
@click="sendRetract()">
<v-icon small class="mr-1">{{ mdiArrowUpBold }}</v-icon>
{{ $t('Panels.ExtruderControlPanel.Retract') }}
</v-btn>
</div>
</template>
<span v-show="!extrudePossible">
{{ $t('Panels.ExtruderControlPanel.ExtruderTempTooLow') }}
{{ minExtrudeTemp }} °C
</span>
<span v-show="tooLargeExtrusion">
{{ $t('Panels.ExtruderControlPanel.TooLargeExtrusion') }}
<br />
{{ $t('Panels.ExtruderControlPanel.Requested') }}:
{{ feedamount * extrudeFactor }} mm
<br />
{{ $t('Panels.ExtruderControlPanel.Allowed') }}:
{{ maxExtrudeOnlyDistance }} mm
</span>
</v-tooltip>
<!-- EXTRUDE -->
<v-tooltip top :disabled="extrudePossible && !tooLargeExtrusion" color="secondary">
<template #activator="{ on }">
<div class="pt-1 pb-2 px-3" v-on="on">
<v-btn
:loading="loadings.includes('btnDetract')"
:disabled="!extrudePossible || tooLargeExtrusion || isPrinting"
small
class="_btn-extruder-cmd"
@click="sendExtrude()">
<v-icon small class="mr-1">{{ mdiArrowDownBold }}</v-icon>
{{ $t('Panels.ExtruderControlPanel.Extrude') }}
</v-btn>
</div>
</template>
<span v-show="!extrudePossible">
{{ $t('Panels.ExtruderControlPanel.ExtruderTempTooLow') }}
{{ minExtrudeTemp }} °C
</span>
<span v-show="tooLargeExtrusion">
{{ $t('Panels.ExtruderControlPanel.TooLargeExtrusion') }}
<br />
{{ $t('Panels.ExtruderControlPanel.Requested') }}:
{{ feedamount * extrudeFactor }} mm
<br />
{{ $t('Panels.ExtruderControlPanel.Allowed') }}:
{{ maxExtrudeOnlyDistance }} mm
</span>
</v-tooltip>
</div>
</div>
</v-col>
</v-row>
</v-container>
<!-- EXTRUSION ESTIMATION NOTE -->
<v-container v-if="showEstimatedExtrusion" class="pa-0 ma-0 pb-2">
<div
v-if="filamentDiameter && nozzleDiameter"
style="font-size: 0.8em"
class="text--disabled text-caption font-weight-light d-flex justify-center">
<span>
{{ $t('Panels.ExtruderControlPanel.EstimatedExtrusion') }} ~ {{ extrudedLength }} mm @
{{ volumetricFlow }} mm³/s -
<v-icon x-small style="opacity: 0.4; margin-top: -2px">
{{ mdiDiameterVariant }}
</v-icon>
{{ nozzleDiameter }} mm
</span>
</div>
</v-container>
</template>
</responsive>
<!-- TOOL SELECTOR BUTTONS -->
<extruder-control-panel-tools />
<!-- EXTRUSION FACTOR SLIDER -->
<extrusion-factor-settings />
<!-- PRESSURE ADVANCE SETTINGS -->
<pressure-advance-settings />
<!-- FIRMWARE RETRACTION SETTINGS -->
<firmware-retraction-settings />
<v-divider class="pb-1" />
<!-- EXTRUDER INPUTS AND QUICKSELECTS -->
<extruder-control-panel-control />
<!-- EXTRUSION ESTIMATION NOTE -->
<estimated-extrusion-output />
</panel>
</template>
<script lang="ts">
import {
mdiArrowDownBold,
mdiArrowUpBold,
mdiPrinter3dNozzle,
mdiPrinter3dNozzleOutline,
mdiDotsVertical,
mdiDiameterVariant,
} from '@mdi/js'
import { Component, Mixins, Watch } from 'vue-property-decorator'
import {
PrinterStateExtruder,
PrinterStateExtruderStepper,
PrinterStateMacro,
PrinterStateToolchangeMacro,
} from '@/store/printer/types'
import BaseMixin from '../mixins/base'
import ControlMixin from '../mixins/control'
import NumberInput from '@/components/inputs/NumberInput.vue'
import { mdiPrinter3dNozzle, mdiDotsVertical } from '@mdi/js'
import { Component, Mixins } from 'vue-property-decorator'
import { PrinterStateExtruder, PrinterStateMacro } from '@/store/printer/types'
import BaseMixin from '@/components/mixins/base'
import ControlMixin from '@/components/mixins/control'
import Panel from '@/components/ui/Panel.vue'
import PressureAdvanceSettings from '@/components/panels/ExtruderSettings/PressureAdvanceSettings.vue'
import FirmwareRetractionSettings from '@/components/panels/ExtruderSettings/FirmwareRetractionSettings.vue'
import Responsive from '@/components/ui/Responsive.vue'
import ToolSlider from '@/components/inputs/ToolSlider.vue'
import ExtruderMixin from '@/components/mixins/extruder'
@Component({
components: {
Panel,
PressureAdvanceSettings,
FirmwareRetractionSettings,
NumberInput,
Responsive,
ToolSlider,
},
})
export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin) {
mdiArrowUpBold = mdiArrowUpBold
mdiArrowDownBold = mdiArrowDownBold
export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin, ExtruderMixin) {
mdiPrinter3dNozzle = mdiPrinter3dNozzle
mdiPrinter3dNozzleOutline = mdiPrinter3dNozzleOutline
mdiDotsVertical = mdiDotsVertical
mdiDiameterVariant = mdiDiameterVariant
private heatWaitGcodes = ['printer.extruder.can_extrude', 'TEMPERATURE_WAIT', 'M109']
get isPrinting(): boolean {
return ['printing'].includes(this.printer_state)
get showPanel(): boolean {
return this.klipperReadyForGui && this.extruders.length > 0
}
get macros() {
return this.$store.getters['printer/getMacros']
}
get toolchangeMacros(): PrinterStateToolchangeMacro[] {
return this.$store.getters['printer/getToolchangeMacros']
get loadFilamentMacro(): PrinterStateMacro | undefined {
const macros = ['LOAD_FILAMENT', 'FILAMENT_LOAD']
return this.macros.find((macro: PrinterStateMacro) => macros.includes(macro.name.toUpperCase()))
}
get loadFilamentMacro() {
return this.macros.find((macro: PrinterStateMacro) => macro.name.toUpperCase() === 'LOAD_FILAMENT')
get unloadFilamentMacro(): PrinterStateMacro | undefined {
const macros = ['UNLOAD_FILAMENT', 'FILAMENT_UNLOAD']
return this.macros.find((macro: PrinterStateMacro) => macros.includes(macro.name.toUpperCase()))
}
get unloadFilamentMacro() {
return this.macros.find((macro: PrinterStateMacro) => macro.name.toUpperCase() === 'UNLOAD_FILAMENT')
get purgeFilamentMacro(): PrinterStateMacro | undefined {
const macros = ['PURGE_FILAMENT', 'FILAMENT_PURGE']
return this.macros.find((macro: PrinterStateMacro) => macros.includes(macro.name.toUpperCase()))
}
get cleanNozzleMacro(): PrinterStateMacro | undefined {
const macros = ['CLEAN_NOZZLE', 'NOZZLE_CLEAN', 'WIPE_NOZZLE', 'NOZZLE_WIPE']
return this.macros.find((macro: PrinterStateMacro) => macros.includes(macro.name.toUpperCase()))
}
/**
@@ -376,13 +155,19 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin
get canExecuteLoadMacro(): boolean {
if (this.extrudePossible) return true
return this.heatWaitGcodes.some((gcode) => this.loadFilamentMacro.prop.gcode.includes(gcode))
return this.heatWaitGcodes.some((gcode) => this.loadFilamentMacro?.prop.gcode.includes(gcode))
}
get canExecuteUnloadMacro(): boolean {
if (this.extrudePossible) return true
return this.heatWaitGcodes.some((gcode) => this.unloadFilamentMacro.prop.gcode.includes(gcode))
return this.heatWaitGcodes.some((gcode) => this.unloadFilamentMacro?.prop.gcode.includes(gcode))
}
get canExecutePurgeMacro(): boolean {
if (this.extrudePossible) return true
return this.heatWaitGcodes.some((gcode) => this.purgeFilamentMacro?.prop.gcode.includes(gcode))
}
get showFilamentMacros(): boolean {
@@ -392,162 +177,5 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin
get extruders(): PrinterStateExtruder[] {
return this.$store.getters['printer/getExtruders']
}
get extruderSteppers(): PrinterStateExtruderStepper[] {
return this.$store.getters['printer/getExtruderSteppers']
}
get activeExtruder(): string {
return this.$store.state.printer.toolhead?.extruder
}
get filamentDiameter(): number {
return this.$store.state.printer.configfile?.settings?.[this.activeExtruder]?.filament_diameter ?? 1.75
}
get nozzleDiameter(): number {
return this.$store.state.printer.configfile?.settings?.[this.activeExtruder]?.nozzle_diameter ?? 0.4
}
get feedamounts(): number[] {
return this.$store.state.gui.control.extruder?.feedamounts ?? []
}
get feedrates(): number[] {
return this.$store.state.gui.control.extruder?.feedrates ?? []
}
get feedamountsSorted(): number[] {
return [...this.feedamounts].sort((a, b) => {
return b - a
})
}
get feedratesSorted(): number[] {
return [...this.feedrates].sort((a, b) => {
return b - a
})
}
get feedamount(): number {
return parseFloat(this.$store.state.gui.control.extruder.feedamount)
}
setFeedamount(params: { value: number }): void {
this.$store.dispatch('gui/saveSetting', { name: 'control.extruder.feedamount', value: params.value })
}
get feedrate(): number {
return parseFloat(this.$store.state.gui.control.extruder.feedrate)
}
setFeedrate(params: { value: number }): void {
this.$store.dispatch('gui/saveSetting', { name: 'control.extruder.feedrate', value: params.value })
}
get extrudePossible(): boolean {
return this.$store.getters['printer/getExtrudePossible']
}
get minExtrudeTemp(): number {
return this.$store.state.printer.configfile?.settings?.[this.activeExtruder]?.min_extrude_temp ?? 170
}
get maxExtrudeOnlyDistance(): number {
return this.$store.state.printer.configfile?.settings?.[this.activeExtruder]?.max_extrude_only_distance ?? 50
}
get tooLargeExtrusion(): boolean {
return this.feedamount * this.extrudeFactor > this.maxExtrudeOnlyDistance
}
get extrudedLength(): number {
return Math.round(
this.feedamount *
this.extrudeFactor *
(Math.pow(this.filamentDiameter, 2) / Math.pow(this.nozzleDiameter, 2))
)
}
get volumetricFlow(): number {
return Math.round(Math.pow(this.filamentDiameter / 2, 2) * Math.PI * this.feedrate * 10) / 10
}
get extrudeFactor() {
return this.$store.state.printer?.gcode_move?.extrude_factor ?? 1
}
get showEstimatedExtrusion() {
return this.$store.state.gui.control.extruder.showEstimatedExtrusionInfo
}
@Watch('maxExtrudeOnlyDistance', { immediate: true })
onMaxExtrudeOnlyDistanceChange(): void {
/**
* If, while switching from ex. A to ex. B, the feedamount
* from ex. A exceeds the maxExtrudeOnlyDistance of ex. B,
* set the feedamount to maxExtrudeOnlyDistance of ex. B
*/
if (this.feedamount > this.maxExtrudeOnlyDistance) {
this.setFeedamount({ value: this.maxExtrudeOnlyDistance })
}
}
sendRetract(): void {
const gcode = `M83\nG1 E-${this.feedamount} F${this.feedrate * 60}`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'btnRetract' })
}
sendExtrude(): void {
const gcode = `M83\nG1 E${this.feedamount} F${this.feedrate * 60}`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'btnDetract' })
}
}
</script>
<style lang="scss" scoped>
._btn-group {
border-radius: 4px;
display: inline-flex;
flex-wrap: nowrap;
max-width: 100%;
min-width: 100%;
width: 100%;
.v-btn {
border-radius: 0;
border-color: rgba(255, 255, 255, 0.12);
border-style: solid;
border-width: thin;
box-shadow: none;
height: 28px;
opacity: 0.8;
min-width: auto !important;
}
.v-btn:first-child {
border-top-left-radius: inherit;
border-bottom-left-radius: inherit;
}
.v-btn:last-child {
border-top-right-radius: inherit;
border-bottom-right-radius: inherit;
}
.v-btn:not(:first-child) {
border-left-width: 0;
}
}
._btn-qs {
font-size: 0.8rem !important;
max-height: 24px;
}
._btn-extruder-cmd {
min-width: 135px !important;
}
</style>
@@ -1,152 +0,0 @@
<template>
<v-container>
<responsive
:breakpoints="{
small: (el) => el.width <= 350,
}">
<template #default="{ el }">
<v-row>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="
$t('Panels.ExtruderControlPanel.FirmwareRetractionSettings.RetractLength').toString()
"
param="RETRACT_LENGTH"
:target="retractLength"
:default-value="defaultRetractLength"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="10"
:step="0.01"
:min="0"
:max="null"
:dec="2"
unit="mm"
@submit="sendCmd"></number-input>
</v-col>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="
$t('Panels.ExtruderControlPanel.FirmwareRetractionSettings.RetractSpeed').toString()
"
param="RETRACT_SPEED"
:target="retractSpeed"
:default-value="defaultRetractSpeed"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="5"
:step="1"
:min="1"
:max="null"
:dec="0"
unit="mm/s"
@submit="sendCmd"></number-input>
</v-col>
</v-row>
<v-row>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="
$t(
'Panels.ExtruderControlPanel.FirmwareRetractionSettings.UnretractExtraLength'
).toString()
"
param="UNRETRACT_EXTRA_LENGTH"
:target="unretractExtraLength"
:default-value="defaultUnretractExtraLength"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="10"
:step="0.01"
:min="0"
:max="null"
:dec="2"
unit="mm"
@submit="sendCmd"></number-input>
</v-col>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="
$t('Panels.ExtruderControlPanel.FirmwareRetractionSettings.UnretractSpeed').toString()
"
param="UNRETRACT_SPEED"
:target="unretractSpeed"
:default-value="defaultUnretractSpeed"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="5"
:step="1"
:min="1"
:max="null"
:dec="0"
unit="mm/s"
@submit="sendCmd"></number-input>
</v-col>
</v-row>
</template>
</responsive>
</v-container>
</template>
<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator'
import { Debounce } from 'vue-debounce-decorator'
import BaseMixin from '@/components/mixins/base'
import Panel from '@/components/ui/Panel.vue'
import NumberInput from '@/components/inputs/NumberInput.vue'
import Responsive from '@/components/ui/Responsive.vue'
@Component({
components: { Panel, NumberInput, Responsive },
})
export default class FirmwareRetractionSettings extends Mixins(BaseMixin) {
get retractLength(): number {
return Math.floor((this.$store.state.printer?.firmware_retraction?.retract_length ?? 0) * 100) / 100
}
get retractSpeed(): number {
return Math.trunc(this.$store.state.printer?.firmware_retraction?.retract_speed ?? 20)
}
get unretractExtraLength(): number {
return Math.floor((this.$store.state.printer?.firmware_retraction?.unretract_extra_length ?? 0) * 100) / 100
}
get unretractSpeed(): number {
return Math.trunc(this.$store.state.printer?.firmware_retraction?.unretract_speed ?? 10)
}
get defaultRetractLength(): number {
return (
Math.floor(
(this.$store.state.printer?.configfile?.settings?.firmware_retraction?.retract_length ?? 0) * 100
) / 100
)
}
get defaultRetractSpeed(): number {
return Math.trunc(this.$store.state.printer?.configfile?.settings?.firmware_retraction?.retract_speed ?? 20)
}
get defaultUnretractExtraLength(): number {
return (
Math.floor(
(this.$store.state.printer?.configfile?.settings?.firmware_retraction?.unretract_extra_length ?? 0) *
100
) / 100
)
}
get defaultUnretractSpeed(): number {
return Math.trunc(this.$store.state.printer?.configfile?.settings?.firmware_retraction?.unretract_speed ?? 0)
}
@Debounce(500)
sendCmd(params: { name: string; value: number }): void {
const gcode = `SET_RETRACTION ${params.name}=${params.value}`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
this.$socket.emit('printer.gcode.script', { script: gcode })
}
}
</script>
@@ -1,133 +0,0 @@
<template>
<v-container>
<responsive
:breakpoints="{
small: (el) => el.width <= 350,
medium: (el) => el.width > 350 && el.width <= 500,
}">
<template #default="{ el }">
<v-row>
<v-col v-if="allExtruders.length > 1" :class="{ 'col-12': el.is.small || el.is.medium }">
<div class="d-flex align-center">
<v-btn v-if="selectedExtruder !== activeExtruder" icon plain @click="resetToActiveExtruder">
<v-icon>{{ mdiRestart }}</v-icon>
</v-btn>
<v-select
v-model="selectedExtruder"
:label="$t('Panels.ExtruderControlPanel.PressureAdvanceSettings.Extruder').toString()"
:items="allExtruders"
:value="activeExtruder"
hide-details
outlined
dense></v-select>
</div>
</v-col>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="$t('Panels.ExtruderControlPanel.PressureAdvanceSettings.Advance').toString()"
param="ADVANCE"
:target="pressureAdvance"
:default-value="defaultPressureAdvance"
:extruder="selectedExtruder"
:output-error-msg="true"
:has-spinner="true"
:min="0"
:max="null"
:step="0.001"
:dec="3"
unit="s"
@submit="sendCmd"></number-input>
</v-col>
<v-col :class="{ 'col-12': el.is.small }">
<number-input
:label="$t('Panels.ExtruderControlPanel.PressureAdvanceSettings.SmoothTime').toString()"
param="SMOOTH_TIME"
:target="smoothTime"
:default-value="defaultSmoothTime"
:extruder="selectedExtruder"
:output-error-msg="true"
:has-spinner="true"
:spinner-factor="10"
:min="0"
:max="0.2"
:step="0.001"
:dec="3"
unit="s"
@submit="sendCmd"></number-input>
</v-col>
</v-row>
</template>
</responsive>
</v-container>
</template>
<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator'
import { Debounce } from 'vue-debounce-decorator'
import BaseMixin from '@/components/mixins/base'
import NumberInput from '@/components/inputs/NumberInput.vue'
import Panel from '@/components/ui/Panel.vue'
import Responsive from '@/components/ui/Responsive.vue'
import { mdiRestart } from '@mdi/js'
@Component({
components: { NumberInput, Panel, Responsive },
})
export default class PressureAdvanceSettings extends Mixins(BaseMixin) {
mdiRestart = mdiRestart
private extruders: string[] = []
private selectedExtruder = ''
resetToActiveExtruder(): void {
this.selectedExtruder = this.$store.state.printer.toolhead?.extruder
}
get allExtruders(): string[] {
Object.keys(this.$store.state.printer).forEach((e) => {
if (e.startsWith('extruder') && !this.extruders.includes(e)) this.extruders.push(e)
})
this.extruders.length === 1 ? this.resetToActiveExtruder() : {}
return this.extruders
}
get activeExtruder(): string {
this.resetToActiveExtruder()
return this.$store.state.printer.toolhead?.extruder
}
get pressureAdvance(): number {
return Math.floor((this.$store.state.printer?.[this.selectedExtruder]?.pressure_advance ?? 0) * 1000) / 1000
}
get smoothTime(): number {
return Math.floor((this.$store.state.printer?.[this.selectedExtruder]?.smooth_time ?? 0.04) * 1000) / 1000
}
get defaultPressureAdvance(): number {
return (
Math.floor(
(this.$store.state.printer.configfile?.settings?.[this.selectedExtruder]?.pressure_advance ?? 0) * 1000
) / 1000
)
}
get defaultSmoothTime(): number {
return (
Math.floor(
(this.$store.state.printer.configfile?.settings?.[this.selectedExtruder]
?.pressure_advance_smooth_time ?? 0.04) * 1000
) / 1000
)
}
@Debounce(500)
sendCmd(params: { name: string; value: number }): void {
const gcode = `SET_PRESSURE_ADVANCE EXTRUDER=${this.selectedExtruder} ${params.name}=${params.value}`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
this.$socket.emit('printer.gcode.script', { script: gcode })
}
}
</script>
+20 -7
View File
@@ -240,6 +240,7 @@
<v-tooltip
top
content-class="tooltip__content-opacity1"
:color="bigThumbnailTooltipColor"
:disabled="!item.big_thumbnail">
<template #activator="{ on, attrs }">
<vue-load-image>
@@ -252,16 +253,16 @@
v-bind="attrs"
v-on="on" />
<div slot="preloader">
<v-progress-circular
indeterminate
color="primary"></v-progress-circular>
<v-progress-circular indeterminate color="primary" />
</div>
<div slot="error">
<v-icon>{{ mdiFile }}</v-icon>
</div>
</vue-load-image>
</template>
<span><img :src="item.big_thumbnail" width="250" :alt="item.filename" /></span>
<span>
<img :src="item.big_thumbnail" width="250" :alt="item.filename" />
</span>
</v-tooltip>
</template>
<template v-else>
@@ -304,7 +305,7 @@
:bool="dialogPrintFile.show"
:file="dialogPrintFile.item"
:current-path="currentPath"
@closeDialog="closeStartPrint"></start-print-dialog>
@closeDialog="closeStartPrint" />
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
<v-list>
<v-list-item
@@ -617,7 +618,7 @@
<script lang="ts">
import { Component, Mixins, Watch } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import { validGcodeExtensions } from '@/store/variables'
import { defaultBigThumbnailBackground, validGcodeExtensions } from '@/store/variables'
import { formatFilesize, formatPrintTime, sortFiles } from '@/plugins/helpers'
import { FileStateFile, FileStateGcodefile } from '@/store/files/types'
import Panel from '@/components/ui/Panel.vue'
@@ -1101,6 +1102,18 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
this.$store.dispatch('gui/saveSetting', { name: 'view.gcodefiles.countPerPage', value: newVal })
}
get bigThumbnailBackground() {
return this.$store.state.gui.uiSettings.bigThumbnailBackground ?? defaultBigThumbnailBackground
}
get bigThumbnailTooltipColor() {
if (defaultBigThumbnailBackground.toLowerCase() === this.bigThumbnailBackground.toLowerCase()) {
return undefined
}
return this.bigThumbnailBackground
}
getStatusIcon(status: string | null) {
return this.$store.getters['server/history/getPrintStatusIcon'](status)
}
@@ -1322,7 +1335,7 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
await addElementToItems('gcodes/' + this.currentPath, this.selectedFiles)
const date = new Date()
const timestamp = `${date.getFullYear()}${date.getMonth()}${date.getDay()}-${date.getHours()}${date.getMinutes()}${date.getSeconds()}`
const timestamp = `${date.getFullYear()}${date.getMonth()}${date.getDate()}-${date.getHours()}${date.getMinutes()}${date.getSeconds()}`
this.$socket.emit(
'server.files.zip',
@@ -1050,7 +1050,7 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
const date = new Date()
const month = (date.getMonth() + 1).toString().padStart(2, '0')
const day = date.getDay().toString().padStart(2, '0')
const day = date.getDate().toString().padStart(2, '0')
const hours = date.getHours().toString().padStart(2, '0')
const minutes = date.getMinutes().toString().padStart(2, '0')
const seconds = date.getSeconds().toString().padStart(2, '0')
@@ -83,7 +83,7 @@ export default class GitCommitsList extends Mixins(BaseMixin) {
if (
commitDate.getFullYear() !== lastCommitDate.getFullYear() ||
commitDate.getMonth() !== lastCommitDate.getMonth() ||
commitDate.getDay() !== lastCommitDate.getDay()
commitDate.getDate() !== lastCommitDate.getDate()
) {
output.push({
date: commitDate,
@@ -116,7 +116,7 @@ export default class GitCommitsList extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
.groupedCommits {
padding-top: 0;
}
@@ -67,7 +67,7 @@ export default class GitCommitsListDayCommit extends Mixins(BaseMixin) {
commitDay.setHours(0, 0, 0, 0)
const todayDay = new Date()
todayDay.setHours(0, 0, 0, 0)
const diff = Math.floor(todayDay.getTime() - commitDay.getTime()) / (1000 * 60 * 60 * 24)
const diff = Math.floor((todayDay.getTime() - commitDay.getTime()) / (1000 * 60 * 60 * 24))
if (diff === 0) {
const diffHours = Math.floor((new Date().getTime() - this.commit.date * 1000) / (1000 * 60 * 60))
@@ -99,7 +99,7 @@ export default class GitCommitsListDayCommit extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
li.commit {
border-color: rgb(48, 54, 61);
border-style: solid;
+1 -1
View File
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>
<template>
<panel
+39 -19
View File
@@ -1,13 +1,3 @@
<style scoped lang="scss">
.consoleTable {
border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.gcode-command-field {
font-family: 'Roboto Mono', monospace;
}
</style>
<template>
<panel
v-if="socketIsConnected && klipperState !== 'disconnected'"
@@ -20,30 +10,37 @@
<v-btn icon tile @click="clearConsole">
<v-icon small>{{ mdiTrashCan }}</v-icon>
</v-btn>
<command-help-modal :in-toolbar="true" @onCommand="gcode = $event"></command-help-modal>
<command-help-modal :in-toolbar="true" @onCommand="gcode = $event" />
<v-menu
:offset-y="true"
:close-on-content-click="false"
:title="$t('Panels.MiniconsolePanel.SetupConsole')">
<template #activator="{ on, attrs }">
<v-btn icon tile v-bind="attrs" v-on="on">
<v-icon small>{{ mdiFilter }}</v-icon>
<v-icon small>{{ mdiCog }}</v-icon>
</v-btn>
</template>
<v-list>
<v-list-item v-if="consoleDirection === 'shell'" class="minHeight36">
<v-checkbox
v-model="autoscroll"
class="mt-0"
hide-details
:label="$t('Panels.MiniconsolePanel.Autoscroll')" />
</v-list-item>
<v-list-item class="minHeight36">
<v-checkbox
v-model="hideWaitTemperatures"
class="mt-0"
hide-details
:label="$t('Panels.MiniconsolePanel.HideTemperatures')"></v-checkbox>
:label="$t('Panels.MiniconsolePanel.HideTemperatures')" />
</v-list-item>
<v-list-item v-if="moonrakerComponents.includes('timelapse')" class="minHeight36">
<v-checkbox
v-model="hideTlCommands"
class="mt-0"
hide-details
:label="$t('Panels.MiniconsolePanel.HideTimelapse')"></v-checkbox>
:label="$t('Panels.MiniconsolePanel.HideTimelapse')" />
</v-list-item>
<v-list-item v-for="(filter, index) in customFilters" :key="index" class="minHeight36">
<v-checkbox
@@ -51,7 +48,7 @@
class="mt-0"
hide-details
:label="filter.name"
@change="toggleFilter(filter)"></v-checkbox>
@change="toggleFilter(filter)" />
</v-list-item>
</v-list>
</v-menu>
@@ -93,7 +90,7 @@
:events="events"
:is-mini="true"
@command-click="commandClick" />
<v-divider></v-divider>
<v-divider />
</overlay-scrollbars>
</v-col>
</v-row>
@@ -109,7 +106,7 @@ import BaseMixin from '@/components/mixins/base'
import { CommandHelp, VTextareaType } from '@/store/printer/types'
import ConsoleTable from '@/components/console/ConsoleTable.vue'
import Panel from '@/components/ui/Panel.vue'
import { mdiChevronDoubleRight, mdiConsoleLine, mdiFilter, mdiSend, mdiTrashCan } from '@mdi/js'
import { mdiChevronDoubleRight, mdiCog, mdiConsoleLine, mdiSend, mdiTrashCan } from '@mdi/js'
import CommandHelpModal from '@/components/CommandHelpModal.vue'
@Component({
@@ -122,7 +119,7 @@ import CommandHelpModal from '@/components/CommandHelpModal.vue'
export default class MiniconsolePanel extends Mixins(BaseMixin) {
mdiTrashCan = mdiTrashCan
mdiConsoleLine = mdiConsoleLine
mdiFilter = mdiFilter
mdiCog = mdiCog
mdiSend = mdiSend
mdiChevronDoubleRight = mdiChevronDoubleRight
@@ -155,13 +152,18 @@ export default class MiniconsolePanel extends Mixins(BaseMixin) {
@Watch('events')
eventsChanged() {
if (this.consoleDirection === 'shell') {
if (this.consoleDirection === 'shell' && this.autoscroll) {
setTimeout(() => {
this.scrollToBottom()
}, 50)
}
}
@Watch('autoscroll')
autoscrollChanged(newVal: boolean) {
if (newVal) this.scrollToBottom()
}
clearConsole() {
this.$store.dispatch('gui/console/clear')
}
@@ -194,6 +196,14 @@ export default class MiniconsolePanel extends Mixins(BaseMixin) {
return this.$store.state.gui.gcodehistory.entries ?? []
}
get autoscroll(): boolean {
return this.$store.state.gui.console.autoscroll ?? true
}
set autoscroll(newVal) {
this.$store.dispatch('gui/saveSetting', { name: 'console.autoscroll', value: newVal })
}
commandClick(msg: string): void {
this.gcode = msg
@@ -325,3 +335,13 @@ export default class MiniconsolePanel extends Mixins(BaseMixin) {
}
}
</script>
<style scoped>
.consoleTable {
border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.gcode-command-field {
font-family: 'Roboto Mono', monospace;
}
</style>
@@ -0,0 +1,129 @@
<template>
<v-list-item three-line>
<v-list-item-content :class="listItemContentClass">
<div :class="overlineClass">#{{ id }} | {{ vendor }}</div>
<v-list-item-title :class="listItemTitleClass">
<span class="cursor-pointer" @click="clickSpool">{{ name }}</span>
</v-list-item-title>
<v-list-item-subtitle>{{ subtitle }}</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-avatar tile :size="avatarSize">
<spool-icon :color="color" @click-spool="clickSpool" />
</v-list-item-avatar>
</v-list-item>
</template>
<script lang="ts">
import { Component, Mixins, Prop } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import Panel from '@/components/ui/Panel.vue'
import SpoolmanChangeSpoolDialog from '@/components/dialogs/SpoolmanChangeSpoolDialog.vue'
import SpoolmanEjectSpoolDialog from '@/components/dialogs/SpoolmanEjectSpoolDialog.vue'
import { ServerSpoolmanStateSpool } from '@/store/server/spoolman/types'
@Component({
components: { Panel, SpoolmanChangeSpoolDialog, SpoolmanEjectSpoolDialog },
})
export default class SpoolmanPanelActiveSpool extends Mixins(BaseMixin) {
@Prop({ required: false, default: false }) readonly small!: boolean
get listItemContentClass() {
if (this.small) return 'my-0'
return ''
}
get overlineClass() {
const classes = ['text-overline', 'mb-1']
if (this.small) classes.push('line-height-auto')
return classes
}
get listItemTitleClass() {
if (this.small) return ['text-h6', 'mb-1']
return ['text-h5', 'mb-1']
}
get avatarSize() {
if (this.small) return 60
return 80
}
get active_spool(): ServerSpoolmanStateSpool | null {
return this.$store.state.server.spoolman.active_spool ?? null
}
get color() {
const color = this.active_spool?.filament.color_hex ?? null
if (color === null) return '#000'
return `#${color}`
}
get id() {
return this.active_spool?.id ?? 'XX'
}
get vendor() {
return this.active_spool?.filament?.vendor?.name ?? 'Unknown'
}
get name() {
return this.active_spool?.filament.name ?? 'Unknown'
}
get materialOutput() {
const material = this.active_spool?.filament.material ?? null
if (material === null) return null
return material
}
get weightOutput() {
let remaining = this.active_spool?.remaining_weight ?? null
let total = this.active_spool?.filament.weight ?? null
let unit = 'g'
if (remaining === null || total === null) return null
remaining = Math.round(remaining)
let totalRound = Math.floor(total / 1000)
if (total >= 1000) {
if (totalRound !== total / 1000) {
totalRound = Math.round(total / 100) / 10
}
return `${remaining}g / ${totalRound}kg`
}
return `${remaining} / ${total}${unit}`
}
get lengthOutput() {
let remaining = this.active_spool?.remaining_length ?? null
if (remaining === null) return null
remaining = Math.round(remaining / 1000)
return `${remaining}m`
}
get subtitle() {
return [this.materialOutput, this.weightOutput, this.lengthOutput].filter((v) => v !== null).join(' | ')
}
clickSpool() {
this.$emit('change-spool')
}
}
</script>
<style scoped>
.line-height-auto {
line-height: 1;
}
</style>
+102
View File
@@ -0,0 +1,102 @@
<template>
<div>
<panel :icon="mdiAdjust" :title="title" card-class="spoolman-panel" :collapsible="true">
<template #buttons>
<v-btn icon tile :title="changeSpoolTooltip" @click="showChangeSpoolDialog = true">
<v-icon>{{ mdiSwapVertical }}</v-icon>
</v-btn>
<v-menu :offset-y="true" :close-on-content-click="false" left>
<template #activator="{ on, attrs }">
<v-btn icon tile v-bind="attrs" v-on="on">
<v-icon>{{ mdiDotsVertical }}</v-icon>
</v-btn>
</template>
<v-list dense>
<v-list-item>
<v-btn small style="width: 100%" @click="showEjectSpoolDialog = true">
<v-icon left>{{ mdiEject }}</v-icon>
{{ $t('Panels.SpoolmanPanel.EjectSpool') }}
</v-btn>
</v-list-item>
<v-list-item>
<v-btn small style="width: 100%" @click="openSpoolManager">
<v-icon left>{{ mdiOpenInNew }}</v-icon>
{{ $t('Panels.SpoolmanPanel.OpenSpoolManager') }}
</v-btn>
</v-list-item>
</v-list>
</v-menu>
</template>
<v-card-text v-if="active_spool === null">
<v-row>
<v-col class="text-center">
<p class="text--disabled">{{ $t('Panels.SpoolmanPanel.NoActiveSpool') }}</p>
<v-btn small color="primary" @click="showChangeSpoolDialog = true">
{{ $t('Panels.SpoolmanPanel.SelectSpool') }}
</v-btn>
</v-col>
</v-row>
</v-card-text>
<spoolman-panel-active-spool v-else @change-spool="showChangeSpoolDialog = true" />
</panel>
<spoolman-change-spool-dialog :show-dialog="showChangeSpoolDialog" @close="showChangeSpoolDialog = false" />
<spoolman-eject-spool-dialog :show-dialog="showEjectSpoolDialog" @close="showEjectSpoolDialog = false" />
</div>
</template>
<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import Panel from '@/components/ui/Panel.vue'
import { mdiAdjust, mdiDotsVertical, mdiEject, mdiOpenInNew, mdiSwapVertical } from '@mdi/js'
import SpoolmanChangeSpoolDialog from '@/components/dialogs/SpoolmanChangeSpoolDialog.vue'
import SpoolmanEjectSpoolDialog from '@/components/dialogs/SpoolmanEjectSpoolDialog.vue'
import { ServerSpoolmanStateSpool } from '@/store/server/spoolman/types'
import SpoolmanPanelActiveSpool from '@/components/panels/Spoolman/SpoolmanPanelActiveSpool.vue'
@Component({
components: { SpoolmanPanelActiveSpool, Panel, SpoolmanChangeSpoolDialog, SpoolmanEjectSpoolDialog },
})
export default class SpoolmanPanel extends Mixins(BaseMixin) {
mdiAdjust = mdiAdjust
mdiDotsVertical = mdiDotsVertical
mdiEject = mdiEject
mdiOpenInNew = mdiOpenInNew
mdiSwapVertical = mdiSwapVertical
showChangeSpoolDialog = false
showEjectSpoolDialog = false
get health() {
return this.$store.state.server.spoolman.health ?? ''
}
get title() {
const headline = this.$t('Panels.SpoolmanPanel.Headline') as string
if (this.health === '' || this.health === 'healthy') return headline
return `${headline} (${this.health})`
}
get changeSpoolTooltip(): string {
if (this.active_spool === null) return this.$t('Panels.SpoolmanPanel.SelectSpool') as string
return this.$t('Panels.SpoolmanPanel.ChangeSpool') as string
}
get active_spool(): ServerSpoolmanStateSpool | null {
return this.$store.state.server.spoolman.active_spool ?? null
}
get spoolManagerUrl() {
return this.$store.state.server.config.config?.spoolman?.server ?? null
}
openSpoolManager() {
window.open(this.spoolManagerUrl, '_blank')
}
}
</script>
<style scoped></style>
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>
<template>
<div v-if="['printing', 'paused'].includes(printer_state) && printing_objects.length">
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>
<template>
<div>
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>
<template>
<div>
@@ -1,6 +1,5 @@
<style lang="scss" scoped>
<style scoped>
svg {
//background: rgba(200, 200, 200);
border: 2px solid #888;
}
+19 -2
View File
@@ -20,7 +20,11 @@
@click="showDialog(item)">
<td class="pr-0 text-center" style="width: 32px">
<template v-if="item.small_thumbnail">
<v-tooltip top content-class="tooltip__content-opacity1" :disabled="!item.big_thumbnail">
<v-tooltip
top
content-class="tooltip__content-opacity1"
:disabled="!item.big_thumbnail"
:color="bigThumbnailTooltipColor">
<template #activator="{ on, attrs }">
<vue-load-image class="d-flex">
<img
@@ -72,7 +76,7 @@
:bool="showDialogBool"
:file="dialogFile"
:current-path="currentPath"
@closeDialog="closeDialog"></start-print-dialog>
@closeDialog="closeDialog" />
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
<v-list>
<v-list-item :disabled="printerIsPrinting || !klipperReadyForGui" @click="showDialog(contextMenu.item)">
@@ -241,6 +245,7 @@ import {
mdiCloseThick,
} from '@mdi/js'
import Panel from '@/components/ui/Panel.vue'
import { defaultBigThumbnailBackground } from '@/store/variables'
interface dialogRenameObject {
show: boolean
@@ -356,6 +361,18 @@ export default class StatusPanelGcodefiles extends Mixins(BaseMixin, ControlMixi
return `width: ${this.contentTdWidth}px;`
}
get bigThumbnailBackground() {
return this.$store.state.gui.uiSettings.bigThumbnailBackground ?? defaultBigThumbnailBackground
}
get bigThumbnailTooltipColor() {
if (defaultBigThumbnailBackground.toLowerCase() === this.bigThumbnailBackground.toLowerCase()) {
return undefined
}
return this.bigThumbnailBackground
}
showContextMenu(e: any, item: FileStateGcodefile) {
if (!this.contextMenu.shown) {
e?.preventDefault()
+1 -1
View File
@@ -156,7 +156,7 @@ export default class StatusPanelJobqueue extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
.filesJobqueue {
position: relative;
}
+19 -2
View File
@@ -5,7 +5,11 @@
@contextmenu="showContextMenu($event, item)">
<td class="pr-0 text-center" style="width: 32px">
<template v-if="smallThumbnail && bigThumbnail">
<v-tooltip v-if="smallThumbnail && bigThumbnail" top content-class="tooltip__content-opacity1">
<v-tooltip
v-if="smallThumbnail && bigThumbnail"
top
content-class="tooltip__content-opacity1"
:color="bigThumbnailTooltipColor">
<template #activator="{ on, attrs }">
<vue-load-image>
<img slot="image" :src="smallThumbnail" width="32" height="32" v-bind="attrs" v-on="on" />
@@ -116,6 +120,7 @@ import BaseMixin from '@/components/mixins/base'
import { ServerJobQueueStateJob } from '@/store/server/jobQueue/types'
import { mdiChevronDown, mdiChevronUp, mdiCloseThick, mdiCounter, mdiFile, mdiPlay, mdiPlaylistRemove } from '@mdi/js'
import NumberInput from '@/components/inputs/NumberInput.vue'
import { defaultBigThumbnailBackground } from '@/store/variables'
@Component({
components: { NumberInput },
})
@@ -192,6 +197,18 @@ export default class StatusPanelJobqueueEntry extends Mixins(BaseMixin) {
return output
}
get bigThumbnailBackground() {
return this.$store.state.gui.uiSettings.bigThumbnailBackground ?? defaultBigThumbnailBackground
}
get bigThumbnailTooltipColor() {
if (defaultBigThumbnailBackground.toLowerCase() === this.bigThumbnailBackground.toLowerCase()) {
return undefined
}
return this.bigThumbnailBackground
}
formatPrintTime(totalSeconds: number) {
if (totalSeconds) {
let output = ''
@@ -258,7 +275,7 @@ export default class StatusPanelJobqueueEntry extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
.filesJobqueue {
position: relative;
}
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>
<template>
<div>
+1 -1
View File
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>
<template>
<div>
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>
<template>
<v-card-text class="pa-0">
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>
<template>
<v-card-text class="pa-0">
@@ -7,6 +7,7 @@
tabindex="-1"
class="d-flex align-end statusPanel-big-thumbnail"
height="200"
:style="thumbnailStyle"
@focus="focusBigThumbnail"
@blur="blurBigThumbnail">
<v-card-title
@@ -43,26 +44,34 @@
:src="thumbnailSmall"
width="32"
height="32"
:alt="current_filename"
v-bind="attrs"
v-on="on" />
<v-progress-circular
slot="preloader"
indeterminate
color="primary"></v-progress-circular>
<v-icon slot="error">{{ mdiFile }}</v-icon>
<div slot="preloader">
<v-progress-circular indeterminate color="primary" />
</div>
<div slot="error">
<v-icon>{{ mdiFile }}</v-icon>
</div>
</vue-load-image>
</template>
<span><img :src="thumbnailBig" width="250" /></span>
<span><img :src="thumbnailBig" width="250" :alt="current_filename" /></span>
</v-tooltip>
</template>
<template v-else-if="thumbnailSmall">
<vue-load-image>
<img slot="image" :src="thumbnailSmall" width="32" height="32" />
<v-progress-circular
slot="preloader"
indeterminate
color="primary"></v-progress-circular>
<v-icon slot="error">{{ mdiFile }}</v-icon>
<img
slot="image"
:src="thumbnailSmall"
width="32"
height="32"
:alt="current_filename" />
<div slot="preloader">
<v-progress-circular indeterminate color="primary" />
</div>
<div slot="error">
<v-icon>{{ mdiFile }}</v-icon>
</div>
</vue-load-image>
</template>
</v-col>
@@ -77,13 +86,11 @@
import Component from 'vue-class-component'
import { Mixins } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import { thumbnailBigMin, thumbnailSmallMax, thumbnailSmallMin } from '@/store/variables'
import { defaultBigThumbnailBackground, thumbnailBigMin, thumbnailSmallMax, thumbnailSmallMin } from '@/store/variables'
import { mdiFileOutline, mdiFile } from '@mdi/js'
import { Debounce } from 'vue-debounce-decorator'
@Component({
components: {},
})
@Component({})
export default class StatusPanelPrintstatusThumbnail extends Mixins(BaseMixin) {
mdiFileOutline = mdiFileOutline
mdiFile = mdiFile
@@ -178,6 +185,18 @@ export default class StatusPanelPrintstatusThumbnail extends Mixins(BaseMixin) {
return this.current_filename && setting && this.thumbnailBig
}
get bigThumbnailBackground() {
return this.$store.state.gui.uiSettings.bigThumbnailBackground ?? defaultBigThumbnailBackground
}
get thumbnailStyle() {
if (defaultBigThumbnailBackground.toLowerCase() !== this.bigThumbnailBackground.toLowerCase()) {
return { backgroundColor: this.bigThumbnailBackground }
}
return {}
}
focusBigThumbnail() {
if (this.$refs.bigThumbnail) {
const clientWidth = this.$refs.bigThumbnail.$el.clientWidth
@@ -204,7 +223,7 @@ export default class StatusPanelPrintstatusThumbnail extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
.statusPanel-big-thumbnail {
transition: height 0.25s ease-out;
}
+1 -1
View File
@@ -397,7 +397,7 @@ export default class StatusPanel extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
._border-radius {
border-bottom-left-radius: inherit;
border-bottom-right-radius: inherit;
@@ -34,6 +34,13 @@
:key="objectName"
:object-name="objectName"
:is-responsive-mobile="el.is.mobile ?? false" />
<template v-if="!hideMonitors">
<temperature-panel-list-item
v-for="objectName in monitors"
:key="objectName"
:object-name="objectName"
:is-responsive-mobile="el.is.mobile ?? false" />
</template>
</tbody>
</v-simple-table>
</template>
@@ -70,6 +77,14 @@ export default class TemperaturePanelList extends Mixins(BaseMixin) {
return this.$store.state.printer?.heaters?.available_sensors ?? []
}
get available_monitors() {
return this.$store.state.printer?.heaters?.available_monitors ?? []
}
get monitors() {
return this.available_monitors.sort(this.sortObjectName)
}
get temperature_fans() {
return this.available_sensors
.filter((name: string) => name.startsWith('temperature_fan') && !name.startsWith('temperature_fan _'))
@@ -84,6 +99,10 @@ export default class TemperaturePanelList extends Mixins(BaseMixin) {
return this.$store.state.gui.view.tempchart.hideMcuHostSensors ?? false
}
get hideMonitors(): boolean {
return this.$store.state.gui.view.tempchart.hideMonitors ?? false
}
get temperature_sensors() {
return this.available_sensors
.filter((fullName: string) => {
@@ -136,7 +155,7 @@ export default class TemperaturePanelList extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
.temperature-panel-table th,
.temperature-panel-table ::v-deep td {
padding-top: 5px !important;
@@ -68,6 +68,7 @@ import { convertName } from '@/plugins/helpers'
import {
mdiFan,
mdiFire,
mdiMemory,
mdiPrinter3dNozzle,
mdiPrinter3dNozzleAlert,
mdiRadiator,
@@ -131,6 +132,9 @@ export default class TemperaturePanelListItem extends Mixins(BaseMixin) {
// show heater_generic icon
if (this.objectName.startsWith('heater_generic')) return mdiFire
// show heater_generic icon
if (this.objectName.startsWith('tmc')) return mdiMemory
// show fan icon, if it is a fan
if (this.isFan) return mdiFan
@@ -138,7 +142,7 @@ export default class TemperaturePanelListItem extends Mixins(BaseMixin) {
}
get color() {
return this.$store.getters['printer/tempHistory/getDatasetColor'](this.objectName)
return this.$store.getters['printer/tempHistory/getDatasetColor'](this.objectName) ?? '#FFFFFF'
}
get iconColor() {
@@ -269,7 +273,7 @@ export default class TemperaturePanelListItem extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
::v-deep .v-icon._no-focus-style:focus::after {
opacity: 0 !important;
}
@@ -99,7 +99,7 @@ export default class TemperaturePanelListItemNevermore extends Mixins(BaseMixin)
}
</script>
<style lang="scss" scoped>
<style scoped>
::v-deep .v-icon._no-focus-style:focus::after {
opacity: 0 !important;
}
@@ -70,13 +70,23 @@ export default class TemperaturePanelPresets extends Mixins(BaseMixin) {
preheat(preset: GuiPresetsStatePreset): void {
for (const [name, attributes] of Object.entries(preset.values)) {
if (attributes.bool) {
let gcode = `SET_HEATER_TEMPERATURE HEATER=${name} TARGET=${attributes.value}`
const splits = name.split(' ')
const printerObject = splits[0]
let printerObjectName = splits[1] ?? splits[0]
if (attributes.type === 'temperature_fan') {
const fanName = name.replace('temperature_fan ', '')
gcode = `SET_TEMPERATURE_FAN_TARGET temperature_fan=${fanName} TARGET=${attributes.value}`
// set default heater command
let command = 'SET_HEATER_TEMPERATURE'
let commandAttribute = 'HEATER'
// override command for temperature_fan
if (printerObject === 'temperature_fan') {
command = 'SET_TEMPERATURE_FAN_TARGET'
commandAttribute = 'TEMPERATURE_FAN'
}
// build gcode
const gcode = `${command} ${commandAttribute}=${printerObjectName} TARGET=${attributes.value}`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
this.$socket.emit('printer.gcode.script', { script: gcode })
}
@@ -97,7 +107,7 @@ export default class TemperaturePanelPresets extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
._preset-title {
font-size: 0.8125rem;
font-weight: 500;
@@ -20,6 +20,13 @@
hide-details
:label="$t('Panels.TemperaturePanel.HideMcuHostSensors')" />
</v-list-item>
<v-list-item class="minHeight36">
<v-checkbox
v-model="hideMonitors"
class="mt-0"
hide-details
:label="$t('Panels.TemperaturePanel.HideMonitors')" />
</v-list-item>
<v-list-item class="minHeight36">
<v-checkbox
v-model="autoscaleTempchart"
@@ -64,5 +71,13 @@ export default class TemperaturePanelSettings extends Mixins(BaseMixin) {
set hideMcuHostSensors(newVal: boolean) {
this.$store.dispatch('gui/saveSetting', { name: 'view.tempchart.hideMcuHostSensors', value: newVal })
}
get hideMonitors(): boolean {
return this.$store.state.gui.view.tempchart.hideMonitors ?? false
}
set hideMonitors(newVal: boolean) {
this.$store.dispatch('gui/saveSetting', { name: 'view.tempchart.hideMonitors', value: newVal })
}
}
</script>
@@ -746,7 +746,7 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
await addElementToItems(this.currentPath, this.selectedFiles)
const date = new Date()
const timestamp = `${date.getFullYear()}${date.getMonth()}${date.getDay()}-${date.getHours()}${date.getMinutes()}${date.getSeconds()}`
const timestamp = `${date.getFullYear()}${date.getMonth()}${date.getDate()}-${date.getHours()}${date.getMinutes()}${date.getSeconds()}`
this.$socket.emit(
'server.files.zip',
@@ -202,10 +202,11 @@ import BaseMixin from '@/components/mixins/base'
import SettingsRow from '@/components/settings/SettingsRow.vue'
import Panel from '@/components/ui/Panel.vue'
import { mdiFile, mdiInformation, mdiTextBoxSearchOutline, mdiCloseThick } from '@mdi/js'
import WebcamMixin from '@/components/mixins/webcam'
@Component({
components: { Panel, SettingsRow },
})
export default class TimelapseStatusPanel extends Mixins(BaseMixin) {
export default class TimelapseStatusPanel extends Mixins(BaseMixin, WebcamMixin) {
mdiInformation = mdiInformation
mdiFile = mdiFile
mdiCloseThick = mdiCloseThick
@@ -351,14 +352,13 @@ export default class TimelapseStatusPanel extends Mixins(BaseMixin) {
}
get webcamStyle() {
let transforms = []
const scale = [0, 180].includes(this.camSettings.rotate) ? 1 : this.scale
this.camSettings?.flipX ? transforms.push(`scaleX(-${scale})`) : transforms.push(`scaleX(${scale})`)
this.camSettings?.flipY ? transforms.push(`scaleY(-${scale})`) : transforms.push(`scaleY(${scale})`)
if (this.camSettings.rotate !== 0) transforms.push(`rotate(${this.camSettings.rotate}deg)`)
if (transforms.length) return { transform: transforms.join(' ') }
return {}
return {
transform: this.generateTransform(
this.camSettings.flip_horizontal ?? false,
this.camSettings.flip_vertical ?? false,
this.camSettings.rotation ?? 0
),
}
}
startRender() {
+15 -17
View File
@@ -2,19 +2,11 @@
<panel
v-if="klipperReadyForGui"
:icon="mdiGamepad"
:title="$t('Panels.ToolheadControlPanel.Headline').toString()"
:title="$t('Panels.ToolheadControlPanel.Headline')"
:collapsible="true"
card-class="toolhead-control-panel">
<!-- PANEL-HEADER 3-DOT-MENU -->
<template
v-if="
(controlStyle !== 'bars' && (existsZtilt || existsQGL)) ||
existsBedScrews ||
existsBedTilt ||
existsDeltaCalibrate ||
existsScrewsTilt
"
#buttons>
<template v-if="showButtons" #buttons>
<v-menu left offset-y :close-on-content-click="false" class="pa-0">
<template #activator="{ on, attrs }">
<v-btn icon tile v-bind="attrs" :disabled="['printing'].includes(printer_state)" v-on="on">
@@ -92,21 +84,21 @@
</v-menu>
</template>
<!-- MOVE TO CONTROL -->
<move-to-control class="py-0 pt-3"></move-to-control>
<move-to-control class="py-0 pt-3" />
<!-- AXIS CONTROL -->
<v-container v-if="axisControlVisible">
<component :is="`${controlStyle}-control`"></component>
<component :is="`${controlStyle}-control`" />
</v-container>
<!-- Z-OFFSET CONTROL -->
<v-divider :class="{ 'mt-3': !axisControlVisible }"></v-divider>
<v-divider :class="{ 'mt-3': !axisControlVisible }" />
<v-container>
<zoffset-control></zoffset-control>
<zoffset-control />
</v-container>
<!-- SPEED FACTOR -->
<v-divider></v-divider>
<v-divider />
<v-container>
<tool-slider
:label="$t('Panels.ToolheadControlPanel.SpeedFactor').toString()"
:label="$t('Panels.ToolheadControlPanel.SpeedFactor')"
:icon="mdiSpeedometer"
:target="speedFactor"
:min="1"
@@ -116,7 +108,7 @@
:dynamic-range="true"
:has-input-field="true"
command="M220"
attribute-name="S"></tool-slider>
attribute-name="S" />
</v-container>
</panel>
</template>
@@ -172,5 +164,11 @@ export default class ToolheadControlPanel extends Mixins(BaseMixin, ControlMixin
get axisControlVisible() {
return !(this.isPrinting && (this.$store.state.gui.control.hideDuringPrint ?? false))
}
get showButtons() {
if (this.controlStyle !== 'bars' && (this.existsZtilt || this.existsQGL)) return true
return this.existsBedScrews || this.existsBedTilt || this.existsDeltaCalibrate || this.existsScrewsTilt
}
}
</script>
@@ -1,4 +1,4 @@
<style lang="scss" scoped>
<style scoped>
.btnHomeAxis {
width: 36px;
min-width: 36px !important;
@@ -706,7 +706,7 @@ export default class CircleControl extends Mixins(BaseMixin, ControlMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
svg {
max-height: 350px;
min-height: 275px;
@@ -1,4 +1,4 @@
<style lang="scss" scoped>
<style scoped>
.btnMinWidthAuto {
min-width: auto !important;
}
@@ -27,11 +27,7 @@
<span v-if="!el.is.xsmall" class="ml-1">{{ $t('Panels.ZoffsetPanel.Clear') }}</span>
</v-btn>
<v-btn
v-if="
z_gcode_offset !== 0 &&
((existZOffsetApplyProbe && !existZOffsetApplyEndstop) ||
(!existZOffsetApplyProbe && existZOffsetApplyEndstop))
"
v-if="showSaveButton"
color="primary"
text
small
@@ -41,31 +37,6 @@
<v-icon small>{{ mdiContentSave }}</v-icon>
<span v-if="!el.is.xsmall" class="ml-1">{{ $t('Panels.ZoffsetPanel.Save') }}</span>
</v-btn>
<v-menu v-else-if="z_gcode_offset !== 0" offset-y left :close-on-content-click="false">
<template #activator="{ on, attrs }">
<v-btn plain text small color="primary" v-bind="attrs" class="pl-2 pr-0" v-on="on">
<v-icon small>{{ mdiContentSave }}</v-icon>
<span v-if="!el.is.xsmall" class="ml-1">
{{ $t('Panels.ZoffsetPanel.Save') }}
</span>
<v-icon small>{{ mdiMenuDown }}</v-icon>
</v-btn>
</template>
<v-list dense>
<v-list-item>
<v-btn small style="width: 100%" @click="saveZOffsetToEndstop">
<v-icon left small>{{ mdiElectricSwitch }}</v-icon>
{{ $t('Panels.ZoffsetPanel.ToEndstop') }}
</v-btn>
</v-list-item>
<v-list-item>
<v-btn small style="width: 100%" @click="saveZOffsetToProbe">
<v-icon left small>{{ mdiElevator }}</v-icon>
{{ $t('Panels.ZoffsetPanel.ToProbe') }}
</v-btn>
</v-list-item>
</v-list>
</v-menu>
</div>
</v-col>
</v-row>
@@ -123,7 +94,7 @@
<v-dialog v-model="saveOffsetDialog" max-width="290">
<panel
:title="$t('Panels.ZoffsetPanel.SaveInfoHeadline').toString()"
:title="$t('Panels.ZoffsetPanel.SaveInfoHeadline')"
:icon="mdiInformation"
card-class="zoffset-saveinfo-dialog"
:margin-bottom="false">
@@ -160,12 +131,9 @@ import Responsive from '@/components/ui/Responsive.vue'
import {
mdiBroom,
mdiElectricSwitch,
mdiElevator,
mdiContentSave,
mdiArrowCollapseDown,
mdiInformation,
mdiMenuDown,
mdiArrowExpandUp,
mdiLayersOutline,
} from '@mdi/js'
@@ -174,16 +142,13 @@ import {
})
export default class ZoffsetControl extends Mixins(BaseMixin) {
mdiBroom = mdiBroom
mdiElectricSwitch = mdiElectricSwitch
mdiElevator = mdiElevator
mdiContentSave = mdiContentSave
mdiArrowCollapseDown = mdiArrowCollapseDown
mdiInformation = mdiInformation
mdiMenuDown = mdiMenuDown
mdiArrowExpandUp = mdiArrowExpandUp
mdiLayersOutline = mdiLayersOutline
private saveOffsetDialog = false
saveOffsetDialog = false
get homing_origin() {
return this.$store.state.printer?.gcode_move?.homing_origin ?? []
@@ -198,13 +163,37 @@ export default class ZoffsetControl extends Mixins(BaseMixin) {
}
get homed_axis() {
return this.$store.state.printer.toolhead.homed_axes ?? ''
return this.$store.state.printer.toolhead?.homed_axes ?? ''
}
get helplist() {
return this.$store.state.printer.helplist ?? []
}
get settings() {
return this.$store.state.printer.configfile?.settings ?? {}
}
get kinematics() {
return this.settings.printer?.kinematics ?? 'cartesian'
}
get stepper_name() {
if (this.kinematics === 'delta') return 'stepper_a'
return 'stepper_z'
}
get endstop_pin() {
const stepperConfig = this.settings[this.stepper_name] ?? {}
return stepperConfig?.endstop_pin
}
get isEndstopProbe() {
return this.endstop_pin.search('probe:z_virtual_endstop') !== -1
}
get existZOffsetApplyProbe() {
return this.helplist.findIndex((gcode: CommandHelp) => gcode.commandLow === 'z_offset_apply_probe') !== -1
}
@@ -217,6 +206,17 @@ export default class ZoffsetControl extends Mixins(BaseMixin) {
return this.$store.state.printer?.gcode_move?.homing_origin[2].toFixed(3)
}
get showSaveButton() {
// hide button when offset is 0
if (this.z_gcode_offset === 0) return false
// show button when z endstop is probe and probe gcode exists
if (this.isEndstopProbe && this.existZOffsetApplyProbe) return true
// show button when z endstop is endstop and endstop gcode exists
return !this.isEndstopProbe && this.existZOffsetApplyEndstop
}
sendBabyStepDown(offset: number): void {
const gcode = `SET_GCODE_OFFSET Z_ADJUST=-${offset} ${this.homed_axis === 'xyz' ? 'MOVE=1' : ''}`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
@@ -236,12 +236,12 @@ export default class ZoffsetControl extends Mixins(BaseMixin) {
}
saveZOffset(): void {
if (this.existZOffsetApplyProbe && !this.existZOffsetApplyEndstop) {
if (this.isEndstopProbe && this.existZOffsetApplyProbe) {
this.saveZOffsetToProbe()
return
}
if (!this.existZOffsetApplyProbe && this.existZOffsetApplyEndstop) {
this.saveZOffsetToEndstop()
}
this.saveZOffsetToEndstop()
}
saveZOffsetToEndstop(): void {
@@ -267,7 +267,7 @@ export default class ZoffsetControl extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
.v-btn-toggle {
width: 100%;
}
+7 -3
View File
@@ -8,8 +8,8 @@
:collapsible="$route.fullPath !== '/cam'"
card-class="webcam-panel"
:margin-bottom="currentPage !== 'page'">
<template v-if="webcams.length > 1" #buttons>
<v-menu :offset-y="true" title="Webcam">
<template #buttons>
<v-menu v-if="showSwitch" :offset-y="true">
<template #activator="{ on, attrs }">
<v-btn text tile v-bind="attrs" v-on="on">
<v-icon v-if="'icon' in currentCam" small class="mr-2">
@@ -33,7 +33,7 @@
<v-icon small class="mt-1">{{ convertWebcamIcon(webcam.icon) }}</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title v-text="webcam.name"></v-list-item-title>
<v-list-item-title v-text="webcam.name" />
</v-list-item-content>
</v-list-item>
</v-list>
@@ -77,6 +77,10 @@ export default class WebcamPanel extends Mixins(BaseMixin, WebcamMixin) {
return this.$store.getters['gui/webcams/getWebcams']
}
get showSwitch() {
return this.webcams.length > 1
}
// id changed to name with the refactoring of using moonraker webcam API
get currentCamId(): string {
if (this.webcams.length === 1) return this.webcams[0].name ?? 'all'
@@ -65,7 +65,7 @@ export default class SettingsGeneralTabResetDatabase extends Mixins(BaseMixin, S
resetCheckboxes: string[] = []
async mounted() {
this.resetableNamespaces = await this.loadBackupableNamespaces()
await this.loadResetableNamespaces()
}
onSelectResetCheckboxes(resetCheckboxes: string[]) {
@@ -78,10 +78,26 @@ export default class SettingsGeneralTabResetDatabase extends Mixins(BaseMixin, S
}
async openDialog() {
this.resetableNamespaces = await this.loadBackupableNamespaces()
await this.loadResetableNamespaces()
this.showDialog = true
}
async loadResetableNamespaces() {
this.resetableNamespaces = await this.loadBackupableNamespaces()
if (this.moonrakerComponents.includes('history')) {
this.resetableNamespaces.push({
value: 'history_jobs',
label: this.$t('Settings.GeneralTab.DbHistoryJobs'),
})
this.resetableNamespaces.push({
value: 'history_totals',
label: this.$t('Settings.GeneralTab.DbHistoryTotals'),
})
}
}
closeDialog() {
this.showDialog = false
}
+19 -16
View File
@@ -82,6 +82,25 @@ export default class SettingsGeneralTab extends Mixins(BaseMixin, SettingsGenera
mdiHelpCircle = mdiHelpCircle
mdiCloseThick = mdiCloseThick
availableLanguages: { text: string; value: string }[] = []
async created() {
const locales = import.meta.glob<string>('../../locales/*.json', { import: 'title' })
const languages: { text: string; value: string }[] = []
for (const file in locales) {
const langKey = file.slice(file.lastIndexOf('.') - 2, file.lastIndexOf('.'))
const title = await locales[file]()
languages.push({
text: title,
value: langKey,
})
}
this.availableLanguages = languages
}
get printerName() {
return this.$store.state.gui.general.printername
}
@@ -98,22 +117,6 @@ export default class SettingsGeneralTab extends Mixins(BaseMixin, SettingsGenera
this.$store.dispatch('gui/saveSetting', { name: 'general.language', value: newVal })
}
get availableLanguages() {
const locales = import.meta.glob('../../locales/*.json', { eager: true }) as { [key: string]: any }
const languages: { text: string; value: string }[] = []
Object.keys(locales).map((file: string) => {
const langKey = file.slice(file.lastIndexOf('.') - 2, file.lastIndexOf('.'))
languages.push({
text: locales[file].title,
value: langKey,
})
})
return languages
}
get dateFormat() {
return this.$store.state.gui.general.dateFormat
}
@@ -78,4 +78,4 @@ export default class SettingsMiscellaneousTab extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped></style>
<style scoped></style>
@@ -233,4 +233,4 @@ export default class SettingsMiscellaneousTabLightGroups extends Mixins(BaseMixi
}
</script>
<style lang="scss" scoped></style>
<style scoped></style>
@@ -464,4 +464,4 @@ export default class SettingsMiscellaneousTabLightPresets extends Mixins(BaseMix
}
</script>
<style lang="scss" scoped></style>
<style scoped></style>
@@ -34,7 +34,7 @@ export default class SettingsNavigationTab extends Mixins(NavigationMixin, BaseM
newVal.forEach((naviPoint, index) => {
this.$store.dispatch('gui/navigation/updatePos', {
type: naviPoint.type,
title: naviPoint.title,
title: naviPoint.orgTitle ?? naviPoint.title,
visible: naviPoint.visible,
position: index + 1,
})
@@ -65,6 +65,32 @@
<v-switch v-model="boolBigThumbnail" hide-details class="mt-0" />
</settings-row>
<v-divider class="my-2" />
<settings-row :title="$t('Settings.UiSettingsTab.BigThumbnailBackground')">
<v-btn
v-if="bigThumbnailBackground.toLowerCase() !== defaultBigThumbnailBackground.toLowerCase()"
small
text
class="minwidth-0"
@click="bigThumbnailBackground = defaultBigThumbnailBackground">
<v-icon small>{{ mdiRestart }}</v-icon>
</v-btn>
<v-menu bottom left offset-y :close-on-content-click="false">
<template #activator="{ on, attrs }">
<v-btn
v-bind="attrs"
:color="bigThumbnailBackground"
class="minwidth-0 px-5"
small
v-on="on" />
</template>
<v-color-picker
:value="bigThumbnailBackground"
hide-mode-switch
mode="rgba"
@update:color="updateBigThumbnailBackground" />
</v-menu>
</settings-row>
<v-divider class="my-2" />
<settings-row
:title="$t('Settings.UiSettingsTab.DisplayCANCEL_PRINT')"
:sub-title="$t('Settings.UiSettingsTab.DisplayCANCEL_PRINTDescription')"
@@ -209,8 +235,8 @@
</settings-row>
<v-divider class="my-2" />
<settings-row
:title="$t('Settings.UiSettingsTab.HideUpdateWarnings').toString()"
:sub-title="$t('Settings.UiSettingsTab.HideUpdateWarningsDescription').toString()"
:title="$t('Settings.UiSettingsTab.HideUpdateWarnings')"
:sub-title="$t('Settings.UiSettingsTab.HideUpdateWarningsDescription')"
:dynamic-slot-width="true">
<v-switch v-model="hideUpdateWarnings" hide-details class="mt-0" />
</settings-row>
@@ -224,7 +250,7 @@ import Component from 'vue-class-component'
import { Mixins } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import SettingsRow from '@/components/settings/SettingsRow.vue'
import { defaultLogoColor, defaultPrimaryColor } from '@/store/variables'
import { defaultLogoColor, defaultPrimaryColor, defaultBigThumbnailBackground } from '@/store/variables'
import { Debounce } from 'vue-debounce-decorator'
import { mdiRestart, mdiTimerOutline } from '@mdi/js'
import { ServerPowerStateDevice } from '@/store/server/power/types'
@@ -238,6 +264,7 @@ export default class SettingsUiSettingsTab extends Mixins(BaseMixin) {
defaultLogoColor = defaultLogoColor
defaultPrimaryColor = defaultPrimaryColor
defaultBigThumbnailBackground = defaultBigThumbnailBackground
get logoColor() {
return this.$store.state.gui.uiSettings.logo
@@ -263,6 +290,14 @@ export default class SettingsUiSettingsTab extends Mixins(BaseMixin) {
this.$store.dispatch('gui/saveSetting', { name: 'uiSettings.boolBigThumbnail', value: newVal })
}
get bigThumbnailBackground() {
return this.$store.state.gui.uiSettings.bigThumbnailBackground
}
set bigThumbnailBackground(newVal) {
this.$store.dispatch('gui/saveSetting', { name: 'uiSettings.bigThumbnailBackground', value: newVal })
}
get displayCancelPrint() {
return this.$store.state.gui.uiSettings.displayCancelPrint
}
@@ -468,5 +503,10 @@ export default class SettingsUiSettingsTab extends Mixins(BaseMixin) {
updatePrimaryColor(newVal: any) {
this.primaryColor = this.clearColorObject(newVal)
}
@Debounce(500)
updateBigThumbnailBackground(newVal: any) {
this.bigThumbnailBackground = this.clearColorObject(newVal)
}
}
</script>
@@ -322,7 +322,7 @@ export default class WebcamForm extends Mixins(BaseMixin, WebcamMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
::v-deep ._transition svg {
transition: transform 500ms;
}
@@ -70,4 +70,4 @@ export default class WebcamListEntry extends Mixins(BaseMixin, WebcamMixin) {
}
</script>
<style lang="scss" scoped></style>
<style scoped></style>
+2 -2
View File
@@ -83,7 +83,7 @@ export default class Panel extends Mixins(BaseMixin) {
}
</script>
<style lang="scss" scoped>
<style scoped>
.expanded header.v-toolbar {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
@@ -107,7 +107,7 @@ export default class Panel extends Mixins(BaseMixin) {
}
</style>
<style lang="scss">
<style>
.v-card.panel .v-toolbar__content {
padding-right: 0;
}
Loaded 100 of 159 files, more files were not shown because too many files have changed in this diff. Show more