Compare commits
100
Commits
v2.3.0
...
v2.5.0-beta1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a798d8973c | ||
|
|
328530a6a3 | ||
|
|
43dc843eca | ||
|
|
92438bf8a7 | ||
|
|
e0e90bcdaf | ||
|
|
6a2a1baaab | ||
|
|
2a924bcd27 | ||
|
|
cec3a9fe33 | ||
|
|
b3ce868dec | ||
|
|
c904b7ba71 | ||
|
|
a8bf9e9559 | ||
|
|
3b5d7f146b | ||
|
|
6b9b69501a | ||
|
|
57a53b5ac3 | ||
|
|
c65527ddf2 | ||
|
|
22ccab831b | ||
|
|
0f94e80135 | ||
|
|
d29ce0a4f0 | ||
|
|
8782c89d71 | ||
|
|
b6fe84f19d | ||
|
|
051b89662b | ||
|
|
e7eb94faa1 | ||
|
|
2b7bf2a3f4 | ||
|
|
9c4fb547b5 | ||
|
|
727fc722af | ||
|
|
1a32147d68 | ||
|
|
380f3c1b6d | ||
|
|
7ac6a723b4 | ||
|
|
712d68136b | ||
|
|
034ff81e49 | ||
|
|
c2ecc845ca | ||
|
|
e21439d061 | ||
|
|
41fa1d98ca | ||
|
|
655d2fd339 | ||
|
|
0735ed37a9 | ||
|
|
d96070f336 | ||
|
|
d259abb749 | ||
|
|
3e06c5fd66 | ||
|
|
288e5110f4 | ||
|
|
41ca5244cc | ||
|
|
3d4b5451ae | ||
|
|
dc17ff1158 | ||
|
|
de23cb6243 | ||
|
|
94d7f0dc16 | ||
|
|
45c52e3571 | ||
|
|
03640e239b | ||
|
|
4c24fa7284 | ||
|
|
12483ee63b | ||
|
|
bae712540e | ||
|
|
31664b5f38 | ||
|
|
ba5aea2b88 | ||
|
|
a6e38df012 | ||
|
|
bc0018dadc | ||
|
|
1a659d30d2 | ||
|
|
d0bf0bde11 | ||
|
|
d87fe4173d | ||
|
|
f8c66af48b | ||
|
|
da14c44873 | ||
|
|
20adf79e7c | ||
|
|
2aa181c7f5 | ||
|
|
c9ab0782bf | ||
|
|
6f8cfaa276 | ||
|
|
4760b9d9f1 | ||
|
|
d6015be734 | ||
|
|
837623e0a1 | ||
|
|
7c28027189 | ||
|
|
a88c9ba083 | ||
|
|
128baea88c | ||
|
|
cca17a8822 | ||
|
|
685665bd46 | ||
|
|
d1cfe7251d | ||
|
|
05dea0c78b | ||
|
|
d05efe26c4 | ||
|
|
835c5dacd2 | ||
|
|
57bb268ea0 | ||
|
|
d5cafaaa06 | ||
|
|
8cba020fb2 | ||
|
|
a305f243da | ||
|
|
666c942b18 | ||
|
|
f01f421c1c | ||
|
|
285b8b9b6f | ||
|
|
feadc73847 | ||
|
|
ceca6ce2f7 | ||
|
|
ff37c7de32 | ||
|
|
829e7a497d | ||
|
|
37c9fa8657 | ||
|
|
6a40e6047d | ||
|
|
78b9864d11 | ||
|
|
950dea1e08 | ||
|
|
27c57eef68 | ||
|
|
f65bc9f0b9 | ||
|
|
e150a4ef32 | ||
|
|
a70bd12c19 | ||
|
|
3ec2ee2793 | ||
|
|
e411175b7f | ||
|
|
3f67d1d4c5 | ||
|
|
12dd1c9e31 | ||
|
|
2b2057648d | ||
|
|
42f7851636 | ||
|
|
175a90aae5 |
No files matched your search
@@ -13,6 +13,7 @@
|
||||
"rules": {
|
||||
"vue/no-v-html": 0,
|
||||
"vue/component-tags-order": 0,
|
||||
"vue/no-v-text-v-html-on-component": 0,
|
||||
"vue/valid-v-slot": [
|
||||
"error",
|
||||
{
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
name: Send LGTM reaction
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@1.0.0
|
||||
- uses: micnncim/action-lgtm-reaction@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GIPHY_API_KEY: ${{ secrets.GIPHY_API_KEY }}
|
||||
with:
|
||||
trigger: '["^(?i)lgtm!*$"]'
|
||||
source: 'giphy'
|
||||
@@ -0,0 +1,145 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
description: New version number in X.Y.Z
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
push-version-number:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone develop repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.PAT }}
|
||||
ref: 'develop'
|
||||
|
||||
- name: get-npm-version
|
||||
id: package-version
|
||||
uses: martinbeentjes/npm-get-version-action@main
|
||||
|
||||
- name: Push version number
|
||||
if: steps.package-version.outputs.current-version != github.event.inputs.version
|
||||
shell: bash
|
||||
run: |
|
||||
npm version --no-git-tag-version ${{ github.event.inputs.version }}
|
||||
|
||||
- name: git add & commit & push
|
||||
if: steps.package-version.outputs.current-version != github.event.inputs.version
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
add: 'package.json package-lock.json'
|
||||
default_author: github_actions
|
||||
message: 'chore: push version number to v${{ github.event.inputs.version }}'
|
||||
push: true
|
||||
|
||||
update-master-branch:
|
||||
needs: ['push-version-number']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: everlytic/branch-merge@1.1.5
|
||||
with:
|
||||
github_token: ${{ secrets.PAT }}
|
||||
source_ref: 'develop'
|
||||
target_branch: 'master'
|
||||
commit_message_template: '[Automated] Merged {source_ref} into target {target_branch}'
|
||||
|
||||
release:
|
||||
needs: ['update-master-branch']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fetch repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: 'master'
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Move build out of dist
|
||||
shell: bash
|
||||
run: mv ./dist/mainsail.zip ./mainsail.zip
|
||||
|
||||
- name: Get latest tag
|
||||
id: latest_tag
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
id: generate-changelog
|
||||
with:
|
||||
config: ./cliff-release.toml
|
||||
args: ${{ steps.latest_tag.outputs.TAG_NAME }}..HEAD
|
||||
|
||||
- name: Create release and upload build
|
||||
uses: softprops/action-gh-release@v1
|
||||
id: create-release
|
||||
with:
|
||||
name: v${{ github.event.inputs.version }}
|
||||
tag_name: v${{ github.event.inputs.version }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: ./mainsail.zip
|
||||
body: ${{ steps.generate-changelog.outputs.content }}
|
||||
|
||||
- name: Copy remote configs to dist
|
||||
shell: bash
|
||||
run: cp ./remote/* ./dist/
|
||||
|
||||
- name: Upload to remote server
|
||||
uses: SamKirkland/FTP-Deploy-Action@4.3.3
|
||||
with:
|
||||
server: ${{ secrets.REMOTEHOST }}
|
||||
username: ${{ secrets.REMOTEUSER }}
|
||||
password: ${{ secrets.REMOTEPASSWORD }}
|
||||
dangerous-clean-slate: true
|
||||
local-dir: ./dist/
|
||||
|
||||
update-changelog:
|
||||
needs: ['release']
|
||||
name: Generate changelog
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: 'develop'
|
||||
token: ${{ secrets.PAT }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get latest tag
|
||||
id: latest_tag
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
id: git-cliff
|
||||
with:
|
||||
config: cliff.toml
|
||||
args: v0.0.4..${{ steps.latest_tag.outputs.TAG_NAME }}
|
||||
env:
|
||||
OUTPUT: ${{ github.workspace }}/CHANGELOG.md
|
||||
|
||||
- name: Show CHANGELOG
|
||||
run: |
|
||||
cat CHANGELOG.md
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: 'docs(changelog): update changelog'
|
||||
file_pattern: CHANGELOG.md
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
- name: Install node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
node-version: 18
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
@@ -28,6 +28,6 @@ jobs:
|
||||
run: npm run build
|
||||
|
||||
- name: Cypress run
|
||||
uses: cypress-io/github-action@v2
|
||||
uses: cypress-io/github-action@v4
|
||||
with:
|
||||
start: npm start
|
||||
start: npm run preview
|
||||
@@ -1,42 +0,0 @@
|
||||
name: Update changelog
|
||||
|
||||
on:
|
||||
# Update the changelog after pushing a new tag
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
# Update the changelog by invoking this workflow manually
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
changelog:
|
||||
name: Generate changelog
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Get latest tag
|
||||
run: |
|
||||
echo "::set-output name=TAG_NAME::$(git describe --tags $(git rev-list --tags --max-count=1))"
|
||||
id: latest_tag
|
||||
- name: Generate a changelog
|
||||
uses: orhun/git-cliff-action@v1
|
||||
id: git-cliff
|
||||
with:
|
||||
config: cliff.toml
|
||||
args: v0.0.4..${{ steps.latest_tag.outputs.TAG_NAME }}
|
||||
env:
|
||||
OUTPUT: CHANGELOG.md
|
||||
|
||||
- name: show CHANGELOG
|
||||
run: |
|
||||
cat CHANGELOG.md
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: 'chore(changelog): update changelog'
|
||||
file_pattern: CHANGELOG.md
|
||||
branch: develop
|
||||
@@ -14,5 +14,6 @@ package-lock.json
|
||||
*.local
|
||||
.env
|
||||
|
||||
cypress/screenshots/
|
||||
cypress/videos/
|
||||
components.d.ts
|
||||
+748
-214
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -74,7 +74,7 @@ Before you work on a PR and submit it, please pay attention to the following gui
|
||||
- Upon merging, we will squash all commits of the PR into a single commit for a clean history and release changelogs.
|
||||
7. Please sign off each commit and your PR. It must contain your real name and a current email address (see example in item 4).
|
||||
- The sign-off should follow this pattern: `Signed-off-by: My Name <myemail@example.org>`
|
||||
- The sign-off certifies that you agree with the [developer certificate of origin](https://github.com/mainsail-crew/mainsail/.github/DEVELOPER_CERTIFICATE_OF_ORIGIN.md).
|
||||
- The sign-off certifies that you agree with the [developer certificate of origin](https://github.com/mainsail-crew/mainsail/blob/develop/.github/DEVELOPER_CERTIFICATE_OF_ORIGIN.md).
|
||||
- If you provide a translation, a sign-off is not necessarily required.
|
||||
8. When opening a pull request, keep `Allow edits and access to secrets by maintainers` **enabled**.
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Builder stage, builds the application in node
|
||||
#
|
||||
FROM --platform=$BUILDPLATFORM node:16-alpine as builder
|
||||
FROM --platform=$BUILDPLATFORM node:18-alpine as builder
|
||||
|
||||
RUN apk add zip
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ You can find the latest release notes [here](https://github.com/mainsail-crew/ma
|
||||
- **Power Control:** _Control power devices such as relays, TP-Link and Tasmota devices, and more_
|
||||
- **Powerful Macro-Management:** _Manage your macros on a micro level_
|
||||
- **[Configurable Dashboard](https://docs.mainsail.xyz/features/dashboard-organisation):** _Create your own personal dashboard_
|
||||
- **[Theming Support](https://docs.mainsail.xyz/features/theming/):** _Customizable user interface including logos, backgrounds, and custom CSS_
|
||||
- **[Theming Support](https://docs.mainsail.xyz/features/theming):** _Customizable user interface including logos, backgrounds, and custom CSS_
|
||||
- **[Additional Sensors](https://docs.mainsail.xyz/quicktips/additional-sensors):** _Add extra sensors to the temperature graph_
|
||||
- **Exclude Objects:** _Exclude parts of your print <sup>(not officially supported by Klipper yet)</sup>_
|
||||
|
||||
@@ -84,6 +84,14 @@ Do you need help or just want to talk? Join our active community on [Discord](ht
|
||||
Did you find a bug or did you thought of a feature?
|
||||
Please create an [Issue](https://github.com/mainsail-crew/mainsail/issues) in GitHub and let us know.
|
||||
|
||||
## Official Sponsors
|
||||
|
||||
<p align='center'>
|
||||
<img src="https://raw.githubusercontent.com/mainsail-crew/docs/master/assets/img/logo-bigtreetech.png" alt='Mainsail logo' width="150">
|
||||
</p>
|
||||
|
||||
**BIGTREETECH** is the official mainboard partner of Mainsail. BIGTREETECH is committed to developing innovative and competitive products to better serve the 3D printing community.
|
||||
|
||||
## Support Mainsail
|
||||
|
||||
Mainsail is primarily developed and maintained by meteyou. To keep the project going he invests his free time, almost
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
# configuration file for git-cliff (0.1.0)
|
||||
|
||||
[changelog]
|
||||
# changelog header
|
||||
header = """
|
||||
# What's Changed
|
||||
"""
|
||||
# template for the changelog body
|
||||
# https://tera.netlify.app/docs/#introduction
|
||||
body = """
|
||||
{% for group, commits in commits | group_by(attribute="group") %}\
|
||||
### {{ group | split(pat="$") | last | 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 }})\
|
||||
{%- if commit.breaking %}
|
||||
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
|
||||
{%- endif -%}
|
||||
|
||||
{%- endfor -%}
|
||||
{%- for commit in commits %}
|
||||
{%- if commit.scope -%}
|
||||
{% else -%}
|
||||
{% raw %}\n{% endraw %}\
|
||||
- {{ commit.message | upper_first | trim }} | [{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }})\
|
||||
{%- if commit.breaking %}
|
||||
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
|
||||
{%- endif -%}
|
||||
|
||||
{% endif -%}
|
||||
{% endfor -%}
|
||||
{% raw %}\n{% endraw %}
|
||||
{% endfor %}\n\
|
||||
"""
|
||||
# remove the leading and trailing whitespaces from the template
|
||||
trim = true
|
||||
# changelog footer
|
||||
footer = """
|
||||
"""
|
||||
|
||||
[git]
|
||||
# allow only conventional commits
|
||||
# https://www.conventionalcommits.org
|
||||
conventional_commits = true
|
||||
filter_unconventional = true
|
||||
# regex for parsing and grouping commits
|
||||
commit_parsers = [
|
||||
{ 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"},
|
||||
]
|
||||
# filter out the commits that are not matched by commit parsers
|
||||
filter_commits = true
|
||||
ignore_tags="v*-(beta|rc)*"
|
||||
# glob pattern for matching git tags
|
||||
tag_pattern = "v[0-9]*"
|
||||
+14
-14
@@ -17,7 +17,7 @@ body = """
|
||||
## [unreleased]
|
||||
{% endif %}\
|
||||
{% for group, commits in commits | group_by(attribute="group") %}\
|
||||
### {{ group | upper_first }}
|
||||
### {{ group | split(pat="$") | last | upper_first }}
|
||||
{% for commit in commits
|
||||
| filter(attribute="scope")
|
||||
| sort(attribute="scope") %}
|
||||
@@ -25,7 +25,6 @@ body = """
|
||||
{%- if commit.breaking %}
|
||||
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
|
||||
{%- endif -%}
|
||||
|
||||
{%- endfor -%}
|
||||
{%- for commit in commits %}
|
||||
{%- if commit.scope -%}
|
||||
@@ -35,7 +34,6 @@ body = """
|
||||
{%- if commit.breaking %}
|
||||
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
|
||||
{%- endif -%}
|
||||
|
||||
{% endif -%}
|
||||
{% endfor -%}
|
||||
{% raw %}\n{% endraw %}
|
||||
@@ -55,16 +53,18 @@ filter_unconventional = false
|
||||
# regex for parsing and grouping commits
|
||||
commit_parsers = [
|
||||
{ message = "^docs\\(changelog\\):", group = "Changelog", skip = true}, # Old redundant commits
|
||||
{ message = "^feat(\\(.*\\))?:", group = "Features"},
|
||||
{ message = "^feature(\\(.*\\))?:", group = "Features"},
|
||||
{ message = "^fix(\\(.*\\))?:", group = "Bug Fixes"},
|
||||
{ message = "^docs(\\(.*\\))?:", group = "Documentation"},
|
||||
{ message = "^perf(\\(.*\\))?:", group = "Performance"},
|
||||
{ message = "^refactor(\\(.*\\))?:", group = "Refactor"},
|
||||
{ message = "^style(\\(.*\\))?:", group = "Styling"},
|
||||
{ message = "^test(\\(.*\\))?:", group = "Testing"},
|
||||
{ message = "^locale(\\(.*\\))?:", group = "Localization"},
|
||||
{ message = "^chore(\\(.*\\))?:", group = "Miscellaneous Tasks", skip = true}, # chore tasks are not relevant for the changelog
|
||||
{ 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 = "release v2.1.2", group = "Release"}, # workaround for v2.1.2 release
|
||||
]
|
||||
@@ -72,4 +72,4 @@ commit_parsers = [
|
||||
filter_commits = true
|
||||
ignore_tags="v*-(beta|rc)*"
|
||||
# glob pattern for matching git tags
|
||||
tag_pattern = "v[0-9]*"
|
||||
tag_pattern = "v[0-9]*"
|
||||
@@ -0,0 +1,13 @@
|
||||
import { defineConfig } from 'cypress'
|
||||
|
||||
export default defineConfig({
|
||||
e2e: {
|
||||
// We've imported your old cypress plugins here.
|
||||
// You may want to clean this up later by importing these.
|
||||
setupNodeEvents(on, config) {
|
||||
// @ts-ignore
|
||||
return require('./cypress/plugins/index.js')(on, config)
|
||||
},
|
||||
baseUrl: 'http://localhost:4173',
|
||||
},
|
||||
})
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"baseUrl": "http://localhost:4173"
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
Generated
+4090
-3120
File diff suppressed because it is too large.
Load diff
+23
-19
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mainsail",
|
||||
"version": "2.3.0",
|
||||
"version": "2.5.0-beta1",
|
||||
"private": true,
|
||||
"decription": "a klipper web interface",
|
||||
"author": {
|
||||
@@ -16,8 +16,9 @@
|
||||
"lint:fix": "npm run lint -- --fix",
|
||||
"build.zip": "cd ./dist && zip -r mainsail.zip ./ -x '**.DS_Store' ./ && cd ..",
|
||||
"i18n-extract": "vue-i18n-extract use-config",
|
||||
"start": "vite preview",
|
||||
"test": "npm run build && cypress run",
|
||||
"preview": "vite preview",
|
||||
"start": "vite build && vite preview",
|
||||
"test": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress run'",
|
||||
"test:ui": "cypress open",
|
||||
"changelog": "git cliff v0.0.4..$(git describe --tags $(git rev-list --tags --max-count=1)) --output CHANGELOG.md"
|
||||
},
|
||||
@@ -30,15 +31,17 @@
|
||||
"@codemirror/search": "^6.0.0",
|
||||
"@codemirror/state": "^6.1.0",
|
||||
"@codemirror/view": "^6.0.3",
|
||||
"@jaames/iro": "^5.5.2",
|
||||
"@lezer/highlight": "^1.0.0",
|
||||
"@sindarius/gcodeviewer": "^3.1.3",
|
||||
"@types/node": "^16.11.22",
|
||||
"@sindarius/gcodeviewer": "^3.2.0",
|
||||
"@types/node": "^18.0.0",
|
||||
"@types/overlayscrollbars": "^1.12.1",
|
||||
"axios": "^0.26.0",
|
||||
"axios": "^0.27.0",
|
||||
"codemirror": "^6.0.1",
|
||||
"core-js": "^3.16.0",
|
||||
"echarts": "^5.2.2",
|
||||
"echarts-gl": "^2.0.8",
|
||||
"hls.js": "^1.3.3",
|
||||
"js-sha256": "^0.9.0",
|
||||
"lodash.kebabcase": "^4.1.1",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
@@ -47,8 +50,8 @@
|
||||
"regenerator-runtime": "^0.13.9",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
"semver": "^7.3.5",
|
||||
"uuid": "^8.3.2",
|
||||
"vue": "^2.6.14",
|
||||
"uuid": "^9.0.0",
|
||||
"vue": "^2.7.10",
|
||||
"vue-class-component": "^7.2.6",
|
||||
"vue-echarts": "^6.0.2",
|
||||
"vue-i18n": "^8.25.0",
|
||||
@@ -59,34 +62,35 @@
|
||||
"vue-resize": "^1.0.1",
|
||||
"vue-toast-notification": "^0.6.1",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuetify": "^2.6.1",
|
||||
"vuetify": "^2.6.10",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@intlify/vite-plugin-vue-i18n": "^2.5.0",
|
||||
"@mdi/js": "^6.5.95",
|
||||
"@mdi/js": "^7.0.0",
|
||||
"@types/file-saver": "^2.0.5",
|
||||
"@types/lodash.kebabcase": "^4.1.6",
|
||||
"@types/lodash.throttle": "^4.1.6",
|
||||
"@types/semver": "^7.3.8",
|
||||
"@types/uuid": "^8.3.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.11.0",
|
||||
"@typescript-eslint/parser": "^5.11.0",
|
||||
"@vue/composition-api": "^1.4.6",
|
||||
"@vue/eslint-config-typescript": "^10.0.0",
|
||||
"@vue/eslint-config-typescript": "^11.0.0",
|
||||
"autoprefixer": "^10.4.2",
|
||||
"cypress": "^9.5.0",
|
||||
"cypress": "^10.0.0",
|
||||
"eslint": "^8.9.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-jsonc": "^2.2.1",
|
||||
"eslint-plugin-vue": "^8.4.1",
|
||||
"eslint-plugin-vue": "^9.0.0",
|
||||
"prettier": "^2.5.1",
|
||||
"sass": "~1.32",
|
||||
"start-server-and-test": "^1.14.0",
|
||||
"typescript": "^4.5.5",
|
||||
"unplugin-vue-components": "^0.18.0",
|
||||
"vite": "^2.9.15",
|
||||
"vite-plugin-checker": "^0.4.2",
|
||||
"unplugin-vue-components": "^0.22.0",
|
||||
"vite": "^3.0.0",
|
||||
"vite-plugin-checker": "^0.5.0",
|
||||
"vite-plugin-package-version": "^1.0.2",
|
||||
"vite-plugin-pwa": "^0.11.13",
|
||||
"vite-plugin-pwa": "^0.13.0",
|
||||
"vite-plugin-vue2": "^2.0.1",
|
||||
"vue-debounce-decorator": "^1.0.1",
|
||||
"vue-i18n-extract": "^2.0.7",
|
||||
@@ -110,6 +114,6 @@
|
||||
"last 2 edge major versions"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^16"
|
||||
"node": "^16 || ^18"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
RewriteRule ^index\.html$ - [L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule . /index.html [L]
|
||||
</IfModule>
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"defaultLocale": "en",
|
||||
"hostname": null,
|
||||
"port": null,
|
||||
"instancesDB": "browser",
|
||||
"instances": []
|
||||
}
|
||||
@@ -39,6 +39,9 @@
|
||||
<the-timelapse-rendering-snackbar></the-timelapse-rendering-snackbar>
|
||||
<the-fullscreen-upload></the-fullscreen-upload>
|
||||
<the-upload-snackbar></the-upload-snackbar>
|
||||
<the-manual-probe-dialog />
|
||||
<the-bed-screws-dialog />
|
||||
<the-screws-tilt-adjust-dialog />
|
||||
</template>
|
||||
<the-select-printer-dialog v-else-if="instancesDB !== 'moonraker'"></the-select-printer-dialog>
|
||||
<the-connecting-dialog v-else></the-connecting-dialog>
|
||||
@@ -59,6 +62,9 @@ import { panelToolbarHeight, topbarHeight, navigationItemHeight } from '@/store/
|
||||
import TheTimelapseRenderingSnackbar from '@/components/TheTimelapseRenderingSnackbar.vue'
|
||||
import TheFullscreenUpload from '@/components/TheFullscreenUpload.vue'
|
||||
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'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -71,6 +77,9 @@ import TheUploadSnackbar from '@/components/TheUploadSnackbar.vue'
|
||||
TheSidebar,
|
||||
TheFullscreenUpload,
|
||||
TheUploadSnackbar,
|
||||
TheManualProbeDialog,
|
||||
TheBedScrewsDialog,
|
||||
TheScrewsTiltAdjustDialog,
|
||||
},
|
||||
metaInfo() {
|
||||
const title = this.$store.getters['getTitle']
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
v-if="restartServiceName === 'klipper'"
|
||||
text
|
||||
tile
|
||||
href="https://www.klipper3d.org/Config_Reference.html"
|
||||
:href="klipperConfigReference"
|
||||
target="_blank"
|
||||
class="d-none d-md-flex">
|
||||
<v-icon small class="mr-1">{{ mdiHelp }}</v-icon>
|
||||
@@ -124,6 +124,7 @@ import { Component, Mixins, Watch } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { capitalize, formatFilesize, windowBeforeUnloadFunction } from '@/plugins/helpers'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { availableKlipperConfigReferenceTranslations } from '@/store/variables'
|
||||
import CodemirrorAsync from '@/components/inputs/CodemirrorAsync'
|
||||
import {
|
||||
mdiClose,
|
||||
@@ -275,6 +276,22 @@ export default class TheEditor extends Mixins(BaseMixin) {
|
||||
return `${title} ${this.changedOutput}`
|
||||
}
|
||||
|
||||
get currentLanguage() {
|
||||
return this.$store.state.gui.general.language
|
||||
}
|
||||
|
||||
get klipperConfigReference(): string {
|
||||
const currentLanguage = this.currentLanguage
|
||||
const translations = availableKlipperConfigReferenceTranslations
|
||||
let url = 'https://www.klipper3d.org/Config_Reference.html'
|
||||
|
||||
if (translations.includes(currentLanguage)) {
|
||||
url = `https://www.klipper3d.org/${currentLanguage}/Config_Reference.html`
|
||||
}
|
||||
|
||||
return url
|
||||
}
|
||||
|
||||
cancelDownload() {
|
||||
this.$store.dispatch('editor/cancelLoad')
|
||||
}
|
||||
@@ -316,3 +333,52 @@ export default class TheEditor extends Mixins(BaseMixin) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .ͼ1 .cm-panel.cm-search *:focus:not(.focus-visible) {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
::v-deep .ͼ1 .cm-panel.cm-search input[type='checkbox'] {
|
||||
width: 2.2em;
|
||||
height: 2.2em;
|
||||
color: dodgerblue;
|
||||
vertical-align: middle;
|
||||
-webkit-appearance: none;
|
||||
border: 10px;
|
||||
outline: 0;
|
||||
flex-grow: 0;
|
||||
border-radius: 4px;
|
||||
background: var(--v-toolbar-base);
|
||||
transition: background 300ms;
|
||||
cursor: pointer;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
/* Pseudo element for check styling */
|
||||
|
||||
::v-deep .ͼ1 .cm-panel.cm-search input[type='checkbox']::before {
|
||||
content: '';
|
||||
color: transparent;
|
||||
display: block;
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
border-radius: inherit;
|
||||
border: 2px;
|
||||
background-color: transparent;
|
||||
background-size: contain;
|
||||
box-shadow: inset 0 0 0 1px #ccd3d8;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Checked */
|
||||
|
||||
::v-deep .ͼ1 .cm-panel.cm-search input[type='checkbox']:checked {
|
||||
background-color: var(--color-primary);
|
||||
}
|
||||
|
||||
::v-deep .ͼ1 .cm-panel.cm-search input[type='checkbox']:checked::before {
|
||||
box-shadow: none;
|
||||
background-color: var(--color-primary);
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E %3Cpath d='M15.88 8.29L10 14.17l-1.88-1.88a.996.996 0 1 0-1.41 1.41l2.59 2.59c.39.39 1.02.39 1.41 0L17.3 9.7a.996.996 0 0 0 0-1.41c-.39-.39-1.03-.39-1.42 0z' fill='%23fffff'/%3E %3C/svg%3E");
|
||||
}
|
||||
</style>
|
||||
@@ -97,7 +97,9 @@ import {
|
||||
mdiTune,
|
||||
mdiVideo3d,
|
||||
mdiWebcam,
|
||||
mdiDipSwitch,
|
||||
} from '@mdi/js'
|
||||
import SettingsMiscellaneousTab from '@/components/settings/SettingsMiscellaneousTab.vue'
|
||||
@Component({
|
||||
components: {
|
||||
Panel,
|
||||
@@ -113,6 +115,7 @@ import {
|
||||
SettingsGCodeViewerTab,
|
||||
SettingsEditorTab,
|
||||
SettingsTimelapseTab,
|
||||
SettingsMiscellaneousTab,
|
||||
},
|
||||
})
|
||||
export default class TheSettingsMenu extends Mixins(BaseMixin) {
|
||||
@@ -186,6 +189,11 @@ export default class TheSettingsMenu extends Mixins(BaseMixin) {
|
||||
name: 'editor',
|
||||
title: this.$t('Settings.EditorTab.Editor'),
|
||||
},
|
||||
{
|
||||
icon: mdiDipSwitch,
|
||||
name: 'miscellaneous',
|
||||
title: this.$t('Settings.MiscellaneousTab.Miscellaneous'),
|
||||
},
|
||||
]
|
||||
|
||||
if (this.moonrakerComponents.includes('timelapse')) {
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<template #append>
|
||||
<v-list-item class="small-list-item mb-2">
|
||||
<v-list-item-icon class="menu-item-icon">
|
||||
<about-modal></about-modal>
|
||||
<about-dialog></about-dialog>
|
||||
</v-list-item-icon>
|
||||
</v-list-item>
|
||||
</template>
|
||||
@@ -144,7 +144,7 @@ import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { PrinterStateKlipperConfig } from '@/store/printer/types'
|
||||
import TheSelectPrinterDialog from '@/components/TheSelectPrinterDialog.vue'
|
||||
import AboutModal from '@/components/modals/AboutModal.vue'
|
||||
import AboutDialog from '@/components/dialogs/AboutDialog.vue'
|
||||
import { navigationWidth, topbarHeight } from '@/store/variables'
|
||||
import MainsailLogo from '@/components/ui/MainsailLogo.vue'
|
||||
import { mdiViewDashboardOutline } from '@mdi/js'
|
||||
@@ -152,7 +152,7 @@ import { mdiViewDashboardOutline } from '@mdi/js'
|
||||
@Component({
|
||||
components: {
|
||||
TheSelectPrinterDialog,
|
||||
AboutModal,
|
||||
AboutDialog,
|
||||
MainsailLogo,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
<input
|
||||
ref="fileUploadAndStart"
|
||||
type="file"
|
||||
:accept="validGcodeExtensions.join(', ')"
|
||||
:accept="gcodeInputFileAccept.join(', ')"
|
||||
style="display: none"
|
||||
@change="uploadAndStart" />
|
||||
<v-btn
|
||||
v-if="klippyIsConnected && saveConfigPending"
|
||||
v-if="showSaveConfigButton"
|
||||
tile
|
||||
:icon="$vuetify.breakpoint.smAndDown"
|
||||
:text="$vuetify.breakpoint.mdAndUp"
|
||||
@@ -63,7 +63,7 @@
|
||||
class="button-min-width-auto px-3 emergency-button"
|
||||
:loading="loadings.includes('topbarEmergencyStop')"
|
||||
@click="btnEmergencyStop">
|
||||
<v-icon class="mr-md-2">{{ mdiAlertCircleOutline }}</v-icon>
|
||||
<v-icon class="mr-md-2">{{ mdiAlertOctagonOutline }}</v-icon>
|
||||
<span class="d-none d-md-inline">{{ $t('App.TopBar.EmergencyStop') }}</span>
|
||||
</v-btn>
|
||||
<the-notification-menu></the-notification-menu>
|
||||
@@ -84,10 +84,10 @@
|
||||
</v-snackbar>
|
||||
<v-dialog v-model="showEmergencyStopDialog" width="400" :fullscreen="isMobile">
|
||||
<panel
|
||||
:title="$t('EmergencyStopDialog.EmergencyStop')"
|
||||
:title="$t('EmergencyStopDialog.EmergencyStop').toString()"
|
||||
toolbar-color="error"
|
||||
card-class="emergency-stop-dialog"
|
||||
:icon="mdiAlertCircleOutline"
|
||||
:icon="mdiAlertOctagonOutline"
|
||||
:margin-bottom="false">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="showEmergencyStopDialog = false">
|
||||
@@ -119,7 +119,7 @@ import PrinterSelector from '@/components/ui/PrinterSelector.vue'
|
||||
import MainsailLogo from '@/components/ui/MainsailLogo.vue'
|
||||
import TheNotificationMenu from '@/components/notifications/TheNotificationMenu.vue'
|
||||
import { topbarHeight } from '@/store/variables'
|
||||
import { mdiAlertCircleOutline, mdiContentSave, mdiFileUpload, mdiClose, mdiCloseThick } from '@mdi/js'
|
||||
import { mdiAlertOctagonOutline, mdiContentSave, mdiFileUpload, mdiClose, mdiCloseThick } from '@mdi/js'
|
||||
|
||||
type uploadSnackbar = {
|
||||
status: boolean
|
||||
@@ -145,7 +145,7 @@ type uploadSnackbar = {
|
||||
},
|
||||
})
|
||||
export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
mdiAlertCircleOutline = mdiAlertCircleOutline
|
||||
mdiAlertOctagonOutline = mdiAlertOctagonOutline
|
||||
mdiContentSave = mdiContentSave
|
||||
mdiFileUpload = mdiFileUpload
|
||||
mdiClose = mdiClose
|
||||
@@ -174,6 +174,12 @@ export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
fileUploadAndStart: HTMLFormElement
|
||||
}
|
||||
|
||||
get gcodeInputFileAccept() {
|
||||
if (this.isIOS) return []
|
||||
|
||||
return validGcodeExtensions
|
||||
}
|
||||
|
||||
get naviDrawer() {
|
||||
return this.$store.state.naviDrawer
|
||||
}
|
||||
@@ -182,10 +188,6 @@ export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
this.$store.dispatch('setNaviDrawer', newVal)
|
||||
}
|
||||
|
||||
get validGcodeExtensions() {
|
||||
return validGcodeExtensions
|
||||
}
|
||||
|
||||
get currentPage() {
|
||||
return this.$route.fullPath
|
||||
}
|
||||
@@ -194,6 +196,20 @@ export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
return this.$store.state.printer.configfile?.save_config_pending ?? false
|
||||
}
|
||||
|
||||
get hideSaveConfigForBedMash() {
|
||||
return this.$store.state.gui.uiSettings.hideSaveConfigForBedMash ?? false
|
||||
}
|
||||
|
||||
get showSaveConfigButton() {
|
||||
if (!this.klipperReadyForGui) return false
|
||||
if (!this.hideSaveConfigForBedMash) return this.saveConfigPending
|
||||
|
||||
let pendingKeys = Object.keys(this.$store.state.printer.configfile?.save_config_pending_items ?? {})
|
||||
pendingKeys = pendingKeys.filter((key: string) => !key.startsWith('bed_mesh '))
|
||||
|
||||
return pendingKeys.length > 0
|
||||
}
|
||||
|
||||
get printerName(): string {
|
||||
if (this.$store.state.gui.general.printername.length) return this.$store.state.gui.general.printername
|
||||
|
||||
@@ -254,14 +270,14 @@ export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
|
||||
async uploadAndStart() {
|
||||
if (this.$refs.fileUploadAndStart?.files.length) {
|
||||
this.$store.dispatch('socket/addLoading', { name: 'btnUploadAndStart' })
|
||||
await this.$store.dispatch('socket/addLoading', { name: 'btnUploadAndStart' })
|
||||
let successFiles = []
|
||||
for (const file of this.$refs.fileUploadAndStart?.files || []) {
|
||||
const result = await this.doUploadAndStart(file)
|
||||
successFiles.push(result)
|
||||
}
|
||||
|
||||
this.$store.dispatch('socket/removeLoading', { name: 'btnUploadAndStart' })
|
||||
await this.$store.dispatch('socket/removeLoading', { name: 'btnUploadAndStart' })
|
||||
for (const file of successFiles) {
|
||||
const text = this.$t('App.TopBar.UploadOfFileSuccessful', { file: file }).toString()
|
||||
this.$toast.success(text)
|
||||
@@ -327,6 +343,7 @@ export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/*noinspection CssUnusedSymbol*/
|
||||
.topbar .v-toolbar__content {
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
@@ -336,13 +353,17 @@ export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
.button-min-width-auto {
|
||||
min-width: auto !important;
|
||||
}
|
||||
/*noinspection CssUnusedSymbol*/
|
||||
.topbar .v-btn {
|
||||
height: 100% !important;
|
||||
max-height: none;
|
||||
}
|
||||
/*noinspection CssUnusedSymbol*/
|
||||
.topbar .v-btn.v-btn--icon {
|
||||
/*noinspection CssUnresolvedCustomProperty*/
|
||||
width: var(--topbar-icon-btn-width) !important;
|
||||
}
|
||||
/*noinspection CssUnusedSymbol*/
|
||||
@media (min-width: 768px) {
|
||||
header.topbar {
|
||||
z-index: 8 !important;
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
:option="chartOptions"
|
||||
:autoresize="true"
|
||||
:init-options="{ renderer: 'svg' }"
|
||||
style="height: 250px; width: 100%"></e-chart>
|
||||
style="height: 200px; width: 100%"></e-chart>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -19,7 +19,7 @@ import { ServerHistoryStateAllPrintStatusEntry } from '@/store/server/history/ty
|
||||
@Component({
|
||||
components: {},
|
||||
})
|
||||
export default class HistoryAllPrintStatus extends Mixins(BaseMixin) {
|
||||
export default class HistoryAllPrintStatusChart extends Mixins(BaseMixin) {
|
||||
declare $refs: {
|
||||
historyAllPrintStatus: any
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<v-simple-table>
|
||||
<tbody>
|
||||
<tr v-for="status in printStatusArray" :key="status.name">
|
||||
<td>{{ status.displayName }}</td>
|
||||
<td class="text-right">{{ status.value }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</v-simple-table>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { ServerHistoryStateAllPrintStatusEntry } from '@/store/server/history/types'
|
||||
|
||||
@Component({
|
||||
components: {},
|
||||
})
|
||||
export default class HistoryAllPrintStatusTable extends Mixins(BaseMixin) {
|
||||
get selectedJobs() {
|
||||
return this.$store.state.gui.view.history.selectedJobs ?? []
|
||||
}
|
||||
|
||||
get allPrintStatusArray() {
|
||||
return this.$store.getters['server/history/getAllPrintStatusArrayAll']
|
||||
}
|
||||
|
||||
get selectedPrintStatusArray() {
|
||||
return this.$store.getters['server/history/getSelectedPrintStatusArray']
|
||||
}
|
||||
|
||||
get printStatusArray() {
|
||||
const output: ServerHistoryStateAllPrintStatusEntry[] = []
|
||||
const orgArray = this.selectedJobs.length ? this.selectedPrintStatusArray : this.allPrintStatusArray
|
||||
|
||||
orgArray.forEach((status: ServerHistoryStateAllPrintStatusEntry) => {
|
||||
const tmp = { ...status }
|
||||
tmp.name = status.displayName
|
||||
output.push(tmp)
|
||||
})
|
||||
|
||||
return output
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -84,6 +84,7 @@ export default class TempChart extends Mixins(BaseMixin) {
|
||||
axisLabel: {
|
||||
color: 'rgba(255, 255, 255, 0.24)',
|
||||
margin: 10,
|
||||
formatter: this.timeFormat,
|
||||
},
|
||||
},
|
||||
yAxis: [
|
||||
@@ -225,8 +226,13 @@ export default class TempChart extends Mixins(BaseMixin) {
|
||||
return this.$store.getters['printer/tempHistory/getSelectedLegends']
|
||||
}
|
||||
|
||||
get timeFormat() {
|
||||
return this.hours12Format ? '{hh}:{mm}' : '{HH}:{mm}'
|
||||
}
|
||||
|
||||
mounted() {
|
||||
this.initChart()
|
||||
this.chartOptions.xAxis.axisLabel.formatter = this.timeFormat
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
@@ -383,5 +389,10 @@ export default class TempChart extends Mixins(BaseMixin) {
|
||||
boolDisplayPwmAxisChanged() {
|
||||
this.updateChartPwmAxis()
|
||||
}
|
||||
|
||||
@Watch('hours12Format')
|
||||
hours12FormatChanged() {
|
||||
this.chartOptions.xAxis.axisLabel.formatter = this.timeFormat
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<template>
|
||||
<v-row :class="'ma-0 ' + entryStyle">
|
||||
<v-col class="col-auto pr-0 text--disabled console-time">{{ event.formatTime }}</v-col>
|
||||
<v-col class="col-auto pr-0 text--disabled console-time">{{ entryFormatTime }}</v-col>
|
||||
<v-col
|
||||
:class="colorConsoleMessage(event) + ' ' + 'console-message'"
|
||||
@click.capture="commandClick"
|
||||
@@ -35,12 +35,12 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import Vue from 'vue'
|
||||
import { Prop } from 'vue-property-decorator'
|
||||
import { Mixins, Prop } from 'vue-property-decorator'
|
||||
import { ServerStateEvent } from '@/store/server/types'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
|
||||
@Component
|
||||
export default class ConsoleTableEntry extends Vue {
|
||||
export default class ConsoleTableEntry extends Mixins(BaseMixin) {
|
||||
@Prop({ required: true })
|
||||
declare readonly event: ServerStateEvent
|
||||
|
||||
@@ -48,6 +48,10 @@ export default class ConsoleTableEntry extends Vue {
|
||||
return this.$store.state.gui.console.entryStyle ?? 'default'
|
||||
}
|
||||
|
||||
get entryFormatTime() {
|
||||
return this.formatTime(this.event.date.getTime(), true)
|
||||
}
|
||||
|
||||
colorConsoleMessage(item: ServerStateEvent): string {
|
||||
if (item.message.startsWith('!! ')) return 'error--text'
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<v-tooltip right color="panel">
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-icon v-bind="attrs" v-on="on">
|
||||
{{ mdiHelpCircleOutline }}
|
||||
</v-icon>
|
||||
</template>
|
||||
<v-container class="version-container pa-0">
|
||||
<div><img height="12" src="/img/logo.svg" alt="mainsail-logo" /></div>
|
||||
<div>v{{ mainsailVersion }}</div>
|
||||
<div>
|
||||
<v-icon small class="moonraker-logo">{{ mdiMoonWaningCrescent }}</v-icon>
|
||||
</div>
|
||||
<div>{{ moonrakerVersion }}</div>
|
||||
<div><img height="12" src="/img/klipper.svg" class="klipper-logo" alt="klipper-logo" /></div>
|
||||
<div>{{ klipperVersion }}</div>
|
||||
</v-container>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import BaseMixin from '../mixins/base'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import Component from 'vue-class-component'
|
||||
import { mdiCloseThick, mdiHelpCircleOutline, mdiMoonWaningCrescent } from '@mdi/js'
|
||||
|
||||
@Component({})
|
||||
export default class AboutDialog extends Mixins(BaseMixin) {
|
||||
mdiHelpCircleOutline = mdiHelpCircleOutline
|
||||
mdiCloseThick = mdiCloseThick
|
||||
mdiMoonWaningCrescent = mdiMoonWaningCrescent
|
||||
|
||||
get mainsailVersion(): string {
|
||||
return this.$store.state.packageVersion
|
||||
}
|
||||
|
||||
get klipperVersion(): string {
|
||||
return this.$store.state.printer?.software_version ?? ''
|
||||
}
|
||||
|
||||
get moonrakerVersion(): string {
|
||||
return this.$store.state.server?.moonraker_version ?? ''
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.klipper-logo {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.moonraker-logo {
|
||||
transform: rotate(45deg);
|
||||
color: #ebc815;
|
||||
}
|
||||
.version-container {
|
||||
display: grid;
|
||||
grid-template-columns: 20px auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<v-dialog :value="showDialog" width="400" persistent :fullscreen="isMobile">
|
||||
<panel
|
||||
:title="$t('BedScrews.Headline').toString()"
|
||||
:icon="mdiArrowCollapseDown"
|
||||
card-class="manual_probe-dialog"
|
||||
:margin-bottom="false"
|
||||
style="overflow: hidden"
|
||||
:height="isMobile ? 0 : 548">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="sendAbort">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
v-model="currentScrewName"
|
||||
:label="$t('BedScrews.ScrewName')"
|
||||
outlined
|
||||
dense
|
||||
clearable
|
||||
hide-details></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="6">
|
||||
<v-text-field
|
||||
v-model="currentScrewOutput"
|
||||
:label="$t('BedScrews.ScrewIndex')"
|
||||
outlined
|
||||
dense
|
||||
clearable
|
||||
hide-details></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="6">
|
||||
<v-text-field
|
||||
v-model="acceptedScrewOutput"
|
||||
:label="$t('BedScrews.ScrewAccepted')"
|
||||
outlined
|
||||
dense
|
||||
clearable
|
||||
hide-details></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="text-center mb-0" v-html="$t('BedScrews.Description')" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn text :loading="loadingAbort" @click="sendAbort">
|
||||
{{ $t('BedScrews.Abort') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text :loading="loadingAdjusted" @click="sendAdjusted">
|
||||
{{ $t('BedScrews.Adjusted') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text :loading="loadingAccept" @click="sendAccept">
|
||||
{{ $t('BedScrews.Accept') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</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 Responsive from '@/components/ui/Responsive.vue'
|
||||
|
||||
import { mdiArrowCollapseDown, mdiInformation, mdiCloseThick } from '@mdi/js'
|
||||
import ControlMixin from '@/components/mixins/control'
|
||||
@Component({
|
||||
components: { Panel, Responsive },
|
||||
})
|
||||
export default class TheBedScrewsDialog extends Mixins(BaseMixin, ControlMixin) {
|
||||
mdiArrowCollapseDown = mdiArrowCollapseDown
|
||||
mdiInformation = mdiInformation
|
||||
mdiCloseThick = mdiCloseThick
|
||||
|
||||
get showDialog() {
|
||||
const is_active = this.$store.state.printer.bed_screws?.is_active ?? false
|
||||
|
||||
return is_active && this.homedAxes.includes('xyz')
|
||||
}
|
||||
|
||||
get config() {
|
||||
return this.$store.state.printer.configfile?.settings?.bed_screws ?? {}
|
||||
}
|
||||
|
||||
get bed_screws_state() {
|
||||
return this.$store.state.printer.bed_screws?.state
|
||||
}
|
||||
|
||||
get current_screw() {
|
||||
return this.$store.state.printer.bed_screws?.current_screw
|
||||
}
|
||||
|
||||
get accepted_screws() {
|
||||
return this.$store.state.printer.bed_screws?.accepted_screws
|
||||
}
|
||||
|
||||
get loadingAbort() {
|
||||
return this.loadings.includes('bedScrewsAbort')
|
||||
}
|
||||
|
||||
get loadingAccept() {
|
||||
return this.loadings.includes('bedScrewsAccept')
|
||||
}
|
||||
|
||||
get loadingAdjusted() {
|
||||
return this.loadings.includes('bedScrewsAdjusted')
|
||||
}
|
||||
|
||||
get screwNames() {
|
||||
const configKeys = Object.keys(this.config)
|
||||
const screwNameKeys = configKeys.filter((name: string) => name.startsWith('screw') && name.endsWith('_name'))
|
||||
|
||||
const output: string[] = []
|
||||
screwNameKeys?.forEach((fullName: string) => {
|
||||
const index = fullName.indexOf('_')
|
||||
const number = parseInt(fullName.slice(5, index))
|
||||
|
||||
output[number - 1] = this.config[`screw${number}_name`] ?? ''
|
||||
})
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
get countScrews() {
|
||||
return this.screwNames.length
|
||||
}
|
||||
|
||||
get currentScrewName() {
|
||||
return this.screwNames[this.current_screw] ?? 'UNKNOWN'
|
||||
}
|
||||
|
||||
get currentScrewOutput() {
|
||||
return this.$t('BedScrews.ScrewOutput', { current: this.current_screw, max: this.countScrews })
|
||||
}
|
||||
|
||||
get acceptedScrewOutput() {
|
||||
return this.$t('BedScrews.ScrewOutput', { current: this.accepted_screws, max: this.countScrews })
|
||||
}
|
||||
|
||||
sendAbort() {
|
||||
const gcode = `ABORT`
|
||||
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
|
||||
this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'manualProbeAbort' })
|
||||
}
|
||||
|
||||
sendAccept() {
|
||||
const gcode = `ACCEPT`
|
||||
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
|
||||
this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'manualProbeAccept' })
|
||||
}
|
||||
|
||||
sendAdjusted() {
|
||||
const gcode = `ADJUSTED`
|
||||
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
|
||||
this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'manualProbeAccept' })
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,222 @@
|
||||
<template>
|
||||
<v-dialog :value="showDialog" width="400" persistent :fullscreen="isMobile">
|
||||
<panel
|
||||
:title="$t('ManualProbe.Headline').toString()"
|
||||
:icon="mdiArrowCollapseDown"
|
||||
card-class="manual_probe-dialog"
|
||||
:margin-bottom="false"
|
||||
style="overflow: hidden"
|
||||
:height="isMobile ? 0 : 548">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="sendAbort">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col class="d-flex align-center justify-center">
|
||||
<span class="text-h5">{{ z_position_lower }}</span>
|
||||
<v-icon class="mx-2">{{ mdiChevronTripleRight }}</v-icon>
|
||||
<span class="text-h4">{{ z_position }}</span>
|
||||
<v-icon class="mx-2">{{ mdiChevronTripleLeft }}</v-icon>
|
||||
<span class="text-h5">{{ z_position_upper }}</span>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-left">
|
||||
<v-btn class="" color="primary" @click="sendTestZ('--')">
|
||||
<v-icon small>{{ mdiMinusThick }}</v-icon>
|
||||
<v-icon small>{{ mdiMinusThick }}</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col class="text-left">
|
||||
<v-btn class="" color="primary" @click="sendTestZ('-')">
|
||||
<v-icon small>{{ mdiMinusThick }}</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col class="text-right">
|
||||
<v-btn class="" color="primary" @click="sendTestZ('+')">
|
||||
<v-icon small>{{ mdiPlusThick }}</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col class="text-right">
|
||||
<v-btn class="" color="primary" @click="sendTestZ('++')">
|
||||
<v-icon small>{{ mdiPlusThick }}</v-icon>
|
||||
<v-icon small>{{ mdiPlusThick }}</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
<sub-panel :title="$t('ManualProbe.Advanced')" sub-panel-class="manual-probe-dialog-advanced" class="mb-n2">
|
||||
<v-container>
|
||||
<v-item-group class="_btn-group">
|
||||
<v-btn
|
||||
v-for="(offset, index) in offsetsZ"
|
||||
:key="`offsetsUp-${index}`"
|
||||
small
|
||||
class="_btn-qs flex-grow-1 px-1"
|
||||
@click="sendTestZ(offset.toString())">
|
||||
<v-icon v-if="index === 0" left small class="mr-1 ml-n1">
|
||||
{{ mdiArrowExpandUp }}
|
||||
</v-icon>
|
||||
<span>+{{ offset }}</span>
|
||||
</v-btn>
|
||||
</v-item-group>
|
||||
<v-item-group class="_btn-group mt-6 mt-sm-3">
|
||||
<v-btn
|
||||
v-for="(offset, index) in offsetsZ"
|
||||
:key="`offsetsDown-${index}`"
|
||||
small
|
||||
class="_btn-qs flex-grow-1 px-1"
|
||||
@click="sendTestZ((offset * -1).toString())">
|
||||
<v-icon v-if="index === 0" left small class="mr-1 ml-n1">
|
||||
{{ mdiArrowCollapseDown }}
|
||||
</v-icon>
|
||||
<span>−{{ offset }}</span>
|
||||
</v-btn>
|
||||
</v-item-group>
|
||||
</v-container>
|
||||
</sub-panel>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn text :loading="loadingAbort" @click="sendAbort">
|
||||
{{ $t('ManualProbe.Abort') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text :loading="loadingAccept" @click="sendAccept">
|
||||
{{ $t('ManualProbe.Accept') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</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 Responsive from '@/components/ui/Responsive.vue'
|
||||
|
||||
import {
|
||||
mdiArrowCollapseDown,
|
||||
mdiArrowExpandUp,
|
||||
mdiInformation,
|
||||
mdiPlusThick,
|
||||
mdiMinusThick,
|
||||
mdiChevronTripleLeft,
|
||||
mdiChevronTripleRight,
|
||||
mdiCloseThick,
|
||||
} from '@mdi/js'
|
||||
@Component({
|
||||
components: { Panel, Responsive },
|
||||
})
|
||||
export default class TheManualProbeDialog extends Mixins(BaseMixin) {
|
||||
mdiArrowCollapseDown = mdiArrowCollapseDown
|
||||
mdiArrowExpandUp = mdiArrowExpandUp
|
||||
mdiInformation = mdiInformation
|
||||
mdiPlusThick = mdiPlusThick
|
||||
mdiMinusThick = mdiMinusThick
|
||||
mdiChevronTripleLeft = mdiChevronTripleLeft
|
||||
mdiChevronTripleRight = mdiChevronTripleRight
|
||||
mdiCloseThick = mdiCloseThick
|
||||
|
||||
get showDialog() {
|
||||
return this.$store.state.printer.manual_probe?.is_active ?? false
|
||||
}
|
||||
|
||||
get offsetsZ() {
|
||||
const offsets = [1, 0.1, 0.05, 0.01, 0.005]
|
||||
|
||||
return offsets.sort()
|
||||
}
|
||||
|
||||
get z_position() {
|
||||
return (this.$store.state.printer.manual_probe?.z_position ?? 0).toFixed(3)
|
||||
}
|
||||
|
||||
get z_position_lower() {
|
||||
const value = this.$store.state.printer.manual_probe?.z_position_lower ?? null
|
||||
if (value === null) return '??????'
|
||||
|
||||
return value.toFixed(3)
|
||||
}
|
||||
|
||||
get z_position_upper() {
|
||||
const value = this.$store.state.printer.manual_probe?.z_position_upper ?? null
|
||||
if (value === null) return '??????'
|
||||
|
||||
return value.toFixed(3)
|
||||
}
|
||||
|
||||
get loadingAbort() {
|
||||
return this.loadings.includes('manualProbeAbort')
|
||||
}
|
||||
|
||||
get loadingAccept() {
|
||||
return this.loadings.includes('manualProbeAccept')
|
||||
}
|
||||
|
||||
sendTestZ(offset: string) {
|
||||
const gcode = `TESTZ Z=${offset}`
|
||||
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
|
||||
this.$socket.emit('printer.gcode.script', { script: gcode })
|
||||
}
|
||||
|
||||
sendAbort() {
|
||||
const gcode = `ABORT`
|
||||
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
|
||||
this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'manualProbeAbort' })
|
||||
}
|
||||
|
||||
sendAccept() {
|
||||
const gcode = `ACCEPT`
|
||||
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
|
||||
this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'manualProbeAccept' })
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.v-btn-toggle {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
._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) !important;
|
||||
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;
|
||||
font-weight: 400;
|
||||
max-height: 28px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<v-dialog :value="showDialog" width="400" persistent :fullscreen="isMobile">
|
||||
<panel
|
||||
:title="$t('ScrewsTiltAdjust.Headline').toString()"
|
||||
:icon="mdiArrowCollapseDown"
|
||||
card-class="manual_probe-dialog"
|
||||
:margin-bottom="false"
|
||||
style="overflow: hidden"
|
||||
:height="isMobile ? 0 : 548">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="clearScrewsTiltAdjust">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text v-if="error">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-alert border="left" text type="error">{{ $t('ScrewsTiltAdjust.ErrorText') }}</v-alert>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-text v-if="Object.keys(results).length">
|
||||
<template v-for="(result, name, index) of results">
|
||||
<v-divider v-if="index" :key="`result-divider-${name}`" class="my-1" />
|
||||
<the-screws-tilt-adjust-dialog-entry :key="`result-${name}`" :name="name" :result="result" />
|
||||
</template>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" text @click="clearScrewsTiltAdjust">
|
||||
{{ $t('ScrewsTiltAdjust.Accept') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</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 Responsive from '@/components/ui/Responsive.vue'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import { mdiArrowCollapseDown, mdiCloseThick } from '@mdi/js'
|
||||
import ControlMixin from '@/components/mixins/control'
|
||||
import TheScrewsTiltAdjustDialogEntry from '@/components/dialogs/TheScrewsTiltAdjustDialogEntry.vue'
|
||||
@Component({
|
||||
components: { TheScrewsTiltAdjustDialogEntry, Panel, Responsive, SettingsRow },
|
||||
})
|
||||
export default class TheScrewsTiltAdjustDialog extends Mixins(BaseMixin, ControlMixin) {
|
||||
mdiArrowCollapseDown = mdiArrowCollapseDown
|
||||
mdiCloseThick = mdiCloseThick
|
||||
get state() {
|
||||
return this.$store.state.printer.screws_tilt_adjust ?? {}
|
||||
}
|
||||
get error() {
|
||||
return this.state.error ?? false
|
||||
}
|
||||
get results() {
|
||||
return this.state.results ?? {}
|
||||
}
|
||||
get showDialog() {
|
||||
return this.error || Object.keys(this.results).length
|
||||
}
|
||||
clearScrewsTiltAdjust() {
|
||||
this.$store.dispatch('printer/clearScrewsTiltAdjust')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<settings-row :title="outputName" :sub-title="subTitle">
|
||||
<v-chip v-if="!(is_base ?? false)" label small>
|
||||
<v-icon v-if="sign === 'CCW'" small left>{{ mdiRotateLeft }}</v-icon>
|
||||
<v-icon v-if="sign === 'CW'" small left>{{ mdiRotateRight }}</v-icon>
|
||||
{{ adjust }}
|
||||
</v-chip>
|
||||
<v-chip v-else label small>{{ $t('ScrewsTiltAdjust.Base') }}</v-chip>
|
||||
</settings-row>
|
||||
</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 Responsive from '@/components/ui/Responsive.vue'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import { mdiRotateLeft, mdiRotateRight, mdiCloseThick } from '@mdi/js'
|
||||
import ControlMixin from '@/components/mixins/control'
|
||||
interface ScrewsTiltAdjustResult {
|
||||
z: number
|
||||
sign?: string
|
||||
adjust?: string
|
||||
is_base: boolean
|
||||
}
|
||||
@Component({
|
||||
components: { Panel, Responsive, SettingsRow },
|
||||
})
|
||||
export default class TheScrewsTiltAdjustDialogEntry extends Mixins(BaseMixin, ControlMixin) {
|
||||
mdiRotateLeft = mdiRotateLeft
|
||||
mdiCloseThick = mdiCloseThick
|
||||
mdiRotateRight = mdiRotateRight
|
||||
@Prop({ required: true }) declare readonly name: string
|
||||
@Prop({ required: true }) declare readonly result: ScrewsTiltAdjustResult
|
||||
get settings() {
|
||||
return this.$store.state.printer.configfile?.settings?.screws_tilt_adjust ?? {}
|
||||
}
|
||||
get outputName() {
|
||||
return this.settings[this.name + '_name'] ?? 'Unknown'
|
||||
}
|
||||
get coordinates() {
|
||||
return this.settings[this.name] ?? [0, 0]
|
||||
}
|
||||
get x() {
|
||||
return this.coordinates[0] ?? 0
|
||||
}
|
||||
get y() {
|
||||
return this.coordinates[1] ?? 0
|
||||
}
|
||||
get z() {
|
||||
return this.result.z.toFixed(3)
|
||||
}
|
||||
get subTitle() {
|
||||
return `(X: ${this.x}, Y: ${this.y}, Z: ${this.z})`
|
||||
}
|
||||
get sign() {
|
||||
return this.result.sign ?? ''
|
||||
}
|
||||
get adjust() {
|
||||
return this.result.adjust ?? '00:00'
|
||||
}
|
||||
get is_base() {
|
||||
return this.result.is_base ?? false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<div ref="view" class="codeview" @mouseup="mouseUp" @keydown="keyPress"></div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, PropSync, Prop, Vue, Watch } from 'vue-property-decorator'
|
||||
import { EditorView, basicSetup } from 'codemirror'
|
||||
import { EditorState } from '@codemirror/state'
|
||||
|
||||
@Component({})
|
||||
export default class CodeStream extends Vue {
|
||||
@PropSync('currentline') currentLineNumber!: number
|
||||
@Prop({ type: String, default: '' }) declare document: string
|
||||
@Prop({ type: Boolean, default: false }) declare isSimulating: boolean
|
||||
@Prop({ type: Boolean, default: false }) declare shown: boolean
|
||||
|
||||
view: EditorView | undefined = undefined
|
||||
|
||||
private mounted() {
|
||||
this.view = new EditorView({
|
||||
doc: this.document,
|
||||
extensions: [basicSetup, EditorState.readOnly.of(true)],
|
||||
parent: this.$refs['view'] as HTMLElement,
|
||||
})
|
||||
}
|
||||
|
||||
mouseUp() {
|
||||
if (this.view) {
|
||||
let line = this.view.state.doc.lineAt(this.view.state.selection.ranges[0].from)
|
||||
this.$emit('update:currentline', line.to)
|
||||
this.view.contentDOM.blur()
|
||||
this.$emit('got-focus')
|
||||
}
|
||||
}
|
||||
|
||||
keyPress() {
|
||||
if (this.view) {
|
||||
let line = this.view.state.doc.lineAt(this.view.state.selection.ranges[0].from)
|
||||
this.$emit('update:currentline', line.to)
|
||||
this.$emit('got-focus')
|
||||
}
|
||||
}
|
||||
|
||||
@Watch('document')
|
||||
documentUpdated() {
|
||||
if (this.view && this.shown) {
|
||||
this.view.dispatch({
|
||||
changes: {
|
||||
from: 0,
|
||||
to: this.view.state.doc.length,
|
||||
insert: this.document,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@Watch('currentLineNumber')
|
||||
currentlineUpdated(to: number) {
|
||||
if (this.view && this.shown) {
|
||||
let line = this.view.state.doc.lineAt(to)
|
||||
this.view.dispatch({
|
||||
selection: {
|
||||
anchor: line.from,
|
||||
head: line.from,
|
||||
},
|
||||
scrollIntoView: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/deep/ .cm-activeLine {
|
||||
background-color: #333 !important;
|
||||
}
|
||||
|
||||
.codeview {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -19,9 +19,19 @@
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-row :class="showScrubber ? 'withScrubber' : ''">
|
||||
<v-col>
|
||||
<v-col :cols="showGCode ? 8 : 12">
|
||||
<div ref="viewerCanvasContainer"></div>
|
||||
</v-col>
|
||||
<v-col v-show="showGCode" cols="4">
|
||||
<div class="viewer">
|
||||
<CodeStream
|
||||
ref="gcodestream"
|
||||
:shown="showGCode"
|
||||
:currentline.sync="scrubPosition"
|
||||
:document="fileData"
|
||||
:is-simulating="!printerIsPrinting" />
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-show="showScrubber" class="scrubber">
|
||||
<v-col class="pt-0">
|
||||
@@ -123,6 +133,14 @@
|
||||
hide-details
|
||||
:label="$t('GCodeViewer.ShowTravelMoves')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox
|
||||
v-model="showGCode"
|
||||
class="mt-0"
|
||||
hide-details
|
||||
:label="$t('GCodeViewer.ShowGCode')"></v-checkbox>
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item
|
||||
v-if="loadedFile === sdCardFilePath && printing_objects.length"
|
||||
class="minHeight36">
|
||||
@@ -168,6 +186,13 @@
|
||||
hide-details
|
||||
:label="$t('GCodeViewer.SpecularLighting')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox
|
||||
v-model="cncMode"
|
||||
class="mt-0"
|
||||
hide-details
|
||||
:label="$t('GCodeViewer.CNCMode')"></v-checkbox>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
@@ -255,6 +280,7 @@ import GCodeViewer from '@sindarius/gcodeviewer'
|
||||
import axios from 'axios'
|
||||
import { formatFilesize } from '@/plugins/helpers'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import CodeStream from '@/components/gcodeviewer/CodeStream.vue'
|
||||
import {
|
||||
mdiCameraRetake,
|
||||
mdiCog,
|
||||
@@ -286,7 +312,7 @@ interface downloadSnackbar {
|
||||
|
||||
let viewer: any = null
|
||||
@Component({
|
||||
components: { Panel },
|
||||
components: { Panel, CodeStream },
|
||||
})
|
||||
export default class Viewer extends Mixins(BaseMixin) {
|
||||
/**
|
||||
@@ -342,6 +368,8 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
name: '',
|
||||
}
|
||||
|
||||
private fileData: string = ''
|
||||
|
||||
@Prop({ type: String, default: '', required: false }) declare filename: string
|
||||
@Ref('fileInput') declare fileInput: HTMLInputElement
|
||||
@Ref('viewerCanvasContainer') declare viewerCanvasContainer: HTMLElement
|
||||
@@ -366,6 +394,9 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
await this.init()
|
||||
|
||||
if (this.loadedFile !== null) this.scrubFileSize = viewer.fileSize
|
||||
if (viewer) {
|
||||
this.fileData = viewer.fileData
|
||||
}
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
@@ -484,13 +515,14 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
viewer.gcodeProcessor.useHighQualityExtrusion(this.hdRendering)
|
||||
viewer.gcodeProcessor.updateForceWireMode(this.forceLineRendering)
|
||||
viewer.gcodeProcessor.updateForceWireMode(this.forceLineRendering || this.cncMode)
|
||||
viewer.gcodeProcessor.setAlpha(this.transparency)
|
||||
viewer.gcodeProcessor.setVoxelMode(this.voxelMode)
|
||||
viewer.gcodeProcessor.voxelWidth = this.voxelWidth
|
||||
viewer.gcodeProcessor.voxelHeight = this.voxelHeight
|
||||
viewer.gcodeProcessor.useSpecularColor(this.specularLighting)
|
||||
viewer.gcodeProcessor.setLiveTracking(false)
|
||||
viewer.gcodeProcessor.g1AsExtrusion = this.cncMode
|
||||
viewer.buildObjects.objectCallback = this.objectCallback
|
||||
|
||||
this.loadToolColors(this.extruderColors)
|
||||
@@ -574,6 +606,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
this.fileSize = blob.length
|
||||
// Do something with result
|
||||
await viewer.processFile(blob)
|
||||
this.fileData = viewer.fileData
|
||||
}
|
||||
this.finishLoad()
|
||||
})
|
||||
@@ -621,6 +654,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
|
||||
viewer.updateRenderQuality(this.renderQuality.value)
|
||||
await viewer.processFile(text)
|
||||
this.fileData = viewer.fileData
|
||||
this.loadingPercent = 100
|
||||
this.finishLoad()
|
||||
this.scrubFileSize = viewer.fileSize
|
||||
@@ -652,6 +686,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
this.loading = true
|
||||
this.loadingPercent = 0
|
||||
await viewer.reload()
|
||||
this.fileData = viewer.fileData
|
||||
this.loadingPercent = 100
|
||||
this.finishLoad()
|
||||
}
|
||||
@@ -694,6 +729,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
const offset = 350
|
||||
if (newVal > 0 && this.printerIsPrinting && this.tracking && newVal > offset) {
|
||||
viewer.gcodeProcessor.updateFilePosition(newVal - offset)
|
||||
this.scrubPosition = newVal - offset
|
||||
} else {
|
||||
viewer.gcodeProcessor.updateFilePosition(viewer.fileSize)
|
||||
}
|
||||
@@ -739,6 +775,18 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'gcodeViewer.showTravelMoves', value: newVal })
|
||||
}
|
||||
|
||||
get showGCode(): boolean {
|
||||
return this.$store.state.gui.gcodeViewer.showGCode ?? false
|
||||
}
|
||||
|
||||
set showGCode(newVal: boolean) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'gcodeViewer.showGCode', value: newVal })
|
||||
if (newVal && viewer) {
|
||||
this.fileData = viewer.fileData
|
||||
}
|
||||
this.handleResize()
|
||||
}
|
||||
|
||||
@Watch('showTravelMoves')
|
||||
showTravelMovesChanged(newVal: boolean) {
|
||||
viewer?.toggleTravels(newVal)
|
||||
@@ -784,7 +832,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
@Watch('forceLineRendering')
|
||||
async forceLineRenderingChanged(newVal: boolean) {
|
||||
if (viewer) {
|
||||
viewer.gcodeProcessor.updateForceWireMode(newVal)
|
||||
viewer.gcodeProcessor.updateForceWireMode(newVal || this.cncMode)
|
||||
await this.reloadViewer()
|
||||
}
|
||||
}
|
||||
@@ -855,6 +903,17 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
}
|
||||
}
|
||||
|
||||
get cncMode() {
|
||||
return this.$store.state.gui.gcodeViewer.cncMode
|
||||
}
|
||||
|
||||
set cncMode(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'gcodeViewer.cncMode', value: newVal })
|
||||
viewer.gcodeProcessor.g1AsExtrusion = newVal
|
||||
viewer.gcodeProcessor.updateForceWireMode(this.forceLineRendering || newVal)
|
||||
this.reloadViewer()
|
||||
}
|
||||
|
||||
get extruderColors() {
|
||||
return this.$store.state.gui.gcodeViewer?.extruderColors ?? false
|
||||
}
|
||||
@@ -1044,6 +1103,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
this.scrubInterval = setInterval(() => {
|
||||
this.scrubPosition += 100 * this.scrubSpeed
|
||||
viewer.gcodeProcessor.updateFilePosition(this.scrubPosition)
|
||||
viewer.simulateToolPosition()
|
||||
if (this.tracking || this.scrubPosition >= this.scrubFileSize) {
|
||||
this.scrubPlaying = false
|
||||
}
|
||||
@@ -1062,7 +1122,10 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
@Debounce(200)
|
||||
@Watch('scrubPosition')
|
||||
updateScrubPosition(to: number): void {
|
||||
if (!this.tracking) viewer.gcodeProcessor.updateFilePosition(to)
|
||||
if (!this.tracking) {
|
||||
viewer.gcodeProcessor.updateFilePosition(to)
|
||||
viewer.simulateToolPosition()
|
||||
}
|
||||
}
|
||||
|
||||
fastForward(): void {
|
||||
|
||||
@@ -95,7 +95,7 @@ export default class Codemirror extends Mixins(BaseMixin) {
|
||||
if (['cfg', 'conf'].includes(this.fileExtension)) extensions.push(StreamLanguage.define(klipper_config))
|
||||
else if (['gcode'].includes(this.fileExtension)) extensions.push(StreamLanguage.define(gcode))
|
||||
else if (['json'].includes(this.fileExtension)) extensions.push(json())
|
||||
else if (['css'].includes(this.fileExtension)) extensions.push(css())
|
||||
else if (['css', 'scss', 'sass'].includes(this.fileExtension)) extensions.push(css())
|
||||
|
||||
return extensions
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div>
|
||||
<div ref="picker"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins, Prop, Ref, Watch } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import iro from '@jaames/iro'
|
||||
import { IroColor } from '@irojs/iro-core'
|
||||
import { ColorPickerProps, IroColorPicker as IroCP } from '@jaames/iro/dist/ColorPicker.d'
|
||||
|
||||
@Component
|
||||
export default class ColorPicker extends Mixins(BaseMixin) {
|
||||
colorPicker: IroCP | null = null
|
||||
|
||||
@Ref('picker')
|
||||
readonly picker!: HTMLElement
|
||||
|
||||
@Prop({ type: [Object, String], default: '#ffffff' })
|
||||
readonly color!: IroColor
|
||||
|
||||
@Prop({ type: Object, default: () => ({}) })
|
||||
readonly options!: ColorPickerProps
|
||||
|
||||
@Watch('color', { deep: true })
|
||||
colorChanged(value: string) {
|
||||
if (this.colorPicker && this.colorPicker.color.rgbString !== value) {
|
||||
this.colorPicker.color.rgbString = value
|
||||
}
|
||||
}
|
||||
|
||||
get internalOptions(): ColorPickerProps {
|
||||
return {
|
||||
...this.options,
|
||||
color: this.color,
|
||||
borderWidth: 2,
|
||||
sliderSize: 16,
|
||||
}
|
||||
}
|
||||
|
||||
emitColorChange(color: IroColor) {
|
||||
this.$emit('change', color)
|
||||
this.$emit('update:color', color)
|
||||
}
|
||||
|
||||
onColorChange(color: IroColor) {
|
||||
this.emitColorChange(color)
|
||||
}
|
||||
|
||||
mounted() {
|
||||
this.colorPicker = iro.ColorPicker(this.picker, this.internalOptions)
|
||||
this.colorPicker.on('color:change', this.onColorChange)
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
this.colorPicker?.off('color:change', this.onColorChange)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -10,7 +10,7 @@
|
||||
{{ alias ? alias : macro.name.replace(/_/g, ' ') }}
|
||||
</v-btn>
|
||||
<template v-if="paramArray.length">
|
||||
<v-menu offset-y :close-on-content-click="false">
|
||||
<v-menu v-if="!isMobile" offset-y :close-on-content-click="false">
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
:disabled="disabled"
|
||||
@@ -22,10 +22,10 @@
|
||||
<v-icon>{{ mdiMenuDown }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card max-width="200">
|
||||
<v-card :max-width="paramsOverlayWidth">
|
||||
<v-card-text class="py-2">
|
||||
<v-row v-for="(name, key) in paramArray" :key="'param_' + key" class="my-2">
|
||||
<v-col class="py-0">
|
||||
<v-row class="my-2">
|
||||
<v-col v-for="(name, key) in paramArray" :key="'param_' + key" :cols="paramCssCols">
|
||||
<v-text-field
|
||||
v-model="params[name].value"
|
||||
:label="name"
|
||||
@@ -49,6 +49,47 @@
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-menu>
|
||||
<template v-else>
|
||||
<v-btn
|
||||
:disabled="disabled"
|
||||
:color="color"
|
||||
class="minwidth-0 px-1 btnMacroMenu"
|
||||
small
|
||||
@click="paramsDialog = true">
|
||||
<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">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="paramsDialog = false">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col v-for="(name, key) in paramArray" :key="'param_mobile_' + key" :cols="6">
|
||||
<v-text-field
|
||||
v-model="params[name].value"
|
||||
:label="name"
|
||||
:placeholder="params[name].default"
|
||||
:persistent-placeholder="true"
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
clearable
|
||||
:clear-icon="mdiRefresh"
|
||||
@keyup.enter="sendWithParams"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-actions class="px-4 pb-4">
|
||||
<v-btn color="primary" class="text-uppercase" block @click="sendWithParams">
|
||||
{{ $t('Panels.MacrosPanel.Send') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</template>
|
||||
</template>
|
||||
</v-item-group>
|
||||
</template>
|
||||
@@ -58,7 +99,8 @@ import Component from 'vue-class-component'
|
||||
import { Mixins, Prop, Watch } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { GuiMacrosStateMacrogroupMacro } from '@/store/gui/macros/types'
|
||||
import { mdiMenuDown, mdiRefresh } from '@mdi/js'
|
||||
import { mdiCloseThick, mdiMenuDown, mdiRefresh } from '@mdi/js'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
|
||||
interface param {
|
||||
type: 'int' | 'double' | 'string' | null
|
||||
@@ -70,16 +112,20 @@ interface params {
|
||||
[key: string]: param
|
||||
}
|
||||
|
||||
@Component
|
||||
@Component({
|
||||
components: { Panel },
|
||||
})
|
||||
export default class MacroButton extends Mixins(BaseMixin) {
|
||||
/**
|
||||
* Icons
|
||||
*/
|
||||
mdiCloseThick = mdiCloseThick
|
||||
mdiMenuDown = mdiMenuDown
|
||||
mdiRefresh = mdiRefresh
|
||||
|
||||
private paramArray: string[] = []
|
||||
private params: params = {}
|
||||
private paramsDialog = false
|
||||
|
||||
@Prop({ required: true })
|
||||
declare readonly macro: GuiMacrosStateMacrogroupMacro
|
||||
@@ -101,6 +147,24 @@ export default class MacroButton extends Mixins(BaseMixin) {
|
||||
return this.macro.name.match(/[G|M]\d{1,3}/gm)
|
||||
}
|
||||
|
||||
get paramCols() {
|
||||
if (this.isMobile) return 1
|
||||
|
||||
const cols = Math.ceil(this.paramArray.length / 5)
|
||||
|
||||
if (cols > 4) return 4
|
||||
|
||||
return cols
|
||||
}
|
||||
|
||||
get paramCssCols() {
|
||||
return 12 / this.paramCols
|
||||
}
|
||||
|
||||
get paramsOverlayWidth() {
|
||||
return 200 * this.paramCols
|
||||
}
|
||||
|
||||
@Watch('klipperMacro')
|
||||
klipperMacroChange() {
|
||||
this.refreshParams()
|
||||
|
||||
@@ -0,0 +1,519 @@
|
||||
<template>
|
||||
<v-container :class="containerClass">
|
||||
<v-row>
|
||||
<v-col class="pb-3">
|
||||
<v-subheader class="_light-subheader">
|
||||
<v-icon v-if="(!root || groups.length === 0) && isOn" small left @click="off">
|
||||
{{ mdiLightbulbOnOutline }}
|
||||
</v-icon>
|
||||
<v-icon v-else-if="!root || groups.length === 0" small left @click="on">
|
||||
{{ mdiLightbulbOutline }}
|
||||
</v-icon>
|
||||
<span>{{ name }}</span>
|
||||
<v-spacer></v-spacer>
|
||||
<span
|
||||
v-if="!root || groups.length === 0"
|
||||
class="_currentState"
|
||||
:style="currentStateStyle"
|
||||
@click="boolDialog = true"></span>
|
||||
</v-subheader>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<template v-if="root && groups.length">
|
||||
<miscellaneous-light v-for="group in groups" :key="group.id" :object="object" :group="group" />
|
||||
</template>
|
||||
<v-dialog v-model="boolDialog" persistent :width="400">
|
||||
<panel
|
||||
:title="name"
|
||||
:icon="mdiLightbulbOutline"
|
||||
card-class="temperature-edit-heater-dialog"
|
||||
:margin-bottom="false">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="boolDialog = false">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text class="pt-6">
|
||||
<template v-if="presets.length">
|
||||
<v-row>
|
||||
<v-col class="light-presets-container pt-0 d-flex flex-wrap flex-row justify-center">
|
||||
<v-tooltip v-for="preset in presets" :key="preset.id" top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<div
|
||||
:style="presetStyle(preset)"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
@click="usePreset(preset)"></div>
|
||||
</template>
|
||||
<span>{{ preset.name }}</span>
|
||||
</v-tooltip>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-divider class="my-3"></v-divider>
|
||||
</template>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<color-picker
|
||||
:color="colorRGB"
|
||||
:options="colorPickerOptions"
|
||||
@update:color="onColorRGBChanged" />
|
||||
<color-picker
|
||||
v-if="existWhite"
|
||||
:color="colorRGBW"
|
||||
:options="colorPickerWhiteOptions"
|
||||
class="mt-3"
|
||||
@update:color="onColorWhiteChanged" />
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-row v-if="existRed">
|
||||
<v-col>
|
||||
<number-input
|
||||
:label="$t('Panels.MiscellaneousPanel.Light.Red')"
|
||||
param="red"
|
||||
:target="redInt"
|
||||
:default-value="Math.round(object.initialRed * 255)"
|
||||
:min="0"
|
||||
:max="255"
|
||||
:dec="1"
|
||||
:step="1"
|
||||
:output-error-msg="true"
|
||||
:has-spinner="true"
|
||||
@submit="onColorInput" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="existGreen">
|
||||
<v-col>
|
||||
<number-input
|
||||
:label="$t('Panels.MiscellaneousPanel.Light.Green')"
|
||||
param="green"
|
||||
:target="greenInt"
|
||||
:default-value="Math.round(object.initialGreen * 255)"
|
||||
:min="0"
|
||||
:max="255"
|
||||
:dec="1"
|
||||
:step="1"
|
||||
:has-spinner="true"
|
||||
@submit="onColorInput" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="existBlue">
|
||||
<v-col>
|
||||
<number-input
|
||||
:label="$t('Panels.MiscellaneousPanel.Light.Blue')"
|
||||
param="blue"
|
||||
:target="blueInt"
|
||||
:default-value="Math.round(object.initialBlue * 255)"
|
||||
:min="0"
|
||||
:max="255"
|
||||
:dec="1"
|
||||
:step="1"
|
||||
:has-spinner="true"
|
||||
@submit="onColorInput" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="existWhite">
|
||||
<v-col>
|
||||
<number-input
|
||||
:label="$t('Panels.MiscellaneousPanel.Light.White')"
|
||||
param="white"
|
||||
:target="whiteInt"
|
||||
:default-value="Math.round(object.initialWhite * 255)"
|
||||
:min="0"
|
||||
:max="255"
|
||||
:dec="1"
|
||||
:step="1"
|
||||
:has-spinner="true"
|
||||
@submit="onColorInput" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { convertName } from '@/plugins/helpers'
|
||||
import { Component, Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { mdiCloseThick, mdiLightbulbOutline, mdiLightbulbOnOutline } from '@mdi/js'
|
||||
import { PrinterStateLight } from '@/store/printer/types'
|
||||
import ColorPicker from '@/components/inputs/ColorPicker.vue'
|
||||
import { ColorPickerProps } from '@jaames/iro/dist/ColorPicker.d'
|
||||
import { Debounce } from 'vue-debounce-decorator'
|
||||
import iro from '@jaames/iro'
|
||||
import { IroColor } from '@irojs/iro-core'
|
||||
import { GuiMiscellaneousStateEntryLightgroup, GuiMiscellaneousStateEntryPreset } from '@/store/gui/miscellaneous/types'
|
||||
|
||||
interface ColorData {
|
||||
red: number | null
|
||||
green: number | null
|
||||
blue: number | null
|
||||
white: number | null
|
||||
}
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
ColorPicker,
|
||||
},
|
||||
})
|
||||
export default class MiscellaneousLight extends Mixins(BaseMixin) {
|
||||
mdiCloseThick = mdiCloseThick
|
||||
mdiLightbulbOutline = mdiLightbulbOutline
|
||||
mdiLightbulbOnOutline = mdiLightbulbOnOutline
|
||||
|
||||
@Prop({ type: Object, required: true })
|
||||
declare object: PrinterStateLight
|
||||
|
||||
@Prop({ type: Boolean, default: false }) readonly root!: boolean
|
||||
@Prop(Object) readonly group!: GuiMiscellaneousStateEntryLightgroup | undefined
|
||||
|
||||
private boolDialog = false
|
||||
private inputValue = 0
|
||||
|
||||
get name() {
|
||||
if (this.group) return convertName(this.group.name)
|
||||
|
||||
return convertName(this.object.name)
|
||||
}
|
||||
|
||||
get colorPickerOptions() {
|
||||
let options: ColorPickerProps = {
|
||||
width: 200,
|
||||
margin: 15,
|
||||
layout: [],
|
||||
}
|
||||
|
||||
if (this.existRed) {
|
||||
// @ts-ignore
|
||||
options?.layout.push({
|
||||
component: iro.ui.Slider,
|
||||
options: {
|
||||
sliderType: 'red',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if (this.existGreen) {
|
||||
// @ts-ignore
|
||||
options?.layout.push({
|
||||
component: iro.ui.Slider,
|
||||
options: {
|
||||
sliderType: 'green',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if (this.existBlue) {
|
||||
// @ts-ignore
|
||||
options?.layout.push({
|
||||
component: iro.ui.Slider,
|
||||
options: {
|
||||
sliderType: 'blue',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if (this.existRed && this.existGreen && this.existBlue) {
|
||||
options.layout = [
|
||||
{
|
||||
component: iro.ui.Wheel,
|
||||
},
|
||||
{
|
||||
component: iro.ui.Slider,
|
||||
options: {
|
||||
sliderType: 'value',
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
get colorPickerWhiteOptions() {
|
||||
let options: ColorPickerProps = {
|
||||
width: 200,
|
||||
margin: 15,
|
||||
layout: [
|
||||
{
|
||||
component: iro.ui.Slider,
|
||||
options: {
|
||||
sliderType: 'alpha',
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
get optionsColors() {
|
||||
let output: string[] = []
|
||||
|
||||
this.presets.forEach((preset: GuiMiscellaneousStateEntryPreset) => {
|
||||
output.push(`rgb(${preset.red}%, ${preset.green}%, ${preset.blue}%)`)
|
||||
})
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
get current() {
|
||||
const color: ColorData = {
|
||||
red: 0,
|
||||
green: 0,
|
||||
blue: 0,
|
||||
white: null,
|
||||
}
|
||||
|
||||
if (this.existWhite) color.white = 0
|
||||
if (this.object.colorData.length === 0) return color
|
||||
|
||||
const firstColorData = this.object.colorData[(this.group?.start ?? 1) - 1]
|
||||
color.red = firstColorData[0] * 255
|
||||
color.green = firstColorData[1] * 255
|
||||
color.blue = firstColorData[2] * 255
|
||||
if (this.object.colorOrder.indexOf('W') !== -1) color.white = firstColorData[3] * 255
|
||||
|
||||
return color
|
||||
}
|
||||
|
||||
get isOn() {
|
||||
return (
|
||||
(this.current.red ?? 0) +
|
||||
(this.current?.green ?? 0) +
|
||||
(this.current.blue ?? 0) +
|
||||
(this.current.white ?? 0) >
|
||||
0
|
||||
)
|
||||
}
|
||||
|
||||
get existRed() {
|
||||
return this.object.colorOrder.indexOf('R') !== -1
|
||||
}
|
||||
|
||||
get existGreen() {
|
||||
return this.object.colorOrder.indexOf('G') !== -1
|
||||
}
|
||||
|
||||
get existBlue() {
|
||||
return this.object.colorOrder.indexOf('B') !== -1
|
||||
}
|
||||
|
||||
get existWhite() {
|
||||
return this.object.colorOrder.indexOf('W') !== -1
|
||||
}
|
||||
|
||||
get currentStateStyle() {
|
||||
let output = this.colorRGB
|
||||
|
||||
if (this.current.white !== null && this.current.red == 0 && this.current.green == 0 && this.current.blue == 0)
|
||||
output = `rgb(${this.current.white * 255}, ${this.current.white * 255}, ${this.current.white * 255})`
|
||||
|
||||
return {
|
||||
'background-color': output,
|
||||
}
|
||||
}
|
||||
|
||||
get colorRGB() {
|
||||
return `rgb(${Math.round(this.current.red ?? 0)}, ${Math.round(this.current.green ?? 0)}, ${Math.round(
|
||||
this.current.blue ?? 0
|
||||
)})`
|
||||
}
|
||||
|
||||
get colorRGBW() {
|
||||
return `rgba(255, 255, 255, ${(this.current.white ?? 0) / 255})`
|
||||
}
|
||||
|
||||
get redInt() {
|
||||
return Math.round(this.current.red ?? 0)
|
||||
}
|
||||
|
||||
get greenInt() {
|
||||
return Math.round(this.current.green ?? 0)
|
||||
}
|
||||
|
||||
get blueInt() {
|
||||
return Math.round(this.current.blue ?? 0)
|
||||
}
|
||||
|
||||
get whiteInt() {
|
||||
return Math.round(this.current.white ?? 0)
|
||||
}
|
||||
|
||||
get groups() {
|
||||
return (
|
||||
this.$store.getters['gui/miscellaneous/getEntryLightgroups']({
|
||||
type: this.object.type,
|
||||
name: this.object.name,
|
||||
}) ?? []
|
||||
)
|
||||
}
|
||||
|
||||
get presets() {
|
||||
return (
|
||||
this.$store.getters['gui/miscellaneous/getEntryPresets']({
|
||||
type: this.object.type,
|
||||
name: this.object.name,
|
||||
}) ?? []
|
||||
)
|
||||
}
|
||||
|
||||
get containerClass() {
|
||||
let output = ['px-0']
|
||||
|
||||
output.push(this.root ? 'py-2' : 'pt-2 pb-0')
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
colorChanged(color: ColorData) {
|
||||
if (
|
||||
Math.round(color.red ?? 0) === Math.round(this.current.red ?? 0) &&
|
||||
Math.round(color.green ?? 0) === Math.round(this.current.green ?? 0) &&
|
||||
Math.round(color.blue ?? 0) === Math.round(this.current.blue ?? 0) &&
|
||||
Math.round(color.white ?? 0) === Math.round(this.current.white ?? 0)
|
||||
)
|
||||
return
|
||||
|
||||
const red = Math.round(((color.red ?? 0) / 255) * 10000) / 10000
|
||||
const green = Math.round(((color.green ?? 0) / 255) * 10000) / 10000
|
||||
const blue = Math.round(((color.blue ?? 0) / 255) * 10000) / 10000
|
||||
const white = Math.round(((color.white ?? 0) / 255) * 10000) / 10000
|
||||
|
||||
let gcode = `SET_LED LED="${this.object.name}" RED=${red} GREEN=${green} BLUE=${blue}`
|
||||
if (this.existWhite) gcode += ` WHITE=${white}`
|
||||
gcode += ` SYNC=0`
|
||||
|
||||
if (this.group) {
|
||||
const tmp = gcode
|
||||
|
||||
for (let i = this.group.start; i <= this.group.end; i++) {
|
||||
if (i === this.group.start) {
|
||||
gcode += ` INDEX=${i}`
|
||||
continue
|
||||
}
|
||||
|
||||
gcode += `\n${tmp} INDEX=${i}`
|
||||
}
|
||||
}
|
||||
|
||||
gcode += ` TRANSMIT=1`
|
||||
|
||||
this.$store.dispatch('server/addEvent', {
|
||||
message: gcode,
|
||||
type: 'command',
|
||||
})
|
||||
this.$socket.emit('printer.gcode.script', { script: gcode })
|
||||
}
|
||||
|
||||
@Debounce({ time: 500 })
|
||||
onColorRGBChanged(payload: IroColor) {
|
||||
const color: ColorData = {
|
||||
red: payload.red,
|
||||
green: payload.green,
|
||||
blue: payload.blue,
|
||||
white: this.current.white,
|
||||
}
|
||||
|
||||
this.colorChanged(color)
|
||||
}
|
||||
|
||||
@Debounce({ time: 500 })
|
||||
onColorWhiteChanged(payload: IroColor) {
|
||||
const color: ColorData = {
|
||||
red: this.current.red,
|
||||
green: this.current.green,
|
||||
blue: this.current.blue,
|
||||
white: this.current.white,
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
color.white = payload.alpha * 255
|
||||
|
||||
this.colorChanged(color)
|
||||
}
|
||||
|
||||
@Debounce({ time: 500 })
|
||||
onColorInput(payload: { name: string; value: number }) {
|
||||
const color: ColorData = {
|
||||
red: this.current.red,
|
||||
green: this.current.green,
|
||||
blue: this.current.blue,
|
||||
white: this.current.white,
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
color[payload.name] = payload.value
|
||||
|
||||
this.colorChanged(color)
|
||||
}
|
||||
|
||||
off() {
|
||||
const color: ColorData = {
|
||||
red: 0,
|
||||
green: 0,
|
||||
blue: 0,
|
||||
white: 0,
|
||||
}
|
||||
|
||||
this.colorChanged(color)
|
||||
}
|
||||
|
||||
on() {
|
||||
const color: ColorData = {
|
||||
red: 255,
|
||||
green: 255,
|
||||
blue: 255,
|
||||
white: 255,
|
||||
}
|
||||
|
||||
this.colorChanged(color)
|
||||
}
|
||||
|
||||
presetStyle(preset: GuiMiscellaneousStateEntryPreset) {
|
||||
if ((preset?.red ?? 0) + (preset?.green ?? 0) + (preset?.blue ?? 0) === 0 && (preset?.white ?? 0) > 0) {
|
||||
return {
|
||||
backgroundColor: `rgb(${preset.white}%, ${preset.white}%, ${preset.white}%)`,
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
backgroundColor: `rgb(${preset.red}%, ${preset.green}%, ${preset.blue}%)`,
|
||||
}
|
||||
}
|
||||
|
||||
usePreset(preset: GuiMiscellaneousStateEntryPreset) {
|
||||
const color: ColorData = { ...preset }
|
||||
|
||||
this.colorChanged(color)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
._light-subheader {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
._currentState {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid lightgray;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.light-presets-container {
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.light-presets-container > div {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@@ -3,7 +3,18 @@
|
||||
<v-row>
|
||||
<v-col :class="pwm ? 'pb-1' : 'pb-3'">
|
||||
<v-subheader class="_fan-slider-subheader">
|
||||
<v-icon v-if="type !== 'output_pin'" small :class="fanClasses">{{ mdiFan }}</v-icon>
|
||||
<v-icon
|
||||
v-if="type === 'led' && target > 0"
|
||||
class="mr-2"
|
||||
small
|
||||
:retain-focus-on-click="true"
|
||||
@click="ledOff">
|
||||
{{ mdiLightbulbOnOutline }}
|
||||
</v-icon>
|
||||
<v-icon v-else-if="type === 'led'" class="mr-2" small :retain-focus-on-click="true" @click="ledOn">
|
||||
{{ mdiLightbulbOutline }}
|
||||
</v-icon>
|
||||
<v-icon v-else-if="type !== 'output_pin'" small :class="fanClasses">{{ mdiFan }}</v-icon>
|
||||
<span>{{ convertName(name) }}</span>
|
||||
<v-spacer></v-spacer>
|
||||
<small v-if="rpm !== null" :class="rpmClasses">{{ Math.round(rpm ?? 0) }} RPM</small>
|
||||
@@ -87,6 +98,8 @@ import {
|
||||
mdiPlus,
|
||||
mdiToggleSwitch,
|
||||
mdiToggleSwitchOffOutline,
|
||||
mdiLightbulbOutline,
|
||||
mdiLightbulbOnOutline,
|
||||
} from '@mdi/js'
|
||||
|
||||
@Component
|
||||
@@ -98,6 +111,8 @@ export default class MiscellaneousSlider extends Mixins(BaseMixin) {
|
||||
mdiLockOpenVariantOutline = mdiLockOpenVariantOutline
|
||||
mdiMinus = mdiMinus
|
||||
mdiPlus = mdiPlus
|
||||
mdiLightbulbOutline = mdiLightbulbOutline
|
||||
mdiLightbulbOnOutline = mdiLightbulbOnOutline
|
||||
|
||||
convertName = convertName
|
||||
private declare timeout: ReturnType<typeof setTimeout>
|
||||
@@ -135,6 +150,9 @@ export default class MiscellaneousSlider extends Mixins(BaseMixin) {
|
||||
@Prop({ type: Number, default: 0 })
|
||||
declare off_below: number
|
||||
|
||||
@Prop({ type: String, default: '' })
|
||||
declare colorOrder: string
|
||||
|
||||
get value(): number {
|
||||
return Math.round((this.target / this.max) * 100) / 100
|
||||
}
|
||||
@@ -187,6 +205,8 @@ export default class MiscellaneousSlider extends Mixins(BaseMixin) {
|
||||
if (this.type === 'fan') gcode = `M106 S${newVal.toFixed(0)}`
|
||||
if (this.type === 'fan_generic') gcode = `SET_FAN_SPEED FAN=${this.name} SPEED=${newVal}`
|
||||
if (this.type === 'output_pin') gcode = `SET_PIN PIN=${this.name} VALUE=${newVal.toFixed(2)}`
|
||||
if (this.type === 'led')
|
||||
gcode = `SET_LED LED=${this.name} ${this.ledChannelName}=${newVal.toFixed(2)} SYNC=0 TRANSMIT=1`
|
||||
|
||||
if (gcode !== '') {
|
||||
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
|
||||
@@ -196,6 +216,14 @@ export default class MiscellaneousSlider extends Mixins(BaseMixin) {
|
||||
this.startLockTimer()
|
||||
}
|
||||
|
||||
ledOff() {
|
||||
this.sendCmd(0)
|
||||
}
|
||||
|
||||
ledOn() {
|
||||
this.sendCmd(1)
|
||||
}
|
||||
|
||||
switchOutputPin(): void {
|
||||
const newVal = this.value ? 0 : 1
|
||||
const gcode = `SET_PIN PIN=${this.name} VALUE=${(newVal * this.multi).toFixed(2)}`
|
||||
@@ -266,6 +294,14 @@ export default class MiscellaneousSlider extends Mixins(BaseMixin) {
|
||||
return output
|
||||
}
|
||||
|
||||
get ledChannelName() {
|
||||
if (this.colorOrder === 'R') return 'RED'
|
||||
if (this.colorOrder === 'G') return 'GREEN'
|
||||
if (this.colorOrder === 'B') return 'BLUE'
|
||||
|
||||
return 'WHITE'
|
||||
}
|
||||
|
||||
submitInput(): void {
|
||||
if (this.errors.length > 0) return
|
||||
|
||||
@@ -313,8 +349,8 @@ export default class MiscellaneousSlider extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
._slider-input {
|
||||
font-size: 0.875rem;
|
||||
max-width: 5.4rem;
|
||||
min-width: 4.2rem;
|
||||
max-width: 5rem;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,40 +1,26 @@
|
||||
<style scoped>
|
||||
._spin_button_group {
|
||||
width: 24px;
|
||||
margin-top: -6px;
|
||||
margin-left: -6px;
|
||||
margin-bottom: -6px;
|
||||
}
|
||||
|
||||
.v-input--has-state {
|
||||
margin-bottom: -18px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<form @submit.prevent="submit">
|
||||
<v-text-field
|
||||
v-model.number="value"
|
||||
v-model="value"
|
||||
:label="label"
|
||||
:suffix="unit"
|
||||
:error="invalidInput()"
|
||||
:error-messages="inputErrors()"
|
||||
:error="invalidInput"
|
||||
:error-messages="inputErrors"
|
||||
:disabled="disabled"
|
||||
:step="step"
|
||||
:min="min"
|
||||
:max="max"
|
||||
:dec="dec"
|
||||
type="number"
|
||||
hide-spin-buttons
|
||||
hide-details="auto"
|
||||
outlined
|
||||
dense
|
||||
class="d-flex align-top"
|
||||
@blur="value = target"
|
||||
@blur="value = target.toString()"
|
||||
@focus="$event.target.select()"
|
||||
@keydown="checkInvalidChars">
|
||||
<template v-if="defaultValue" #append>
|
||||
<v-icon @click="resetToDefault">{{ value !== defaultValue ? mdiRestart : '' }}</v-icon>
|
||||
<v-icon @click="resetToDefault">{{ value !== defaultValue.toString() ? mdiRestart : '' }}</v-icon>
|
||||
</template>
|
||||
<template v-if="hasSpinner" #append-outer>
|
||||
<div class="_spin_button_group">
|
||||
@@ -74,7 +60,7 @@ export default class NumberInput extends Mixins(BaseMixin) {
|
||||
mdiChevronUp = mdiChevronUp
|
||||
mdiChevronDown = mdiChevronDown
|
||||
|
||||
private value: number = 0
|
||||
private value: string = '0'
|
||||
private error: boolean = false
|
||||
private invalidChars: string[] = ['e', 'E', '+']
|
||||
|
||||
@@ -123,40 +109,44 @@ export default class NumberInput extends Mixins(BaseMixin) {
|
||||
declare readonly outputErrorMsg: boolean
|
||||
|
||||
created(): void {
|
||||
this.value = this.target
|
||||
this.value = this.target.toString()
|
||||
}
|
||||
|
||||
@Watch('target')
|
||||
updateTarget(): void {
|
||||
this.value = this.target
|
||||
this.value = this.target.toString()
|
||||
}
|
||||
|
||||
incrementValue(): void {
|
||||
if (this.value + this.step * this.spinnerFactor < this.max! || this.max === null) {
|
||||
this.value = Math.round((this.value + this.step * this.spinnerFactor) * 10 ** this.dec) / 10 ** this.dec
|
||||
} else {
|
||||
this.value = this.max
|
||||
}
|
||||
if (this.inputValue + this.step * this.spinnerFactor < this.max! || this.max === null) {
|
||||
this.value = (
|
||||
Math.round((this.inputValue + this.step * this.spinnerFactor) * 10 ** this.dec) /
|
||||
10 ** this.dec
|
||||
).toString()
|
||||
} else this.value = this.max.toString()
|
||||
|
||||
this.submit()
|
||||
}
|
||||
|
||||
decrementValue(): void {
|
||||
if (this.value - this.step * this.spinnerFactor > this.min) {
|
||||
this.value = Math.round((this.value - this.step * this.spinnerFactor) * 10 ** this.dec) / 10 ** this.dec
|
||||
} else {
|
||||
this.value = this.min
|
||||
}
|
||||
if (this.inputValue - this.step * this.spinnerFactor > this.min) {
|
||||
this.value = (
|
||||
Math.round((this.inputValue - this.step * this.spinnerFactor) * 10 ** this.dec) /
|
||||
10 ** this.dec
|
||||
).toString()
|
||||
} else this.value = this.min.toString()
|
||||
|
||||
this.submit()
|
||||
}
|
||||
|
||||
resetToDefault(): void {
|
||||
this.value = this.defaultValue
|
||||
this.value = this.defaultValue.toString()
|
||||
this.submit()
|
||||
}
|
||||
|
||||
submit(): void {
|
||||
if (this.invalidInput()) return
|
||||
this.$emit('submit', { name: this.param, value: this.value })
|
||||
if (this.invalidInput) return
|
||||
this.$emit('submit', { name: this.param, value: this.inputValue })
|
||||
}
|
||||
|
||||
// input validation //
|
||||
@@ -166,27 +156,44 @@ export default class NumberInput extends Mixins(BaseMixin) {
|
||||
if (this.invalidChars.includes(event.key)) event.preventDefault()
|
||||
}
|
||||
|
||||
invalidInput(): boolean {
|
||||
return this.value.toString() === '' || this.value < this.min || (this.value > this.max! && this.max !== null)
|
||||
// this function only parse this.value, to escape an empty input
|
||||
get inputValue(): number {
|
||||
if (this.value.toString() === '') return 0
|
||||
|
||||
return parseFloat(this.value.replace(',', '.'))
|
||||
}
|
||||
|
||||
inputErrors() {
|
||||
get invalidInput(): boolean {
|
||||
return this.inputErrors.length > 0
|
||||
}
|
||||
|
||||
get inputErrors() {
|
||||
if (!this.outputErrorMsg) return []
|
||||
|
||||
const errors = []
|
||||
if (this.value.toString() === '') {
|
||||
// "Input must not be empty!"
|
||||
errors.push(this.$t('App.NumberInput.NoEmptyAllowedError'))
|
||||
}
|
||||
if (this.max === null && this.value < this.min) {
|
||||
if (this.max === null && this.inputValue < this.min) {
|
||||
// "Must be grater or equal than {min}!"
|
||||
errors.push(this.$t('App.NumberInput.GreaterOrEqualError', { min: this.min }))
|
||||
}
|
||||
if (this.max !== null && (this.value > this.max! || this.value < this.min)) {
|
||||
if (this.max !== null && (this.inputValue > this.max! || this.inputValue < this.min)) {
|
||||
// "Must be between {min} and {max}!"
|
||||
errors.push(this.$t('App.NumberInput.MustBeBetweenError', { min: this.min, max: this.max }))
|
||||
}
|
||||
|
||||
return errors
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
._spin_button_group {
|
||||
width: 24px;
|
||||
margin-top: -6px;
|
||||
margin-left: -6px;
|
||||
margin-bottom: -6px;
|
||||
}
|
||||
|
||||
.v-input--has-state {
|
||||
margin-bottom: -18px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,26 +1,3 @@
|
||||
<style scoped>
|
||||
._temp-input {
|
||||
font-size: 0.875rem;
|
||||
min-width: 4rem;
|
||||
max-width: 5rem;
|
||||
}
|
||||
|
||||
._temp-input >>> .v-input__slot {
|
||||
min-height: 1rem !important;
|
||||
padding-left: 8px !important;
|
||||
padding-right: 8px !important;
|
||||
}
|
||||
|
||||
._temp-input >>> .v-text-field__slot input {
|
||||
padding: 4px 0 4px;
|
||||
}
|
||||
|
||||
._preset {
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div class="d-flex align-center">
|
||||
<form @submit.prevent="setTemps">
|
||||
@@ -57,11 +34,11 @@
|
||||
link
|
||||
style="min-height: 32px"
|
||||
@click="doSend(`${command} ${attributeName}=${name} TARGET=${preset.value}`)">
|
||||
<div class="d-flex align-center _preset">
|
||||
<v-icon v-if="preset.value === 0" else color="primary" small class="mr-1">
|
||||
<div class="_preset">
|
||||
<v-icon v-if="preset.value === 0" else color="primary" small class="_preset-icon">
|
||||
{{ mdiSnowflake }}
|
||||
</v-icon>
|
||||
<v-icon v-else small class="mr-1">{{ mdiFire }}</v-icon>
|
||||
<v-icon v-else small class="_preset-icon">{{ mdiFire }}</v-icon>
|
||||
<span style="padding-top: 2px">{{ preset.value }}°C</span>
|
||||
</div>
|
||||
</v-list-item>
|
||||
@@ -124,3 +101,30 @@ export default class TemperatureInput extends Mixins(BaseMixin, ControlMixin) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
._temp-input {
|
||||
min-width: 4.2rem;
|
||||
max-width: 5rem;
|
||||
}
|
||||
|
||||
._temp-input >>> .v-input__slot {
|
||||
min-height: 1rem !important;
|
||||
padding-left: 8px !important;
|
||||
padding-right: 8px !important;
|
||||
}
|
||||
|
||||
._temp-input >>> .v-text-field__slot input {
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
._preset {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
._preset-icon {
|
||||
margin-top: -1px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,53 +1,3 @@
|
||||
<style scoped>
|
||||
._tool-slider-subheader {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
._lock-button {
|
||||
margin-left: -6px;
|
||||
}
|
||||
|
||||
._error-msg {
|
||||
color: #ff5252;
|
||||
font-size: 12px;
|
||||
padding: 4px 16px 2px 0;
|
||||
}
|
||||
|
||||
.fade-enter-active {
|
||||
animation: slide-in 0.15s reverse;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.fade-leave-active {
|
||||
animation: slide-in 0.15s;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@keyframes slide-in {
|
||||
100% {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
}
|
||||
|
||||
._slider-input {
|
||||
font-size: 0.875rem;
|
||||
max-width: 5.4rem;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
._slider-input >>> .v-input__slot {
|
||||
min-height: 1rem !important;
|
||||
}
|
||||
|
||||
._slider-input >>> .v-text-field__slot input {
|
||||
padding: 4px 0 4px;
|
||||
}
|
||||
|
||||
._slider-input >>> .v-input__append-inner {
|
||||
margin: auto -5px auto 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-row dense>
|
||||
<v-col class="pa-0">
|
||||
@@ -301,3 +251,54 @@ export default class ToolSlider extends Mixins(BaseMixin) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
._tool-slider-subheader {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
._lock-button {
|
||||
margin-left: -6px;
|
||||
}
|
||||
|
||||
._error-msg {
|
||||
color: #ff5252;
|
||||
font-size: 12px;
|
||||
padding: 4px 16px 2px 0;
|
||||
}
|
||||
|
||||
.fade-enter-active {
|
||||
animation: slide-in 0.15s reverse;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.fade-leave-active {
|
||||
animation: slide-in 0.15s;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@keyframes slide-in {
|
||||
100% {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
}
|
||||
|
||||
._slider-input {
|
||||
min-width: 4.2rem;
|
||||
max-width: 5rem;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
._slider-input >>> .v-input__slot {
|
||||
min-height: 1rem !important;
|
||||
}
|
||||
|
||||
._slider-input >>> .v-text-field__slot input {
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
._slider-input >>> .v-input__append-inner {
|
||||
margin: auto -5px auto 0 !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { DateTimeFormatOptions } from 'vue-i18n'
|
||||
import { ServerPowerStateDevice } from '@/store/server/power/types'
|
||||
|
||||
@Component
|
||||
export default class BaseMixin extends Vue {
|
||||
@@ -11,6 +13,10 @@ export default class BaseMixin extends Vue {
|
||||
return this.$store.getters['socket/getHostUrl']
|
||||
}
|
||||
|
||||
get hostPort(): boolean {
|
||||
return this.$store.state.socket.port ?? 80
|
||||
}
|
||||
|
||||
get instancesDB() {
|
||||
return this.$store.state.instancesDB ?? 'moonraker'
|
||||
}
|
||||
@@ -28,6 +34,8 @@ export default class BaseMixin extends Vue {
|
||||
}
|
||||
|
||||
get klipperState(): string {
|
||||
if (!this.klippyIsConnected) return 'disconnected'
|
||||
|
||||
return this.$store.state.server.klippy_state ?? ''
|
||||
}
|
||||
|
||||
@@ -39,6 +47,31 @@ export default class BaseMixin extends Vue {
|
||||
return this.klipperReadyForGui && ['printing', 'paused'].includes(this.printer_state)
|
||||
}
|
||||
|
||||
get printerPowerDevice(): string {
|
||||
let deviceName = this.$store.state.gui.uiSettings.powerDeviceName ?? null
|
||||
if (deviceName === null) deviceName = 'printer'
|
||||
|
||||
return deviceName
|
||||
}
|
||||
|
||||
get isPrinterPowerOff() {
|
||||
const devices = this.$store.getters['server/power/getDevices'] ?? []
|
||||
if (devices.length === 0) return false
|
||||
|
||||
const deviceIndex = devices.findIndex(
|
||||
(device: ServerPowerStateDevice) => device.device === this.printerPowerDevice
|
||||
)
|
||||
// stop if device is not found
|
||||
if (deviceIndex === -1) return false
|
||||
|
||||
const device = devices[deviceIndex]
|
||||
// Printer is on, if device status is "on" or "error"
|
||||
if (device.status !== 'off') return false
|
||||
|
||||
// if klippy is not connected (service shutdown) and device.status === off
|
||||
return !this.klippyIsConnected
|
||||
}
|
||||
|
||||
get loadings(): string[] {
|
||||
return this.$store.state.socket.loadings ?? []
|
||||
}
|
||||
@@ -78,6 +111,14 @@ export default class BaseMixin extends Vue {
|
||||
return 'ontouchstart' in window || (navigator.maxTouchPoints > 0 && navigator.maxTouchPoints !== 256)
|
||||
}
|
||||
|
||||
get isIOS() {
|
||||
return !!(
|
||||
navigator.userAgent.match(/(iPad|iPhone|iPod)/) ||
|
||||
// @ts-ignore
|
||||
(navigator.platform === 'MacIntel' && typeof navigator.standalone !== 'undefined')
|
||||
)
|
||||
}
|
||||
|
||||
get moonrakerComponents() {
|
||||
return this.$store.state.server?.components ?? []
|
||||
}
|
||||
@@ -87,4 +128,96 @@ export default class BaseMixin extends Vue {
|
||||
|
||||
return roots.findIndex((root: string) => root === 'gcodes') >= 0
|
||||
}
|
||||
|
||||
get formatDateOptions(): DateTimeFormatOptions {
|
||||
const format = this.$store.state.gui.general.dateFormat
|
||||
|
||||
switch (format) {
|
||||
case '2-digits':
|
||||
return { day: '2-digit', month: '2-digit', year: 'numeric' }
|
||||
|
||||
case 'short':
|
||||
return { day: '2-digit', month: 'short', year: 'numeric' }
|
||||
|
||||
default:
|
||||
return { dateStyle: 'medium' }
|
||||
}
|
||||
}
|
||||
|
||||
get formatTimeOptions(): DateTimeFormatOptions {
|
||||
const format = this.$store.state.gui.general.timeFormat
|
||||
|
||||
switch (format) {
|
||||
case '24hours':
|
||||
return { hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }
|
||||
|
||||
case '12hours':
|
||||
return { hour: '2-digit', minute: '2-digit', hourCycle: 'h12' }
|
||||
|
||||
default:
|
||||
return { timeStyle: 'short' }
|
||||
}
|
||||
}
|
||||
|
||||
get formatTimeWithSecondsOptions(): DateTimeFormatOptions {
|
||||
const format = this.$store.state.gui.general.timeFormat
|
||||
|
||||
switch (format) {
|
||||
case '24hours':
|
||||
return { hour: '2-digit', minute: '2-digit', second: '2-digit', hourCycle: 'h23' }
|
||||
|
||||
case '12hours':
|
||||
return { hour: '2-digit', minute: '2-digit', second: '2-digit', hourCycle: 'h12' }
|
||||
|
||||
default:
|
||||
return { timeStyle: 'short' }
|
||||
}
|
||||
}
|
||||
|
||||
get browserLocale() {
|
||||
return navigator.languages && navigator.languages.length ? navigator.languages[0] : navigator.language
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
formatDate(value: number | Date): string {
|
||||
let tmp = null
|
||||
|
||||
try {
|
||||
// @ts-ignore
|
||||
tmp = (typeof value.getMonth === 'function' ? value : new Date(value)) as Date
|
||||
} catch (_) {
|
||||
return 'UNKNOWN'
|
||||
}
|
||||
|
||||
return tmp.toLocaleDateString(this.browserLocale, this.formatDateOptions)
|
||||
}
|
||||
|
||||
formatTime(value: number | Date, boolSeconds = false): string {
|
||||
let tmp = null
|
||||
|
||||
try {
|
||||
// @ts-ignore
|
||||
tmp = (typeof value.getMonth === 'function' ? value : new Date(value)) as Date
|
||||
} catch (_) {
|
||||
return 'UNKNOWN'
|
||||
}
|
||||
|
||||
if (boolSeconds) return tmp.toLocaleTimeString(this.browserLocale, this.formatTimeWithSecondsOptions)
|
||||
|
||||
return tmp.toLocaleTimeString(this.browserLocale, this.formatTimeOptions)
|
||||
}
|
||||
|
||||
formatDateTime(value: number, boolSeconds = false): string {
|
||||
const date = this.formatDate(value)
|
||||
const time = this.formatTime(value, boolSeconds)
|
||||
|
||||
return `${date} ${time}`
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,22 @@
|
||||
import Component from 'vue-class-component'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { allDashboardPanels } from '@/store/variables'
|
||||
import { capitalize } from '@/plugins/helpers'
|
||||
import { GuiMacrosStateMacrogroup } from '@/store/gui/macros/types'
|
||||
import kebabCase from 'lodash.kebabcase'
|
||||
import Vue from 'vue'
|
||||
import {
|
||||
mdiArrowCollapseVertical,
|
||||
mdiCodeTags,
|
||||
mdiConsoleLine,
|
||||
mdiDipSwitch,
|
||||
mdiEngine,
|
||||
mdiGamepad,
|
||||
mdiInformation,
|
||||
mdiPrinter3dNozzle,
|
||||
mdiThermometerLines,
|
||||
mdiWebcam,
|
||||
} from '@mdi/js'
|
||||
|
||||
@Component
|
||||
export default class DashboardMixin extends BaseMixin {
|
||||
get printerKinematics() {
|
||||
return this.$store.getters['printer/getKinematics']
|
||||
}
|
||||
|
||||
get printerExtruderCount() {
|
||||
return this.$store.getters['printer/getExtruders'].length
|
||||
}
|
||||
|
||||
get printerAvailableHeatersCount() {
|
||||
return this.$store.getters['printer/getAvailableHeaters'].length
|
||||
}
|
||||
|
||||
get printerTemperatureSensorsCount() {
|
||||
return this.$store.getters['printer/getTemperatureSensors'].length
|
||||
}
|
||||
|
||||
get macroMode() {
|
||||
return this.$store.state.gui.macros.mode ?? 'simple'
|
||||
}
|
||||
|
||||
get macrogroups() {
|
||||
return this.$store.getters['gui/macros/getAllMacrogroups'] ?? []
|
||||
}
|
||||
@@ -36,89 +25,6 @@ export default class DashboardMixin extends BaseMixin {
|
||||
return this.$store.getters['gui/webcams/getWebcams'] ?? []
|
||||
}
|
||||
|
||||
get missingPanelsMobile() {
|
||||
const panels = [...this.$store.state.gui.dashboard.mobileLayout]
|
||||
|
||||
return this.checkMissingPanels(panels)
|
||||
}
|
||||
|
||||
get missingPanelsTablet() {
|
||||
const panels = [
|
||||
...this.$store.state.gui.dashboard.tabletLayout1,
|
||||
...this.$store.state.gui.dashboard.tabletLayout2,
|
||||
]
|
||||
|
||||
return this.checkMissingPanels(panels)
|
||||
}
|
||||
|
||||
get missingPanelsDesktop() {
|
||||
const panels = [
|
||||
...this.$store.state.gui.dashboard.desktopLayout1,
|
||||
...this.$store.state.gui.dashboard.desktopLayout2,
|
||||
]
|
||||
|
||||
return this.checkMissingPanels(panels)
|
||||
}
|
||||
|
||||
get missingPanelsWidescreen() {
|
||||
const panels = [
|
||||
...this.$store.state.gui.dashboard.widescreenLayout1,
|
||||
...this.$store.state.gui.dashboard.widescreenLayout2,
|
||||
...this.$store.state.gui.dashboard.widescreenLayout3,
|
||||
]
|
||||
|
||||
return this.checkMissingPanels(panels)
|
||||
}
|
||||
|
||||
get allPossiblePanels() {
|
||||
let allPanels = [...allDashboardPanels]
|
||||
|
||||
// remove macros panel and add macrogroups panels if macroMode === expert
|
||||
if (this.macroMode === 'expert') {
|
||||
this.macrogroups.forEach((group: GuiMacrosStateMacrogroup) => {
|
||||
allPanels.push('macrogroup_' + group.id)
|
||||
})
|
||||
|
||||
allPanels = allPanels.filter((name) => name !== 'macros')
|
||||
}
|
||||
|
||||
// remove toolhead panel, if kinematics === none
|
||||
if (this.printerKinematics === 'none') {
|
||||
allPanels = allPanels.filter((name) => name !== 'toolhead-control')
|
||||
}
|
||||
|
||||
// remove extruder panel, if printerExtruderCount < 1
|
||||
if (this.printerExtruderCount < 1) {
|
||||
allPanels = allPanels.filter((name) => name !== 'extruder-control')
|
||||
}
|
||||
|
||||
// remove temperature panel, if heaters & sensors < 1
|
||||
if (this.printerAvailableHeatersCount + this.printerTemperatureSensorsCount < 1) {
|
||||
allPanels = allPanels.filter((name) => name !== 'temperature')
|
||||
}
|
||||
|
||||
// remove webcam panel, if no webcam exists
|
||||
if (this.webcams.length === 0) {
|
||||
allPanels = allPanels.filter((name) => name !== 'webcam')
|
||||
}
|
||||
|
||||
return allPanels
|
||||
}
|
||||
|
||||
checkMissingPanels(panels: any[]) {
|
||||
const missingPanels: any[] = []
|
||||
|
||||
this.allPossiblePanels.forEach((panelname) => {
|
||||
if (!panels.find((panel) => panel.name === panelname))
|
||||
missingPanels.push({
|
||||
name: panelname,
|
||||
visible: true,
|
||||
})
|
||||
})
|
||||
|
||||
return missingPanels
|
||||
}
|
||||
|
||||
getPanelName(name: string) {
|
||||
if (name.startsWith('macrogroup_')) {
|
||||
const groupId = name.split('_')[1] ?? ''
|
||||
@@ -138,4 +44,32 @@ export default class DashboardMixin extends BaseMixin {
|
||||
|
||||
return this.$t(`Panels.${capitalize(name)}Panel.Headline`)
|
||||
}
|
||||
|
||||
convertPanelnameToIcon(name: string): string {
|
||||
if (name.startsWith('macrogroup_')) return mdiCodeTags
|
||||
|
||||
switch (name) {
|
||||
case 'webcam':
|
||||
return mdiWebcam
|
||||
case 'zoffset':
|
||||
return mdiArrowCollapseVertical
|
||||
case 'toolhead-control':
|
||||
return mdiGamepad
|
||||
case 'macros':
|
||||
return mdiCodeTags
|
||||
case 'miscellaneous':
|
||||
return mdiDipSwitch
|
||||
case 'temperature':
|
||||
return mdiThermometerLines
|
||||
case 'miniconsole':
|
||||
return mdiConsoleLine
|
||||
case 'machine-settings':
|
||||
return mdiEngine
|
||||
case 'extruder-control':
|
||||
return mdiPrinter3dNozzle
|
||||
|
||||
default:
|
||||
return mdiInformation
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
<style scoped>
|
||||
.klipper-logo {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.moonraker-logo {
|
||||
transform: rotate(45deg);
|
||||
color: #ebc815;
|
||||
}
|
||||
.version-container {
|
||||
display: grid;
|
||||
grid-template-columns: 20px auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-dialog v-model="isOpen" transition="dialog-bottom-transition" max-width="600" scrollable>
|
||||
<template #activator="{ an }">
|
||||
<v-tooltip right color="panel">
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-icon v-bind="attrs" v-on="an" @mouseenter="on.mouseenter" @mouseleave="on.mouseleave">
|
||||
{{ mdiHelpCircleOutline }}
|
||||
</v-icon>
|
||||
</template>
|
||||
<span class="dark version-container">
|
||||
<div><img height="12" src="/img/logo.svg" /></div>
|
||||
<div>v{{ mainsailVersion }}</div>
|
||||
<div>
|
||||
<v-icon small class="moonraker-logo">{{ mdiMoonWaningCrescent }}</v-icon>
|
||||
</div>
|
||||
<div>{{ moonrakerVersion }}</div>
|
||||
<div><img height="12" src="/img/klipper.svg" class="klipper-logo" /></div>
|
||||
<div>{{ klipperVersion }}</div>
|
||||
</span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
<template #default>
|
||||
<panel title="About" :margin-bottom="false">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="isOpen = false">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-container fliud class="align-self-start">
|
||||
<v-row tag="logo">
|
||||
<v-col cols="auto">
|
||||
<v-img
|
||||
height="80"
|
||||
contain
|
||||
src="https://docs.mainsail.xyz/assets/img/logo-mainsail.png"></v-img>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row tag="data1" justify="center">
|
||||
<v-col class="pr-3 text-right">Version</v-col>
|
||||
<v-col>v2.1.0-alpha</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</panel>
|
||||
</template>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import BaseMixin from '../mixins/base'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import Component from 'vue-class-component'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { mdiCloseThick, mdiHelpCircleOutline, mdiMoonWaningCrescent } from '@mdi/js'
|
||||
|
||||
@Component({
|
||||
components: { Panel },
|
||||
})
|
||||
export default class AboutModal extends Mixins(BaseMixin) {
|
||||
mdiHelpCircleOutline = mdiHelpCircleOutline
|
||||
mdiCloseThick = mdiCloseThick
|
||||
mdiMoonWaningCrescent = mdiMoonWaningCrescent
|
||||
|
||||
private isOpen = false
|
||||
|
||||
get mainsailVersion(): string {
|
||||
return this.$store.state.packageVersion
|
||||
}
|
||||
|
||||
get klipperVersion(): string {
|
||||
return this.$store.state.printer?.software_version ?? ''
|
||||
}
|
||||
|
||||
get moonrakerVersion(): string {
|
||||
return this.$store.state.server?.moonraker_version ?? ''
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -63,6 +63,7 @@
|
||||
: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)">
|
||||
@@ -85,7 +86,7 @@
|
||||
attribute-name="S"></tool-slider>
|
||||
</v-container>
|
||||
<!-- PRESSURE ADVANCE SETTINGS -->
|
||||
<template v-if="!extruderSteppers.length > 0">
|
||||
<template v-if="!(extruderSteppers.length > 0)">
|
||||
<v-divider></v-divider>
|
||||
<pressure-advance-settings></pressure-advance-settings>
|
||||
</template>
|
||||
@@ -461,7 +462,11 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin
|
||||
}
|
||||
|
||||
get extrudedLength(): number {
|
||||
return Math.round(this.feedamount * this.extrudeFactor * (this.filamentDiameter / this.nozzleDiameter))
|
||||
return Math.round(
|
||||
this.feedamount *
|
||||
this.extrudeFactor *
|
||||
(Math.pow(this.filamentDiameter, 2) / Math.pow(this.nozzleDiameter, 2))
|
||||
)
|
||||
}
|
||||
|
||||
get volumetricFlow(): number {
|
||||
|
||||
@@ -18,6 +18,15 @@
|
||||
dense
|
||||
style="max-width: 300px"></v-text-field>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
v-if="selectedFiles.length"
|
||||
:title="$t('Files.Download')"
|
||||
color="primary"
|
||||
class="px-2 minwidth-0 ml-3"
|
||||
:loading="loadings.includes('gcodeDownloadZip')"
|
||||
@click="downloadSelectedFiles">
|
||||
<v-icon>{{ mdiCloudDownload }}</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
v-if="selectedFiles.length"
|
||||
:title="$t('Files.Delete')"
|
||||
@@ -29,7 +38,7 @@
|
||||
<input
|
||||
ref="fileUpload"
|
||||
type="file"
|
||||
:accept="validGcodeExtensions.join(', ')"
|
||||
:accept="gcodeInputFileAccept.join(', ')"
|
||||
style="display: none"
|
||||
multiple
|
||||
@change="uploadFile" />
|
||||
@@ -315,6 +324,13 @@
|
||||
<v-icon class="mr-1">{{ mdiPlaylistPlus }}</v-icon>
|
||||
{{ $t('Files.AddToQueue') }}
|
||||
</v-list-item>
|
||||
<v-list-item
|
||||
v-if="!contextMenu.item.isDirectory && moonrakerComponents.includes('job_queue')"
|
||||
:disabled="!isGcodeFile(contextMenu.item)"
|
||||
@click="openAddBatchToQueueDialog(contextMenu.item)">
|
||||
<v-icon class="mr-1">{{ mdiPlaylistPlus }}</v-icon>
|
||||
{{ $t('Files.AddBatchToQueue') }}
|
||||
</v-list-item>
|
||||
<v-list-item
|
||||
v-if="contextMenu.item.preheat_gcode !== null"
|
||||
:disabled="['error', 'printing', 'paused'].includes(printer_state)"
|
||||
@@ -374,12 +390,16 @@
|
||||
v-model="dialogCreateDirectory.name"
|
||||
:label="$t('Files.Name')"
|
||||
required
|
||||
:rules="nameInputRules"
|
||||
@update:error="isInvalidName = !isInvalidName"
|
||||
@keypress.enter="createDirectoryAction"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogCreateDirectory.show = false">{{ $t('Files.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="createDirectoryAction">{{ $t('Files.Create') }}</v-btn>
|
||||
<v-btn :disabled="isInvalidName" color="primary" text @click="createDirectoryAction">
|
||||
{{ $t('Files.Create') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
@@ -399,12 +419,16 @@
|
||||
v-model="dialogRenameFile.newName"
|
||||
:label="$t('Files.Name').toString()"
|
||||
required
|
||||
:rules="nameInputRules"
|
||||
@update:error="isInvalidName = !isInvalidName"
|
||||
@keyup.enter="renameFileAction"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogRenameFile.show = false">{{ $t('Files.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="renameFileAction">{{ $t('Files.Rename') }}</v-btn>
|
||||
<v-btn :disabled="isInvalidName" color="primary" text @click="renameFileAction">
|
||||
{{ $t('Files.Rename') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
@@ -424,12 +448,16 @@
|
||||
v-model="dialogRenameDirectory.newName"
|
||||
:label="$t('Files.Name')"
|
||||
required
|
||||
:rules="nameInputRules"
|
||||
@update:error="isInvalidName = !isInvalidName"
|
||||
@keyup.enter="renameDirectoryAction"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogRenameDirectory.show = false">{{ $t('Files.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="renameDirectoryAction">{{ $t('Files.Rename') }}</v-btn>
|
||||
<v-btn :disabled="isInvalidName" color="primary" text @click="renameDirectoryAction">
|
||||
{{ $t('Files.Rename') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
@@ -475,6 +503,53 @@
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogAddBatchToQueue.show" max-width="400">
|
||||
<panel
|
||||
:title="$t('Files.AddToQueue').toString()"
|
||||
card-class="gcode-files-add-to-queue-dialog"
|
||||
:icon="mdiPlaylistPlus"
|
||||
:margin-bottom="false">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="dialogAddBatchToQueue.show = false">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
ref="inputFieldAddToQueueCount"
|
||||
v-model="dialogAddBatchToQueue.count"
|
||||
:label="$t('Files.Count')"
|
||||
required
|
||||
hide-spin-buttons
|
||||
type="number"
|
||||
:rules="countInputRules"
|
||||
@keyup.enter="addBatchToQueueAction">
|
||||
<template #append-outer>
|
||||
<div class="_spin_button_group">
|
||||
<v-btn class="mt-n3" icon plain small @click="dialogAddBatchToQueue.count++">
|
||||
<v-icon>{{ mdiChevronUp }}</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
:disabled="dialogAddBatchToQueue.count <= 1"
|
||||
class="mb-n3"
|
||||
icon
|
||||
plain
|
||||
small
|
||||
@click="dialogAddBatchToQueue.count--">
|
||||
<v-icon>{{ mdiChevronDown }}</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogAddBatchToQueue.show = false">{{ $t('Files.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="addBatchToQueueAction">{{ $t('Files.AddToQueue') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -482,12 +557,14 @@
|
||||
import { Component, Mixins, Watch } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { validGcodeExtensions } from '@/store/variables'
|
||||
import { formatDate, formatFilesize, formatPrintTime, sortFiles } from '@/plugins/helpers'
|
||||
import { formatFilesize, formatPrintTime, sortFiles } from '@/plugins/helpers'
|
||||
import { FileStateFile, FileStateGcodefile } from '@/store/files/types'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import draggable from 'vuedraggable'
|
||||
import {
|
||||
mdiChevronDown,
|
||||
mdiChevronUp,
|
||||
mdiDragVertical,
|
||||
mdiCheckboxBlankOutline,
|
||||
mdiCheckboxMarked,
|
||||
@@ -531,6 +608,12 @@ interface dialogPrintFile {
|
||||
item: FileStateGcodefile
|
||||
}
|
||||
|
||||
interface dialogAddBatchToQueue {
|
||||
show: boolean
|
||||
count: number
|
||||
item: FileStateGcodefile
|
||||
}
|
||||
|
||||
interface dialogRenameObject {
|
||||
show: boolean
|
||||
newName: string
|
||||
@@ -551,6 +634,8 @@ interface tableColumnSetting {
|
||||
components: { StartPrintDialog, Panel, SettingsRow, draggable },
|
||||
})
|
||||
export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
mdiChevronDown = mdiChevronDown
|
||||
mdiChevronUp = mdiChevronUp
|
||||
mdiFile = mdiFile
|
||||
mdiFileDocumentMultipleOutline = mdiFileDocumentMultipleOutline
|
||||
mdiMagnify = mdiMagnify
|
||||
@@ -573,8 +658,6 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
mdiCheckboxMarked = mdiCheckboxMarked
|
||||
mdiDragVertical = mdiDragVertical
|
||||
|
||||
validGcodeExtensions = validGcodeExtensions
|
||||
formatDate = formatDate
|
||||
formatFilesize = formatFilesize
|
||||
formatPrintTime = formatPrintTime
|
||||
sortFiles = sortFiles
|
||||
@@ -627,6 +710,12 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
item: { ...this.contextMenu.item },
|
||||
}
|
||||
|
||||
private dialogAddBatchToQueue: dialogAddBatchToQueue = {
|
||||
show: false,
|
||||
count: 1,
|
||||
item: { ...this.contextMenu.item },
|
||||
}
|
||||
|
||||
private dialogRenameFile: dialogRenameObject = {
|
||||
show: false,
|
||||
newName: '',
|
||||
@@ -647,6 +736,26 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
|
||||
private deleteSelectedDialog = false
|
||||
|
||||
private isInvalidName = true
|
||||
private nameInputRules = [
|
||||
(value: string) => !!value || this.$t('Files.InvalidNameEmpty'),
|
||||
(value: string) => !this.existsFilename(value) || this.$t('Files.InvalidNameAlreadyExists'),
|
||||
]
|
||||
private countInputRules = [
|
||||
(value: string) => !!value || this.$t('JobQueue.InvalidCountEmpty'),
|
||||
(value: string) => parseInt(value) > 0 || this.$t('JobQueue.InvalidCountGreaterZero'),
|
||||
]
|
||||
|
||||
existsFilename(name: string) {
|
||||
return this.files.findIndex((file: FileStateFile) => file.filename === name) >= 0
|
||||
}
|
||||
|
||||
get gcodeInputFileAccept() {
|
||||
if (this.isIOS) return []
|
||||
|
||||
return validGcodeExtensions
|
||||
}
|
||||
|
||||
get currentPath() {
|
||||
const path = this.$store.state.gui.view.gcodefiles.currentPath
|
||||
if (path === 'gcodes') return ''
|
||||
@@ -1062,11 +1171,31 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
this.currentPath = this.currentPath.slice(0, this.currentPath.lastIndexOf('/'))
|
||||
}
|
||||
|
||||
addToQueue(item: FileStateGcodefile | FileStateFile) {
|
||||
async addToQueue(item: FileStateGcodefile) {
|
||||
let filename = [this.currentPath, item.filename].join('/')
|
||||
if (filename.startsWith('/')) filename = filename.slice(1)
|
||||
|
||||
this.$store.dispatch('server/jobQueue/addToQueue', [filename])
|
||||
await this.$store.dispatch('server/jobQueue/addToQueue', [filename])
|
||||
}
|
||||
|
||||
openAddBatchToQueueDialog(item: FileStateGcodefile) {
|
||||
this.dialogAddBatchToQueue.show = true
|
||||
this.dialogAddBatchToQueue.count = 1
|
||||
this.dialogAddBatchToQueue.item = item
|
||||
}
|
||||
|
||||
async addBatchToQueueAction() {
|
||||
let filename = [this.currentPath, this.dialogAddBatchToQueue.item.filename].join('/')
|
||||
if (filename.startsWith('/')) filename = filename.slice(1)
|
||||
|
||||
const array: string[] = []
|
||||
for (let i = 0; i < this.dialogAddBatchToQueue.count; i++) {
|
||||
array.push(filename)
|
||||
}
|
||||
|
||||
await this.$store.dispatch('server/jobQueue/addToQueue', array)
|
||||
|
||||
this.dialogAddBatchToQueue.show = false
|
||||
}
|
||||
|
||||
changeMetadataVisible(name: string, value: boolean) {
|
||||
@@ -1103,6 +1232,36 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
window.open(href)
|
||||
}
|
||||
|
||||
async downloadSelectedFiles() {
|
||||
let items: string[] = []
|
||||
|
||||
const addElementToItems = async (absolutPath: string, directory: FileStateFile[]) => {
|
||||
for (const file of directory) {
|
||||
const filePath = `${absolutPath}/${file.filename}`
|
||||
|
||||
if (file.isDirectory && file.childrens) {
|
||||
await addElementToItems(filePath, file.childrens)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
items.push(filePath)
|
||||
}
|
||||
}
|
||||
|
||||
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()}`
|
||||
|
||||
this.$socket.emit(
|
||||
'server.files.zip',
|
||||
{ items, dest: `config/gcodes-${timestamp}.zip` },
|
||||
{ action: 'files/downloadZip', loading: 'gcodeDownloadZip' }
|
||||
)
|
||||
|
||||
this.selectedFiles = []
|
||||
}
|
||||
|
||||
renameFile(item: FileStateGcodefile) {
|
||||
this.dialogRenameFile.item = item
|
||||
this.dialogRenameFile.newName = item.filename
|
||||
@@ -1247,7 +1406,7 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
return formatFilesize(value)
|
||||
|
||||
case 'date':
|
||||
return this.formatDate(value)
|
||||
return this.formatDateTime(value)
|
||||
|
||||
case 'time':
|
||||
return this.formatPrintTime(value)
|
||||
@@ -1271,6 +1430,15 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
._spin_button_group {
|
||||
width: 24px;
|
||||
margin-top: -6px;
|
||||
margin-left: -6px;
|
||||
margin-bottom: -6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/*noinspection CssUnusedSymbol*/
|
||||
.files-table .v-data-table-header__icon {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div>
|
||||
<panel
|
||||
:icon="mdiFileDocumentMultipleOutline"
|
||||
:title="$t('History.PrintHistory')"
|
||||
:title="$t('History.PrintHistory').toString()"
|
||||
card-class="history-list-panel">
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
@@ -246,7 +246,7 @@
|
||||
persistent
|
||||
@keydown.esc="detailsDialog.boolShow = false">
|
||||
<panel
|
||||
:title="$t('History.JobDetails')"
|
||||
:title="$t('History.JobDetails').toString()"
|
||||
:icon="mdiUpdate"
|
||||
card-class="history-detail-dialog"
|
||||
:margin-bottom="false">
|
||||
@@ -272,7 +272,9 @@
|
||||
<v-divider class="my-3"></v-divider>
|
||||
<v-row>
|
||||
<v-col>{{ $t('History.LastModified') }}</v-col>
|
||||
<v-col class="text-right">{{ formatDate(detailsDialog.item.metadata.modified) }}</v-col>
|
||||
<v-col class="text-right">
|
||||
{{ formatDateTime(detailsDialog.item.metadata.modified * 1000) }}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
<v-divider class="my-3"></v-divider>
|
||||
@@ -289,13 +291,15 @@
|
||||
<v-divider class="my-3"></v-divider>
|
||||
<v-row>
|
||||
<v-col>{{ $t('History.StartTime') }}</v-col>
|
||||
<v-col class="text-right">{{ formatDate(detailsDialog.item.start_time) }}</v-col>
|
||||
<v-col class="text-right">{{ formatDateTime(detailsDialog.item.start_time * 1000) }}</v-col>
|
||||
</v-row>
|
||||
<template v-if="'end_time' in detailsDialog.item && detailsDialog.item.end_time > 0">
|
||||
<v-divider class="my-3"></v-divider>
|
||||
<v-row>
|
||||
<v-col>{{ $t('History.EndTime') }}</v-col>
|
||||
<v-col class="text-right">{{ formatDate(detailsDialog.item.end_time) }}</v-col>
|
||||
<v-col class="text-right">
|
||||
{{ formatDateTime(detailsDialog.item.end_time * 1000) }}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
<template
|
||||
@@ -427,7 +431,10 @@
|
||||
</panel>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="deleteSelectedDialog" max-width="400">
|
||||
<panel :title="$t('History.Delete')" card-class="history-delete-selected-dialog" :margin-bottom="false">
|
||||
<panel
|
||||
:title="$t('History.Delete').toString()"
|
||||
card-class="history-delete-selected-dialog"
|
||||
:margin-bottom="false">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="deleteSelectedDialog = false">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
@@ -761,12 +768,6 @@ export default class HistoryListPanel extends Mixins(BaseMixin) {
|
||||
this.$socket.emit('server.history.list', { start: 0, limit: 50 }, { action: 'server/history/getHistory' })
|
||||
}
|
||||
|
||||
formatDate(date: number) {
|
||||
const tmp2 = new Date(date * 1000)
|
||||
|
||||
return tmp2.toLocaleString().replace(',', '')
|
||||
}
|
||||
|
||||
formatPrintTime(totalSeconds: number) {
|
||||
if (totalSeconds) {
|
||||
let output = ''
|
||||
@@ -1013,7 +1014,7 @@ export default class HistoryListPanel extends Mixins(BaseMixin) {
|
||||
if (!format) {
|
||||
switch (col.outputType) {
|
||||
case 'date':
|
||||
return this.formatDate(value)
|
||||
return this.formatDateTime(value * 1000)
|
||||
|
||||
case 'time':
|
||||
return value?.toFixed() ?? ''
|
||||
@@ -1038,7 +1039,7 @@ export default class HistoryListPanel extends Mixins(BaseMixin) {
|
||||
return formatFilesize(value)
|
||||
|
||||
case 'date':
|
||||
return this.formatDate(value)
|
||||
return this.formatDateTime(value * 1000)
|
||||
|
||||
case 'time':
|
||||
return this.formatPrintTime(value)
|
||||
|
||||
@@ -57,11 +57,23 @@
|
||||
</v-simple-table>
|
||||
</v-col>
|
||||
<v-col class="col-12 col-sm-6 col-md-4">
|
||||
<history-all-print-status></history-all-print-status>
|
||||
<history-all-print-status-chart
|
||||
v-if="togglePrintStatus === 'chart'"></history-all-print-status-chart>
|
||||
<history-all-print-status-table v-else></history-all-print-status-table>
|
||||
<div class="text-center mb-3">
|
||||
<v-btn-toggle v-model="togglePrintStatus" small mandatory>
|
||||
<v-btn small value="chart">
|
||||
{{ $t('History.Chart') }}
|
||||
</v-btn>
|
||||
<v-btn small value="table">
|
||||
{{ $t('History.Table') }}
|
||||
</v-btn>
|
||||
</v-btn-toggle>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col class="col-12 col-sm-12 col-md-4">
|
||||
<history-filament-usage v-if="toggleChart === 'filament_usage'"></history-filament-usage>
|
||||
<history-printtime-avg v-if="toggleChart === 'printtime_avg'"></history-printtime-avg>
|
||||
<history-printtime-avg v-else-if="toggleChart === 'printtime_avg'"></history-printtime-avg>
|
||||
<div class="text-center mt-3">
|
||||
<v-btn-toggle v-model="toggleChart" small mandatory>
|
||||
<v-btn small value="filament_usage">
|
||||
@@ -84,11 +96,11 @@ import BaseMixin from '@/components/mixins/base'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import HistoryFilamentUsage from '@/components/charts/HistoryFilamentUsage.vue'
|
||||
import HistoryPrinttimeAvg from '@/components/charts/HistoryPrinttimeAvg.vue'
|
||||
import HistoryAllPrintStatus from '@/components/charts/HistoryAllPrintStatus.vue'
|
||||
import HistoryAllPrintStatusChart from '@/components/charts/HistoryAllPrintStatusChart.vue'
|
||||
import { ServerHistoryStateJob } from '@/store/server/history/types'
|
||||
import { mdiChartAreaspline } from '@mdi/js'
|
||||
@Component({
|
||||
components: { Panel, HistoryFilamentUsage, HistoryPrinttimeAvg, HistoryAllPrintStatus },
|
||||
components: { Panel, HistoryFilamentUsage, HistoryPrinttimeAvg, HistoryAllPrintStatusChart },
|
||||
})
|
||||
export default class HistoryStatisticsPanel extends Mixins(BaseMixin) {
|
||||
mdiChartAreaspline = mdiChartAreaspline
|
||||
@@ -177,6 +189,14 @@ export default class HistoryStatisticsPanel extends Mixins(BaseMixin) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.history.toggleChartCol3', value: newVal })
|
||||
}
|
||||
|
||||
get togglePrintStatus() {
|
||||
return this.$store.state.gui.view.history.toggleChartCol2
|
||||
}
|
||||
|
||||
set togglePrintStatus(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.history.toggleChartCol2', value: newVal })
|
||||
}
|
||||
|
||||
formatPrintTime(totalSeconds: number) {
|
||||
if (totalSeconds) {
|
||||
let output = ''
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<panel ref="jobqueuePanel" :icon="mdiTrayFull" :title="$t('JobQueue.JobQueue')" card-class="jobqueue-panel">
|
||||
<panel
|
||||
ref="jobqueuePanel"
|
||||
:icon="mdiTrayFull"
|
||||
:title="$t('JobQueue.JobQueue').toString()"
|
||||
card-class="jobqueue-panel">
|
||||
<template #buttons>
|
||||
<v-btn
|
||||
v-if="queueState === 'paused'"
|
||||
@@ -48,98 +52,29 @@
|
||||
</template>
|
||||
|
||||
<template #item="{ item }">
|
||||
<tr
|
||||
:key="item.job_id"
|
||||
v-longpress:600="(e) => showContextMenu(e, item)"
|
||||
class="file-list-cursor user-select-none"
|
||||
@contextmenu="showContextMenu($event, item)">
|
||||
<td class="pr-0 text-center" style="width: 32px">
|
||||
<template v-if="getSmallThumbnail(item) && getBigThumbnail(item)">
|
||||
<v-tooltip
|
||||
v-if="!item.isDirectory && getSmallThumbnail(item) && getBigThumbnail(item)"
|
||||
top
|
||||
content-class="tooltip__content-opacity1">
|
||||
<template #activator="{ on, attrs }">
|
||||
<vue-load-image>
|
||||
<img
|
||||
slot="image"
|
||||
:src="getSmallThumbnail(item)"
|
||||
width="32"
|
||||
height="32"
|
||||
v-bind="attrs"
|
||||
v-on="on" />
|
||||
<v-progress-circular
|
||||
slot="preloader"
|
||||
indeterminate
|
||||
color="primary"></v-progress-circular>
|
||||
<v-icon slot="error">{{ mdiFile }}</v-icon>
|
||||
</vue-load-image>
|
||||
</template>
|
||||
<span><img :src="getBigThumbnail(item)" width="250" /></span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
<template v-else-if="getSmallThumbnail(item)">
|
||||
<vue-load-image>
|
||||
<img slot="image" :src="getSmallThumbnail(item)" width="32" height="32" />
|
||||
<v-progress-circular
|
||||
slot="preloader"
|
||||
indeterminate
|
||||
color="primary"></v-progress-circular>
|
||||
<v-icon slot="error">{{ mdiFile }}</v-icon>
|
||||
</vue-load-image>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-icon>{{ mdiFile }}</v-icon>
|
||||
</template>
|
||||
</td>
|
||||
<td class=" ">
|
||||
<div class="d-block text-truncate" :style="styleContentTdWidth">{{ item.filename }}</div>
|
||||
<small v-if="existMetadata(item)">{{ getDescription(item) }}</small>
|
||||
</td>
|
||||
</tr>
|
||||
<jobqueue-entry :key="item.job_id" :item="item" :content-td-width="contentTdWidth" />
|
||||
</template>
|
||||
</v-data-table>
|
||||
<resize-observer @notify="handleResize" />
|
||||
</panel>
|
||||
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
|
||||
<v-list>
|
||||
<v-list-item @click="deleteJob(contextMenu.item)">
|
||||
<v-icon class="mr-1">{{ mdiPlaylistRemove }}</v-icon>
|
||||
{{ $t('JobQueue.RemoveFromQueue') }}
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { ServerHistoryStateJob } from '@/store/server/history/types'
|
||||
import { formatFilesize, formatPrintTime } from '@/plugins/helpers'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { ServerJobQueueStateJob } from '@/store/server/jobQueue/types'
|
||||
import { mdiPlay, mdiPause, mdiFile, mdiPlaylistRemove, mdiTrayFull } from '@mdi/js'
|
||||
import { mdiPlay, mdiPause, mdiTrayFull } from '@mdi/js'
|
||||
import JobqueueEntry from '@/components/panels/Status/JobqueueEntry.vue'
|
||||
@Component({
|
||||
components: { Panel },
|
||||
components: { JobqueueEntry, Panel },
|
||||
})
|
||||
export default class JobqueuePanel extends Mixins(BaseMixin) {
|
||||
mdiPlay = mdiPlay
|
||||
mdiPause = mdiPause
|
||||
mdiFile = mdiFile
|
||||
mdiPlaylistRemove = mdiPlaylistRemove
|
||||
mdiTrayFull = mdiTrayFull
|
||||
|
||||
formatFilesize = formatFilesize
|
||||
|
||||
private contentTdWidth = 100
|
||||
private contextMenu = {
|
||||
shown: false,
|
||||
touchTimer: undefined,
|
||||
x: 0,
|
||||
y: 0,
|
||||
item: {},
|
||||
}
|
||||
|
||||
declare $refs: {
|
||||
jobqueuePanel: any
|
||||
@@ -161,27 +96,6 @@ export default class JobqueuePanel extends Mixins(BaseMixin) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.jobqueue.countPerPage', value: newVal })
|
||||
}
|
||||
|
||||
get styleContentTdWidth() {
|
||||
return `width: ${this.contentTdWidth}px;`
|
||||
}
|
||||
|
||||
showContextMenu(e: any, item: ServerHistoryStateJob) {
|
||||
if (!this.contextMenu.shown) {
|
||||
e?.preventDefault()
|
||||
this.contextMenu.shown = true
|
||||
this.contextMenu.x = e?.clientX || e?.pageX || window.screenX / 2
|
||||
this.contextMenu.y = e?.clientY || e?.pageY || window.screenY / 2
|
||||
this.contextMenu.item = item
|
||||
this.$nextTick(() => {
|
||||
this.contextMenu.shown = true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
deleteJob(item: ServerJobQueueStateJob) {
|
||||
this.$store.dispatch('server/jobQueue/deleteFromQueue', [item.job_id])
|
||||
}
|
||||
|
||||
startJobqueue() {
|
||||
this.$store.dispatch('server/jobQueue/start')
|
||||
}
|
||||
@@ -190,35 +104,6 @@ export default class JobqueuePanel extends Mixins(BaseMixin) {
|
||||
this.$store.dispatch('server/jobQueue/pause')
|
||||
}
|
||||
|
||||
getSmallThumbnail(item: ServerJobQueueStateJob) {
|
||||
return this.$store.getters['server/jobQueue/getSmallThumbnail'](item)
|
||||
}
|
||||
|
||||
getBigThumbnail(item: ServerJobQueueStateJob) {
|
||||
return this.$store.getters['server/jobQueue/getBigThumbnail'](item)
|
||||
}
|
||||
|
||||
getDescription(item: ServerJobQueueStateJob) {
|
||||
let output = ''
|
||||
|
||||
output += this.$t('Files.Filament') + ': '
|
||||
if (item.metadata?.filament_total || item.metadata.filament_weight_total) {
|
||||
if (item.metadata?.filament_total) output += item.metadata.filament_total.toFixed() + ' mm'
|
||||
if (item.metadata?.filament_total && item.metadata.filament_weight_total) output += ' / '
|
||||
if (item.metadata?.filament_weight_total) output += item.metadata.filament_weight_total.toFixed(2) + ' g'
|
||||
} else output += '--'
|
||||
|
||||
output += ', ' + this.$t('Files.PrintTime') + ': '
|
||||
if (item.metadata?.estimated_time) output += formatPrintTime(item.metadata.estimated_time)
|
||||
else output += '--'
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
existMetadata(item: ServerJobQueueStateJob) {
|
||||
return item?.metadata?.metadataPulled
|
||||
}
|
||||
|
||||
mounted() {
|
||||
this.calcContentTdWidth()
|
||||
}
|
||||
@@ -235,7 +120,7 @@ export default class JobqueuePanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.jobqueue-panel {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -1,37 +1,106 @@
|
||||
<template>
|
||||
<panel
|
||||
v-if="klipperState !== 'ready' && socketIsConnected"
|
||||
:icon="mdiAlertCircle"
|
||||
:title="$t('Panels.KlippyStatePanel.KlippyState') + ': ' + klipperState"
|
||||
card-class="klippy-state-panel">
|
||||
<div v-if="klipperState !== 'ready' && socketIsConnected">
|
||||
<template v-if="klippyIsConnected">
|
||||
<v-card-text v-if="klippy_message !== null" class="py-1 mt-2">
|
||||
<pre style="white-space: pre-wrap">{{ klippy_message }}</pre>
|
||||
</v-card-text>
|
||||
<v-card-text v-else class="text-center py-3">
|
||||
<v-progress-circular indeterminate color="primary"></v-progress-circular>
|
||||
</v-card-text>
|
||||
<v-divider class="mt-2"></v-divider>
|
||||
<v-card-actions class="justify-start">
|
||||
<v-btn small class="ml-2 error--text" @click="restart">
|
||||
<v-icon class="mr-sm-2">{{ mdiRestart }}</v-icon>
|
||||
{{ $t('Panels.KlippyStatePanel.Restart') }}
|
||||
</v-btn>
|
||||
<v-btn small class="ml-4 error--text" @click="firmwareRestart">
|
||||
<v-icon class="mr-sm-2">{{ mdiRestart }}</v-icon>
|
||||
{{ $t('Panels.KlippyStatePanel.FirmwareRestart') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
<v-alert :color="messageType.color" dense text border="left" class="mb-0 mb-6">
|
||||
<!-- KLIPPER MESSAGE TITLE -->
|
||||
<p class="font-weight-medium d-flex align-center">
|
||||
<v-icon :color="messageType.color" class="pr-2">{{ messageType.icon }}</v-icon>
|
||||
{{ $t('Panels.KlippyStatePanel.ServiceReports', { service: 'Klipper' }) }}:
|
||||
{{ klipperState.toUpperCase() }}
|
||||
</p>
|
||||
<!-- KLIPPER MESSAGE -->
|
||||
<div v-if="klippy_message !== null">
|
||||
<pre style="white-space: pre-wrap">{{ klippy_message.trim() }}</pre>
|
||||
<v-divider class="mt-2 pb-3"></v-divider>
|
||||
<v-row>
|
||||
<!-- RESTART BUTTONS -->
|
||||
<v-col>
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
text
|
||||
:class="`${messageType.color}--text my-1`"
|
||||
style="width: 100%"
|
||||
@click="restart">
|
||||
<v-icon class="mr-sm-2">{{ mdiRestart }}</v-icon>
|
||||
{{ $t('Panels.KlippyStatePanel.Restart') }}
|
||||
</v-btn>
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
text
|
||||
:class="`${messageType.color}--text my-1`"
|
||||
style="width: 100%"
|
||||
@click="firmwareRestart">
|
||||
<v-icon class="mr-sm-2">{{ mdiRestart }}</v-icon>
|
||||
{{ $t('Panels.KlippyStatePanel.FirmwareRestart') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<!-- LOG DOWNLOAD BUTTONS -->
|
||||
<v-col>
|
||||
<v-btn
|
||||
:href="apiUrl + '/server/files/klippy.log'"
|
||||
small
|
||||
outlined
|
||||
text
|
||||
:class="`${messageType.color}--text my-1`"
|
||||
style="width: 100%"
|
||||
@click="downloadLog">
|
||||
<v-icon class="mr-2">{{ mdiDownload }}</v-icon>
|
||||
Klipper Log
|
||||
</v-btn>
|
||||
<v-btn
|
||||
:href="apiUrl + '/server/files/moonraker.log'"
|
||||
small
|
||||
outlined
|
||||
text
|
||||
:class="`${messageType.color}--text my-1`"
|
||||
style="width: 100%"
|
||||
@click="downloadLog">
|
||||
<v-icon class="mr-2">{{ mdiDownload }}</v-icon>
|
||||
Moonraker Log
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<!-- LOADER -->
|
||||
<v-card-text v-else class="text-center py-3">
|
||||
<v-progress-circular indeterminate :color="messageType.color"></v-progress-circular>
|
||||
</v-card-text>
|
||||
</v-alert>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-card-text class="pt-5 pb-1">
|
||||
<!-- Power OFF panel -->
|
||||
<template v-else-if="isPrinterPowerOff">
|
||||
<v-alert dense text border="left" class="mb-6">
|
||||
<p class="font-weight-medium d-flex align-center">
|
||||
<v-icon class="pr-2">{{ messageType.icon }}</v-icon>
|
||||
{{ $t('Panels.KlippyStatePanel.PrinterSwitchedOff') }}
|
||||
</p>
|
||||
<p>{{ $t('Panels.KlippyStatePanel.PrinterSwitchedOffDescription') }}</p>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn small outlined text :class="`${messageType.color}--text my-1`" @click="powerOn">
|
||||
<v-icon class="mr-sm-2">{{ mdiPower }}</v-icon>
|
||||
{{ $t('Panels.KlippyStatePanel.PowerOn') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-alert>
|
||||
</template>
|
||||
<!-- DISCONNECTED INFOGRAPHIC -->
|
||||
<template v-else-if="klipperState === 'disconnected'">
|
||||
<v-alert dense text border="left" class="mb-6">
|
||||
<p class="font-weight-medium d-flex align-center">
|
||||
<v-icon class="pr-2">{{ messageType.icon }}</v-icon>
|
||||
{{ $t('Panels.KlippyStatePanel.ServiceReports', { service: 'Moonraker' }) }}:
|
||||
{{ klipperState.toUpperCase() }}
|
||||
</p>
|
||||
<connection-status :moonraker="true" :klipper="false"></connection-status>
|
||||
<p class="mt-2 mb-0 text-center">{{ $t('Panels.KlippyStatePanel.MoonrakerCannotConnect') }}</p>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<p class="mt-2">{{ $t('Panels.KlippyStatePanel.KlipperCheck') }}</p>
|
||||
</v-card-text>
|
||||
<p class="mb-0 text-center">{{ $t('Panels.KlippyStatePanel.CheckKlippyAndUdsAddress') }}</p>
|
||||
</v-alert>
|
||||
</template>
|
||||
</panel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -40,21 +109,45 @@ import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '../mixins/base'
|
||||
import ConnectionStatus from '../ui/ConnectionStatus.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { mdiAlertCircle, mdiRestart } from '@mdi/js'
|
||||
import {
|
||||
mdiRestart,
|
||||
mdiDownload,
|
||||
mdiMessageOutline,
|
||||
mdiAlertOutline,
|
||||
mdiRocketLaunch,
|
||||
mdiConnection,
|
||||
mdiPrinter3d,
|
||||
mdiPower,
|
||||
} from '@mdi/js'
|
||||
|
||||
@Component({
|
||||
components: { Panel, ConnectionStatus },
|
||||
})
|
||||
export default class KlippyStatePanel extends Mixins(BaseMixin) {
|
||||
//private timer: number | null = null
|
||||
|
||||
mdiAlertCircle = mdiAlertCircle
|
||||
mdiPrinter3d = mdiPrinter3d
|
||||
mdiRestart = mdiRestart
|
||||
mdiDownload = mdiDownload
|
||||
mdiPower = mdiPower
|
||||
|
||||
get klippy_message() {
|
||||
return this.$store.state.server.klippy_message ?? null
|
||||
}
|
||||
|
||||
get messageType(): { color: string; icon: string } {
|
||||
switch (this.klipperState) {
|
||||
case 'startup':
|
||||
return { color: 'info', icon: mdiRocketLaunch }
|
||||
case 'shutdown':
|
||||
return { color: 'warning', icon: mdiAlertOutline }
|
||||
case 'error':
|
||||
return { color: 'error', icon: mdiAlertOutline }
|
||||
case 'disconnected':
|
||||
return { color: '', icon: mdiConnection }
|
||||
default:
|
||||
return { color: '', icon: mdiMessageOutline }
|
||||
}
|
||||
}
|
||||
|
||||
restart() {
|
||||
this.$socket.emit('printer.restart', {}, { loading: 'restart' })
|
||||
}
|
||||
@@ -63,22 +156,24 @@ export default class KlippyStatePanel extends Mixins(BaseMixin) {
|
||||
this.$socket.emit('printer.firmware_restart', {}, { loading: 'firmwareRestart' })
|
||||
}
|
||||
|
||||
/*requestKlippyState() {
|
||||
this.$socket.emit('printer.info', {}, { action: 'printer/getInfo' })
|
||||
downloadLog(event: any) {
|
||||
event.preventDefault()
|
||||
let href = ''
|
||||
if ('href' in event.target.attributes) href = event.target.attributes.href.value
|
||||
if ('href' in event.target.parentElement.attributes) href = event.target.parentElement.attributes.href.value
|
||||
|
||||
window.open(href)
|
||||
}
|
||||
|
||||
@Watch('klipperState')
|
||||
klipperStateChanged(newVal: string) {
|
||||
if (['ready', 'disconnected'].includes(newVal)) {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
}
|
||||
} else if (this.timer === null) {
|
||||
this.timer = setInterval(() => {
|
||||
this.requestKlippyState()
|
||||
}, 2000)
|
||||
}
|
||||
}*/
|
||||
powerOn() {
|
||||
this.$socket.emit(
|
||||
'machine.device_power.post_device',
|
||||
{
|
||||
device: this.printerPowerDevice,
|
||||
action: 'on',
|
||||
},
|
||||
{ action: 'server/power/responseToggle' }
|
||||
)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -162,7 +162,7 @@
|
||||
<td class="text-no-wrap text-right">
|
||||
{{ item.isDirectory ? '--' : formatFilesize(item.size) }}
|
||||
</td>
|
||||
<td class="text-right">{{ formatDate(item.modified) }}</td>
|
||||
<td class="text-right">{{ formatDateTime(item.modified) }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
</v-data-table>
|
||||
@@ -277,6 +277,8 @@
|
||||
v-model="dialogCreateFile.name"
|
||||
:label="$t('Machine.ConfigFilesPanel.Name')"
|
||||
required
|
||||
:rules="nameInputRules"
|
||||
@update:error="isInvalidName = !isInvalidName"
|
||||
@keyup.enter="createFileAction"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
@@ -284,7 +286,7 @@
|
||||
<v-btn color="" text @click="dialogCreateFile.show = false">
|
||||
{{ $t('Machine.ConfigFilesPanel.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text @click="createFileAction">
|
||||
<v-btn :disabled="isInvalidName" color="primary" text @click="createFileAction">
|
||||
{{ $t('Machine.ConfigFilesPanel.Create') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
@@ -306,6 +308,8 @@
|
||||
v-model="dialogRenameFile.newName"
|
||||
:label="$t('Machine.ConfigFilesPanel.Name')"
|
||||
required
|
||||
:rules="nameInputRules"
|
||||
@update:error="isInvalidName = !isInvalidName"
|
||||
@keyup.enter="renameFileAction"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
@@ -313,7 +317,7 @@
|
||||
<v-btn color="" text @click="dialogRenameFile.show = false">
|
||||
{{ $t('Machine.ConfigFilesPanel.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text @click="renameFileAction">
|
||||
<v-btn :disabled="isInvalidName" color="primary" text @click="renameFileAction">
|
||||
{{ $t('Machine.ConfigFilesPanel.Rename') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
@@ -335,6 +339,8 @@
|
||||
v-model="dialogCreateDirectory.name"
|
||||
:label="$t('Machine.ConfigFilesPanel.Name')"
|
||||
required
|
||||
:rules="nameInputRules"
|
||||
@update:error="isInvalidName = !isInvalidName"
|
||||
@keyup.enter="createDirectoryAction"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
@@ -342,7 +348,7 @@
|
||||
<v-btn color="" text @click="dialogCreateDirectory.show = false">
|
||||
{{ $t('Machine.ConfigFilesPanel.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text @click="createDirectoryAction">
|
||||
<v-btn :disabled="isInvalidName" color="primary" text @click="createDirectoryAction">
|
||||
{{ $t('Machine.ConfigFilesPanel.Create') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
@@ -364,6 +370,8 @@
|
||||
v-model="dialogRenameDirectory.newName"
|
||||
:label="$t('Machine.ConfigFilesPanel.Name')"
|
||||
required
|
||||
:rules="nameInputRules"
|
||||
@update:error="isInvalidName = !isInvalidName"
|
||||
@keyup.enter="renameDirectoryAction"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
@@ -371,7 +379,7 @@
|
||||
<v-btn color="" text @click="dialogRenameDirectory.show = false">
|
||||
{{ $t('Machine.ConfigFilesPanel.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text @click="renameDirectoryAction">
|
||||
<v-btn :disabled="isInvalidName" color="primary" text @click="renameDirectoryAction">
|
||||
{{ $t('Machine.ConfigFilesPanel.Rename') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
@@ -454,7 +462,7 @@
|
||||
<script lang="ts">
|
||||
import { Component, Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { formatDate, formatFilesize, sortFiles } from '@/plugins/helpers'
|
||||
import { formatFilesize, sortFiles } from '@/plugins/helpers'
|
||||
import { FileStateFile, FileStateGcodefile } from '@/store/files/types'
|
||||
import axios from 'axios'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
@@ -545,7 +553,6 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
|
||||
|
||||
sortFiles = sortFiles
|
||||
formatFilesize = formatFilesize
|
||||
formatDate = formatDate
|
||||
|
||||
declare $refs: {
|
||||
fileUpload: HTMLInputElement
|
||||
@@ -639,6 +646,16 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
|
||||
|
||||
private deleteSelectedDialog = false
|
||||
|
||||
private isInvalidName = true
|
||||
private nameInputRules = [
|
||||
(value: string) => !!value || this.$t('Files.InvalidNameEmpty'),
|
||||
(value: string) => !this.existsFilename(value) || this.$t('Files.InvalidNameAlreadyExists'),
|
||||
]
|
||||
|
||||
existsFilename(name: string) {
|
||||
return this.files.findIndex((file) => file.filename === name) >= 0
|
||||
}
|
||||
|
||||
get blockFileUpload() {
|
||||
return this.$store.state.gui.view.blockFileUpload ?? false
|
||||
}
|
||||
@@ -649,6 +666,17 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
|
||||
|
||||
get toolbarButtons() {
|
||||
return [
|
||||
{
|
||||
text: this.$t('Machine.ConfigFilesPanel.Download'),
|
||||
color: 'primary',
|
||||
icon: mdiCloudDownload,
|
||||
loadingName: 'configDownloadZip',
|
||||
onlyWriteable: false,
|
||||
condition: this.selectedFiles.length > 0,
|
||||
click: () => {
|
||||
this.downloadSelectedFiles()
|
||||
},
|
||||
},
|
||||
{
|
||||
text: this.$t('Machine.ConfigFilesPanel.Delete'),
|
||||
color: 'error',
|
||||
@@ -685,7 +713,7 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
|
||||
loadingName: null,
|
||||
onlyWriteable: true,
|
||||
condition: true,
|
||||
click: this.createDirecotry,
|
||||
click: this.createDirectory,
|
||||
},
|
||||
{
|
||||
text: this.$t('Machine.ConfigFilesPanel.RefreshDirectory'),
|
||||
@@ -836,6 +864,8 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
set currentPath(newVal) {
|
||||
this.selectedFiles = []
|
||||
|
||||
this.$store.dispatch('gui/saveSettingWithoutUpload', { name: 'view.configfiles.currentPath', value: newVal })
|
||||
}
|
||||
|
||||
@@ -914,7 +944,37 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
|
||||
window.open(href)
|
||||
}
|
||||
|
||||
createDirecotry() {
|
||||
async downloadSelectedFiles() {
|
||||
let items: string[] = []
|
||||
|
||||
const addElementToItems = async (absolutPath: string, directory: FileStateFile[]) => {
|
||||
for (const file of directory) {
|
||||
const filePath = `${absolutPath}/${file.filename}`
|
||||
|
||||
if (file.isDirectory && file.childrens) {
|
||||
await addElementToItems(filePath, file.childrens)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
items.push(filePath)
|
||||
}
|
||||
}
|
||||
|
||||
await addElementToItems(this.absolutePath, this.selectedFiles)
|
||||
const date = new Date()
|
||||
const timestamp = `${date.getFullYear()}${date.getMonth()}${date.getDay()}-${date.getHours()}${date.getMinutes()}${date.getSeconds()}`
|
||||
|
||||
this.$socket.emit(
|
||||
'server.files.zip',
|
||||
{ items, dest: `config/${this.root}-${timestamp}.zip` },
|
||||
{ action: 'files/downloadZip', loading: 'configDownloadZip' }
|
||||
)
|
||||
|
||||
this.selectedFiles = []
|
||||
}
|
||||
|
||||
createDirectory() {
|
||||
this.dialogCreateDirectory.name = ''
|
||||
this.dialogCreateDirectory.show = true
|
||||
|
||||
|
||||
@@ -1,11 +1,30 @@
|
||||
<template>
|
||||
<panel
|
||||
:title="$t('Machine.LogfilesPanel.Logfiles').toString()"
|
||||
:icon="mdiFileDocumentEdit"
|
||||
card-class="machine-logfiles-panel"
|
||||
:collapsible="true">
|
||||
<v-card-text :class="'text-center text-lg-left py-0'">
|
||||
<v-container pb-0 px-0>
|
||||
<div>
|
||||
<panel
|
||||
:title="$t('Machine.LogfilesPanel.Logfiles').toString()"
|
||||
:icon="mdiFileDocumentEdit"
|
||||
card-class="machine-logfiles-panel"
|
||||
:collapsible="true">
|
||||
<template #buttons>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
icon
|
||||
tile
|
||||
color="primary"
|
||||
:ripple="true"
|
||||
:loading="loadings.includes('loadingBtnRolloverLogs')"
|
||||
:disabled="['printing', 'paused'].includes(printer_state)"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
@click="showRolloverDialog = true">
|
||||
<v-icon>{{ mdiFileSyncOutline }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ $t('Machine.LogfilesPanel.Rollover') }}</span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
<v-card-text :class="'text-center text-lg-left'">
|
||||
<v-row>
|
||||
<v-col :class="'col-12' + (klipperState !== 'ready' ? 'col-md-6' : 'col-md-12') + ''">
|
||||
<v-btn
|
||||
@@ -53,23 +72,74 @@
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</panel>
|
||||
</v-card-text>
|
||||
</panel>
|
||||
<v-dialog :value="showRolloverDialog" persistent width="400" :fullscreen="isMobile">
|
||||
<panel
|
||||
:title="$t('Machine.LogfilesPanel.Rollover').toString()"
|
||||
card-class="machine_rollover_logfiles-dialog"
|
||||
:icon="mdiFileSyncOutline"
|
||||
:margin-bottom="false">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="showRolloverDialog = false">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0">{{ $t('Machine.LogfilesPanel.RolloverDescription') }}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="mt-0">
|
||||
<v-col>
|
||||
<v-checkbox
|
||||
v-for="log in rolloverLogfiles"
|
||||
:key="log"
|
||||
v-model="selectedRolloverLogs"
|
||||
:label="capitalize(log)"
|
||||
:value="log"
|
||||
hide-details
|
||||
class="mt-0" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn text @click="showRolloverDialog = false">
|
||||
{{ $t('Machine.LogfilesPanel.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text @click="btnRolloverLogs">
|
||||
{{ $t('Machine.LogfilesPanel.Accept') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins } from 'vue-property-decorator'
|
||||
import { Component, Mixins, Watch } from 'vue-property-decorator'
|
||||
import BaseMixin from '../../mixins/base'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { FileStateFile } from '@/store/files/types'
|
||||
import { mdiDownload, mdiFileDocumentEdit } from '@mdi/js'
|
||||
import { mdiDownload, mdiFileDocumentEdit, mdiCloseThick, mdiFileSyncOutline } from '@mdi/js'
|
||||
import { rolloverLogfiles } from '@/store/variables'
|
||||
import { capitalize } from '@/plugins/helpers'
|
||||
@Component({
|
||||
components: { Panel },
|
||||
})
|
||||
export default class LogfilesPanel extends Mixins(BaseMixin) {
|
||||
mdiFileDocumentEdit = mdiFileDocumentEdit
|
||||
mdiDownload = mdiDownload
|
||||
mdiCloseThick = mdiCloseThick
|
||||
mdiFileSyncOutline = mdiFileSyncOutline
|
||||
|
||||
rolloverLogfiles = rolloverLogfiles
|
||||
capitalize = capitalize
|
||||
|
||||
private showRolloverDialog = false
|
||||
private selectedRolloverLogs: string[] = []
|
||||
|
||||
get logfiles() {
|
||||
return this.$store.getters['files/getDirectory']('logs')?.childrens ?? []
|
||||
@@ -85,6 +155,10 @@ export default class LogfilesPanel extends Mixins(BaseMixin) {
|
||||
return sonarLog?.size > 0
|
||||
}
|
||||
|
||||
get loadingRolloverLogs() {
|
||||
return this.loadings.filter((log) => log.startsWith('rolloverLog_')).length > 0
|
||||
}
|
||||
|
||||
downloadLog(event: any) {
|
||||
event.preventDefault()
|
||||
let href = ''
|
||||
@@ -93,5 +167,24 @@ export default class LogfilesPanel extends Mixins(BaseMixin) {
|
||||
|
||||
window.open(href)
|
||||
}
|
||||
|
||||
btnRolloverLogs() {
|
||||
if (this.selectedRolloverLogs.length === 0) return
|
||||
|
||||
this.selectedRolloverLogs.forEach((name) => {
|
||||
this.$socket.emit(
|
||||
'server.logs.rollover',
|
||||
{ application: name },
|
||||
{ loading: 'rolloverLog_' + name, action: 'files/rolloverLog' }
|
||||
)
|
||||
})
|
||||
|
||||
this.selectedRolloverLogs = []
|
||||
}
|
||||
|
||||
@Watch('loadingRolloverLogs')
|
||||
loadingRolloverLogsChanged(newVal: boolean) {
|
||||
if (newVal) this.showRolloverDialog = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -9,16 +9,12 @@
|
||||
<v-row class="py-0 pr-4">
|
||||
<v-col class="pl-6">
|
||||
<strong style="cursor: pointer" @click="hostDetailsDialog = true">Host</strong>
|
||||
<template v-if="hostStats.cpuDesc">
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<small v-if="hostStats.cpuName" class="ml-2" v-bind="attrs" v-on="on">
|
||||
({{ hostStats.cpuName }})
|
||||
</small>
|
||||
</template>
|
||||
<span>{{ hostStats.cpuDesc }}</span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<small v-if="hostStats.cpuName" class="ml-2" v-bind="attrs" v-on="on">({{ cpuName }})</small>
|
||||
</template>
|
||||
<span>{{ cpuDesc }}</span>
|
||||
</v-tooltip>
|
||||
<br />
|
||||
<div class="text-body-2">
|
||||
<div v-if="hostStats.version">
|
||||
@@ -90,7 +86,11 @@
|
||||
<template v-if="networkInterfaces">
|
||||
<div v-for="(interfaceStats, interfaceName) in networkInterfaces" :key="interfaceName">
|
||||
<span class="text-no-wrap">
|
||||
{{ interfaceName }}{{ getIpAddress(interfaceStats.details.ip_addresses) }}:
|
||||
{{ interfaceName }}
|
||||
<template v-if="'details' in interfaceStats">
|
||||
{{ getIpAddress(interfaceStats.details.ip_addresses) }}
|
||||
</template>
|
||||
:
|
||||
</span>
|
||||
<span class="text-no-wrap">
|
||||
{{
|
||||
@@ -261,5 +261,21 @@ export default class SystemPanelHost extends Mixins(BaseMixin) {
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
get cpuDesc() {
|
||||
let output = this.hostStats.cpuDesc
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
get cpuName() {
|
||||
let output = this.hostStats.cpuName
|
||||
|
||||
if (this.hostStats.bits) {
|
||||
output += `, ${this.hostStats.bits}`
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<template>
|
||||
<panel
|
||||
v-if="klipperReadyForGui && (miscellaneous.length || filamentSensors.length)"
|
||||
v-if="showMiscellaneousPanel"
|
||||
:icon="mdiDipSwitch"
|
||||
:title="$t('Panels.MiscellaneousPanel.Headline')"
|
||||
:collapsible="true"
|
||||
@@ -20,8 +20,21 @@
|
||||
:max="object.max_power"
|
||||
:multi="parseInt(object.scale)"></miscellaneous-slider>
|
||||
</div>
|
||||
<div v-for="(sensor, index) of filamentSensors" :key="'sensor_' + index">
|
||||
<div v-for="(light, index) of lights" :key="'light_' + light.name">
|
||||
<v-divider v-if="index || miscellaneous.length"></v-divider>
|
||||
<miscellaneous-slider
|
||||
v-if="light.type === 'led' && light.colorOrder.length === 1"
|
||||
:name="light.name"
|
||||
type="led"
|
||||
:rpm="null"
|
||||
:controllable="true"
|
||||
:pwm="true"
|
||||
:target="light.singleChannelTarget"
|
||||
:color-order="light.colorOrder" />
|
||||
<miscellaneous-light v-else :object="light" :root="true" />
|
||||
</div>
|
||||
<div v-for="(sensor, index) of filamentSensors" :key="'sensor_' + index">
|
||||
<v-divider v-if="index || miscellaneous.length || lights.length"></v-divider>
|
||||
<filament-sensor
|
||||
:name="sensor.name"
|
||||
:enabled="sensor.enabled"
|
||||
@@ -34,21 +47,32 @@
|
||||
import { Component, Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import MiscellaneousSlider from '@/components/inputs/MiscellaneousSlider.vue'
|
||||
import MiscellaneousLight from '@/components/inputs/MiscellaneousLight.vue'
|
||||
import FilamentSensor from '@/components/inputs/FilamentSensor.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { mdiDipSwitch } from '@mdi/js'
|
||||
@Component({
|
||||
components: { Panel, FilamentSensor, MiscellaneousSlider },
|
||||
components: { Panel, FilamentSensor, MiscellaneousSlider, MiscellaneousLight },
|
||||
})
|
||||
export default class MiscellaneousPanel extends Mixins(BaseMixin) {
|
||||
mdiDipSwitch = mdiDipSwitch
|
||||
|
||||
get filamentSensors() {
|
||||
return this.$store.getters['printer/getFilamentSensors'] ?? []
|
||||
}
|
||||
|
||||
get miscellaneous() {
|
||||
return this.$store.getters['printer/getMiscellaneous'] ?? []
|
||||
}
|
||||
|
||||
get filamentSensors() {
|
||||
return this.$store.getters['printer/getFilamentSensors'] ?? []
|
||||
get lights() {
|
||||
return this.$store.getters['printer/getLights'] ?? []
|
||||
}
|
||||
|
||||
get showMiscellaneousPanel() {
|
||||
return (
|
||||
this.klipperReadyForGui && (this.miscellaneous.length || this.filamentSensors.length || this.lights.length)
|
||||
)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -81,7 +81,7 @@ svg {
|
||||
stroke-width="1" />
|
||||
</g>
|
||||
|
||||
<g v-for="(object, index) in printing_objects" :key="index">
|
||||
<g v-for="(object, index) in printing_objects_with_polygons" :key="index">
|
||||
<polygon
|
||||
:points="object.polygon.map((point) => convertX(point[0]) + ',' + convertY(point[1])).join(' ')"
|
||||
style="cursor: pointer"
|
||||
@@ -124,6 +124,10 @@ export default class StatusPanelObjectsDialogMap extends Mixins(BaseMixin) {
|
||||
return this.$store.state.printer.exclude_object?.objects ?? []
|
||||
}
|
||||
|
||||
get printing_objects_with_polygons() {
|
||||
return this.printing_objects.filter((eobject: any) => 'polygon' in eobject)
|
||||
}
|
||||
|
||||
get current_object() {
|
||||
return this.$store.state.printer.exclude_object?.current_object ?? null
|
||||
}
|
||||
@@ -144,20 +148,32 @@ export default class StatusPanelObjectsDialogMap extends Mixins(BaseMixin) {
|
||||
)
|
||||
}
|
||||
|
||||
get toolhead() {
|
||||
return this.$store.state.printer.toolhead ?? {}
|
||||
}
|
||||
|
||||
get axis_minimum() {
|
||||
return this.toolhead.axis_minimum ?? []
|
||||
}
|
||||
|
||||
get axis_maximum() {
|
||||
return this.toolhead.axis_maximum ?? []
|
||||
}
|
||||
|
||||
get stepperXmin() {
|
||||
return this.$store.state.printer.configfile?.settings?.stepper_x?.position_min ?? 0
|
||||
return this.axis_minimum[0] ?? 0
|
||||
}
|
||||
|
||||
get stepperXmax() {
|
||||
return this.$store.state.printer.configfile?.settings?.stepper_x?.position_max ?? 0
|
||||
return this.axis_maximum[0] ?? 200
|
||||
}
|
||||
|
||||
get stepperYmin() {
|
||||
return this.$store.state.printer.configfile?.settings?.stepper_y?.position_min ?? 200
|
||||
return this.axis_minimum[1] ?? 0
|
||||
}
|
||||
|
||||
get stepperYmax() {
|
||||
return this.$store.state.printer.configfile?.settings?.stepper_y?.position_max ?? 200
|
||||
return this.axis_maximum[1] ?? 200
|
||||
}
|
||||
|
||||
get absoluteX() {
|
||||
|
||||
@@ -83,6 +83,12 @@
|
||||
<v-icon class="mr-1">{{ mdiPlaylistPlus }}</v-icon>
|
||||
{{ $t('Files.AddToQueue') }}
|
||||
</v-list-item>
|
||||
<v-list-item
|
||||
v-if="moonrakerComponents.includes('job_queue')"
|
||||
@click="openAddBatchToQueueDialog(contextMenu.item)">
|
||||
<v-icon class="mr-1">{{ mdiPlaylistPlus }}</v-icon>
|
||||
{{ $t('Files.AddBatchToQueue') }}
|
||||
</v-list-item>
|
||||
<v-list-item
|
||||
v-if="contextMenu.item.preheat_gcode !== null"
|
||||
:disabled="['error', 'printing', 'paused'].includes(printer_state)"
|
||||
@@ -137,6 +143,53 @@
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogAddBatchToQueue.show" max-width="400">
|
||||
<panel
|
||||
:title="$t('Files.AddToQueue').toString()"
|
||||
card-class="gcode-files-add-to-queue-dialog"
|
||||
:icon="mdiPlaylistPlus"
|
||||
:margin-bottom="false">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="dialogAddBatchToQueue.show = false">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
ref="inputFieldAddToQueueCount"
|
||||
v-model="dialogAddBatchToQueue.count"
|
||||
:label="$t('Files.Count')"
|
||||
required
|
||||
hide-spin-buttons
|
||||
type="number"
|
||||
:rules="countInputRules"
|
||||
@keyup.enter="addBatchToQueueAction">
|
||||
<template #append-outer>
|
||||
<div class="_spin_button_group">
|
||||
<v-btn class="mt-n3" icon plain small @click="dialogAddBatchToQueue.count++">
|
||||
<v-icon>{{ mdiChevronUp }}</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
:disabled="dialogAddBatchToQueue.count <= 1"
|
||||
class="mb-n3"
|
||||
icon
|
||||
plain
|
||||
small
|
||||
@click="dialogAddBatchToQueue.count--">
|
||||
<v-icon>{{ mdiChevronDown }}</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogAddBatchToQueue.show = false">{{ $t('Files.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="addBatchToQueueAction">{{ $t('Files.AddToQueue') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
@@ -148,6 +201,8 @@ import ControlMixin from '@/components/mixins/control'
|
||||
import { FileStateGcodefile } from '@/store/files/types'
|
||||
import StartPrintDialog from '@/components/dialogs/StartPrintDialog.vue'
|
||||
import {
|
||||
mdiChevronDown,
|
||||
mdiChevronUp,
|
||||
mdiFile,
|
||||
mdiPlay,
|
||||
mdiPlaylistPlus,
|
||||
@@ -166,12 +221,20 @@ interface dialogRenameObject {
|
||||
item: FileStateGcodefile
|
||||
}
|
||||
|
||||
interface dialogAddBatchToQueue {
|
||||
show: boolean
|
||||
count: number
|
||||
item: FileStateGcodefile
|
||||
}
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
StartPrintDialog,
|
||||
},
|
||||
})
|
||||
export default class StatusPanelGcodefiles extends Mixins(BaseMixin, ControlMixin) {
|
||||
mdiChevronDown = mdiChevronDown
|
||||
mdiChevronUp = mdiChevronUp
|
||||
mdiFile = mdiFile
|
||||
mdiPlay = mdiPlay
|
||||
mdiPlaylistPlus = mdiPlaylistPlus
|
||||
@@ -199,6 +262,7 @@ export default class StatusPanelGcodefiles extends Mixins(BaseMixin, ControlMixi
|
||||
last_status: null,
|
||||
last_start_time: null,
|
||||
last_total_duration: null,
|
||||
preheat_gcode: null,
|
||||
}
|
||||
private currentPath = ''
|
||||
private contentTdWidth = 100
|
||||
@@ -222,6 +286,17 @@ export default class StatusPanelGcodefiles extends Mixins(BaseMixin, ControlMixi
|
||||
item: { ...this.dialogFile },
|
||||
}
|
||||
|
||||
private dialogAddBatchToQueue: dialogAddBatchToQueue = {
|
||||
show: false,
|
||||
count: 1,
|
||||
item: { ...this.contextMenu.item },
|
||||
}
|
||||
|
||||
private countInputRules = [
|
||||
(value: string) => !!value || this.$t('JobQueue.InvalidCountEmpty'),
|
||||
(value: string) => parseInt(value) > 0 || this.$t('JobQueue.InvalidCountGreaterZero'),
|
||||
]
|
||||
|
||||
get gcodeFiles() {
|
||||
let gcodes = this.$store.getters['files/getAllGcodes'] ?? []
|
||||
gcodes = gcodes
|
||||
@@ -343,6 +418,26 @@ export default class StatusPanelGcodefiles extends Mixins(BaseMixin, ControlMixi
|
||||
this.$store.dispatch('server/jobQueue/addToQueue', [item.filename])
|
||||
}
|
||||
|
||||
openAddBatchToQueueDialog(item: FileStateGcodefile) {
|
||||
this.dialogAddBatchToQueue.show = true
|
||||
this.dialogAddBatchToQueue.count = 1
|
||||
this.dialogAddBatchToQueue.item = item
|
||||
}
|
||||
|
||||
async addBatchToQueueAction() {
|
||||
let filename = [this.currentPath, this.dialogAddBatchToQueue.item.filename].join('/')
|
||||
if (filename.startsWith('/')) filename = filename.slice(1)
|
||||
|
||||
const array: string[] = []
|
||||
for (let i = 0; i < this.dialogAddBatchToQueue.count; i++) {
|
||||
array.push(filename)
|
||||
}
|
||||
|
||||
await this.$store.dispatch('server/jobQueue/addToQueue', array)
|
||||
|
||||
this.dialogAddBatchToQueue.show = false
|
||||
}
|
||||
|
||||
view3D(item: FileStateGcodefile) {
|
||||
this.$router.push({ path: '/viewer', query: { filename: 'gcodes/' + item.filename } })
|
||||
}
|
||||
@@ -419,8 +514,15 @@ export default class StatusPanelGcodefiles extends Mixins(BaseMixin, ControlMixi
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style scoped>
|
||||
.filesGcodeCard {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
._spin_button_group {
|
||||
width: 24px;
|
||||
margin-top: -6px;
|
||||
margin-left: -6px;
|
||||
margin-bottom: -6px;
|
||||
}
|
||||
</style>
|
||||
@@ -5,77 +5,27 @@
|
||||
hide-default-footer
|
||||
class="dashboard-jobqueue-table"
|
||||
sort-by="time_added"
|
||||
mobile-breakpoint="0"
|
||||
@current-items="setFirst">
|
||||
mobile-breakpoint="0">
|
||||
<template #no-data>
|
||||
<div class="text-center">{{ $t('Panels.StatusPanel.EmptyJobqueue') }}</div>
|
||||
</template>
|
||||
|
||||
<template #item="{ item }">
|
||||
<tr
|
||||
<template #item="{ item, index }">
|
||||
<jobqueue-entry
|
||||
:key="item.job_id"
|
||||
v-longpress:600="(e) => showContextMenu(e, item)"
|
||||
class="cursor-pointer"
|
||||
@contextmenu="showContextMenu($event, item)">
|
||||
<td class="pr-0 text-center" style="width: 32px">
|
||||
<template v-if="getSmallThumbnail(item) && getBigThumbnail(item)">
|
||||
<v-tooltip
|
||||
v-if="!item.isDirectory && getSmallThumbnail(item) && getBigThumbnail(item)"
|
||||
top
|
||||
content-class="tooltip__content-opacity1">
|
||||
<template #activator="{ on, attrs }">
|
||||
<vue-load-image>
|
||||
<img
|
||||
slot="image"
|
||||
:src="getSmallThumbnail(item)"
|
||||
width="32"
|
||||
height="32"
|
||||
v-bind="attrs"
|
||||
v-on="on" />
|
||||
<v-progress-circular
|
||||
slot="preloader"
|
||||
indeterminate
|
||||
color="primary"></v-progress-circular>
|
||||
<v-icon slot="error">{{ mdiFile }}</v-icon>
|
||||
</vue-load-image>
|
||||
</template>
|
||||
<span><img :src="getBigThumbnail(item)" width="250" /></span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
<template v-else-if="getSmallThumbnail(item)">
|
||||
<vue-load-image>
|
||||
<img slot="image" :src="getSmallThumbnail(item)" width="32" height="32" />
|
||||
<v-progress-circular
|
||||
slot="preloader"
|
||||
indeterminate
|
||||
color="primary"></v-progress-circular>
|
||||
<v-icon slot="error">{{ mdiFile }}</v-icon>
|
||||
</vue-load-image>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-icon>{{ mdiFile }}</v-icon>
|
||||
</template>
|
||||
</td>
|
||||
<td class="pr-2">
|
||||
<template v-if="item.isFirst && !printerIsPrinting">
|
||||
<v-btn icon color="success" class="float-right minwidth-0 mt-1" @click="startJobqueue">
|
||||
<v-icon>{{ mdiPlay }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<div class="d-block text-truncate" :style="styleContentTdWidth">{{ item.filename }}</div>
|
||||
<small v-if="existMetadata(item)">{{ getDescription(item) }}</small>
|
||||
</td>
|
||||
</tr>
|
||||
:item="item"
|
||||
:is-first="index === 0"
|
||||
:content-td-width="contentTdWidth" />
|
||||
</template>
|
||||
<template v-if="jobs.length > jobsTable.length" #body.append>
|
||||
<template v-if="jobsRest.length" #body.append>
|
||||
<tr>
|
||||
<td class="pr-0 text-center" style="width: 32px">
|
||||
<v-icon>{{ mdiFileMultiple }}</v-icon>
|
||||
</td>
|
||||
<td class="pr-2">
|
||||
{{
|
||||
$tc('Panels.StatusPanel.JobqueueMoreFiles', jobs.length - jobsTable.length, {
|
||||
count: jobs.length - jobsTable.length,
|
||||
$tc('Panels.StatusPanel.JobqueueMoreFiles', restJobsLength, {
|
||||
count: restJobsLength,
|
||||
})
|
||||
}}
|
||||
<br />
|
||||
@@ -85,14 +35,6 @@
|
||||
</template>
|
||||
</v-data-table>
|
||||
<resize-observer @notify="handleResize" />
|
||||
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
|
||||
<v-list>
|
||||
<v-list-item @click="removeFromJobqueue(contextMenu.item)">
|
||||
<v-icon class="mr-1">{{ mdiPlaylistRemove }}</v-icon>
|
||||
{{ $t('JobQueue.RemoveFromQueue') }}
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
@@ -101,24 +43,15 @@ import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { ServerJobQueueStateJob } from '@/store/server/jobQueue/types'
|
||||
import { mdiFile, mdiPlay, mdiFileMultiple, mdiPlaylistRemove } from '@mdi/js'
|
||||
import { mdiFileMultiple } from '@mdi/js'
|
||||
import JobqueueEntry from '@/components/panels/Status/JobqueueEntry.vue'
|
||||
@Component({
|
||||
components: {},
|
||||
components: { JobqueueEntry },
|
||||
})
|
||||
export default class StatusPanelJobqueue extends Mixins(BaseMixin) {
|
||||
mdiFile = mdiFile
|
||||
mdiPlay = mdiPlay
|
||||
mdiFileMultiple = mdiFileMultiple
|
||||
mdiPlaylistRemove = mdiPlaylistRemove
|
||||
|
||||
private contentTdWidth = 100
|
||||
private contextMenu = {
|
||||
shown: false,
|
||||
touchTimer: undefined,
|
||||
x: 0,
|
||||
y: 0,
|
||||
item: {},
|
||||
}
|
||||
|
||||
declare $refs: {
|
||||
filesJobqueue: any
|
||||
@@ -136,15 +69,27 @@ export default class StatusPanelJobqueue extends Mixins(BaseMixin) {
|
||||
return this.jobs.slice(5)
|
||||
}
|
||||
|
||||
get restJobsLength() {
|
||||
let count = 0
|
||||
|
||||
this.jobsRest.forEach((item: ServerJobQueueStateJob) => {
|
||||
count += (item.combinedIds?.length ?? 0) + 1
|
||||
})
|
||||
|
||||
return count
|
||||
}
|
||||
|
||||
get descriptionRestJobs() {
|
||||
let filamentLength = 0
|
||||
let filamentWeight = 0
|
||||
let printTime = 0
|
||||
|
||||
this.jobsRest.forEach((item: ServerJobQueueStateJob) => {
|
||||
if (item.metadata?.filament_total) filamentLength += item.metadata?.filament_total
|
||||
if (item.metadata?.filament_weight_total) filamentWeight += item.metadata?.filament_weight_total
|
||||
if (item.metadata?.estimated_time) printTime = item.metadata.estimated_time
|
||||
const count = (item.combinedIds?.length ?? 0) + 1
|
||||
|
||||
if (item.metadata?.filament_total) filamentLength += item.metadata?.filament_total * count
|
||||
if (item.metadata?.filament_weight_total) filamentWeight += item.metadata?.filament_weight_total * count
|
||||
if (item.metadata?.estimated_time) printTime = item.metadata.estimated_time * count
|
||||
})
|
||||
|
||||
let output = ''
|
||||
@@ -163,49 +108,6 @@ export default class StatusPanelJobqueue extends Mixins(BaseMixin) {
|
||||
return output
|
||||
}
|
||||
|
||||
get styleContentTdWidth() {
|
||||
return `width: ${this.contentTdWidth}px;`
|
||||
}
|
||||
|
||||
getSmallThumbnail(item: ServerJobQueueStateJob) {
|
||||
return this.$store.getters['server/jobQueue/getSmallThumbnail'](item)
|
||||
}
|
||||
|
||||
getBigThumbnail(item: ServerJobQueueStateJob) {
|
||||
return this.$store.getters['server/jobQueue/getBigThumbnail'](item)
|
||||
}
|
||||
|
||||
getDescription(item: ServerJobQueueStateJob) {
|
||||
let output = ''
|
||||
|
||||
output += this.$t('Panels.StatusPanel.Filament') + ': '
|
||||
if (item.metadata?.filament_total || item.metadata.filament_weight_total) {
|
||||
if (item.metadata?.filament_total) output += item.metadata.filament_total.toFixed() + ' mm'
|
||||
if (item.metadata?.filament_total && item.metadata.filament_weight_total) output += ' / '
|
||||
if (item.metadata?.filament_weight_total) output += item.metadata.filament_weight_total.toFixed(2) + ' g'
|
||||
} else output += '--'
|
||||
|
||||
output += ', ' + this.$t('Panels.StatusPanel.PrintTime') + ': '
|
||||
if (item.metadata?.estimated_time) output += this.formatPrintTime(item.metadata.estimated_time)
|
||||
else output += '--'
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
existMetadata(item: ServerJobQueueStateJob) {
|
||||
return item?.metadata?.metadataPulled
|
||||
}
|
||||
|
||||
setFirst(currItems: ServerJobQueueStateJob[]) {
|
||||
// first check that actually exists values
|
||||
if (currItems.length) {
|
||||
// toggle all to false
|
||||
currItems.forEach((x: ServerJobQueueStateJob) => (x.isFirst = false))
|
||||
// just set first to true
|
||||
currItems[0].isFirst = true
|
||||
}
|
||||
}
|
||||
|
||||
formatPrintTime(totalSeconds: number) {
|
||||
if (totalSeconds) {
|
||||
let output = ''
|
||||
@@ -232,27 +134,10 @@ export default class StatusPanelJobqueue extends Mixins(BaseMixin) {
|
||||
return '--'
|
||||
}
|
||||
|
||||
showContextMenu(e: any, item: ServerJobQueueStateJob) {
|
||||
if (!this.contextMenu.shown) {
|
||||
e?.preventDefault()
|
||||
this.contextMenu.shown = true
|
||||
this.contextMenu.x = e?.clientX || e?.pageX || window.screenX / 2
|
||||
this.contextMenu.y = e?.clientY || e?.pageY || window.screenY / 2
|
||||
this.contextMenu.item = item
|
||||
this.$nextTick(() => {
|
||||
this.contextMenu.shown = true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
startJobqueue() {
|
||||
this.$store.dispatch('server/jobQueue/start')
|
||||
}
|
||||
|
||||
removeFromJobqueue(item: ServerJobQueueStateJob) {
|
||||
this.$store.dispatch('server/jobQueue/deleteFromQueue', [item.job_id])
|
||||
}
|
||||
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
this.calcContentTdWidth()
|
||||
|
||||
@@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<tr
|
||||
v-longpress:600="(e) => showContextMenu(e, item)"
|
||||
class="cursor-pointer"
|
||||
@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">
|
||||
<template #activator="{ on, attrs }">
|
||||
<vue-load-image>
|
||||
<img slot="image" :src="smallThumbnail" width="32" height="32" v-bind="attrs" v-on="on" />
|
||||
<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="bigThumbnail" width="250" /></span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
<template v-else-if="smallThumbnail">
|
||||
<vue-load-image>
|
||||
<img slot="image" :src="smallThumbnail" width="32" height="32" />
|
||||
<div slot="preloader">
|
||||
<v-progress-circular indeterminate color="primary" />
|
||||
</div>
|
||||
<div slot="error">
|
||||
<v-icon>{{ mdiFile }}</v-icon>
|
||||
</div>
|
||||
</vue-load-image>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-icon>{{ mdiFile }}</v-icon>
|
||||
</template>
|
||||
</td>
|
||||
<td class="pr-2">
|
||||
<template v-if="isFirst && !printerIsPrinting">
|
||||
<v-btn icon color="success" class="float-right minwidth-0 mt-1" @click="startJobqueue">
|
||||
<v-icon>{{ mdiPlay }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<div class="d-block text-truncate" :style="styleContentTdWidth">
|
||||
<strong v-if="item.combinedIds.length">{{ item.combinedIds.length + 1 }}x</strong>
|
||||
{{ item.filename }}
|
||||
</div>
|
||||
<small v-if="item?.metadata?.metadataPulled">{{ description }}</small>
|
||||
</td>
|
||||
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
|
||||
<v-list>
|
||||
<v-list-item @click="openChangeCountDialog(contextMenu.item)">
|
||||
<v-icon class="mr-1">{{ mdiCounter }}</v-icon>
|
||||
{{ $t('JobQueue.ChangeCount') }}
|
||||
</v-list-item>
|
||||
<v-list-item @click="removeFromJobqueue(contextMenu.item)">
|
||||
<v-icon class="mr-1">{{ mdiPlaylistRemove }}</v-icon>
|
||||
{{ $t('JobQueue.RemoveFromQueue') }}
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-dialog v-model="dialogChangeCount.show" max-width="400">
|
||||
<panel
|
||||
:title="$t('JobQueue.ChangeCount').toString()"
|
||||
:icon="mdiCounter"
|
||||
card-class="jobqueue-change-count-dialog"
|
||||
:margin-bottom="false">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="dialogChangeCount.show = false">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
ref="inputFieldAddToQueueCount"
|
||||
v-model="dialogChangeCount.count"
|
||||
:label="$t('JobQueue.Count')"
|
||||
required
|
||||
:rules="countInputRules"
|
||||
hide-spin-buttons
|
||||
type="number"
|
||||
@keyup.enter="changeCountAction">
|
||||
<template #append-outer>
|
||||
<div class="_spin_button_group">
|
||||
<v-btn class="mt-n3" icon plain small @click="dialogChangeCount.count++">
|
||||
<v-icon>{{ mdiChevronUp }}</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
:disabled="dialogChangeCount.count <= 1"
|
||||
class="mb-n3"
|
||||
icon
|
||||
plain
|
||||
small
|
||||
@click="dialogChangeCount.count--">
|
||||
<v-icon>{{ mdiChevronDown }}</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn color="" text @click="dialogChangeCount.show = false">{{ $t('JobQueue.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="changeCountAction">{{ $t('JobQueue.ChangeCount') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</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 { ServerJobQueueStateJob } from '@/store/server/jobQueue/types'
|
||||
import { mdiChevronDown, mdiChevronUp, mdiCloseThick, mdiCounter, mdiFile, mdiPlay, mdiPlaylistRemove } from '@mdi/js'
|
||||
import NumberInput from '@/components/inputs/NumberInput.vue'
|
||||
@Component({
|
||||
components: { NumberInput },
|
||||
})
|
||||
export default class StatusPanelJobqueueEntry extends Mixins(BaseMixin) {
|
||||
mdiChevronDown = mdiChevronDown
|
||||
mdiChevronUp = mdiChevronUp
|
||||
mdiCloseThick = mdiCloseThick
|
||||
mdiCounter = mdiCounter
|
||||
mdiFile = mdiFile
|
||||
mdiPlay = mdiPlay
|
||||
mdiPlaylistRemove = mdiPlaylistRemove
|
||||
|
||||
@Prop({ type: Object, required: true }) declare item: ServerJobQueueStateJob
|
||||
@Prop({ type: Number, required: true }) declare contentTdWidth: number
|
||||
@Prop({ type: Boolean, default: false }) declare isFirst: boolean
|
||||
private contextMenu: {
|
||||
shown: boolean
|
||||
x: number
|
||||
y: number
|
||||
item: ServerJobQueueStateJob | any
|
||||
} = {
|
||||
shown: false,
|
||||
x: 0,
|
||||
y: 0,
|
||||
item: {},
|
||||
}
|
||||
|
||||
private dialogChangeCount: {
|
||||
show: boolean
|
||||
count: number
|
||||
item: ServerJobQueueStateJob | any
|
||||
} = {
|
||||
show: false,
|
||||
count: 1,
|
||||
item: {},
|
||||
}
|
||||
|
||||
private countInputRules = [
|
||||
(value: string) => !!value || this.$t('JobQueue.InvalidCountEmpty'),
|
||||
(value: string) => parseInt(value) > 0 || this.$t('JobQueue.InvalidCountGreaterZero'),
|
||||
]
|
||||
|
||||
declare $refs: {
|
||||
filesJobqueue: any
|
||||
}
|
||||
|
||||
get styleContentTdWidth() {
|
||||
return `width: ${this.contentTdWidth}px;`
|
||||
}
|
||||
|
||||
get smallThumbnail() {
|
||||
return this.$store.getters['server/jobQueue/getSmallThumbnail'](this.item)
|
||||
}
|
||||
|
||||
get bigThumbnail() {
|
||||
return this.$store.getters['server/jobQueue/getBigThumbnail'](this.item)
|
||||
}
|
||||
|
||||
get description() {
|
||||
let output = ''
|
||||
|
||||
output += this.$t('Panels.StatusPanel.Filament') + ': '
|
||||
if (this.item.metadata?.filament_total || this.item.metadata.filament_weight_total) {
|
||||
if (this.item.metadata?.filament_total) output += this.item.metadata.filament_total.toFixed() + ' mm'
|
||||
if (this.item.metadata?.filament_total && this.item.metadata.filament_weight_total) output += ' / '
|
||||
if (this.item.metadata?.filament_weight_total)
|
||||
output += this.item.metadata.filament_weight_total.toFixed(2) + ' g'
|
||||
} else output += '--'
|
||||
|
||||
output += ', ' + this.$t('Panels.StatusPanel.PrintTime') + ': '
|
||||
if (this.item.metadata?.estimated_time) output += this.formatPrintTime(this.item.metadata.estimated_time)
|
||||
else output += '--'
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
formatPrintTime(totalSeconds: number) {
|
||||
if (totalSeconds) {
|
||||
let output = ''
|
||||
|
||||
const days = Math.floor(totalSeconds / (3600 * 24))
|
||||
if (days) {
|
||||
totalSeconds %= 3600 * 24
|
||||
output += days + 'd'
|
||||
}
|
||||
|
||||
const hours = Math.floor(totalSeconds / 3600)
|
||||
totalSeconds %= 3600
|
||||
if (hours) output += ' ' + hours + 'h'
|
||||
|
||||
const minutes = Math.floor(totalSeconds / 60)
|
||||
if (minutes) output += ' ' + minutes + 'm'
|
||||
|
||||
const seconds = totalSeconds % 60
|
||||
if (seconds) output += ' ' + seconds.toFixed(0) + 's'
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
return '--'
|
||||
}
|
||||
|
||||
showContextMenu(e: any, item: ServerJobQueueStateJob) {
|
||||
if (!this.contextMenu.shown) {
|
||||
e?.preventDefault()
|
||||
this.contextMenu.shown = true
|
||||
this.contextMenu.x = e?.clientX || e?.pageX || window.screenX / 2
|
||||
this.contextMenu.y = e?.clientY || e?.pageY || window.screenY / 2
|
||||
this.contextMenu.item = item
|
||||
this.$nextTick(() => {
|
||||
this.contextMenu.shown = true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
startJobqueue() {
|
||||
this.$store.dispatch('server/jobQueue/start')
|
||||
}
|
||||
|
||||
removeFromJobqueue(item: ServerJobQueueStateJob) {
|
||||
const ids = [...(item.combinedIds ?? [])]
|
||||
ids.push(item.job_id)
|
||||
|
||||
this.$store.dispatch('server/jobQueue/deleteFromQueue', ids)
|
||||
}
|
||||
|
||||
openChangeCountDialog(item: ServerJobQueueStateJob) {
|
||||
this.dialogChangeCount.show = true
|
||||
this.dialogChangeCount.count = (item.combinedIds?.length ?? 0) + 1
|
||||
this.dialogChangeCount.item = item
|
||||
}
|
||||
|
||||
changeCountAction() {
|
||||
this.$store.dispatch('server/jobQueue/changeCount', {
|
||||
job_id: this.dialogChangeCount.item.job_id,
|
||||
count: this.dialogChangeCount.count,
|
||||
})
|
||||
this.dialogChangeCount.show = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.filesJobqueue {
|
||||
position: relative;
|
||||
}
|
||||
._spin_button_group {
|
||||
width: 24px;
|
||||
margin-top: -6px;
|
||||
margin-left: -6px;
|
||||
margin-bottom: -6px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,225 @@
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<v-dialog v-model="showDialog" width="400" persistent :fullscreen="isMobile">
|
||||
<panel
|
||||
:title="$t('Panels.StatusPanel.PauseAtLayer.PauseAtLayer').toString()"
|
||||
:icon="mdiLayersPlus"
|
||||
card-class="pause-at-layer-dialog"
|
||||
:margin-bottom="false">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="hideDialog">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-row v-if="type === 'atLayer' && macroSettingsPauseAtLayerEnable">
|
||||
<v-col>
|
||||
<v-alert text type="warning" border="left">
|
||||
{{
|
||||
$t('Panels.StatusPanel.PauseAtLayer.DescriptionPauseAtLayerActive', {
|
||||
layer: macroSettingsPauseAtLayerLayer,
|
||||
call: macroSettingsPauseAtLayerCall,
|
||||
})
|
||||
}}
|
||||
</v-alert>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="type === 'nextLayer' && macroSettingsPauseNextLayerEnable">
|
||||
<v-col>
|
||||
<v-alert text type="warning" border="left">
|
||||
{{
|
||||
$t('Panels.StatusPanel.PauseAtLayer.DescriptionPauseNextLayerActive', {
|
||||
call: macroSettingsPauseAtLayerCall,
|
||||
})
|
||||
}}
|
||||
</v-alert>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-select
|
||||
v-model="type"
|
||||
:items="itemsFiltered"
|
||||
:label="$t('Panels.StatusPanel.PauseAtLayer.Type')"
|
||||
outlined
|
||||
hide-details />
|
||||
</v-col>
|
||||
<v-col v-if="type === 'atLayer'">
|
||||
<v-text-field
|
||||
v-model="layer"
|
||||
:label="$t('Panels.StatusPanel.PauseAtLayer.Layer')"
|
||||
outlined
|
||||
hide-details />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="mt-0">
|
||||
<v-col>
|
||||
<v-select
|
||||
v-model="call"
|
||||
:items="itemsCall"
|
||||
:label="$t('Panels.StatusPanel.PauseAtLayer.Call')"
|
||||
outlined
|
||||
hide-details />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn text @click="hideDialog">{{ $t('Panels.StatusPanel.PauseAtLayer.Abort') }}</v-btn>
|
||||
<v-btn color="primary" text @click="sendCommand">
|
||||
{{ $t('Panels.StatusPanel.PauseAtLayer.Accept') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</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 StatusPanelExcludeObjectDialogMap from '@/components/panels/Status/ExcludeObjectDialogMap.vue'
|
||||
import StatusPanelExcludeObjectDialogList from '@/components/panels/Status/ExcludeObjectDialogList.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { mdiCloseThick, mdiLayersPlus } from '@mdi/js'
|
||||
import { PrinterStateMacro } from '@/store/printer/types'
|
||||
@Component({
|
||||
components: { Panel, StatusPanelExcludeObjectDialogList, StatusPanelExcludeObjectDialogMap },
|
||||
})
|
||||
export default class StatusPanelPauseAtLayerDialog extends Mixins(BaseMixin) {
|
||||
mdiLayersPlus = mdiLayersPlus
|
||||
mdiCloseThick = mdiCloseThick
|
||||
|
||||
@Prop({ required: true }) declare readonly showDialog: boolean
|
||||
|
||||
private type: 'nextLayer' | 'atLayer' = 'atLayer'
|
||||
private layer: number = 0
|
||||
private call: 'PAUSE' | 'M600' = 'PAUSE'
|
||||
|
||||
hideDialog() {
|
||||
this.$emit('update:showDialog', false)
|
||||
}
|
||||
|
||||
get items() {
|
||||
return [
|
||||
{
|
||||
text: this.$t('Panels.StatusPanel.PauseAtLayer.AtLayer'),
|
||||
value: 'atLayer',
|
||||
status: this.existsSetPauseAtLayer,
|
||||
},
|
||||
{
|
||||
text: this.$t('Panels.StatusPanel.PauseAtLayer.NextLayer'),
|
||||
value: 'nextLayer',
|
||||
status: this.existsSetPauseNextLayer,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
get itemsFiltered() {
|
||||
return this.items.filter((entry) => entry.status)
|
||||
}
|
||||
|
||||
get itemsCall() {
|
||||
return [
|
||||
{
|
||||
text: 'PAUSE',
|
||||
value: 'PAUSE',
|
||||
},
|
||||
{
|
||||
text: 'M600',
|
||||
value: 'M600',
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
get current_layer() {
|
||||
return this.$store.state.printer.print_stats?.info?.current_layer ?? 0
|
||||
}
|
||||
|
||||
get total_layer() {
|
||||
return this.$store.state.printer.print_stats?.info?.total_layer ?? 0
|
||||
}
|
||||
|
||||
get macros() {
|
||||
return this.$store.getters['printer/getMacros'] ?? []
|
||||
}
|
||||
|
||||
get existsSetPauseAtLayer() {
|
||||
return this.macros.findIndex((macro: PrinterStateMacro) => macro.name === 'SET_PAUSE_AT_LAYER') !== -1
|
||||
}
|
||||
|
||||
get existsSetPauseNextLayer() {
|
||||
return this.macros.findIndex((macro: PrinterStateMacro) => macro.name === 'SET_PAUSE_NEXT_LAYER') !== -1
|
||||
}
|
||||
|
||||
get macroSetPrintStatsInfo() {
|
||||
return this.$store.state.printer['gcode_macro SET_PRINT_STATS_INFO'] ?? {}
|
||||
}
|
||||
|
||||
get macroSettingsPauseAtLayer() {
|
||||
return this.macroSetPrintStatsInfo.pause_at_layer ?? {}
|
||||
}
|
||||
|
||||
get macroSettingsPauseAtLayerEnable() {
|
||||
return this.macroSettingsPauseAtLayer.enable ?? false
|
||||
}
|
||||
|
||||
get macroSettingsPauseAtLayerCall() {
|
||||
return this.macroSettingsPauseAtLayer.call ?? 'PAUSE'
|
||||
}
|
||||
|
||||
get macroSettingsPauseAtLayerLayer() {
|
||||
return this.macroSettingsPauseAtLayer.layer ?? 0
|
||||
}
|
||||
|
||||
get macroSettingsPauseNextLayer() {
|
||||
return this.macroSetPrintStatsInfo.pause_next_layer ?? {}
|
||||
}
|
||||
|
||||
get macroSettingsPauseNextLayerEnable() {
|
||||
return this.macroSettingsPauseNextLayer.enable ?? false
|
||||
}
|
||||
|
||||
get macroSettingsPauseNextLayerCall() {
|
||||
return this.macroSettingsPauseNextLayer.call ?? 'PAUSE'
|
||||
}
|
||||
|
||||
sendCommand() {
|
||||
if (this.type === 'atLayer') {
|
||||
this.doSend(`SET_PAUSE_AT_LAYER LAYER=${this.layer} MACRO=${this.call}`)
|
||||
this.hideDialog()
|
||||
return
|
||||
}
|
||||
|
||||
this.doSend(`SET_PAUSE_NEXT_LAYER MACRO=${this.call}`)
|
||||
this.hideDialog()
|
||||
}
|
||||
|
||||
doSend(gcode: string) {
|
||||
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
|
||||
this.$socket.emit('printer.gcode.script', { script: gcode })
|
||||
}
|
||||
|
||||
@Watch('showDialog')
|
||||
showDialogChanged(newVal: boolean) {
|
||||
if (newVal) {
|
||||
this.layer = this.current_layer + 1
|
||||
this.type = 'atLayer'
|
||||
|
||||
if (!this.existsSetPauseAtLayer) this.type = 'nextLayer'
|
||||
}
|
||||
}
|
||||
|
||||
@Watch('type')
|
||||
typeChanged(newVal: string) {
|
||||
if (newVal === 'atLayer') {
|
||||
this.call = this.macroSettingsPauseAtLayerCall
|
||||
} else if (newVal === 'nextLayer') {
|
||||
this.call = this.macroSettingsPauseNextLayerCall
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -81,16 +81,16 @@
|
||||
<strong>{{ $t('Panels.StatusPanel.Estimate') }}</strong>
|
||||
<br />
|
||||
<span class="text-no-wrap">
|
||||
{{ estimated_time_avg ? formatTime(estimated_time_avg) : '--' }}
|
||||
{{ estimated_time_avg ? formatDuration(estimated_time_avg) : '--' }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="text-right">
|
||||
{{ $t('Panels.StatusPanel.File') }}:
|
||||
{{ estimated_time_file ? formatTime(estimated_time_file) : '--' }}
|
||||
{{ estimated_time_file ? formatDuration(estimated_time_file) : '--' }}
|
||||
<br />
|
||||
{{ $t('Panels.StatusPanel.Filament') }}:
|
||||
{{ estimated_time_filament ? formatTime(estimated_time_filament) : '--' }}
|
||||
{{ estimated_time_filament ? formatDuration(estimated_time_filament) : '--' }}
|
||||
</div>
|
||||
</v-tooltip>
|
||||
</v-col>
|
||||
@@ -98,7 +98,7 @@
|
||||
<strong>{{ $t('Panels.StatusPanel.Slicer') }}</strong>
|
||||
<br />
|
||||
<span class="text-no-wrap">
|
||||
{{ estimated_time_slicer ? formatTime(estimated_time_slicer) : '--' }}
|
||||
{{ estimated_time_slicer ? formatDuration(estimated_time_slicer) : '--' }}
|
||||
</span>
|
||||
</v-col>
|
||||
<v-col class="col-3 pa-0">
|
||||
@@ -108,23 +108,23 @@
|
||||
<strong>{{ $t('Panels.StatusPanel.Total') }}</strong>
|
||||
<br />
|
||||
<span class="text-no-wrap">
|
||||
{{ print_time_total ? formatTime(print_time_total) : '--' }}
|
||||
{{ print_time_total ? formatDuration(print_time_total) : '--' }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="text-right">
|
||||
{{ $t('Panels.StatusPanel.Print') }}:
|
||||
{{ print_time ? formatTime(print_time) : '--' }}
|
||||
{{ print_time ? formatDuration(print_time) : '--' }}
|
||||
<br />
|
||||
{{ $t('Panels.StatusPanel.Difference') }}:
|
||||
{{ print_time && print_time_total ? formatTime(print_time_total - print_time) : '--' }}
|
||||
{{ print_time && print_time_total ? formatDuration(print_time_total - print_time) : '--' }}
|
||||
</div>
|
||||
</v-tooltip>
|
||||
</v-col>
|
||||
<v-col class="col-3 pa-0">
|
||||
<strong>{{ $t('Panels.StatusPanel.ETA') }}</strong>
|
||||
<br />
|
||||
<span class="text-no-wrap">{{ outputEta }}</span>
|
||||
<span class="text-no-wrap">{{ eta }}</span>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
@@ -189,34 +189,11 @@ export default class StatusPanelPrintstatusPrinting extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get max_layers() {
|
||||
if (
|
||||
'first_layer_height' in this.current_file &&
|
||||
'layer_height' in this.current_file &&
|
||||
'object_height' in this.current_file
|
||||
) {
|
||||
const max = Math.ceil(
|
||||
(this.current_file.object_height - this.current_file.first_layer_height) /
|
||||
this.current_file.layer_height +
|
||||
1
|
||||
)
|
||||
return max > 0 ? max : 0
|
||||
}
|
||||
|
||||
return 0
|
||||
return this.$store.getters['printer/getPrintMaxLayers'] ?? 0
|
||||
}
|
||||
|
||||
get current_layer() {
|
||||
if (this.print_time > 0 && 'first_layer_height' in this.current_file && 'layer_height' in this.current_file) {
|
||||
const gcodePositionZ = this.$store.state.printer.gcode_move?.gcode_position[2] ?? 0
|
||||
let current_layer = Math.ceil(
|
||||
(gcodePositionZ - this.current_file.first_layer_height) / this.current_file.layer_height + 1
|
||||
)
|
||||
current_layer = current_layer <= this.max_layers ? current_layer : this.max_layers
|
||||
|
||||
return current_layer > 0 ? current_layer : 0
|
||||
}
|
||||
|
||||
return 0
|
||||
return this.$store.getters['printer/getPrintCurrentLayer'] ?? 0
|
||||
}
|
||||
|
||||
get estimated_time_file() {
|
||||
@@ -236,11 +213,7 @@ export default class StatusPanelPrintstatusPrinting extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get eta() {
|
||||
return this.$store.getters['printer/getEstimatedTimeETA']
|
||||
}
|
||||
|
||||
get outputEta() {
|
||||
return this.eta ? this.formatDateTime(this.eta) : '--'
|
||||
return this.$store.getters['printer/getEstimatedTimeETAFormat']
|
||||
}
|
||||
|
||||
get filament_diameter() {
|
||||
@@ -265,7 +238,7 @@ export default class StatusPanelPrintstatusPrinting extends Mixins(BaseMixin) {
|
||||
: this.filament_used.toFixed(2) + ' mm'
|
||||
}
|
||||
|
||||
formatTime(seconds: number) {
|
||||
formatDuration(seconds: number) {
|
||||
let h = Math.floor(seconds / 3600)
|
||||
seconds %= 3600
|
||||
let m = ('0' + Math.floor(seconds / 60)).slice(-2)
|
||||
@@ -273,14 +246,5 @@ export default class StatusPanelPrintstatusPrinting extends Mixins(BaseMixin) {
|
||||
|
||||
return h + ':' + m + ':' + s
|
||||
}
|
||||
|
||||
formatDateTime(msec: number) {
|
||||
const date = new Date(msec)
|
||||
const h = date.getHours() >= 10 ? date.getHours() : '0' + date.getHours()
|
||||
const m = date.getMinutes() >= 10 ? date.getMinutes() : '0' + date.getMinutes()
|
||||
|
||||
const diff = msec - new Date().getTime()
|
||||
return h + ':' + m + (diff > 60 * 60 * 24 * 1000 ? '+' + Math.round(diff / (60 * 60 * 24 * 1000)) : '')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,5 +1,3 @@
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<min-settings-panel></min-settings-panel>
|
||||
@@ -36,11 +34,29 @@
|
||||
<span>{{ button.text }}</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-menu v-if="multiFunctionButton" left offset-y :close-on-content-click="false" class="pa-0">
|
||||
<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-for="(entry, index) in multiFunctionMenuButtonsFiltered"
|
||||
:key="'multiFunction_' + index">
|
||||
<v-btn small style="width: 100%" @click="entry.click()">
|
||||
<v-icon left small>{{ entry.icon }}</v-icon>
|
||||
{{ entry.text }}
|
||||
</v-btn>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</template>
|
||||
<status-panel-printstatus-thumbnail></status-panel-printstatus-thumbnail>
|
||||
<status-panel-exclude-object
|
||||
:show-dialog.sync="boolShowObjects"
|
||||
@update:showDialog="updateShowDialog"></status-panel-exclude-object>
|
||||
<status-panel-pause-at-layer-dialog :show-dialog.sync="boolShowPauseAtLayer" />
|
||||
<template v-if="display_message || print_stats_message">
|
||||
<v-container>
|
||||
<v-row>
|
||||
@@ -65,7 +81,7 @@
|
||||
<v-tab href="#jobqueue">{{ $t('Panels.StatusPanel.Jobqueue', { count: jobsCount }) }}</v-tab>
|
||||
</v-tabs>
|
||||
<v-divider class="my-0"></v-divider>
|
||||
<v-tabs-items v-model="activeTab">
|
||||
<v-tabs-items v-model="activeTab" class="_border-radius">
|
||||
<v-tab-item v-if="current_filename" value="status">
|
||||
<status-panel-printstatus></status-panel-printstatus>
|
||||
</v-tab-item>
|
||||
@@ -91,6 +107,7 @@ import StatusPanelGcodefiles from '@/components/panels/Status/Gcodefiles.vue'
|
||||
import StatusPanelJobqueue from '@/components/panels/Status/Jobqueue.vue'
|
||||
import StatusPanelExcludeObject from '@/components/panels/Status/ExcludeObject.vue'
|
||||
import StatusPanelPrintstatusThumbnail from '@/components/panels/Status/PrintstatusThumbnail.vue'
|
||||
import StatusPanelPauseAtLayerDialog from '@/components/panels/Status/PauseAtLayerDialog.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import {
|
||||
mdiBroom,
|
||||
@@ -102,6 +119,8 @@ import {
|
||||
mdiStop,
|
||||
mdiMessageProcessingOutline,
|
||||
mdiCloseCircle,
|
||||
mdiLayersPlus,
|
||||
mdiDotsVertical,
|
||||
} from '@mdi/js'
|
||||
|
||||
@Component({
|
||||
@@ -114,14 +133,17 @@ import {
|
||||
StatusPanelJobqueue,
|
||||
StatusPanelPrintstatus,
|
||||
StatusPanelPrintstatusThumbnail,
|
||||
StatusPanelPauseAtLayerDialog,
|
||||
},
|
||||
})
|
||||
export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
mdiInformation = mdiInformation
|
||||
mdiMessageProcessingOutline = mdiMessageProcessingOutline
|
||||
mdiCloseCircle = mdiCloseCircle
|
||||
mdiDotsVertical = mdiDotsVertical
|
||||
|
||||
private boolShowObjects = false
|
||||
private boolShowPauseAtLayer = false
|
||||
|
||||
declare $refs: {
|
||||
bigThumbnail: any
|
||||
@@ -135,7 +157,7 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get jobsCount() {
|
||||
return this.jobs?.length ?? 0
|
||||
return this.$store.getters['server/jobQueue/getJobsCount'] ?? 0
|
||||
}
|
||||
|
||||
get current_filename() {
|
||||
@@ -175,7 +197,7 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
color: 'warning',
|
||||
icon: mdiPause,
|
||||
loadingName: 'statusPrintPause',
|
||||
status: ['printing'],
|
||||
status: () => ['printing'].includes(this.printer_state),
|
||||
click: this.btnPauseJob,
|
||||
},
|
||||
{
|
||||
@@ -183,7 +205,7 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
color: 'success',
|
||||
icon: mdiPlay,
|
||||
loadingName: 'statusPrintResume',
|
||||
status: ['paused'],
|
||||
status: () => ['paused'].includes(this.printer_state),
|
||||
click: this.btnResumeJob,
|
||||
},
|
||||
{
|
||||
@@ -191,15 +213,36 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
color: 'error',
|
||||
icon: mdiStop,
|
||||
loadingName: 'statusPrintCancel',
|
||||
status: this.$store.state.gui.uiSettings.displayCancelPrint ? ['paused', 'printing'] : ['paused'],
|
||||
status: () => {
|
||||
if (this.$store.state.gui.uiSettings.displayCancelPrint)
|
||||
return ['paused', 'printing'].includes(this.printer_state)
|
||||
|
||||
return ['paused'].includes(this.printer_state)
|
||||
},
|
||||
click: this.btnCancelJob,
|
||||
},
|
||||
{
|
||||
text: this.$t('Panels.StatusPanel.ExcludeObject.ExcludeObject'),
|
||||
color: 'warning',
|
||||
icon: mdiSelectionRemove,
|
||||
loadingName: '',
|
||||
status: this.printing_objects.length ? ['paused', 'printing'] : [],
|
||||
loadingName: 'excludeObjectButton',
|
||||
status: () => {
|
||||
if (this.multiFunctionButton || this.printing_objects.length < 2) return false
|
||||
|
||||
return ['paused', 'printing'].includes(this.printer_state)
|
||||
},
|
||||
click: this.btnExcludeObject,
|
||||
},
|
||||
{
|
||||
text: this.$t('Panels.StatusPanel.PauseAtLayer.PauseAtLayer'),
|
||||
color: 'warning',
|
||||
icon: mdiLayersPlus,
|
||||
loadingName: 'pauseAtLayer',
|
||||
status: () => {
|
||||
if (this.multiFunctionButton || this.layer_count === null) return false
|
||||
|
||||
return ['paused', 'printing'].includes(this.printer_state)
|
||||
},
|
||||
click: this.btnExcludeObject,
|
||||
},
|
||||
{
|
||||
@@ -207,7 +250,7 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
color: 'primary',
|
||||
icon: mdiBroom,
|
||||
loadingName: 'statusPrintClear',
|
||||
status: ['error', 'complete', 'cancelled'],
|
||||
status: () => ['error', 'complete', 'cancelled'].includes(this.printer_state),
|
||||
click: this.btnClearJob,
|
||||
},
|
||||
{
|
||||
@@ -215,16 +258,14 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
color: 'primary',
|
||||
icon: mdiPrinter,
|
||||
loadingName: 'statusPrintReprint',
|
||||
status: ['error', 'complete', 'cancelled'],
|
||||
status: () => ['error', 'complete', 'cancelled'].includes(this.printer_state),
|
||||
click: this.btnReprintJob,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
get filteredToolbarButtons() {
|
||||
return this.toolbarButtons.filter((button) => {
|
||||
return button.status.includes(this.printer_state)
|
||||
})
|
||||
return this.toolbarButtons.filter((button) => button.status())
|
||||
}
|
||||
|
||||
get printing_objects() {
|
||||
@@ -239,6 +280,41 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
return this.$store.state.printer.print_stats?.message ?? ''
|
||||
}
|
||||
|
||||
get layer_count() {
|
||||
return this.$store.state.printer.print_stats?.info?.total_layer ?? null
|
||||
}
|
||||
|
||||
get multiFunctionMenuButtons() {
|
||||
return [
|
||||
{
|
||||
text: this.$t('Panels.StatusPanel.ExcludeObject.ExcludeObject'),
|
||||
loadingName: 'excludeObjectButton',
|
||||
icon: mdiSelectionRemove,
|
||||
status: () => this.printing_objects.length > 1,
|
||||
disabled: () => ['paused', 'printing'].includes(this.printer_state),
|
||||
click: this.btnExcludeObject,
|
||||
},
|
||||
{
|
||||
text: this.$t('Panels.StatusPanel.PauseAtLayer.PauseAtLayer'),
|
||||
loadingName: 'pauseAtLayer',
|
||||
icon: mdiLayersPlus,
|
||||
status: () => this.layer_count !== null,
|
||||
disabled: () => ['paused', 'printing'].includes(this.printer_state),
|
||||
click: this.btnPauseAtLayer,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
get multiFunctionMenuButtonsFiltered() {
|
||||
return this.multiFunctionMenuButtons.filter((button) => button.status)
|
||||
}
|
||||
|
||||
get multiFunctionButton() {
|
||||
if (!['paused', 'printing'].includes(this.printer_state)) return false
|
||||
|
||||
return this.multiFunctionMenuButtonsFiltered.length > 1
|
||||
}
|
||||
|
||||
mounted() {
|
||||
if (this.current_filename !== '') this.activeTab = 'status'
|
||||
}
|
||||
@@ -271,6 +347,10 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
this.boolShowObjects = true
|
||||
}
|
||||
|
||||
btnPauseAtLayer() {
|
||||
this.boolShowPauseAtLayer = true
|
||||
}
|
||||
|
||||
btnCancelJob() {
|
||||
this.$socket.emit('printer.print.cancel', {}, { loading: 'statusPrintCancel' })
|
||||
}
|
||||
@@ -284,3 +364,10 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
._border-radius {
|
||||
border-bottom-left-radius: inherit;
|
||||
border-bottom-right-radius: inherit;
|
||||
}
|
||||
</style>
|
||||
@@ -81,7 +81,7 @@
|
||||
<v-card-text class="pa-0">
|
||||
<responsive
|
||||
:breakpoints="{
|
||||
mobile: (el) => el.width <= 390,
|
||||
mobile: (el) => el.width <= 395,
|
||||
}">
|
||||
<template #default="{ el }">
|
||||
<v-simple-table class="temperature-panel-table">
|
||||
@@ -120,9 +120,9 @@
|
||||
<td v-if="!el.is.mobile" class="state">
|
||||
<v-tooltip v-if="object.state !== null" top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<small v-bind="attrs" v-on="on">
|
||||
<div v-bind="attrs" v-on="on">
|
||||
{{ object.state }}
|
||||
</small>
|
||||
</div>
|
||||
</template>
|
||||
<span>{{ $t('Panels.TemperaturePanel.Avg') }}: {{ object.avgState }}</span>
|
||||
</v-tooltip>
|
||||
@@ -149,7 +149,7 @@
|
||||
{{ object.measured_min_temp }}°C
|
||||
</span>
|
||||
</v-tooltip>
|
||||
<div v-for="(values, key) of object.additionSensors" :key="key">
|
||||
<div v-for="(values, key) of object.additionalSensors" :key="key">
|
||||
<span v-if="values.bool" class="d-block">
|
||||
<small>{{ values.value }} {{ values.unit }}</small>
|
||||
</span>
|
||||
@@ -211,14 +211,14 @@
|
||||
@change="setVisible(dataset)"></v-checkbox>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-for="key in Object.keys(editHeater.additionSensors)" :key="key">
|
||||
<v-row v-for="additionalSensor in editHeater.additionalSensors" :key="additionalSensor.name">
|
||||
<v-col class="col-12 py-1">
|
||||
<v-checkbox
|
||||
v-model="editHeater.additionSensors[key]['bool']"
|
||||
:label="$t('Panels.TemperaturePanel.ShowNameInList', { name: key })"
|
||||
v-model="additionalSensor.bool"
|
||||
:label="$t('Panels.TemperaturePanel.ShowNameInList', { name: additionalSensor.name })"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@change="setVisibleAdditionalSensor(key)"></v-checkbox>
|
||||
@change="setVisibleAdditionalSensor(additionalSensor)"></v-checkbox>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
@@ -243,7 +243,7 @@ import { Mixins } from 'vue-property-decorator'
|
||||
import { capitalize, convertName } from '@/plugins/helpers'
|
||||
import { Debounce } from 'vue-debounce-decorator'
|
||||
import { GuiPresetsStatePreset } from '@/store/gui/presets/types'
|
||||
import { PrinterStateTemperatureObject } from '@/store/printer/types'
|
||||
import { PrinterStateAdditionalSensor, PrinterStateTemperatureObject } from '@/store/printer/types'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import ControlMixin from '@/components/mixins/control'
|
||||
import TempChart from '@/components/charts/TempChart.vue'
|
||||
@@ -274,7 +274,7 @@ export default class TemperaturePanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
boolTarget: false,
|
||||
boolPower: false,
|
||||
boolSpeed: false,
|
||||
additionSensors: {},
|
||||
additionalSensors: {},
|
||||
color: '',
|
||||
}
|
||||
|
||||
@@ -303,7 +303,9 @@ export default class TemperaturePanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
}
|
||||
|
||||
get temperatureObjects() {
|
||||
return this.$store.getters['printer/getTemperatureObjects'] ?? []
|
||||
const sensors = this.$store.getters['printer/getTemperatureObjects'] ?? []
|
||||
|
||||
return sensors.filter((sensor: PrinterStateTemperatureObject) => !sensor.name.startsWith('_'))
|
||||
}
|
||||
|
||||
preheat(preset: GuiPresetsStatePreset): void {
|
||||
@@ -347,7 +349,7 @@ export default class TemperaturePanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
this.editHeater.boolTarget = this.$store.getters['gui/getDatasetValue']({ name: object.name, type: 'target' })
|
||||
this.editHeater.boolPower = this.$store.getters['gui/getDatasetValue']({ name: object.name, type: 'power' })
|
||||
this.editHeater.boolSpeed = this.$store.getters['gui/getDatasetValue']({ name: object.name, type: 'speed' })
|
||||
this.editHeater.additionSensors = object.additionSensors
|
||||
this.editHeater.additionalSensors = object.additionalSensors
|
||||
|
||||
this.editHeater.bool = true
|
||||
}
|
||||
@@ -360,9 +362,9 @@ export default class TemperaturePanel extends Mixins(BaseMixin, ControlMixin) {
|
||||
this.$store.dispatch('gui/saveSetting', { name, value })
|
||||
}
|
||||
|
||||
setVisibleAdditionalSensor(sensor: string): void {
|
||||
const name = 'view.tempchart.datasetSettings.' + this.editHeater.name + '.additionalSensors.' + sensor
|
||||
this.$store.dispatch('gui/saveSetting', { name, value: this.editHeater.additionSensors[sensor].bool })
|
||||
setVisibleAdditionalSensor(sensor: PrinterStateAdditionalSensor): void {
|
||||
const name = 'view.tempchart.datasetSettings.' + this.editHeater.name + '.additionalSensors.' + sensor.name
|
||||
this.$store.dispatch('gui/saveSetting', { name, value: sensor.bool })
|
||||
}
|
||||
|
||||
@Debounce(500)
|
||||
|
||||
@@ -32,6 +32,15 @@
|
||||
dense
|
||||
style="max-width: 300px"></v-text-field>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
v-if="selectedFiles.length"
|
||||
:title="$t('Timelapse.Download')"
|
||||
color="primary"
|
||||
class="px-2 minwidth-0 ml-3"
|
||||
:loading="loadings.includes('timelapseDownloadZip')"
|
||||
@click="downloadSelectedFiles">
|
||||
<v-icon>{{ mdiCloudDownload }}</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
v-if="selectedFiles.length"
|
||||
:title="$t('Timelapse.Delete')"
|
||||
@@ -181,7 +190,7 @@
|
||||
{{ item.isDirectory ? '--' : formatFilesize(item.size) }}
|
||||
</td>
|
||||
<td v-if="headers.find((header) => header.value === 'modified').visible" class="text-right">
|
||||
{{ formatDate(item.modified) }}
|
||||
{{ formatDateTime(item.modified) }}
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -237,12 +246,16 @@
|
||||
v-model="dialogRenameFile.newName"
|
||||
:label="$t('Timelapse.Name')"
|
||||
required
|
||||
:rules="nameInputRules"
|
||||
@update:error="isInvalidName = !isInvalidName"
|
||||
@keypress.enter="renameFileAction"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogRenameFile.show = false">{{ $t('Timelapse.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="renameFileAction">{{ $t('Timelapse.Rename') }}</v-btn>
|
||||
<v-btn :disabled="isInvalidName" color="primary" text @click="renameFileAction">
|
||||
{{ $t('Timelapse.Rename') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
@@ -261,8 +274,9 @@
|
||||
ref="inputFieldCreateDirectory"
|
||||
v-model="dialogCreateDirectory.name"
|
||||
:label="$t('Timelapse.Name')"
|
||||
:rules="input_rules"
|
||||
required
|
||||
:rules="nameInputRules"
|
||||
@update:error="isInvalidName = !isInvalidName"
|
||||
@keypress.enter="createDirectoryAction"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
@@ -270,7 +284,9 @@
|
||||
<v-btn color="" text @click="dialogCreateDirectory.show = false">
|
||||
{{ $t('Timelapse.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text @click="createDirectoryAction">{{ $t('Timelapse.Create') }}</v-btn>
|
||||
<v-btn :disabled="isInvalidName" color="primary" text @click="createDirectoryAction">
|
||||
{{ $t('Timelapse.Create') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
@@ -290,6 +306,8 @@
|
||||
v-model="dialogRenameDirectory.newName"
|
||||
:label="$t('Timelapse.Name')"
|
||||
required
|
||||
:rules="nameInputRules"
|
||||
@update:error="isInvalidName = !isInvalidName"
|
||||
@keyup.enter="renameDirectoryAction"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
@@ -297,7 +315,9 @@
|
||||
<v-btn color="" text @click="dialogRenameDirectory.show = false">
|
||||
{{ $t('Timelapse.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text @click="renameDirectoryAction">{{ $t('Timelapse.Rename') }}</v-btn>
|
||||
<v-btn :disabled="isInvalidName" color="primary" text @click="renameDirectoryAction">
|
||||
{{ $t('Timelapse.Rename') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
@@ -385,7 +405,7 @@
|
||||
<script lang="ts">
|
||||
import { Component, Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { formatFilesize, formatDate, sortFiles } from '@/plugins/helpers'
|
||||
import { formatFilesize, sortFiles } from '@/plugins/helpers'
|
||||
import { FileStateFile, FileStateGcodefile } from '@/store/files/types'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import {
|
||||
@@ -414,7 +434,6 @@ interface dialogRenameObject {
|
||||
components: { Panel },
|
||||
})
|
||||
export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
|
||||
formatDate = formatDate
|
||||
formatFilesize = formatFilesize
|
||||
sortFiles = sortFiles
|
||||
|
||||
@@ -496,7 +515,15 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
|
||||
|
||||
private deleteSelectedDialog = false
|
||||
|
||||
private input_rules = [(value: string) => value.indexOf(' ') === -1 || 'Name contains spaces!']
|
||||
private isInvalidName = true
|
||||
private nameInputRules = [
|
||||
(value: string) => !!value || this.$t('Files.InvalidNameEmpty'),
|
||||
(value: string) => !this.existsFilename(value) || this.$t('Files.InvalidNameAlreadyExists'),
|
||||
]
|
||||
|
||||
existsFilename(name: string) {
|
||||
return this.files.findIndex((file) => file.filename === name) >= 0
|
||||
}
|
||||
|
||||
get headers() {
|
||||
return [
|
||||
@@ -593,14 +620,15 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
createDirectoryAction() {
|
||||
if (this.dialogCreateDirectory.name.length && this.dialogCreateDirectory.name.indexOf(' ') === -1) {
|
||||
this.dialogCreateDirectory.show = false
|
||||
this.$socket.emit(
|
||||
'server.files.post_directory',
|
||||
{ path: this.currentPath + '/' + this.dialogCreateDirectory.name },
|
||||
{ action: 'files/getCreateDir' }
|
||||
)
|
||||
}
|
||||
this.dialogCreateDirectory.show = false
|
||||
|
||||
this.$socket.emit(
|
||||
'server.files.post_directory',
|
||||
{
|
||||
path: this.currentPath + '/' + this.dialogCreateDirectory.name,
|
||||
},
|
||||
{ action: 'files/getCreateDir' }
|
||||
)
|
||||
}
|
||||
|
||||
refreshFileList() {
|
||||
@@ -673,6 +701,46 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
|
||||
window.open(href)
|
||||
}
|
||||
|
||||
async downloadSelectedFiles() {
|
||||
let items: string[] = []
|
||||
|
||||
const addElementToItems = async (absolutPath: string, directory: FileStateFile[]) => {
|
||||
for (const file of directory) {
|
||||
const filePath = `${absolutPath}/${file.filename}`
|
||||
|
||||
if (file.isDirectory && file.childrens) {
|
||||
await addElementToItems(filePath, file.childrens)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
items.push(filePath)
|
||||
|
||||
if (file.filename.endsWith('.mp4')) {
|
||||
const indexLastPoint = file.filename.lastIndexOf('.')
|
||||
const filenameWithoutExtension = file.filename.slice(0, indexLastPoint)
|
||||
const filenamePng = `${filenameWithoutExtension}.jpg`
|
||||
|
||||
if (this.files.indexOf((file: FileStateFile) => file.filename === filenamePng) !== -1) {
|
||||
items.push(`${absolutPath}/${filenamePng}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await addElementToItems(this.currentPath, this.selectedFiles)
|
||||
const date = new Date()
|
||||
const timestamp = `${date.getFullYear()}${date.getMonth()}${date.getDay()}-${date.getHours()}${date.getMinutes()}${date.getSeconds()}`
|
||||
|
||||
this.$socket.emit(
|
||||
'server.files.zip',
|
||||
{ items, dest: `timelapse/timelapse-${timestamp}.zip` },
|
||||
{ action: 'files/downloadZip', loading: 'timelapseDownloadZip' }
|
||||
)
|
||||
|
||||
this.selectedFiles = []
|
||||
}
|
||||
|
||||
renameFile(item: FileStateFile) {
|
||||
const posLastPoint = item.filename.lastIndexOf('.')
|
||||
this.dialogRenameFile.newName = item.filename.slice(0, posLastPoint)
|
||||
|
||||
@@ -18,16 +18,19 @@
|
||||
<v-col>
|
||||
<vue-load-image>
|
||||
<img
|
||||
ref="timelapsePreview"
|
||||
slot="image"
|
||||
:src="frameUrl"
|
||||
:alt="$t('Timelapse.Preview')"
|
||||
class="w-100"
|
||||
:style="webcamStyle" />
|
||||
<v-progress-circular
|
||||
slot="preloader"
|
||||
indeterminate
|
||||
color="primary"></v-progress-circular>
|
||||
<v-icon slot="error">{{ mdiFile }}</v-icon>
|
||||
:style="webcamStyle"
|
||||
@load="calcRatio" />
|
||||
<div slot="preloader">
|
||||
<v-progress-circular indeterminate color="primary"></v-progress-circular>
|
||||
</div>
|
||||
<div slot="error">
|
||||
<v-icon>{{ mdiFile }}</v-icon>
|
||||
</div>
|
||||
</vue-load-image>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -39,22 +42,24 @@
|
||||
align-self="center">
|
||||
<v-card-text :class="framesCount ? 'pt-0' : ''">
|
||||
<template v-if="framesCount > 0">
|
||||
<settings-row :title="$t('Timelapse.Frames')">
|
||||
<settings-row :title="$t('Timelapse.Frames').toString()">
|
||||
{{ framesCount }}
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Timelapse.EstimatedLength')" :dynamic-slot-width="true">
|
||||
<settings-row
|
||||
:title="$t('Timelapse.EstimatedLength').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
{{ estimatedVideoLength }}
|
||||
</settings-row>
|
||||
</template>
|
||||
<template v-if="['printing', 'paused'].includes(printer_state)">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Timelapse.Enabled')" :dynamic-slot-width="true">
|
||||
<settings-row :title="$t('Timelapse.Enabled').toString()" :dynamic-slot-width="true">
|
||||
<v-switch v-model="enabled" hide-details class="mt-0"></v-switch>
|
||||
</settings-row>
|
||||
<template v-if="enabled">
|
||||
<v-divider v-if="framesCount > 0" class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Timelapse.Autorender')" :dynamic-slot-width="true">
|
||||
<settings-row :title="$t('Timelapse.Autorender').toString()" :dynamic-slot-width="true">
|
||||
<v-switch v-model="autorender" hide-details class="mt-0"></v-switch>
|
||||
</settings-row>
|
||||
</template>
|
||||
@@ -91,7 +96,7 @@
|
||||
</v-card>
|
||||
<v-dialog v-model="boolDialogRendersettings" :max-width="700" :max-height="500">
|
||||
<panel
|
||||
:title="$t('Timelapse.RenderSettings')"
|
||||
:title="$t('Timelapse.RenderSettings').toString()"
|
||||
:icon="mdiTextBoxSearchOutline"
|
||||
card-class="timelapse-rendersettings-dialog"
|
||||
:margin-bottom="false">
|
||||
@@ -109,8 +114,7 @@
|
||||
:items="framerateTypeOptions"
|
||||
outlined
|
||||
dense
|
||||
hide-details
|
||||
attach></v-select>
|
||||
hide-details></v-select>
|
||||
</v-col>
|
||||
<v-col class="col-4">
|
||||
<template v-if="variable_fps">
|
||||
@@ -197,16 +201,22 @@ import { Component, Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { mdiFile, mdiInformation, mdiTextBoxSearchOutline } from '@mdi/js'
|
||||
import { mdiFile, mdiInformation, mdiTextBoxSearchOutline, mdiCloseThick } from '@mdi/js'
|
||||
@Component({
|
||||
components: { Panel, SettingsRow },
|
||||
})
|
||||
export default class TimelapseStatusPanel extends Mixins(BaseMixin) {
|
||||
mdiInformation = mdiInformation
|
||||
mdiFile = mdiFile
|
||||
mdiCloseThick = mdiCloseThick
|
||||
mdiTextBoxSearchOutline = mdiTextBoxSearchOutline
|
||||
|
||||
private boolDialogRendersettings = false
|
||||
private scale = 1
|
||||
|
||||
declare $refs: {
|
||||
timelapsePreview: HTMLImageElement
|
||||
}
|
||||
|
||||
get frameUrl() {
|
||||
const frame = this.$store.state.server.timelapse?.lastFrame?.file ?? null
|
||||
@@ -308,12 +318,12 @@ export default class TimelapseStatusPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get estimatedVideoLength() {
|
||||
let seconds = 0
|
||||
let seconds = Math.round((this.framesCount + this.duplicatelastframe) / this.output_framerate)
|
||||
|
||||
if (this.variable_fps) {
|
||||
seconds = Math.round((this.framesCount + this.duplicatelastframe) / this.variableTargetFps)
|
||||
if (seconds < this.targetlength) seconds = this.targetlength
|
||||
} else seconds = Math.round((this.framesCount + this.duplicatelastframe) / this.output_framerate)
|
||||
}
|
||||
|
||||
return seconds > 60
|
||||
? Math.floor(seconds / 60) + 'm ' + (seconds - Math.floor(seconds / 60) * 60) + 's'
|
||||
@@ -341,14 +351,14 @@ export default class TimelapseStatusPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get webcamStyle() {
|
||||
if (this.camSettings === undefined) return ''
|
||||
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(' ') }
|
||||
|
||||
let transforms = ''
|
||||
if ('flipX' in this.camSettings && this.camSettings.flipX) transforms += ' scaleX(-1)'
|
||||
if ('flipX' in this.camSettings && this.camSettings.flipY) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimLeft().length) return { transform: transforms.trimLeft() }
|
||||
|
||||
return ''
|
||||
return {}
|
||||
}
|
||||
|
||||
startRender() {
|
||||
@@ -360,5 +370,14 @@ export default class TimelapseStatusPanel extends Mixins(BaseMixin) {
|
||||
saveFrames() {
|
||||
this.$socket.emit('machine.timelapse.saveframes', {}, { loading: 'timelapse_saveframes' })
|
||||
}
|
||||
|
||||
calcRatio() {
|
||||
if (this.$refs.timelapsePreview) {
|
||||
this.scale = this.$refs.timelapsePreview.naturalHeight / this.$refs.timelapsePreview.naturalWidth
|
||||
if (this.scale > 1) {
|
||||
this.scale = this.$refs.timelapsePreview.naturalWidth / this.$refs.timelapsePreview.naturalHeight
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,114 +1,7 @@
|
||||
<style lang="scss" scoped>
|
||||
svg {
|
||||
max-height: 350px;
|
||||
min-height: 275px;
|
||||
user-select: none;
|
||||
filter: drop-shadow(0px 10px 10px rgba(0, 0, 0, 0.3));
|
||||
}
|
||||
|
||||
svg a {
|
||||
stroke: hsl(0, 0%, 10%);
|
||||
stroke-width: 0.3px;
|
||||
}
|
||||
|
||||
svg a.step {
|
||||
transition: fill 750ms ease-out;
|
||||
}
|
||||
|
||||
svg a.step:hover {
|
||||
fill: hsl(215, 0%, 50%) !important;
|
||||
transition: fill 100ms ease-in;
|
||||
}
|
||||
|
||||
svg a.step:active {
|
||||
fill: hsl(215, 0%, 70%) !important;
|
||||
}
|
||||
|
||||
svg a.step.inner {
|
||||
fill: #666;
|
||||
}
|
||||
svg a.step.inner-mid {
|
||||
fill: #555;
|
||||
}
|
||||
svg a.step.outer-mid {
|
||||
fill: #444;
|
||||
}
|
||||
svg a.step.outer {
|
||||
fill: #333;
|
||||
}
|
||||
|
||||
svg g#stepsZ,
|
||||
svg g#stepsXY {
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
font-family: 'Roboto-Regular', 'Roboto', sans-serif;
|
||||
font-size: 3px;
|
||||
fill: white;
|
||||
}
|
||||
|
||||
svg a#tilt_adjust text {
|
||||
font-family: 'Roboto-Regular', 'Roboto', sans-serif;
|
||||
font-size: 3px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
svg g#home_buttons text {
|
||||
font-family: 'Roboto-Regular', 'Roboto', sans-serif;
|
||||
font-size: 5px;
|
||||
fill: black;
|
||||
}
|
||||
|
||||
svg g.home_button,
|
||||
svg a#home_all_center {
|
||||
fill: var(--color-warning);
|
||||
transition: opacity 250ms;
|
||||
}
|
||||
|
||||
svg a#tilt_adjust,
|
||||
svg a#stepper_off {
|
||||
transition: opacity 250ms;
|
||||
}
|
||||
|
||||
svg a#tilt_adjust.warning,
|
||||
svg a#stepper_off.warning {
|
||||
fill: var(--color-warning);
|
||||
}
|
||||
|
||||
svg a#tilt_adjust.primary,
|
||||
svg a#stepper_off.primary {
|
||||
fill: var(--color-primary);
|
||||
}
|
||||
|
||||
svg g.home_button.homed,
|
||||
svg a#home_all_center.homed {
|
||||
fill: var(--color-primary);
|
||||
}
|
||||
|
||||
svg g.home_button:hover,
|
||||
svg a#home_all_center:hover,
|
||||
svg a#tilt_adjust:hover,
|
||||
svg a#stepper_off:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
svg a#tilt_adjust text,
|
||||
svg a#tilt_adjust #tilt_icon,
|
||||
svg a#stepper_off #stepper_off_icon,
|
||||
svg g#home_buttons .home-icon {
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
svg a#tilt_adjust #tilt_icon,
|
||||
svg a#stepper_off #stepper_off_icon {
|
||||
fill: #000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<v-row>
|
||||
<v-col class="pa-0">
|
||||
<v-col class="pa-0 mt-1">
|
||||
<svg
|
||||
width="100%"
|
||||
height="100%"
|
||||
@@ -120,13 +13,13 @@ svg a#stepper_off #stepper_off_icon {
|
||||
<rect x="0" y="0" width="62" height="62" style="fill: none" />
|
||||
<g id="home_buttons" transform="matrix(0.804902,0,0,1,0.0430241,0)">
|
||||
<!-- HOME X BUTTON -->
|
||||
<a @click="doHomeX">
|
||||
<a :class="xHomeClass" @click="doHomeX">
|
||||
<g
|
||||
id="home_x"
|
||||
transform="matrix(0.707107,-0.707107,0.707107,0.707107,-1.41799,4.05689)">
|
||||
<g
|
||||
id="home_button_x"
|
||||
:class="'home_button' + (homedAxes.includes('x') ? ' homed' : '')"
|
||||
class="home_button"
|
||||
transform="matrix(0.68689,0.68689,-0.68689,0.68689,3.87132,0.962447)">
|
||||
<path :d="pathHomeButtonTop" />
|
||||
</g>
|
||||
@@ -135,20 +28,20 @@ svg a#stepper_off #stepper_off_icon {
|
||||
</g>
|
||||
<g
|
||||
id="Icon"
|
||||
class="home-icon"
|
||||
class="home_icon"
|
||||
transform="matrix(0.147059,0,0,0.147059,2.10662,2.08254)">
|
||||
<path :d="homeIcon" style="fill-rule: nonzero" />
|
||||
</g>
|
||||
</g>
|
||||
</a>
|
||||
<!-- HOME Y BUTTON -->
|
||||
<a @click="doHomeY">
|
||||
<a :class="yHomeClass" @click="doHomeY">
|
||||
<g
|
||||
id="home_y"
|
||||
transform="matrix(0.707107,0.707107,-0.707107,0.707107,57.8807,-1.41799)">
|
||||
<g
|
||||
id="home_button_y"
|
||||
:class="'home_button' + (homedAxes.includes('y') ? ' homed' : '')"
|
||||
class="home_button"
|
||||
transform="matrix(0.68689,0.68689,-0.68689,0.68689,3.87132,0.962447)">
|
||||
<path :d="pathHomeButtonTop" />
|
||||
</g>
|
||||
@@ -157,20 +50,20 @@ svg a#stepper_off #stepper_off_icon {
|
||||
</g>
|
||||
<g
|
||||
id="icon"
|
||||
class="home-icon"
|
||||
class="home_icon"
|
||||
transform="matrix(0.147059,0,0,0.147059,2.10662,2.08254)">
|
||||
<path :d="homeIcon" style="fill-rule: nonzero" />
|
||||
</g>
|
||||
</g>
|
||||
</a>
|
||||
<!-- HOME Z BUTTON -->
|
||||
<a @click="doHomeZ">
|
||||
<a :class="zHomeClass" @click="doHomeZ">
|
||||
<g
|
||||
id="home_z"
|
||||
transform="matrix(-0.707107,0.707107,-0.707107,-0.707107,63.3555,57.8807)">
|
||||
<g
|
||||
id="home_button_z"
|
||||
:class="'home_button ' + (homedAxes.includes('z') ? ' homed' : '')"
|
||||
class="home_button"
|
||||
transform="matrix(0.68689,0.68689,-0.68689,0.68689,3.87132,0.962447)">
|
||||
<path :d="pathHomeButtonBottom" />
|
||||
</g>
|
||||
@@ -179,20 +72,20 @@ svg a#stepper_off #stepper_off_icon {
|
||||
</g>
|
||||
<g
|
||||
id="icon1"
|
||||
class="home-icon"
|
||||
class="home_icon"
|
||||
transform="matrix(0.147059,0,0,0.147059,2.10662,2.08254)">
|
||||
<path :d="homeIcon" style="fill-rule: nonzero" />
|
||||
</g>
|
||||
</g>
|
||||
</a>
|
||||
<!-- HOME XY BUTTON -->
|
||||
<a v-if="enableXYHoming" @click="doHomeXY">
|
||||
<a v-if="enableXYHoming" :class="xyHomeClass" @click="doHomeXY">
|
||||
<g
|
||||
id="home_xy"
|
||||
transform="matrix(-0.707107,-0.707107,0.707107,-0.707107,4.05689,63.3555)">
|
||||
<g
|
||||
id="home_button_xy"
|
||||
:class="'home_button' + (homedAxes.includes('xy') ? ' homed' : '')"
|
||||
class="home_button"
|
||||
transform="matrix(0.68689,0.68689,-0.68689,0.68689,3.87132,0.962447)">
|
||||
<path :d="pathHomeButtonBottom" />
|
||||
</g>
|
||||
@@ -201,35 +94,34 @@ svg a#stepper_off #stepper_off_icon {
|
||||
</g>
|
||||
<g
|
||||
id="icon2"
|
||||
class="home-icon"
|
||||
class="home_icon"
|
||||
transform="matrix(0.147059,0,0,0.147059,2.10662,2.08254)">
|
||||
<path :d="homeIcon" style="fill-rule: nonzero" />
|
||||
</g>
|
||||
</g>
|
||||
</a>
|
||||
<!-- HOME ALL BUTTON -->
|
||||
<a v-if="!enableXYHoming" @click="doHome">
|
||||
<a v-else :class="xyzHomeClass" @click="doHome">
|
||||
<g
|
||||
id="home_all"
|
||||
transform="matrix(-0.707107,-0.707107,0.707107,-0.707107,4.05689,63.3555)">
|
||||
<g
|
||||
id="home_button_all"
|
||||
:class="'home_button' + (homedAxes.includes('xyz') ? ' homed' : '')"
|
||||
class="home_button"
|
||||
transform="matrix(0.68689,0.68689,-0.68689,0.68689,3.87132,0.962447)">
|
||||
<path :d="pathHomeButtonBottom" />
|
||||
</g>
|
||||
<g
|
||||
id="icon3"
|
||||
class="home-icon"
|
||||
class="home_icon"
|
||||
transform="matrix(0.29377,0,0,0.29377,0.346087,1.64241)">
|
||||
<path :d="homeIcon" style="fill-rule: nonzero" />
|
||||
</g>
|
||||
</g>
|
||||
</a>
|
||||
<a v-if="enableXYHoming" @click="doHome">
|
||||
<g
|
||||
id="home_all_center"
|
||||
:class="'home_button' + (homedAxes.includes('xyz') ? ' homed' : '')">
|
||||
<!-- HOME ALL BUTTON IN THE CENTER -->
|
||||
<a v-if="enableXYHoming" :class="xyzHomeClass" @click="doHome">
|
||||
<g id="home_all_center" class="home_button">
|
||||
<circle id="home_button_all_center" cx="31" cy="31" r="5" />
|
||||
</g>
|
||||
<g id="icon4" class="home-icon" transform="scale(0.3) translate(91.25,91.25)">
|
||||
@@ -241,7 +133,10 @@ svg a#stepper_off #stepper_off_icon {
|
||||
<g id="step_buttons" transform="matrix(0.804902,0,0,1,0.0430241,0)">
|
||||
<!-- Z STEPS BUTTONS -->
|
||||
<g id="Z" transform="matrix(1.24239,0,0,1,-0.0534526,0)">
|
||||
<g id="Bottom" transform="matrix(-1,-1.52149e-16,9.85721e-17,-1,114.34,62)">
|
||||
<g
|
||||
id="Bottom"
|
||||
:class="zStepClass"
|
||||
transform="matrix(-1,-1.52149e-16,9.85721e-17,-1,114.34,62)">
|
||||
<a
|
||||
class="step inner"
|
||||
@click="
|
||||
@@ -290,7 +185,7 @@ svg a#stepper_off #stepper_off_icon {
|
||||
</g>
|
||||
</a>
|
||||
</g>
|
||||
<g id="Top">
|
||||
<g id="Top" :class="zStepClass">
|
||||
<a
|
||||
class="step inner"
|
||||
@click="
|
||||
@@ -343,7 +238,7 @@ svg a#stepper_off #stepper_off_icon {
|
||||
</g>
|
||||
</g>
|
||||
<!-- Z STEP BUTTON TEXT -->
|
||||
<g id="stepsZ" transform="matrix(1,0,0,1,40,0)">
|
||||
<g id="stepsZ" :class="zStepClass" transform="matrix(1,0,0,1,40,0)">
|
||||
<g transform="matrix(1,0,0,1,0.483899,4.07983)">
|
||||
<text x="30.7px" y="19.056px" text-anchor="middle">
|
||||
{{ stepsZ.length >= 0 ? stepsZ[0] : '--' }}
|
||||
@@ -367,7 +262,7 @@ svg a#stepper_off #stepper_off_icon {
|
||||
</g>
|
||||
<!-- XY STEP BUTTONS -->
|
||||
<g id="XY">
|
||||
<g id="Right">
|
||||
<g id="Right" :class="xStepClass">
|
||||
<a
|
||||
class="step inner"
|
||||
@click="
|
||||
@@ -417,7 +312,10 @@ svg a#stepper_off #stepper_off_icon {
|
||||
</g>
|
||||
</a>
|
||||
</g>
|
||||
<g id="Left" transform="matrix(-1,-1.22465e-16,1.22465e-16,-1,61.9767,61.9767)">
|
||||
<g
|
||||
id="Left"
|
||||
:class="xStepClass"
|
||||
transform="matrix(-1,-1.22465e-16,1.22465e-16,-1,61.9767,61.9767)">
|
||||
<a
|
||||
class="step inner"
|
||||
@click="
|
||||
@@ -467,7 +365,10 @@ svg a#stepper_off #stepper_off_icon {
|
||||
</g>
|
||||
</a>
|
||||
</g>
|
||||
<g id="Bottom1" transform="matrix(6.12323e-17,1,-1,6.12323e-17,61.9767,-1.77705e-14)">
|
||||
<g
|
||||
id="Bottom1"
|
||||
:class="yStepClass"
|
||||
transform="matrix(6.12323e-17,1,-1,6.12323e-17,61.9767,-1.77705e-14)">
|
||||
<a
|
||||
class="step inner"
|
||||
@click="
|
||||
@@ -517,7 +418,10 @@ svg a#stepper_off #stepper_off_icon {
|
||||
</g>
|
||||
</a>
|
||||
</g>
|
||||
<g id="Top1" transform="matrix(6.12323e-17,-1,1,6.12323e-17,7.10543e-15,61.9767)">
|
||||
<g
|
||||
id="Top1"
|
||||
:class="yStepClass"
|
||||
transform="matrix(6.12323e-17,-1,1,6.12323e-17,7.10543e-15,61.9767)">
|
||||
<a
|
||||
class="step inner"
|
||||
@click="
|
||||
@@ -569,7 +473,7 @@ svg a#stepper_off #stepper_off_icon {
|
||||
</g>
|
||||
</g>
|
||||
<!-- XY STEP BUTTON TEXT -->
|
||||
<g id="stepsXY">
|
||||
<g id="stepsXY" :class="stepTextClass">
|
||||
<g transform="matrix(1,0,0,1,0.483899,4.07983)">
|
||||
<text x="30.5px" y="19.056px" text-anchor="middle">
|
||||
{{ stepsXY.length >= 0 ? stepsXY[0] : '--' }}
|
||||
@@ -617,7 +521,7 @@ svg a#stepper_off #stepper_off_icon {
|
||||
<path :d="zTiltIcon2" />
|
||||
</g>
|
||||
</a>
|
||||
<a v-else id="stepper_off" :class="homedAxes !== '' ? 'primary' : 'warning'" @click="doSend('M84')">
|
||||
<a v-else id="stepper_off" :class="motorsOffClass" @click="doSend('M84')">
|
||||
<circle id="stepper_off_button" cx="70.92" cy="31" r="5" />
|
||||
<g id="stepper_off_icon" transform="scale(0.3) translate(224,91)">
|
||||
<path :d="engineOffIcon" />
|
||||
@@ -710,10 +614,89 @@ export default class CircleControl extends Mixins(BaseMixin, ControlMixin) {
|
||||
return Array.from(new Set([...(steps ?? [])])).sort((a, b) => a - b)
|
||||
}
|
||||
|
||||
get isPrinting() {
|
||||
return ['printing'].includes(this.printer_state)
|
||||
}
|
||||
|
||||
get stepTextClass() {
|
||||
if (!this.homedAxes.includes('xy') || this.isPrinting) return ['disabled']
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
get xStepClass() {
|
||||
if (!this.homedAxes.includes('x') || this.isPrinting) return ['disabled']
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
get yStepClass() {
|
||||
if (!this.homedAxes.includes('y') || this.isPrinting) return ['disabled']
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
get zStepClass() {
|
||||
if (!this.homedAxes.includes('z') || this.isPrinting) return ['disabled']
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
get xHomeClass() {
|
||||
let classes = []
|
||||
if (this.homedAxes.includes('x')) classes.push('homed')
|
||||
if (this.isPrinting) classes.push('disabled')
|
||||
|
||||
return classes
|
||||
}
|
||||
|
||||
get yHomeClass() {
|
||||
let classes = []
|
||||
if (this.homedAxes.includes('y')) classes.push('homed')
|
||||
if (this.isPrinting) classes.push('disabled')
|
||||
|
||||
return classes
|
||||
}
|
||||
|
||||
get xyHomeClass() {
|
||||
let classes = []
|
||||
if (this.homedAxes.includes('xy')) classes.push('homed')
|
||||
if (this.isPrinting) classes.push('disabled')
|
||||
|
||||
return classes
|
||||
}
|
||||
|
||||
get xyzHomeClass() {
|
||||
let classes = []
|
||||
if (this.homedAxes.includes('xyz')) classes.push('homed')
|
||||
if (this.isPrinting) classes.push('disabled')
|
||||
|
||||
return classes
|
||||
}
|
||||
|
||||
get zHomeClass() {
|
||||
let classes = []
|
||||
if (this.homedAxes.includes('z')) classes.push('homed')
|
||||
if (this.isPrinting) classes.push('disabled')
|
||||
|
||||
return classes
|
||||
}
|
||||
|
||||
get colorSpecialButton() {
|
||||
if (this.existsQGL) return this.colorQuadGantryLevel
|
||||
else if (this.existsZtilt) return this.colorZTilt
|
||||
else return 'warning'
|
||||
let classes = []
|
||||
if (this.isPrinting) classes.push('disabled')
|
||||
if (this.existsQGL) classes.push(this.colorQuadGantryLevel)
|
||||
else if (this.existsZtilt) classes.push(this.colorZTilt)
|
||||
|
||||
return classes
|
||||
}
|
||||
|
||||
get motorsOffClass() {
|
||||
let classes = []
|
||||
classes.push(this.homedAxes !== '' ? 'primary' : 'warning')
|
||||
if (this.isPrinting) classes.push('disabled')
|
||||
|
||||
return classes
|
||||
}
|
||||
|
||||
clickSpecialButton() {
|
||||
@@ -722,3 +705,128 @@ export default class CircleControl extends Mixins(BaseMixin, ControlMixin) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
svg {
|
||||
max-height: 350px;
|
||||
min-height: 275px;
|
||||
user-select: none;
|
||||
filter: drop-shadow(0px 10px 10px rgba(0, 0, 0, 0.3));
|
||||
}
|
||||
|
||||
svg a {
|
||||
stroke: hsl(0, 0%, 10%);
|
||||
stroke-width: 0.3px;
|
||||
}
|
||||
|
||||
svg a.step {
|
||||
transition: fill 750ms ease-out;
|
||||
}
|
||||
|
||||
svg a.step:hover {
|
||||
fill: hsl(215, 0%, 50%) !important;
|
||||
transition: fill 100ms ease-in;
|
||||
}
|
||||
|
||||
svg a.step:active {
|
||||
fill: hsl(215, 0%, 70%) !important;
|
||||
}
|
||||
|
||||
svg a.step.inner {
|
||||
fill: #666;
|
||||
}
|
||||
svg a.step.inner-mid {
|
||||
fill: #555;
|
||||
}
|
||||
svg a.step.outer-mid {
|
||||
fill: #444;
|
||||
}
|
||||
svg a.step.outer {
|
||||
fill: #333;
|
||||
}
|
||||
|
||||
svg .disabled a.step {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
svg g#stepsZ,
|
||||
svg g#stepsXY {
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
font-family: 'Roboto-Regular', 'Roboto', sans-serif;
|
||||
font-size: 3px;
|
||||
fill: white;
|
||||
}
|
||||
|
||||
svg a#tilt_adjust text {
|
||||
font-family: 'Roboto-Regular', 'Roboto', sans-serif;
|
||||
font-size: 3px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
svg g#home_buttons text {
|
||||
font-family: 'Roboto-Regular', 'Roboto', sans-serif;
|
||||
font-size: 5px;
|
||||
fill: black;
|
||||
}
|
||||
|
||||
svg g.home_button,
|
||||
svg a#home_all_center {
|
||||
fill: var(--color-warning);
|
||||
transition: opacity 250ms;
|
||||
}
|
||||
|
||||
svg a.disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
svg a.disabled .home_button path,
|
||||
svg a.disabled circle {
|
||||
fill: rgb(92, 92, 92);
|
||||
}
|
||||
|
||||
svg g#stepsXY.disabled text,
|
||||
svg g#stepsZ.disabled text {
|
||||
fill: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
svg a#tilt_adjust,
|
||||
svg a#stepper_off {
|
||||
transition: opacity 250ms;
|
||||
}
|
||||
|
||||
svg a#tilt_adjust.warning,
|
||||
svg a#stepper_off.warning {
|
||||
fill: var(--color-warning);
|
||||
}
|
||||
|
||||
svg a#tilt_adjust.primary,
|
||||
svg a#stepper_off.primary {
|
||||
fill: var(--color-primary);
|
||||
}
|
||||
|
||||
svg .homed g.home_button,
|
||||
svg .homed a#home_all_center {
|
||||
fill: var(--color-primary);
|
||||
}
|
||||
|
||||
svg g.home_button:hover,
|
||||
svg a#home_all_center:hover,
|
||||
svg a#tilt_adjust:hover,
|
||||
svg a#stepper_off:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
svg a#tilt_adjust text,
|
||||
svg a#tilt_adjust #tilt_icon,
|
||||
svg a#stepper_off #stepper_off_icon,
|
||||
svg g#home_buttons .home_icon {
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
svg a#tilt_adjust #tilt_icon,
|
||||
svg a#stepper_off #stepper_off_icon {
|
||||
fill: #000;
|
||||
}
|
||||
</style>
|
||||
@@ -6,7 +6,8 @@
|
||||
:icon="mdiWebcam"
|
||||
:title="$t('Panels.WebcamPanel.Headline')"
|
||||
:collapsible="$route.fullPath !== '/cam'"
|
||||
card-class="webcam-panel">
|
||||
card-class="webcam-panel"
|
||||
:margin-bottom="currentPage !== 'page'">
|
||||
<template v-if="webcams.length > 1" #buttons>
|
||||
<v-menu :offset-y="true" title="Webcam">
|
||||
<template #activator="{ on, attrs }">
|
||||
@@ -56,6 +57,9 @@
|
||||
<template v-else-if="currentCam.service === 'ipstream'">
|
||||
<webcam-ipstreamer :cam-settings="currentCam"></webcam-ipstreamer>
|
||||
</template>
|
||||
<template v-else-if="currentCam.service === 'hlsstream'">
|
||||
<webcam-hlsstreamer :cam-settings="currentCam"></webcam-hlsstreamer>
|
||||
</template>
|
||||
<template v-else>
|
||||
<p class="text-center py-3 font-italic">{{ $t('Panels.WebcamPanel.UnknownWebcamService') }}</p>
|
||||
</template>
|
||||
@@ -72,6 +76,7 @@
|
||||
import Mjpegstreamer from '@/components/webcams/Mjpegstreamer.vue'
|
||||
import MjpegstreamerAdaptive from '@/components/webcams/MjpegstreamerAdaptive.vue'
|
||||
import Ipstreamer from '@/components/webcams/Ipstreamer.vue'
|
||||
import Hlsstreamer from '@/components/webcams/Hlsstreamer.vue'
|
||||
import Uv4lMjpeg from '@/components/webcams/Uv4lMjpeg.vue'
|
||||
import WebcamGrid from '@/components/webcams/WebcamGrid.vue'
|
||||
import Component from 'vue-class-component'
|
||||
@@ -88,6 +93,7 @@ import WebcamMixin from '@/components/mixins/webcam'
|
||||
'webcam-mjpegstreamer': Mjpegstreamer,
|
||||
'webcam-mjpegstreamer-adaptive': MjpegstreamerAdaptive,
|
||||
'webcam-ipstreamer': Ipstreamer,
|
||||
'webcam-hlsstreamer': Hlsstreamer,
|
||||
'webcam-uv4l-mjpeg': Uv4lMjpeg,
|
||||
'webcam-grid': WebcamGrid,
|
||||
},
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col class="col-12 col-md-6">
|
||||
<settings-dashboard-sortable viewport-name="desktop" :column="1" />
|
||||
</v-col>
|
||||
<v-col class="col-12 col-md-6">
|
||||
<settings-dashboard-sortable viewport-name="desktop" :column="2" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="error" @click="resetLayout">{{ $t('Settings.DashboardTab.ResetLayout') }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import DashboardMixin from '@/components/mixins/dashboard'
|
||||
import SettingsDashboardSortable from '@/components/settings/Dashboard/Sortable.vue'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
SettingsDashboardSortable,
|
||||
},
|
||||
})
|
||||
export default class SettingsDashboardTabDesktop extends Mixins(DashboardMixin) {
|
||||
resetLayout() {
|
||||
this.$store.dispatch('gui/resetLayout', 'desktopLayout1')
|
||||
this.$store.dispatch('gui/resetLayout', 'desktopLayout2')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<settings-dashboard-sortable viewport-name="mobile" :column="0" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="error" @click="resetLayout">{{ $t('Settings.DashboardTab.ResetLayout') }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import DashboardMixin from '@/components/mixins/dashboard'
|
||||
import SettingsDashboardSortable from '@/components/settings/Dashboard/Sortable.vue'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
SettingsDashboardSortable,
|
||||
},
|
||||
})
|
||||
export default class SettingsDashboardTabMobile extends Mixins(DashboardMixin) {
|
||||
resetLayout() {
|
||||
this.$store.dispatch('gui/resetLayout', 'mobileLayout')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<v-card class="mx-auto fill-height" max-width="300" tile>
|
||||
<v-list class="fill-height" dense>
|
||||
<v-list-item v-if="column < 2">
|
||||
<v-row>
|
||||
<v-col class="col-auto pr-0 pl-8">
|
||||
<v-icon>{{ mdiInformation }}</v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ $t('Panels.StatusPanel.Headline') }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-0">
|
||||
<v-icon color="grey lighten-1">{{ mdiLock }}</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
<draggable
|
||||
v-model="layout"
|
||||
handle=".handle"
|
||||
class="v-list-item-group fill-height"
|
||||
ghost-class="ghost"
|
||||
:group="groupname">
|
||||
<transition-group>
|
||||
<settings-dashboard-sortable-item
|
||||
v-for="element in layout"
|
||||
:key="`item-${element.name}`"
|
||||
:name="element.name"
|
||||
:visible="element.visible"
|
||||
@change-visible="changeVisible" />
|
||||
</transition-group>
|
||||
</draggable>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins, Prop } from 'vue-property-decorator'
|
||||
import draggable from 'vuedraggable'
|
||||
import { mdiInformation, mdiLock } from '@mdi/js'
|
||||
import DashboardMixin from '@/components/mixins/dashboard'
|
||||
import SettingsDashboardSortableItem from '@/components/settings/Dashboard/SortableItem.vue'
|
||||
|
||||
@Component({
|
||||
components: { SettingsDashboardSortableItem, draggable },
|
||||
})
|
||||
export default class SettingsDashboardSortable extends Mixins(DashboardMixin) {
|
||||
/**
|
||||
* Icons
|
||||
*/
|
||||
mdiInformation = mdiInformation
|
||||
mdiLock = mdiLock
|
||||
|
||||
@Prop({ type: String, required: true }) declare readonly viewportName: string
|
||||
@Prop({ type: Number, required: false, default: 1 }) declare readonly column: number
|
||||
|
||||
get layoutname() {
|
||||
if (this.column) return `${this.viewportName}Layout${this.column}`
|
||||
|
||||
return `${this.viewportName}Layout`
|
||||
}
|
||||
|
||||
get groupname() {
|
||||
return `${this.viewportName}Viewport`
|
||||
}
|
||||
|
||||
get layout() {
|
||||
return this.$store.getters['gui/getPanels'](this.viewportName, this.column)
|
||||
}
|
||||
|
||||
set layout(newVal) {
|
||||
newVal = newVal.filter((element: any) => element !== undefined)
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: `dashboard.${this.layoutname}`, value: newVal })
|
||||
}
|
||||
|
||||
changeVisible(name: string, newVal: boolean) {
|
||||
const index = this.layout.findIndex((element: any) => element.name === name)
|
||||
if (index !== -1) {
|
||||
this.layout[index].visible = newVal
|
||||
this.$store.dispatch('gui/saveSetting', {
|
||||
name: `dashboard.${this.layoutname}`,
|
||||
value: this.layout,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/deep/ .ghost {
|
||||
opacity: 0.5;
|
||||
background: #c8ebfb;
|
||||
}
|
||||
|
||||
.v-list-item-group > span {
|
||||
display: block;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<v-list-item>
|
||||
<v-row>
|
||||
<v-col class="col-auto px-0">
|
||||
<v-icon class="handle pr-2">{{ mdiDragVertical }}</v-icon>
|
||||
<v-icon>{{ icon }}</v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ panelname }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-2">
|
||||
<v-icon
|
||||
:color="checkboxColor"
|
||||
@click.stop="$emit('change-visible', name, !visible)"
|
||||
v-html="checkboxIcon" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins, Prop } from 'vue-property-decorator'
|
||||
import draggable from 'vuedraggable'
|
||||
import { mdiCheckboxBlankOutline, mdiCheckboxMarked, mdiDragVertical, mdiInformation } from '@mdi/js'
|
||||
import DashboardMixin from '@/components/mixins/dashboard'
|
||||
|
||||
@Component({
|
||||
components: { draggable },
|
||||
})
|
||||
export default class SettingsDashboardSortableItem extends Mixins(DashboardMixin) {
|
||||
/**
|
||||
* Icons
|
||||
*/
|
||||
mdiInformation = mdiInformation
|
||||
mdiDragVertical = mdiDragVertical
|
||||
|
||||
@Prop({ type: String, required: true }) declare readonly name: string
|
||||
@Prop({ type: Boolean, required: true }) declare readonly visible: boolean
|
||||
|
||||
get panelname() {
|
||||
return this.getPanelName(this.name)
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return this.convertPanelnameToIcon(this.name)
|
||||
}
|
||||
|
||||
get checkboxColor() {
|
||||
if (this.visible) return 'primary'
|
||||
|
||||
return 'grey lighten-1'
|
||||
}
|
||||
|
||||
get checkboxIcon() {
|
||||
if (this.visible) return mdiCheckboxMarked
|
||||
|
||||
return mdiCheckboxBlankOutline
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.handle {
|
||||
cursor: move;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col class="col-12 col-md-6">
|
||||
<settings-dashboard-sortable viewport-name="tablet" :column="1" />
|
||||
</v-col>
|
||||
<v-col class="col-12 col-md-6">
|
||||
<settings-dashboard-sortable viewport-name="tablet" :column="2" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="error" @click="resetLayout">{{ $t('Settings.DashboardTab.ResetLayout') }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import DashboardMixin from '@/components/mixins/dashboard'
|
||||
import SettingsDashboardSortable from '@/components/settings/Dashboard/Sortable.vue'
|
||||
@Component({
|
||||
components: {
|
||||
SettingsDashboardSortable,
|
||||
},
|
||||
})
|
||||
export default class SettingsDashboardTabTablet extends Mixins(DashboardMixin) {
|
||||
resetLayout() {
|
||||
this.$store.dispatch('gui/resetLayout', 'tabletLayout1')
|
||||
this.$store.dispatch('gui/resetLayout', 'tabletLayout2')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col class="col-12 col-md-4">
|
||||
<settings-dashboard-sortable viewport-name="widescreen" :column="1" />
|
||||
</v-col>
|
||||
<v-col class="col-12 col-md-4">
|
||||
<settings-dashboard-sortable viewport-name="widescreen" :column="2" />
|
||||
</v-col>
|
||||
<v-col class="col-12 col-md-4">
|
||||
<settings-dashboard-sortable viewport-name="widescreen" :column="3" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="error" @click="resetLayout">{{ $t('Settings.DashboardTab.ResetLayout') }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import DashboardMixin from '@/components/mixins/dashboard'
|
||||
import SettingsDashboardSortable from '@/components/settings/Dashboard/Sortable.vue'
|
||||
@Component({
|
||||
components: {
|
||||
SettingsDashboardSortable,
|
||||
},
|
||||
})
|
||||
export default class SettingsDashboardTabWidescreen extends Mixins(DashboardMixin) {
|
||||
resetLayout() {
|
||||
this.$store.dispatch('gui/resetLayout', 'widescreenLayout1')
|
||||
this.$store.dispatch('gui/resetLayout', 'widescreenLayout2')
|
||||
this.$store.dispatch('gui/resetLayout', 'widescreenLayout3')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -1,4 +1,8 @@
|
||||
<style scoped></style>
|
||||
<style scoped>
|
||||
.dashboard-rows-container /deep/ .v-list-item-group {
|
||||
min-height: 80px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-card flat>
|
||||
@@ -33,7 +37,7 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-col class="dashboard-rows-container">
|
||||
<component :is="currentTab"></component>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -45,16 +49,14 @@
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import draggable from 'vuedraggable'
|
||||
import SettingsDashboardTabMobile from '@/components/settings/SettingsDashboardTabMobile.vue'
|
||||
import SettingsDashboardTabTablet from '@/components/settings/SettingsDashboardTabTablet.vue'
|
||||
import SettingsDashboardTabDesktop from '@/components/settings/SettingsDashboardTabDesktop.vue'
|
||||
import SettingsDashboardTabWidescreen from '@/components/settings/SettingsDashboardTabWidescreen.vue'
|
||||
import SettingsDashboardTabMobile from '@/components/settings/Dashboard/Mobile.vue'
|
||||
import SettingsDashboardTabTablet from '@/components/settings/Dashboard/Tablet.vue'
|
||||
import SettingsDashboardTabDesktop from '@/components/settings/Dashboard/Desktop.vue'
|
||||
import SettingsDashboardTabWidescreen from '@/components/settings/Dashboard/Widescreen.vue'
|
||||
import { mdiCellphone, mdiMonitorScreenshot, mdiMonitorDashboard, mdiTablet } from '@mdi/js'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
draggable,
|
||||
SettingsDashboardTabMobile,
|
||||
SettingsDashboardTabTablet,
|
||||
SettingsDashboardTabDesktop,
|
||||
|
||||
@@ -1,192 +0,0 @@
|
||||
<template>
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col class="col-12 col-md-6">
|
||||
<v-card class="mx-auto" max-width="300" tile>
|
||||
<v-list dense>
|
||||
<v-list-item>
|
||||
<v-row>
|
||||
<v-col class="col-auto pr-0 pl-8">
|
||||
<v-icon>{{ mdiInformation }}</v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ $t('Panels.StatusPanel.Headline') }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-0">
|
||||
<v-icon color="grey lighten-1">{{ mdiLock }}</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
<draggable
|
||||
v-model="desktopLayout1"
|
||||
handle=".handle"
|
||||
class="v-list-item-group"
|
||||
ghost-class="ghost"
|
||||
group="desktopViewport">
|
||||
<template v-for="element in desktopLayout1">
|
||||
<v-list-item :key="'item-desktop-' + element.name">
|
||||
<v-row class="d-flex align-center">
|
||||
<v-col class="col-auto px-0">
|
||||
<v-icon class="handle pr-2">{{ mdiDragVertical }}</v-icon>
|
||||
<v-icon v-text="convertPanelnameToIcon(element.name)"></v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ getPanelName(element.name) }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-2">
|
||||
<v-icon
|
||||
v-if="!element.visible"
|
||||
color="grey lighten-1"
|
||||
@click.stop="changeState1(element.name, true)">
|
||||
{{ mdiCheckboxBlankOutline }}
|
||||
</v-icon>
|
||||
<v-icon
|
||||
v-else
|
||||
color="primary"
|
||||
@click.stop="changeState1(element.name, false)">
|
||||
{{ mdiCheckboxMarked }}
|
||||
</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</draggable>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col class="col-12 col-md-6">
|
||||
<v-card class="mx-auto" max-width="300" tile>
|
||||
<v-list dense>
|
||||
<draggable
|
||||
v-model="desktopLayout2"
|
||||
handle=".handle"
|
||||
class="v-list-item-group"
|
||||
ghost-class="ghost"
|
||||
group="desktopViewport">
|
||||
<template v-for="element in desktopLayout2">
|
||||
<v-list-item :key="'item-desktop-' + element.name">
|
||||
<v-row class="d-flex align-center">
|
||||
<v-col class="col-auto px-0">
|
||||
<v-icon class="handle pr-2">{{ mdiDragVertical }}</v-icon>
|
||||
<v-icon v-text="convertPanelnameToIcon(element.name)"></v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ getPanelName(element.name) }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-2">
|
||||
<v-icon
|
||||
v-if="!element.visible"
|
||||
color="grey lighten-1"
|
||||
@click.stop="changeState2(element.name, true)">
|
||||
{{ mdiCheckboxBlankOutline }}
|
||||
</v-icon>
|
||||
<v-icon
|
||||
v-else
|
||||
color="primary"
|
||||
@click.stop="changeState2(element.name, false)">
|
||||
{{ mdiCheckboxMarked }}
|
||||
</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</draggable>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="error" @click="resetLayout">{{ $t('Settings.DashboardTab.ResetLayout') }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import draggable from 'vuedraggable'
|
||||
import { convertPanelnameToIcon } from '@/plugins/helpers'
|
||||
import DashboardMixin from '@/components/mixins/dashboard'
|
||||
import { mdiInformation, mdiCheckboxMarked, mdiCheckboxBlankOutline, mdiLock, mdiDragVertical } from '@mdi/js'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
draggable,
|
||||
},
|
||||
})
|
||||
export default class SettingsDashboardTabDesktop extends Mixins(DashboardMixin) {
|
||||
/**
|
||||
* Icons
|
||||
*/
|
||||
mdiLock = mdiLock
|
||||
mdiInformation = mdiInformation
|
||||
mdiDragVertical = mdiDragVertical
|
||||
mdiCheckboxMarked = mdiCheckboxMarked
|
||||
mdiCheckboxBlankOutline = mdiCheckboxBlankOutline
|
||||
|
||||
convertPanelnameToIcon = convertPanelnameToIcon
|
||||
|
||||
get desktopLayout1() {
|
||||
let panels = this.$store.getters['gui/getPanels']('desktopLayout1')
|
||||
panels = panels.concat(this.missingPanelsDesktop)
|
||||
panels = panels.filter((element: any) => this.allPossiblePanels.includes(element.name))
|
||||
|
||||
return panels
|
||||
}
|
||||
|
||||
set desktopLayout1(newVal) {
|
||||
newVal = newVal.filter((element: any) => element !== undefined)
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.desktopLayout1', value: newVal })
|
||||
}
|
||||
|
||||
get desktopLayout2() {
|
||||
let panels = this.$store.getters['gui/getPanels']('desktopLayout2')
|
||||
panels = panels.filter((element: any) => this.allPossiblePanels.includes(element.name))
|
||||
|
||||
return panels
|
||||
}
|
||||
|
||||
set desktopLayout2(newVal) {
|
||||
newVal = newVal.filter((element: any) => element !== undefined)
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.desktopLayout2', value: newVal })
|
||||
}
|
||||
|
||||
changeState1(name: string, newVal: boolean) {
|
||||
const index = this.desktopLayout1.findIndex((element: any) => element.name === name)
|
||||
if (index !== -1) {
|
||||
this.desktopLayout1[index].visible = newVal
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.desktopLayout1', value: this.desktopLayout1 })
|
||||
}
|
||||
}
|
||||
|
||||
changeState2(name: string, newVal: boolean) {
|
||||
const index = this.desktopLayout2.findIndex((element: any) => element.name === name)
|
||||
if (index !== -1) {
|
||||
this.desktopLayout2[index].visible = newVal
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.desktopLayout2', value: this.desktopLayout2 })
|
||||
}
|
||||
}
|
||||
|
||||
resetLayout() {
|
||||
this.$store.dispatch('gui/resetLayout', 'desktopLayout1')
|
||||
this.$store.dispatch('gui/resetLayout', 'desktopLayout2')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ghost {
|
||||
opacity: 0.5;
|
||||
background: #c8ebfb;
|
||||
}
|
||||
|
||||
.handle {
|
||||
cursor: move;
|
||||
}
|
||||
</style>
|
||||
@@ -1,129 +0,0 @@
|
||||
<template>
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-card class="mx-auto" max-width="300" tile>
|
||||
<v-list dense>
|
||||
<v-list-item>
|
||||
<v-row>
|
||||
<v-col class="col-auto pr-0 pl-8">
|
||||
<v-icon>{{ mdiInformation }}</v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ $t('Panels.StatusPanel.Headline') }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-0">
|
||||
<v-icon color="grey lighten-1">{{ mdiLock }}</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
<draggable
|
||||
v-model="mobileLayout"
|
||||
handle=".handle"
|
||||
class="v-list-item-group"
|
||||
ghost-class="ghost"
|
||||
group="mobileViewport">
|
||||
<template v-for="element in mobileLayout">
|
||||
<v-list-item :key="'item-mobile-' + element.name">
|
||||
<v-row class="d-flex align-center">
|
||||
<v-col class="col-auto px-0">
|
||||
<v-icon class="handle pr-2">{{ mdiDragVertical }}</v-icon>
|
||||
<v-icon v-text="convertPanelnameToIcon(element.name)"></v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ getPanelName(element.name) }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-2">
|
||||
<v-icon
|
||||
v-if="!element.visible"
|
||||
color="grey lighten-1"
|
||||
@click.stop="changeState(element.name, true)">
|
||||
{{ mdiCheckboxBlankOutline }}
|
||||
</v-icon>
|
||||
<v-icon
|
||||
v-else
|
||||
color="primary"
|
||||
@click.stop="changeState(element.name, false)">
|
||||
{{ mdiCheckboxMarked }}
|
||||
</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</draggable>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="error" @click="resetLayout">{{ $t('Settings.DashboardTab.ResetLayout') }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import DashboardMixin from '@/components/mixins/dashboard'
|
||||
import draggable from 'vuedraggable'
|
||||
import { convertPanelnameToIcon } from '@/plugins/helpers'
|
||||
import { mdiDragVertical, mdiCheckboxBlankOutline, mdiCheckboxMarked, mdiInformation, mdiLock } from '@mdi/js'
|
||||
@Component({
|
||||
components: {
|
||||
draggable,
|
||||
},
|
||||
})
|
||||
export default class SettingsDashboardTabMobile extends Mixins(DashboardMixin) {
|
||||
/**
|
||||
* Icons
|
||||
*/
|
||||
mdiLock = mdiLock
|
||||
mdiInformation = mdiInformation
|
||||
mdiDragVertical = mdiDragVertical
|
||||
mdiCheckboxMarked = mdiCheckboxMarked
|
||||
mdiCheckboxBlankOutline = mdiCheckboxBlankOutline
|
||||
|
||||
convertPanelnameToIcon = convertPanelnameToIcon
|
||||
|
||||
get mobileLayout() {
|
||||
let panels = this.$store.getters['gui/getPanels']('mobileLayout')
|
||||
panels = panels.concat(this.missingPanelsMobile)
|
||||
panels = panels.filter((element: any) => this.allPossiblePanels.includes(element.name))
|
||||
|
||||
return panels
|
||||
}
|
||||
|
||||
set mobileLayout(newVal) {
|
||||
newVal = newVal.filter((element: any) => element !== undefined)
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.mobileLayout', value: newVal })
|
||||
}
|
||||
|
||||
changeState(name: string, newVal: boolean) {
|
||||
const index = this.mobileLayout.findIndex((element: any) => element.name === name)
|
||||
if (index !== -1) {
|
||||
this.mobileLayout[index].visible = newVal
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.mobileLayout', value: this.mobileLayout })
|
||||
}
|
||||
}
|
||||
|
||||
resetLayout() {
|
||||
this.$store.dispatch('gui/resetLayout', 'mobileLayout')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ghost {
|
||||
opacity: 0.5;
|
||||
background: #c8ebfb;
|
||||
}
|
||||
|
||||
.handle {
|
||||
cursor: move;
|
||||
}
|
||||
</style>
|
||||
@@ -1,191 +0,0 @@
|
||||
<template>
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col class="col-12 col-md-6">
|
||||
<v-card class="mx-auto" max-width="300" tile>
|
||||
<v-list dense>
|
||||
<v-list-item>
|
||||
<v-row>
|
||||
<v-col class="col-auto pr-0 pl-8">
|
||||
<v-icon>{{ mdiInformation }}</v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ $t('Panels.StatusPanel.Headline') }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-0">
|
||||
<v-icon color="grey lighten-1">{{ mdiLock }}</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
<draggable
|
||||
v-model="tabletLayout1"
|
||||
handle=".handle"
|
||||
class="v-list-item-group"
|
||||
ghost-class="ghost"
|
||||
group="tabletViewport">
|
||||
<template v-for="element in tabletLayout1">
|
||||
<v-list-item :key="'item-tablet-' + element.name">
|
||||
<v-row class="d-flex align-center">
|
||||
<v-col class="col-auto px-0">
|
||||
<v-icon class="handle pr-2">{{ mdiDragVertical }}</v-icon>
|
||||
<v-icon v-text="convertPanelnameToIcon(element.name)"></v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ getPanelName(element.name) }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-2">
|
||||
<v-icon
|
||||
v-if="!element.visible"
|
||||
color="grey lighten-1"
|
||||
@click.stop="changeState1(element.name, true)">
|
||||
{{ mdiCheckboxBlankOutline }}
|
||||
</v-icon>
|
||||
<v-icon
|
||||
v-else
|
||||
color="primary"
|
||||
@click.stop="changeState1(element.name, false)">
|
||||
{{ mdiCheckboxMarked }}
|
||||
</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</draggable>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col class="col-12 col-md-6">
|
||||
<v-card class="mx-auto" max-width="300" tile>
|
||||
<v-list dense>
|
||||
<draggable
|
||||
v-model="tabletLayout2"
|
||||
handle=".handle"
|
||||
class="v-list-item-group"
|
||||
ghost-class="ghost"
|
||||
group="tabletViewport">
|
||||
<template v-for="element in tabletLayout2">
|
||||
<v-list-item :key="'item-tablet-' + element.name">
|
||||
<v-row class="d-flex align-center">
|
||||
<v-col class="col-auto px-0">
|
||||
<v-icon class="handle pr-2">{{ mdiDragVertical }}</v-icon>
|
||||
<v-icon v-text="convertPanelnameToIcon(element.name)"></v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ getPanelName(element.name) }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-2">
|
||||
<v-icon
|
||||
v-if="!element.visible"
|
||||
color="grey lighten-1"
|
||||
@click.stop="changeState2(element.name, true)">
|
||||
{{ mdiCheckboxBlankOutline }}
|
||||
</v-icon>
|
||||
<v-icon
|
||||
v-else
|
||||
color="primary"
|
||||
@click.stop="changeState2(element.name, false)">
|
||||
{{ mdiCheckboxMarked }}
|
||||
</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</draggable>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="error" @click="resetLayout">{{ $t('Settings.DashboardTab.ResetLayout') }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import DashboardMixin from '@/components/mixins/dashboard'
|
||||
import draggable from 'vuedraggable'
|
||||
import { convertPanelnameToIcon } from '@/plugins/helpers'
|
||||
import { mdiLock, mdiInformation, mdiDragVertical, mdiCheckboxMarked, mdiCheckboxBlankOutline } from '@mdi/js'
|
||||
@Component({
|
||||
components: {
|
||||
draggable,
|
||||
},
|
||||
})
|
||||
export default class SettingsDashboardTabTablet extends Mixins(DashboardMixin) {
|
||||
/**
|
||||
* Icons
|
||||
*/
|
||||
mdiLock = mdiLock
|
||||
mdiInformation = mdiInformation
|
||||
mdiDragVertical = mdiDragVertical
|
||||
mdiCheckboxMarked = mdiCheckboxMarked
|
||||
mdiCheckboxBlankOutline = mdiCheckboxBlankOutline
|
||||
|
||||
convertPanelnameToIcon = convertPanelnameToIcon
|
||||
|
||||
get tabletLayout1() {
|
||||
let panels = this.$store.getters['gui/getPanels']('tabletLayout1')
|
||||
panels = panels.concat(this.missingPanelsTablet)
|
||||
panels = panels.filter((element: any) => this.allPossiblePanels.includes(element.name))
|
||||
|
||||
return panels
|
||||
}
|
||||
|
||||
set tabletLayout1(newVal) {
|
||||
newVal = newVal.filter((element: any) => element !== undefined)
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.tabletLayout1', value: newVal })
|
||||
}
|
||||
|
||||
get tabletLayout2() {
|
||||
let panels = this.$store.getters['gui/getPanels']('tabletLayout2')
|
||||
panels = panels.filter((element: any) => this.allPossiblePanels.includes(element.name))
|
||||
|
||||
return panels
|
||||
}
|
||||
|
||||
set tabletLayout2(newVal) {
|
||||
newVal = newVal.filter((element: any) => element !== undefined)
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.tabletLayout2', value: newVal })
|
||||
}
|
||||
|
||||
changeState1(name: string, newVal: boolean) {
|
||||
const index = this.tabletLayout1.findIndex((element: any) => element.name === name)
|
||||
if (index !== -1) {
|
||||
this.tabletLayout1[index].visible = newVal
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.tabletLayout1', value: this.tabletLayout1 })
|
||||
}
|
||||
}
|
||||
|
||||
changeState2(name: string, newVal: boolean) {
|
||||
const index = this.tabletLayout2.findIndex((element: any) => element.name === name)
|
||||
if (index !== -1) {
|
||||
this.tabletLayout2[index].visible = newVal
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.tabletLayout2', value: this.tabletLayout2 })
|
||||
}
|
||||
}
|
||||
|
||||
resetLayout() {
|
||||
this.$store.dispatch('gui/resetLayout', 'tabletLayout1')
|
||||
this.$store.dispatch('gui/resetLayout', 'tabletLayout2')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ghost {
|
||||
opacity: 0.5;
|
||||
background: #c8ebfb;
|
||||
}
|
||||
|
||||
.handle {
|
||||
cursor: move;
|
||||
}
|
||||
</style>
|
||||
@@ -1,262 +0,0 @@
|
||||
<template>
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col class="col-12 col-md-4">
|
||||
<v-card class="mx-auto" max-width="300" tile>
|
||||
<v-list dense>
|
||||
<v-list-item>
|
||||
<v-row>
|
||||
<v-col class="col-auto pr-0 pl-8">
|
||||
<v-icon>{{ mdiInformation }}</v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ $t('Panels.StatusPanel.Headline') }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-0">
|
||||
<v-icon color="grey lighten-1">{{ mdiLock }}</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
<draggable
|
||||
v-model="widescreenLayout1"
|
||||
handle=".handle"
|
||||
class="v-list-item-group"
|
||||
ghost-class="ghost"
|
||||
group="widescreenViewport">
|
||||
<template v-for="element in widescreenLayout1">
|
||||
<v-list-item :key="'item-widescreen-' + element.name">
|
||||
<v-row>
|
||||
<v-col class="col-auto px-0">
|
||||
<v-icon class="handle pr-2">{{ mdiDragVertical }}</v-icon>
|
||||
<v-icon v-text="convertPanelnameToIcon(element.name)"></v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ getPanelName(element.name) }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-2">
|
||||
<v-icon
|
||||
v-if="!element.visible"
|
||||
color="grey lighten-1"
|
||||
@click.stop="changeState1(element.name, true)">
|
||||
{{ mdiCheckboxBlankOutline }}
|
||||
</v-icon>
|
||||
<v-icon
|
||||
v-else
|
||||
color="primary"
|
||||
@click.stop="changeState1(element.name, false)">
|
||||
{{ mdiCheckboxMarked }}
|
||||
</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</draggable>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col class="col-12 col-md-4">
|
||||
<v-card class="mx-auto" max-width="300" tile>
|
||||
<v-list dense>
|
||||
<draggable
|
||||
v-model="widescreenLayout2"
|
||||
handle=".handle"
|
||||
class="v-list-item-group"
|
||||
ghost-class="ghost"
|
||||
group="widescreenViewport">
|
||||
<template v-for="element in widescreenLayout2">
|
||||
<v-list-item :key="'item-widescreen-' + element.name">
|
||||
<v-row>
|
||||
<v-col class="col-auto px-0">
|
||||
<v-icon class="handle pr-2">{{ mdiDragVertical }}</v-icon>
|
||||
<v-icon v-text="convertPanelnameToIcon(element.name)"></v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ getPanelName(element.name) }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-2">
|
||||
<v-icon
|
||||
v-if="!element.visible"
|
||||
color="grey lighten-1"
|
||||
@click.stop="changeState2(element.name, true)">
|
||||
{{ mdiCheckboxBlankOutline }}
|
||||
</v-icon>
|
||||
<v-icon
|
||||
v-else
|
||||
color="primary"
|
||||
@click.stop="changeState2(element.name, false)">
|
||||
{{ mdiCheckboxMarked }}
|
||||
</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</draggable>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col class="col-12 col-md-4">
|
||||
<v-card class="mx-auto" max-width="300" tile>
|
||||
<v-list dense>
|
||||
<draggable
|
||||
v-model="widescreenLayout3"
|
||||
handle=".handle"
|
||||
class="v-list-item-group"
|
||||
ghost-class="ghost"
|
||||
group="widescreenViewport">
|
||||
<template v-for="element in widescreenLayout3">
|
||||
<v-list-item :key="'item-widescreen-' + element.name">
|
||||
<v-row class="d-flex align-center">
|
||||
<v-col class="col-auto px-0">
|
||||
<v-icon class="handle pr-2">{{ mdiDragVertical }}</v-icon>
|
||||
<v-icon v-text="convertPanelnameToIcon(element.name)"></v-icon>
|
||||
</v-col>
|
||||
<v-col class="pr-0 text-truncate">
|
||||
{{ getPanelName(element.name) }}
|
||||
</v-col>
|
||||
<v-col class="col-auto pl-2">
|
||||
<v-icon
|
||||
v-if="!element.visible"
|
||||
color="grey lighten-1"
|
||||
@click.stop="changeState3(element.name, true)">
|
||||
{{ mdiCheckboxBlankOutline }}
|
||||
</v-icon>
|
||||
<v-icon
|
||||
v-else
|
||||
color="primary"
|
||||
@click.stop="changeState3(element.name, false)">
|
||||
{{ mdiCheckboxMarked }}
|
||||
</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</draggable>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="error" @click="resetLayout">{{ $t('Settings.DashboardTab.ResetLayout') }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import draggable from 'vuedraggable'
|
||||
import { convertPanelnameToIcon } from '@/plugins/helpers'
|
||||
import DashboardMixin from '@/components/mixins/dashboard'
|
||||
import { mdiDragVertical, mdiCheckboxBlankOutline, mdiCheckboxMarked, mdiInformation, mdiLock } from '@mdi/js'
|
||||
@Component({
|
||||
components: {
|
||||
draggable,
|
||||
},
|
||||
})
|
||||
export default class SettingsDashboardTabWidescreen extends Mixins(DashboardMixin) {
|
||||
/**
|
||||
* Icons
|
||||
*/
|
||||
mdiLock = mdiLock
|
||||
mdiInformation = mdiInformation
|
||||
mdiDragVertical = mdiDragVertical
|
||||
mdiCheckboxMarked = mdiCheckboxMarked
|
||||
mdiCheckboxBlankOutline = mdiCheckboxBlankOutline
|
||||
|
||||
convertPanelnameToIcon = convertPanelnameToIcon
|
||||
|
||||
get widescreenLayout1() {
|
||||
let panels = this.$store.getters['gui/getPanels']('widescreenLayout1')
|
||||
panels = panels.concat(this.missingPanelsWidescreen)
|
||||
panels = panels.filter((element: any) => this.allPossiblePanels.includes(element.name))
|
||||
|
||||
return panels
|
||||
}
|
||||
|
||||
set widescreenLayout1(newVal) {
|
||||
newVal = newVal.filter((element: any) => element !== undefined)
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.widescreenLayout1', value: newVal })
|
||||
}
|
||||
|
||||
get widescreenLayout2() {
|
||||
let panels = this.$store.getters['gui/getPanels']('widescreenLayout2')
|
||||
panels = panels.filter((element: any) => this.allPossiblePanels.includes(element.name))
|
||||
|
||||
return panels
|
||||
}
|
||||
|
||||
set widescreenLayout2(newVal) {
|
||||
newVal = newVal.filter((element: any) => element !== undefined)
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.widescreenLayout2', value: newVal })
|
||||
}
|
||||
|
||||
get widescreenLayout3() {
|
||||
let panels = this.$store.getters['gui/getPanels']('widescreenLayout3')
|
||||
panels = panels.filter((element: any) => this.allPossiblePanels.includes(element.name))
|
||||
|
||||
return panels
|
||||
}
|
||||
|
||||
set widescreenLayout3(newVal) {
|
||||
newVal = newVal.filter((element: any) => element !== undefined)
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.widescreenLayout3', value: newVal })
|
||||
}
|
||||
|
||||
changeState1(name: string, newVal: boolean) {
|
||||
const index = this.widescreenLayout1.findIndex((element: any) => element.name === name)
|
||||
if (index !== -1) {
|
||||
this.widescreenLayout1[index].visible = newVal
|
||||
this.$store.dispatch('gui/saveSetting', {
|
||||
name: 'dashboard.widescreenLayout1',
|
||||
value: this.widescreenLayout1,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
changeState2(name: string, newVal: boolean) {
|
||||
const index = this.widescreenLayout2.findIndex((element: any) => element.name === name)
|
||||
if (index !== -1) {
|
||||
this.widescreenLayout2[index].visible = newVal
|
||||
this.$store.dispatch('gui/saveSetting', {
|
||||
name: 'dashboard.widescreenLayout2',
|
||||
value: this.widescreenLayout2,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
changeState3(name: string, newVal: boolean) {
|
||||
const index = this.widescreenLayout3.findIndex((element: any) => element.name === name)
|
||||
if (index !== -1) {
|
||||
this.widescreenLayout3[index].visible = newVal
|
||||
this.$store.dispatch('gui/saveSetting', {
|
||||
name: 'dashboard.widescreenLayout3',
|
||||
value: this.widescreenLayout3,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
resetLayout() {
|
||||
this.$store.dispatch('gui/resetLayout', 'widescreenLayout1')
|
||||
this.$store.dispatch('gui/resetLayout', 'widescreenLayout2')
|
||||
this.$store.dispatch('gui/resetLayout', 'widescreenLayout3')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ghost {
|
||||
opacity: 0.5;
|
||||
background: #c8ebfb;
|
||||
}
|
||||
|
||||
.handle {
|
||||
cursor: move;
|
||||
}
|
||||
</style>
|
||||
@@ -16,6 +16,26 @@
|
||||
attach></v-select>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Settings.GeneralTab.DateFormat').toString()">
|
||||
<v-select
|
||||
v-model="dateFormat"
|
||||
:items="dateFormatItems"
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
attach></v-select>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Settings.GeneralTab.TimeFormat').toString()">
|
||||
<v-select
|
||||
v-model="timeFormat"
|
||||
:items="timeFormatItems"
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
attach></v-select>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row
|
||||
:title="$t('Settings.GeneralTab.CalcPrintProgress').toString()"
|
||||
:sub-title="$t('Settings.GeneralTab.CalcPrintProgressDescription').toString()">
|
||||
@@ -349,8 +369,8 @@ export default class SettingsGeneralTab extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get availableLanguages() {
|
||||
const locales = import.meta.globEager('../../locales/*.json')
|
||||
const languages: any = []
|
||||
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('.'))
|
||||
@@ -364,6 +384,62 @@ export default class SettingsGeneralTab extends Mixins(BaseMixin) {
|
||||
return languages
|
||||
}
|
||||
|
||||
get dateFormat() {
|
||||
return this.$store.state.gui.general.dateFormat
|
||||
}
|
||||
|
||||
set dateFormat(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'general.dateFormat', value: newVal })
|
||||
}
|
||||
|
||||
get dateFormatItems() {
|
||||
const date = new Date()
|
||||
const userLocale =
|
||||
navigator.languages && navigator.languages.length ? navigator.languages[0] : navigator.language
|
||||
|
||||
return [
|
||||
{ value: null, text: `Browser (${date.toLocaleDateString(userLocale, { dateStyle: 'medium' })})` },
|
||||
{
|
||||
value: '2-digits',
|
||||
text: date.toLocaleDateString(userLocale, { day: '2-digit', month: '2-digit', year: 'numeric' }),
|
||||
},
|
||||
{
|
||||
value: 'short',
|
||||
text: date.toLocaleDateString(userLocale, { day: '2-digit', month: 'short', year: 'numeric' }),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
get timeFormat() {
|
||||
return this.$store.state.gui.general.timeFormat
|
||||
}
|
||||
|
||||
set timeFormat(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'general.timeFormat', value: newVal })
|
||||
}
|
||||
|
||||
get timeFormatItems() {
|
||||
const date = new Date()
|
||||
const userLocale =
|
||||
navigator.languages && navigator.languages.length ? navigator.languages[0] : navigator.language
|
||||
|
||||
return [
|
||||
{ value: null, text: `Browser (${date.toLocaleTimeString(userLocale, { timeStyle: 'short' })})` },
|
||||
{
|
||||
value: '24hours',
|
||||
text: this.$t('Settings.GeneralTab.24hours', {
|
||||
time: date.toLocaleTimeString(userLocale, { hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }),
|
||||
}).toString(),
|
||||
},
|
||||
{
|
||||
value: '12hours',
|
||||
text: this.$t('Settings.GeneralTab.12hours', {
|
||||
time: date.toLocaleTimeString(userLocale, { hour: '2-digit', minute: '2-digit', hourCycle: 'h12' }),
|
||||
}).toString(),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
get calcPrintProgressItems() {
|
||||
return [
|
||||
{ value: 'file-relative', text: this.$t('Settings.GeneralTab.CalcPrintProgressItems.FileRelative') },
|
||||
|
||||
@@ -141,120 +141,114 @@
|
||||
ghost-class="ghost"
|
||||
group="macros"
|
||||
@change="updateMacroOrder">
|
||||
<template v-for="(macro, index) in editGroupMacros">
|
||||
<div :key="macro.name">
|
||||
<v-row>
|
||||
<v-col class="col-auto pr-0 d-flex">
|
||||
<v-icon class="handle">{{ mdiDragVertical }}</v-icon>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<settings-row
|
||||
:key="'groupMacro_macro_' + index"
|
||||
:title="macro.name"
|
||||
:sub-title="getMacroDescription(macro.name)"
|
||||
:dynamic-slot-width="true">
|
||||
<template v-if="existsMacro(macro.name)">
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
v-bind="attrs"
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
:color="macro.color"
|
||||
v-on="on"
|
||||
@click="changeColorMacroFromGroup(macro)">
|
||||
<v-icon small left>{{ mdiPalette }}</v-icon>
|
||||
{{ macro.color }}
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ $t('Settings.MacrosTab.ChangeMacroColor') }}</span>
|
||||
</v-tooltip>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
v-bind="attrs"
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
:color="macro.showInStandby ? '' : 'secondary'"
|
||||
v-on="on"
|
||||
@click="
|
||||
updateMacroFromGroup(
|
||||
macro,
|
||||
'showInStandby',
|
||||
!macro.showInStandby
|
||||
)
|
||||
">
|
||||
<v-icon small>{{ mdiSleep }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ $t('Settings.MacrosTab.ShowInStateStandby') }}</span>
|
||||
</v-tooltip>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
v-bind="attrs"
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
:color="macro.showInPause ? '' : 'secondary'"
|
||||
v-on="on"
|
||||
@click="
|
||||
updateMacroFromGroup(
|
||||
macro,
|
||||
'showInPause',
|
||||
!macro.showInPause
|
||||
)
|
||||
">
|
||||
<v-icon small>{{ mdiPause }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ $t('Settings.MacrosTab.ShowInStatePaused') }}</span>
|
||||
</v-tooltip>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
v-bind="attrs"
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
:color="macro.showInPrinting ? '' : 'secondary'"
|
||||
v-on="on"
|
||||
@click="
|
||||
updateMacroFromGroup(
|
||||
macro,
|
||||
'showInPrinting',
|
||||
!macro.showInPrinting
|
||||
)
|
||||
">
|
||||
<v-icon small>{{ mdiPrinter3dNozzle }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ $t('Settings.MacrosTab.ShowInStatePrinting') }}</span>
|
||||
</v-tooltip>
|
||||
<v-row
|
||||
v-for="(macro, index) in editGroupMacros"
|
||||
:key="macro.name"
|
||||
class="dragable-item my-2 mx-0">
|
||||
<v-col class="col-auto pr-0 d-flex py-2">
|
||||
<v-icon class="handle">{{ mdiDragVertical }}</v-icon>
|
||||
</v-col>
|
||||
<v-col class="py-2">
|
||||
<settings-row
|
||||
:key="'groupMacro_macro_' + index"
|
||||
:title="macro.name"
|
||||
:sub-title="getMacroDescription(macro.name)"
|
||||
:dynamic-slot-width="true">
|
||||
<template v-if="existsMacro(macro.name)">
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
v-bind="attrs"
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
:color="macro.color"
|
||||
v-on="on"
|
||||
@click="changeColorMacroFromGroup(macro)">
|
||||
<v-icon small left>{{ mdiPalette }}</v-icon>
|
||||
{{ macro.color }}
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
v-bind="attrs"
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
color="error"
|
||||
v-on="on"
|
||||
@click="removeMacroFromGroup(macro)">
|
||||
<v-icon small>{{ mdiDelete }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ $t('Settings.MacrosTab.DeleteMacroFromGroup') }}</span>
|
||||
</v-tooltip>
|
||||
</settings-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
</div>
|
||||
</template>
|
||||
<span>{{ $t('Settings.MacrosTab.ChangeMacroColor') }}</span>
|
||||
</v-tooltip>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
v-bind="attrs"
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
:color="macro.showInStandby ? '' : 'secondary'"
|
||||
v-on="on"
|
||||
@click="
|
||||
updateMacroFromGroup(
|
||||
macro,
|
||||
'showInStandby',
|
||||
!macro.showInStandby
|
||||
)
|
||||
">
|
||||
<v-icon small>{{ mdiSleep }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ $t('Settings.MacrosTab.ShowInStateStandby') }}</span>
|
||||
</v-tooltip>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
v-bind="attrs"
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
:color="macro.showInPause ? '' : 'secondary'"
|
||||
v-on="on"
|
||||
@click="
|
||||
updateMacroFromGroup(macro, 'showInPause', !macro.showInPause)
|
||||
">
|
||||
<v-icon small>{{ mdiPause }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ $t('Settings.MacrosTab.ShowInStatePaused') }}</span>
|
||||
</v-tooltip>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
v-bind="attrs"
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
:color="macro.showInPrinting ? '' : 'secondary'"
|
||||
v-on="on"
|
||||
@click="
|
||||
updateMacroFromGroup(
|
||||
macro,
|
||||
'showInPrinting',
|
||||
!macro.showInPrinting
|
||||
)
|
||||
">
|
||||
<v-icon small>{{ mdiPrinter3dNozzle }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ $t('Settings.MacrosTab.ShowInStatePrinting') }}</span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
v-bind="attrs"
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
color="error"
|
||||
v-on="on"
|
||||
@click="removeMacroFromGroup(macro)">
|
||||
<v-icon small>{{ mdiDelete }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ $t('Settings.MacrosTab.DeleteMacroFromGroup') }}</span>
|
||||
</v-tooltip>
|
||||
</settings-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</draggable>
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -553,3 +547,9 @@ export default class SettingsMacrosTabExpert extends Mixins(BaseMixin) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dragable-item {
|
||||
background-color: #282828;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<div>
|
||||
<settings-miscellaneous-tab-light-groups
|
||||
v-if="editLightGroupObject"
|
||||
:light="editLightGroupObject"
|
||||
@close="editLightGroupObject = null" />
|
||||
<settings-miscellaneous-tab-light-presets
|
||||
v-else-if="editLightPresetObject"
|
||||
:light="editLightPresetObject"
|
||||
@close="editLightPresetObject = null" />
|
||||
<v-card-text v-else>
|
||||
<h3 class="text-h5 mb-3">{{ $t('Settings.MiscellaneousTab.Miscellaneous') }}</h3>
|
||||
<template v-if="filteredLights.length">
|
||||
<div v-for="(light, index) in filteredLights" :key="index">
|
||||
<v-divider v-if="index" class="my-2"></v-divider>
|
||||
<settings-row :title="convertName(light.name)" :dynamic-slot-width="true">
|
||||
<v-btn
|
||||
v-if="light.chainCount > 1"
|
||||
small
|
||||
outlined
|
||||
class="ml-3"
|
||||
@click="editLightGroupObject = light">
|
||||
<v-icon left small>{{ mdiPencil }}</v-icon>
|
||||
{{ $t('Settings.MiscellaneousTab.Groups') }}
|
||||
</v-btn>
|
||||
<v-btn small outlined class="ml-3" @click="editLightPresetObject = light">
|
||||
<v-icon left small>{{ mdiPalette }}</v-icon>
|
||||
{{ $t('Settings.MiscellaneousTab.Presets') }}
|
||||
</v-btn>
|
||||
</settings-row>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0 text-center font-italic">{{ $t('Settings.MiscellaneousTab.NoDevicesFound') }}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</v-card-text>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '../mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import { mdiDelete, mdiPalette, mdiPencil } from '@mdi/js'
|
||||
import { convertName } from '@/plugins/helpers'
|
||||
import SettingsMiscellaneousTabLightGroups from '@/components/settings/SettingsMiscellaneousTabLightGroups.vue'
|
||||
import SettingsMiscellaneousTabLightPresets from '@/components/settings/SettingsMiscellaneousTabLightPresets.vue'
|
||||
import { PrinterStateLight } from '@/store/printer/types'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
SettingsRow,
|
||||
SettingsMiscellaneousTabLightGroups,
|
||||
SettingsMiscellaneousTabLightPresets,
|
||||
},
|
||||
})
|
||||
export default class SettingsMiscellaneousTab extends Mixins(BaseMixin) {
|
||||
mdiDelete = mdiDelete
|
||||
mdiPalette = mdiPalette
|
||||
mdiPencil = mdiPencil
|
||||
|
||||
convertName = convertName
|
||||
|
||||
editLightGroupObject: PrinterStateLight | null = null
|
||||
editLightPresetObject: PrinterStateLight | null = null
|
||||
|
||||
get lights() {
|
||||
return this.$store.getters['printer/getLights'] ?? []
|
||||
}
|
||||
|
||||
get filteredLights() {
|
||||
return this.lights.filter((light: PrinterStateLight) => light.colorOrder.length > 1)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<div>
|
||||
<template v-if="boolForm">
|
||||
<v-card-text>
|
||||
<h3 class="text-h5 mb-3">{{ $t('Settings.MiscellaneousTab.CreateGroup') }}</h3>
|
||||
<settings-row :title="$t('Settings.MiscellaneousTab.Name').toString()">
|
||||
<v-text-field
|
||||
v-model="form.name"
|
||||
hide-details="auto"
|
||||
:rules="[rules.required, rules.groupUnique]"
|
||||
dense
|
||||
outlined></v-text-field>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row
|
||||
:title="$t('Settings.MiscellaneousTab.Start').toString()"
|
||||
:sub-title="$t('Settings.MiscellaneousTab.StartDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="form.start"
|
||||
hide-details="auto"
|
||||
type="number"
|
||||
step="1"
|
||||
:rules="[rules.minStart, rules.max]"
|
||||
dense
|
||||
outlined></v-text-field>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row
|
||||
:title="$t('Settings.MiscellaneousTab.End').toString()"
|
||||
:sub-title="$t('Settings.MiscellaneousTab.EndDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="form.end"
|
||||
hide-details="auto"
|
||||
type="number"
|
||||
step="1"
|
||||
:rules="[rules.minEnd, rules.max]"
|
||||
dense
|
||||
outlined></v-text-field>
|
||||
</settings-row>
|
||||
</v-card-text>
|
||||
<v-card-actions class="d-flex justify-end">
|
||||
<v-btn text @click="closeForm">{{ $t('Settings.Cancel') }}</v-btn>
|
||||
<v-btn v-if="form.id !== null" text color="primary" @click="updateGroup">
|
||||
{{ $t('Settings.Update') }}
|
||||
</v-btn>
|
||||
<v-btn v-else text color="primary" @click="storeGroup">{{ $t('Settings.Store') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-card-text>
|
||||
<h3 class="text-h5 mb-3">{{ $t('Settings.MiscellaneousTab.LightGroups', { name: light.name }) }}</h3>
|
||||
<template v-if="light">
|
||||
<template v-if="groups.length">
|
||||
<div v-for="(group, index) in groups" :key="group.id">
|
||||
<v-divider v-if="index" class="my-2"></v-divider>
|
||||
<settings-row
|
||||
:title="group.name"
|
||||
:sub-title="
|
||||
$t('Settings.MiscellaneousTab.GroupSubTitle', {
|
||||
start: group.start,
|
||||
end: group.end,
|
||||
}).toString()
|
||||
"
|
||||
:dynamic-slot-width="true">
|
||||
<v-btn small outlined class="ml-3" @click="editGroup(group)">
|
||||
<v-icon left small>{{ mdiPencil }}</v-icon>
|
||||
{{ $t('Settings.Edit') }}
|
||||
</v-btn>
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
color="error"
|
||||
@click="deleteGroup(group.id)">
|
||||
<v-icon small>{{ mdiDelete }}</v-icon>
|
||||
</v-btn>
|
||||
</settings-row>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0 text-center font-italic">
|
||||
{{ $t('Settings.MiscellaneousTab.NoGroupFound') }}
|
||||
</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0 text-center font-italic">
|
||||
{{ $t('Settings.MiscellaneousTab.UnableToLoadLight') }}
|
||||
</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</v-card-text>
|
||||
<v-card-actions class="d-flex justify-end">
|
||||
<v-btn text @click="$emit('close')">{{ $t('Settings.Close') }}</v-btn>
|
||||
<v-btn text color="primary" @click="createGroup">
|
||||
{{ $t('Settings.MiscellaneousTab.AddGroup') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '../mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import { mdiDelete, mdiPalette, mdiPencil } from '@mdi/js'
|
||||
import { caseInsensitiveSort, convertName } from '@/plugins/helpers'
|
||||
import { PrinterStateLight } from '@/store/printer/types'
|
||||
import { GuiMacrosStateMacrogroup } from '@/store/gui/macros/types'
|
||||
import { GuiMiscellaneousStateEntry, GuiMiscellaneousStateEntryLightgroup } from '@/store/gui/miscellaneous/types'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
SettingsRow,
|
||||
},
|
||||
})
|
||||
export default class SettingsMiscellaneousTabLightGroups extends Mixins(BaseMixin) {
|
||||
mdiDelete = mdiDelete
|
||||
mdiPalette = mdiPalette
|
||||
mdiPencil = mdiPencil
|
||||
|
||||
convertName = convertName
|
||||
|
||||
private boolForm = false
|
||||
|
||||
private form: {
|
||||
id: string | null
|
||||
name: string
|
||||
start: number
|
||||
end: number
|
||||
} = {
|
||||
id: null,
|
||||
name: '',
|
||||
start: 1,
|
||||
end: 1,
|
||||
}
|
||||
|
||||
private rules = {
|
||||
required: (value: string) => value !== '' || 'required',
|
||||
groupUnique: (value: string) => !this.existsGroupName(value) || 'Name already exists',
|
||||
minStart: (value: number) => value > 0 || 'smaller than 1',
|
||||
minEnd: (value: number) => value >= this.form.start || 'smaller than start value',
|
||||
max: (value: number) => value <= (this.light?.chainCount ?? 1) || 'higher than chain_count',
|
||||
}
|
||||
|
||||
@Prop({ type: Object, default: null })
|
||||
declare light: PrinterStateLight | null
|
||||
|
||||
get entry() {
|
||||
return this.$store.getters['gui/miscellaneous/getEntry']({
|
||||
type: this.light?.type,
|
||||
name: this.light?.name,
|
||||
}) as GuiMiscellaneousStateEntry | null
|
||||
}
|
||||
|
||||
get groups() {
|
||||
if (!this.entry) return []
|
||||
|
||||
const groups: GuiMiscellaneousStateEntryLightgroup[] = []
|
||||
Object.entries(this.entry.lightgroups).forEach(([key, lightgroup]) => {
|
||||
groups.push({
|
||||
name: lightgroup.name,
|
||||
start: lightgroup.start,
|
||||
end: lightgroup.end,
|
||||
id: key,
|
||||
})
|
||||
})
|
||||
window.console.log('getEntryLightgroups', groups)
|
||||
|
||||
return caseInsensitiveSort(groups, 'name')
|
||||
}
|
||||
|
||||
createGroup() {
|
||||
this.form.id = null
|
||||
this.form.name = ''
|
||||
this.form.start = 1
|
||||
this.form.end = this.light?.chainCount ?? 1
|
||||
this.boolForm = true
|
||||
}
|
||||
|
||||
editGroup(group: GuiMiscellaneousStateEntryLightgroup) {
|
||||
this.form.id = group.id ?? null
|
||||
this.form.name = group.name
|
||||
this.form.start = group.start
|
||||
this.form.end = group.end
|
||||
this.boolForm = true
|
||||
}
|
||||
|
||||
closeForm() {
|
||||
this.boolForm = false
|
||||
}
|
||||
|
||||
storeGroup() {
|
||||
this.$store.dispatch('gui/miscellaneous/storeLightgroup', {
|
||||
entry: this.light,
|
||||
lightgroup: this.form,
|
||||
})
|
||||
|
||||
this.boolForm = false
|
||||
}
|
||||
|
||||
updateGroup() {
|
||||
this.$store.dispatch('gui/miscellaneous/updateLightgroup', {
|
||||
entry: this.light,
|
||||
lightgroup: this.form,
|
||||
})
|
||||
|
||||
this.boolForm = false
|
||||
}
|
||||
|
||||
deleteGroup(groupId: string) {
|
||||
this.$store.dispatch('gui/miscellaneous/deleteLightgroup', {
|
||||
entry: this.light,
|
||||
lightgroupId: groupId,
|
||||
})
|
||||
}
|
||||
|
||||
existsGroupName(name: string) {
|
||||
return (
|
||||
this.groups.findIndex(
|
||||
(group: GuiMacrosStateMacrogroup) => group.name === name && group.id != this.form.id
|
||||
) >= 0
|
||||
)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,467 @@
|
||||
<template>
|
||||
<div>
|
||||
<template v-if="boolForm">
|
||||
<v-card-text>
|
||||
<h3 class="text-h5 mb-3">{{ $t('Settings.MiscellaneousTab.CreatePreset') }}</h3>
|
||||
<settings-row :title="$t('Settings.MiscellaneousTab.Name').toString()">
|
||||
<v-text-field
|
||||
v-model="form.name"
|
||||
hide-details="auto"
|
||||
:rules="[rules.required, rules.presetUnique]"
|
||||
dense
|
||||
outlined></v-text-field>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Settings.MiscellaneousTab.Color').toString()">
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<color-picker
|
||||
:color="colorRGB"
|
||||
:options="colorPickerOptions"
|
||||
@update:color="onColorRGBChanged" />
|
||||
<color-picker
|
||||
v-if="existWhite"
|
||||
:color="colorRGBW"
|
||||
:options="colorPickerWhiteOptions"
|
||||
class="mt-3"
|
||||
@update:color="onColorWhiteChanged" />
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-row v-if="existRed">
|
||||
<v-col>
|
||||
<number-input
|
||||
:label="$t('Panels.MiscellaneousPanel.Light.Red')"
|
||||
param="red"
|
||||
:target="redInt"
|
||||
:min="0"
|
||||
:max="255"
|
||||
:dec="1"
|
||||
:step="1"
|
||||
:output-error-msg="true"
|
||||
:has-spinner="true"
|
||||
@submit="onColorInput" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="existGreen">
|
||||
<v-col>
|
||||
<number-input
|
||||
:label="$t('Panels.MiscellaneousPanel.Light.Green')"
|
||||
param="green"
|
||||
:target="greenInt"
|
||||
:min="0"
|
||||
:max="255"
|
||||
:dec="1"
|
||||
:step="1"
|
||||
:has-spinner="true"
|
||||
@submit="onColorInput" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="existBlue">
|
||||
<v-col>
|
||||
<number-input
|
||||
:label="$t('Panels.MiscellaneousPanel.Light.Blue')"
|
||||
param="blue"
|
||||
:target="blueInt"
|
||||
:min="0"
|
||||
:max="255"
|
||||
:dec="1"
|
||||
:step="1"
|
||||
:has-spinner="true"
|
||||
@submit="onColorInput" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="existWhite">
|
||||
<v-col>
|
||||
<number-input
|
||||
:label="$t('Panels.MiscellaneousPanel.Light.White')"
|
||||
param="white"
|
||||
:target="whiteInt"
|
||||
:min="0"
|
||||
:max="255"
|
||||
:dec="1"
|
||||
:step="1"
|
||||
:has-spinner="true"
|
||||
@submit="onColorInput" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</settings-row>
|
||||
</v-card-text>
|
||||
<v-card-actions class="d-flex justify-end">
|
||||
<v-btn text @click="closeForm">{{ $t('Settings.Cancel') }}</v-btn>
|
||||
<v-btn v-if="form.id !== null" text color="primary" @click="updatePreset">
|
||||
{{ $t('Settings.Update') }}
|
||||
</v-btn>
|
||||
<v-btn v-else text color="primary" @click="storePreset">{{ $t('Settings.Store') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-card-text>
|
||||
<h3 class="text-h5 mb-3">{{ $t('Settings.MiscellaneousTab.LightPresets', { name: light.name }) }}</h3>
|
||||
<template v-if="light">
|
||||
<template v-if="presets.length">
|
||||
<div v-for="(preset, index) in presets" :key="preset.id">
|
||||
<v-divider v-if="index" class="my-2"></v-divider>
|
||||
<settings-row
|
||||
:title="preset.name"
|
||||
:sub-title="entryDescriptionText(preset)"
|
||||
:dynamic-slot-width="true">
|
||||
<v-btn small outlined class="ml-3" @click="editPreset(preset)">
|
||||
<v-icon left small>{{ mdiPencil }}</v-icon>
|
||||
{{ $t('Settings.Edit') }}
|
||||
</v-btn>
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
color="error"
|
||||
@click="deletePreset(preset.id)">
|
||||
<v-icon small>{{ mdiDelete }}</v-icon>
|
||||
</v-btn>
|
||||
</settings-row>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0 text-center font-italic">
|
||||
{{ $t('Settings.MiscellaneousTab.NoPresetFound') }}
|
||||
</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0 text-center font-italic">
|
||||
{{ $t('Settings.MiscellaneousTab.UnableToLoadPreset') }}
|
||||
</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</v-card-text>
|
||||
<v-card-actions class="d-flex justify-end">
|
||||
<v-btn text @click="$emit('close')">{{ $t('Settings.Close') }}</v-btn>
|
||||
<v-btn text color="primary" @click="createPreset">
|
||||
{{ $t('Settings.MiscellaneousTab.AddPreset') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '../mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import { mdiDelete, mdiPencil } from '@mdi/js'
|
||||
import { caseInsensitiveSort, convertName } from '@/plugins/helpers'
|
||||
import { PrinterStateLight } from '@/store/printer/types'
|
||||
import { GuiMiscellaneousStateEntry, GuiMiscellaneousStateEntryPreset } from '@/store/gui/miscellaneous/types'
|
||||
import { ColorPickerProps } from '@jaames/iro/dist/ColorPicker.d'
|
||||
import iro from '@jaames/iro'
|
||||
import { Debounce } from 'vue-debounce-decorator'
|
||||
import { IroColor } from '@irojs/iro-core'
|
||||
|
||||
interface ColorData {
|
||||
red: number | null
|
||||
green: number | null
|
||||
blue: number | null
|
||||
white: number | null
|
||||
}
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
SettingsRow,
|
||||
},
|
||||
})
|
||||
export default class SettingsMiscellaneousTabLightPresets extends Mixins(BaseMixin) {
|
||||
mdiDelete = mdiDelete
|
||||
mdiPencil = mdiPencil
|
||||
|
||||
convertName = convertName
|
||||
|
||||
private boolForm = false
|
||||
|
||||
private form: {
|
||||
id: string | null
|
||||
name: string
|
||||
red: number | null
|
||||
green: number | null
|
||||
blue: number | null
|
||||
white: number | null
|
||||
} = {
|
||||
id: null,
|
||||
name: '',
|
||||
red: null,
|
||||
green: null,
|
||||
blue: null,
|
||||
white: null,
|
||||
}
|
||||
|
||||
private rules = {
|
||||
required: (value: string) => value !== '' || 'required',
|
||||
presetUnique: (value: string) => !this.existsPresetName(value) || 'Name already exists',
|
||||
min: (value: number) => value >= 0 || 'Must be minimum 0',
|
||||
max: (value: number) => value <= 255 || 'Must be smaller then 256',
|
||||
}
|
||||
|
||||
@Prop({ type: Object, default: null })
|
||||
declare light: PrinterStateLight | null
|
||||
|
||||
get entry() {
|
||||
return this.$store.getters['gui/miscellaneous/getEntry']({
|
||||
type: this.light?.type,
|
||||
name: this.light?.name,
|
||||
}) as GuiMiscellaneousStateEntry | null
|
||||
}
|
||||
|
||||
get presets() {
|
||||
if (!this.entry) return []
|
||||
|
||||
const presets: GuiMiscellaneousStateEntryPreset[] = []
|
||||
Object.entries(this.entry.presets).forEach(([key, preset]) => {
|
||||
presets.push({
|
||||
...preset,
|
||||
id: key,
|
||||
})
|
||||
})
|
||||
window.console.log('getEntryPresets', presets)
|
||||
|
||||
return caseInsensitiveSort(presets, 'name')
|
||||
}
|
||||
|
||||
get existRed() {
|
||||
return this.light?.colorOrder.indexOf('R') !== -1
|
||||
}
|
||||
|
||||
get existGreen() {
|
||||
return this.light?.colorOrder.indexOf('G') !== -1
|
||||
}
|
||||
|
||||
get existBlue() {
|
||||
return this.light?.colorOrder.indexOf('B') !== -1
|
||||
}
|
||||
|
||||
get existWhite() {
|
||||
return this.light?.colorOrder.indexOf('W') !== -1
|
||||
}
|
||||
|
||||
get colorRGB() {
|
||||
return `rgb(${Math.round(this.form.red ?? 0)}, ${Math.round(this.form.green ?? 0)}, ${Math.round(
|
||||
this.form.blue ?? 0
|
||||
)})`
|
||||
}
|
||||
|
||||
get colorRGBW() {
|
||||
return `rgba(255, 255, 255, ${(this.form.white ?? 0) / 255})`
|
||||
}
|
||||
|
||||
get redInt() {
|
||||
return Math.round(this.form.red ?? 0)
|
||||
}
|
||||
|
||||
get greenInt() {
|
||||
return Math.round(this.form.green ?? 0)
|
||||
}
|
||||
|
||||
get blueInt() {
|
||||
return Math.round(this.form.blue ?? 0)
|
||||
}
|
||||
|
||||
get whiteInt() {
|
||||
return Math.round(this.form.white ?? 0)
|
||||
}
|
||||
|
||||
get colorPickerOptions() {
|
||||
let options: ColorPickerProps = {
|
||||
width: 200,
|
||||
margin: 15,
|
||||
layout: [],
|
||||
}
|
||||
|
||||
if (this.existRed) {
|
||||
// @ts-ignore
|
||||
options?.layout.push({
|
||||
component: iro.ui.Slider,
|
||||
options: {
|
||||
sliderType: 'red',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if (this.existGreen) {
|
||||
// @ts-ignore
|
||||
options?.layout.push({
|
||||
component: iro.ui.Slider,
|
||||
options: {
|
||||
sliderType: 'green',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if (this.existBlue) {
|
||||
// @ts-ignore
|
||||
options?.layout.push({
|
||||
component: iro.ui.Slider,
|
||||
options: {
|
||||
sliderType: 'blue',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if (this.existRed && this.existGreen && this.existBlue) {
|
||||
options.layout = [
|
||||
{
|
||||
component: iro.ui.Wheel,
|
||||
},
|
||||
{
|
||||
component: iro.ui.Slider,
|
||||
options: {
|
||||
sliderType: 'value',
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
get colorPickerWhiteOptions() {
|
||||
let options: ColorPickerProps = {
|
||||
width: 200,
|
||||
margin: 15,
|
||||
layout: [
|
||||
{
|
||||
component: iro.ui.Slider,
|
||||
options: {
|
||||
sliderType: 'alpha',
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
entryDescriptionText(preset: GuiMiscellaneousStateEntryPreset) {
|
||||
let output: string[] = []
|
||||
|
||||
if (this.light?.colorOrder.includes('R')) output.push(`R: ${preset.red}`)
|
||||
if (this.light?.colorOrder.includes('G')) output.push(`G: ${preset.green}`)
|
||||
if (this.light?.colorOrder.includes('B')) output.push(`B: ${preset.blue}`)
|
||||
if (this.light?.colorOrder.includes('W')) output.push(`W: ${preset.white}`)
|
||||
|
||||
return output.join(', ')
|
||||
}
|
||||
|
||||
createPreset() {
|
||||
this.form.id = null
|
||||
this.form.name = ''
|
||||
this.form.red = this.light?.colorOrder.indexOf('R') != -1 ? 0 : null
|
||||
this.form.green = this.light?.colorOrder.indexOf('G') != -1 ? 0 : null
|
||||
this.form.blue = this.light?.colorOrder.indexOf('B') != -1 ? 0 : null
|
||||
this.form.white = this.light?.colorOrder.indexOf('W') != -1 ? 0 : null
|
||||
this.boolForm = true
|
||||
}
|
||||
|
||||
editPreset(preset: GuiMiscellaneousStateEntryPreset) {
|
||||
this.form.id = preset.id ?? null
|
||||
this.form.name = preset.name
|
||||
this.form.red = this.light?.colorOrder.indexOf('R') != -1 ? preset.red : null
|
||||
this.form.green = this.light?.colorOrder.indexOf('G') != -1 ? preset.green : null
|
||||
this.form.blue = this.light?.colorOrder.indexOf('B') != -1 ? preset.blue : null
|
||||
this.form.white = this.light?.colorOrder.indexOf('W') != -1 ? preset.white : null
|
||||
this.boolForm = true
|
||||
}
|
||||
|
||||
closeForm() {
|
||||
this.boolForm = false
|
||||
}
|
||||
|
||||
storePreset() {
|
||||
this.$store.dispatch('gui/miscellaneous/storePreset', {
|
||||
entry: this.light,
|
||||
preset: this.form,
|
||||
})
|
||||
|
||||
this.boolForm = false
|
||||
}
|
||||
|
||||
updatePreset() {
|
||||
this.$store.dispatch('gui/miscellaneous/updatePreset', {
|
||||
entry: this.light,
|
||||
preset: this.form,
|
||||
})
|
||||
|
||||
this.boolForm = false
|
||||
}
|
||||
|
||||
deletePreset(presetId: string) {
|
||||
this.$store.dispatch('gui/miscellaneous/deletePreset', {
|
||||
entry: this.light,
|
||||
presetId: presetId,
|
||||
})
|
||||
}
|
||||
|
||||
existsPresetName(name: string) {
|
||||
return (
|
||||
this.presets.findIndex(
|
||||
(group: GuiMiscellaneousStateEntryPreset) => group.name === name && group.id != this.form.id
|
||||
) >= 0
|
||||
)
|
||||
}
|
||||
|
||||
@Debounce({ time: 250 })
|
||||
onColorRGBChanged(payload: IroColor) {
|
||||
const color: ColorData = {
|
||||
red: payload.red,
|
||||
green: payload.green,
|
||||
blue: payload.blue,
|
||||
white: this.form.white,
|
||||
}
|
||||
|
||||
this.colorChanged(color)
|
||||
}
|
||||
|
||||
@Debounce({ time: 250 })
|
||||
onColorWhiteChanged(payload: IroColor) {
|
||||
const color: ColorData = {
|
||||
red: this.form.red,
|
||||
green: this.form.green,
|
||||
blue: this.form.blue,
|
||||
white: this.form.white,
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
color.white = payload.alpha * 255
|
||||
|
||||
this.colorChanged(color)
|
||||
}
|
||||
|
||||
onColorInput(payload: { name: string; value: number }) {
|
||||
const color: ColorData = {
|
||||
red: this.form.red,
|
||||
green: this.form.green,
|
||||
blue: this.form.blue,
|
||||
white: this.form.white,
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
color[payload.name] = payload.value
|
||||
|
||||
this.colorChanged(color)
|
||||
}
|
||||
|
||||
colorChanged(color: ColorData) {
|
||||
this.form.red = color.red
|
||||
this.form.green = color.green
|
||||
this.form.blue = color.blue
|
||||
this.form.white = color.white
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -4,57 +4,55 @@
|
||||
<v-card-text>
|
||||
<h3 class="text-h5 mb-3">{{ $t('Settings.TimelapseTab.General') }}</h3>
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Enabled')"
|
||||
:sub-title="$t('Settings.TimelapseTab.EnabledDescription')"
|
||||
:title="$t('Settings.TimelapseTab.Enabled').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.EnabledDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="enabled"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
:disabled="blockedsettings.includes('enabled')"></v-switch>
|
||||
:disabled="blockedsettings.includes('enabled')" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Autorender')"
|
||||
:sub-title="$t('Settings.TimelapseTab.AutorenderDescription')"
|
||||
:title="$t('Settings.TimelapseTab.Autorender').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.AutorenderDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="autorender"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
:disabled="blockedsettings.includes('autorender')"></v-switch>
|
||||
:disabled="blockedsettings.includes('autorender')" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Camera')"
|
||||
:sub-title="$t('Settings.TimelapseTab.CameraDescription')">
|
||||
:title="$t('Settings.TimelapseTab.Camera').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.CameraDescription').toString()">
|
||||
<v-select
|
||||
v-model="camera"
|
||||
:items="cameraOptions"
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('camera') || blockedsettings.includes('snapshoturl')"
|
||||
attach></v-select>
|
||||
:disabled="blockedsettings.includes('camera') || blockedsettings.includes('snapshoturl')" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Mode')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ModeDescription')">
|
||||
:title="$t('Settings.TimelapseTab.Mode').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ModeDescription').toString()">
|
||||
<v-select
|
||||
v-model="mode"
|
||||
:items="modeOptions"
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('modeOptions')"
|
||||
attach></v-select>
|
||||
:disabled="blockedsettings.includes('modeOptions')" />
|
||||
</settings-row>
|
||||
<template v-if="mode === 'hyperlapse'">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.HyperlapseCycle')"
|
||||
:sub-title="$t('Settings.TimelapseTab.HyperlapseCycleDescription')">
|
||||
:title="$t('Settings.TimelapseTab.HyperlapseCycle').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.HyperlapseCycleDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="hyperlapseCycle"
|
||||
type="number"
|
||||
@@ -63,35 +61,35 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('hyperlapseCycle')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
</template>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.PreviewImage')"
|
||||
:sub-title="$t('Settings.TimelapseTab.PreviewImageDescription')"
|
||||
:title="$t('Settings.TimelapseTab.PreviewImage').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.PreviewImageDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="previewimage"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
:disabled="blockedsettings.includes('previewimage')"></v-switch>
|
||||
:disabled="blockedsettings.includes('previewimage')" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.SaveFrames')"
|
||||
:sub-title="$t('Settings.TimelapseTab.SaveFramesDescription')"
|
||||
:title="$t('Settings.TimelapseTab.SaveFrames').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.SaveFramesDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="saveframes"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
:disabled="blockedsettings.includes('saveframes')"></v-switch>
|
||||
:disabled="blockedsettings.includes('saveframes')" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.StreamDelayCompensation')"
|
||||
:sub-title="$t('Settings.TimelapseTab.StreamDelayCompensationDescription')">
|
||||
:title="$t('Settings.TimelapseTab.StreamDelayCompensation').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.StreamDelayCompensationDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="stream_delay_compensation"
|
||||
type="number"
|
||||
@@ -100,50 +98,49 @@
|
||||
hide-details="auto"
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('stream_delay_compensation')"></v-text-field>
|
||||
:disabled="blockedsettings.includes('stream_delay_compensation')" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.GcodeVerbose')"
|
||||
:sub-title="$t('Settings.TimelapseTab.GcodeVerboseDescription')"
|
||||
:title="$t('Settings.TimelapseTab.GcodeVerbose').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.GcodeVerboseDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="gcode_verbose"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
:disabled="blockedsettings.includes('gcode_verbose')"></v-switch>
|
||||
:disabled="blockedsettings.includes('gcode_verbose')" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<h3 class="text-h5 mt-6 mb-3">{{ $t('Settings.TimelapseTab.Parkhead') }}</h3>
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Parkhead')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkheadDescription')"
|
||||
:title="$t('Settings.TimelapseTab.Parkhead').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkheadDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="parkhead"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
:disabled="blockedsettings.includes('parkhead')"></v-switch>
|
||||
:disabled="blockedsettings.includes('parkhead')" />
|
||||
</settings-row>
|
||||
<template v-if="parkhead">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Parkpos')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkposDescription')">
|
||||
:title="$t('Settings.TimelapseTab.Parkpos').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkposDescription').toString()">
|
||||
<v-select
|
||||
v-model="parkpos"
|
||||
:items="parkposOptions"
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('parkposOptions')"
|
||||
attach></v-select>
|
||||
:disabled="blockedsettings.includes('parkposOptions')" />
|
||||
</settings-row>
|
||||
<template v-if="parkpos === 'custom'">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<template v-if="['x_only', 'custom'].includes(parkpos)">
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.PosX')"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosXDescription')">
|
||||
:title="$t('Settings.TimelapseTab.PosX').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosXDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="park_custom_pos_x"
|
||||
type="number"
|
||||
@@ -152,12 +149,14 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('park_custom_pos_x')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
</template>
|
||||
<template v-if="['y_only', 'custom'].includes(parkpos)">
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.PosY')"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosYDescription')">
|
||||
:title="$t('Settings.TimelapseTab.PosY').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosYDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="park_custom_pos_y"
|
||||
type="number"
|
||||
@@ -166,12 +165,14 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('park_custom_pos_y')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
</template>
|
||||
<template v-if="['x_only', 'y_only', 'custom'].includes(parkpos)">
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.PosDZ')"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosDZDescription')">
|
||||
:title="$t('Settings.TimelapseTab.PosDZ').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosDZDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="park_custom_pos_dz"
|
||||
type="number"
|
||||
@@ -180,13 +181,13 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('park_custom_pos_dz')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
</template>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.TravelSpeed')"
|
||||
:sub-title="$t('Settings.TimelapseTab.TravelSpeedDescription')">
|
||||
:title="$t('Settings.TimelapseTab.TravelSpeed').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.TravelSpeedDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="park_travel_speed"
|
||||
type="number"
|
||||
@@ -195,24 +196,24 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('park_travel_speed')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.FwRetract')"
|
||||
:sub-title="$t('Settings.TimelapseTab.FwRetractDescription')"
|
||||
:title="$t('Settings.TimelapseTab.FwRetract').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.FwRetractDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="fw_retract"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
:disabled="blockedsettings.includes('fw_retract')"></v-switch>
|
||||
:disabled="blockedsettings.includes('fw_retract')" />
|
||||
</settings-row>
|
||||
<template v-if="!fw_retract">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.RetractSpeed')"
|
||||
:sub-title="$t('Settings.TimelapseTab.RetractSpeedDescription')">
|
||||
:title="$t('Settings.TimelapseTab.RetractSpeed').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.RetractSpeedDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="park_retract_speed"
|
||||
type="number"
|
||||
@@ -221,12 +222,12 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('park_retract_speed')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.RetractDistance')"
|
||||
:sub-title="$t('Settings.TimelapseTab.RetractDistanceDescription')">
|
||||
:title="$t('Settings.TimelapseTab.RetractDistance').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.RetractDistanceDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="park_retract_distance"
|
||||
type="number"
|
||||
@@ -237,10 +238,10 @@
|
||||
:disabled="blockedsettings.includes('park_retract_distance')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.UnretractSpeed')"
|
||||
:sub-title="$t('Settings.TimelapseTab.UnretractSpeedDescription')">
|
||||
:title="$t('Settings.TimelapseTab.UnretractSpeed').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.UnretractSpeedDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="park_extrude_speed"
|
||||
type="number"
|
||||
@@ -249,12 +250,12 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('park_extrude_speed')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.UnretractDistance')"
|
||||
:sub-title="$t('Settings.TimelapseTab.UnretractDistanceDescription')">
|
||||
:title="$t('Settings.TimelapseTab.UnretractDistance').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.UnretractDistanceDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="park_extrude_distance"
|
||||
type="number"
|
||||
@@ -263,13 +264,13 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('park_extrude_distance')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
</template>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.ParkTime')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkTimeDescription')">
|
||||
:title="$t('Settings.TimelapseTab.ParkTime').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkTimeDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="park_time"
|
||||
type="number"
|
||||
@@ -278,26 +279,26 @@
|
||||
step="0.1"
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('park_time')"></v-text-field>
|
||||
:disabled="blockedsettings.includes('park_time')" />
|
||||
</settings-row>
|
||||
</template>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<h3 class="text-h5 mt-6 mb-3">{{ $t('Settings.TimelapseTab.RenderingOptions') }}</h3>
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.VariableFps')"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsDescription')"
|
||||
:title="$t('Settings.TimelapseTab.VariableFps').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="variable_fps"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
:disabled="blockedsettings.includes('variable_fps')"></v-switch>
|
||||
:disabled="blockedsettings.includes('variable_fps')" />
|
||||
</settings-row>
|
||||
<template v-if="variable_fps">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Targetlength')"
|
||||
:sub-title="$t('Settings.TimelapseTab.TargetlengthDescription')">
|
||||
:title="$t('Settings.TimelapseTab.Targetlength').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.TargetlengthDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="targetlength"
|
||||
type="number"
|
||||
@@ -308,10 +309,10 @@
|
||||
:disabled="blockedsettings.includes('targetlength')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.VariableFpsMin')"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsMinDescription')">
|
||||
:title="$t('Settings.TimelapseTab.VariableFpsMin').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsMinDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="variable_fps_min"
|
||||
type="number"
|
||||
@@ -320,12 +321,12 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('variable_fps_min')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.VariableFpsMax')"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsMaxDescription')">
|
||||
:title="$t('Settings.TimelapseTab.VariableFpsMax').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsMaxDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="variable_fps_max"
|
||||
type="number"
|
||||
@@ -334,14 +335,14 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('variable_fps_max')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.OutputFramerate')"
|
||||
:sub-title="$t('Settings.TimelapseTab.OutputFramerateDescription')">
|
||||
:title="$t('Settings.TimelapseTab.OutputFramerate').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.OutputFramerateDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="output_framerate"
|
||||
type="number"
|
||||
@@ -350,13 +351,13 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('output_framerate')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
</template>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.duplicatelastframe')"
|
||||
:sub-title="$t('Settings.TimelapseTab.duplicatelastframeDescription')">
|
||||
:title="$t('Settings.TimelapseTab.duplicatelastframe').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.duplicatelastframeDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="duplicatelastframe"
|
||||
type="number"
|
||||
@@ -364,12 +365,12 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('duplicatelastframe')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.ConstantRateFactor')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ConstantRateFactorDescription')">
|
||||
:title="$t('Settings.TimelapseTab.ConstantRateFactor').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ConstantRateFactorDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="constant_rate_factor"
|
||||
type="number"
|
||||
@@ -377,43 +378,43 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('constant_rate_factor')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Pixelformat')"
|
||||
:sub-title="$t('Settings.TimelapseTab.PixelformatDescription')">
|
||||
:title="$t('Settings.TimelapseTab.Pixelformat').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.PixelformatDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="pixelformat"
|
||||
type="text"
|
||||
hide-details="auto"
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('pixelformat')"></v-text-field>
|
||||
:disabled="blockedsettings.includes('pixelformat')" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.TimeFormatCode')"
|
||||
:sub-title="$t('Settings.TimelapseTab.TimeFormatCodeDescription')">
|
||||
:title="$t('Settings.TimelapseTab.TimeFormatCode').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.TimeFormatCodeDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="time_format_code"
|
||||
type="text"
|
||||
hide-details="auto"
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('time_format_code')"></v-text-field>
|
||||
:disabled="blockedsettings.includes('time_format_code')" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Extraoutputparams')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ExtraoutputparamsDescription')">
|
||||
:title="$t('Settings.TimelapseTab.Extraoutputparams').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ExtraoutputparamsDescription').toString()">
|
||||
<v-text-field
|
||||
v-model="extraoutputparams"
|
||||
type="text"
|
||||
hide-details="auto"
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('extraoutputparams')"></v-text-field>
|
||||
:disabled="blockedsettings.includes('extraoutputparams')" />
|
||||
</settings-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
@@ -463,6 +464,14 @@ export default class SettingsTimelapseTab extends Mixins(BaseMixin) {
|
||||
text: 'back_right',
|
||||
value: 'back_right',
|
||||
},
|
||||
{
|
||||
text: 'x_only',
|
||||
value: 'x_only',
|
||||
},
|
||||
{
|
||||
text: 'y_only',
|
||||
value: 'y_only',
|
||||
},
|
||||
{
|
||||
text: 'custom',
|
||||
value: 'custom',
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
color="primary"
|
||||
href="https://docs.mainsail.xyz/quicktips/thumbnails"
|
||||
target="_blank">
|
||||
{{ $t('Settings.UiSettingsTab.Guide') }}
|
||||
{{ $t('Settings.UiSettingsTab.Guide').toString() }}
|
||||
</v-btn>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
@@ -130,7 +130,6 @@
|
||||
class="mt-0"
|
||||
hide-details
|
||||
outlined
|
||||
attach
|
||||
dense></v-select>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
@@ -140,6 +139,26 @@
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="boolHideUploadAndPrintButton" hide-details class="mt-0"></v-switch>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.PowerDeviceName').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.PowerDeviceNameDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-select
|
||||
v-model="powerDeviceName"
|
||||
:items="powerDeviceOptions"
|
||||
class="mt-0"
|
||||
hide-details
|
||||
outlined
|
||||
dense />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.HideSaveConfigButtonForBedMesh').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.HideSaveConfigButtonForBedMeshDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="hideSaveConfigForBedMash" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</div>
|
||||
@@ -153,6 +172,7 @@ import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import { defaultLogoColor, defaultPrimaryColor } from '@/store/variables'
|
||||
import { Debounce } from 'vue-debounce-decorator'
|
||||
import { mdiRestart, mdiTimerOutline } from '@mdi/js'
|
||||
import { ServerPowerStateDevice } from '@/store/server/power/types'
|
||||
|
||||
@Component({
|
||||
components: { SettingsRow },
|
||||
@@ -271,6 +291,48 @@ export default class SettingsUiSettingsTab extends Mixins(BaseMixin) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'uiSettings.boolHideUploadAndPrintButton', value: newVal })
|
||||
}
|
||||
|
||||
get powerDevices() {
|
||||
return this.$store.getters['server/power/getDevices'] ?? []
|
||||
}
|
||||
|
||||
get autoPowerDevice() {
|
||||
const autoIndex = this.powerDevices.findIndex((device: ServerPowerStateDevice) => device.device === 'printer')
|
||||
if (autoIndex === -1) return '--'
|
||||
|
||||
return this.powerDevices[autoIndex].device
|
||||
}
|
||||
|
||||
get powerDeviceName() {
|
||||
return this.$store.state.gui.uiSettings.powerDeviceName ?? null
|
||||
}
|
||||
|
||||
set powerDeviceName(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'uiSettings.powerDeviceName', value: newVal })
|
||||
}
|
||||
|
||||
get powerDeviceOptions() {
|
||||
const items: { text: string; value: string | null }[] = [
|
||||
{ text: `Auto (${this.autoPowerDevice})`, value: null },
|
||||
]
|
||||
|
||||
this.powerDevices.forEach((device: ServerPowerStateDevice) => {
|
||||
items.push({
|
||||
text: `${device.device} (${device.type})`,
|
||||
value: device.device.toString(),
|
||||
})
|
||||
})
|
||||
|
||||
return items
|
||||
}
|
||||
|
||||
get hideSaveConfigForBedMash() {
|
||||
return this.$store.state.gui.uiSettings.hideSaveConfigForBedMash ?? false
|
||||
}
|
||||
|
||||
set hideSaveConfigForBedMash(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'uiSettings.hideSaveConfigForBedMash', value: newVal })
|
||||
}
|
||||
|
||||
clearColorObject(color: any): string {
|
||||
if (typeof color === 'object' && 'hex' in color) color = color.hex
|
||||
if (color.length > 7) color = color.substr(0, 7)
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
hide-details="auto"
|
||||
outlined
|
||||
:rules="[rules.required, rules.unique]"
|
||||
class="_webcam-settings-name-field"
|
||||
dense></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -150,21 +151,26 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-1">
|
||||
<v-checkbox
|
||||
v-model="form.flipX"
|
||||
hide-details
|
||||
class="mt-1"
|
||||
:label="$t('Settings.WebcamsTab.FlipHorizontally')"></v-checkbox>
|
||||
<v-col class="pt-1 pb-3">
|
||||
<div class="v-label v-label--active theme--dark text-subtitle-1">
|
||||
{{ $t('Settings.WebcamsTab.FlipWebcam') }}
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-1">
|
||||
<v-row class="mt-0">
|
||||
<v-col class="py-0">
|
||||
<v-checkbox
|
||||
v-model="form.flipX"
|
||||
class="mt-1"
|
||||
hide-details
|
||||
:label="$t('Settings.WebcamsTab.Horizontally')"></v-checkbox>
|
||||
</v-col>
|
||||
<v-col class="py-0">
|
||||
<v-checkbox
|
||||
v-model="form.flipY"
|
||||
hide-details
|
||||
class="mt-1"
|
||||
:label="$t('Settings.WebcamsTab.FlipVertically')"></v-checkbox>
|
||||
hide-details
|
||||
:label="$t('Settings.WebcamsTab.Vertically')"></v-checkbox>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
@@ -181,6 +187,9 @@
|
||||
<template v-else-if="form.service === 'ipstream'">
|
||||
<webcam-ipstreamer :cam-settings="form"></webcam-ipstreamer>
|
||||
</template>
|
||||
<template v-else-if="form.service === 'hlsstream'">
|
||||
<webcam-hlsstreamer :cam-settings="form"></webcam-hlsstreamer>
|
||||
</template>
|
||||
<template v-else>
|
||||
<p class="text-center py-3 font-italic">
|
||||
{{ $t('Panels.WebcamPanel.UnknownWebcamService') }}
|
||||
@@ -193,7 +202,7 @@
|
||||
<v-btn text @click="form.bool = false">
|
||||
{{ $t('Settings.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text type="submit">
|
||||
<v-btn color="primary" text type="submit" :disabled="!form.name">
|
||||
{{
|
||||
form.id === null
|
||||
? $t('Settings.WebcamsTab.SaveWebcam')
|
||||
@@ -218,6 +227,7 @@ import Ipstreamer from '@/components/webcams/Ipstreamer.vue'
|
||||
import { mdiMenuDown, mdiDelete, mdiPencil, mdiWebcam } from '@mdi/js'
|
||||
import WebcamMixin from '@/components/mixins/webcam'
|
||||
import { FileStateFile } from '@/store/files/types'
|
||||
import Hlsstreamer from '../webcams/Hlsstreamer.vue'
|
||||
|
||||
interface webcamForm {
|
||||
bool: boolean
|
||||
@@ -241,6 +251,7 @@ interface webcamForm {
|
||||
'webcam-mjpegstreamer-adaptive': MjpegstreamerAdaptive,
|
||||
'webcam-uv4l-mjpeg': Uv4lMjpeg,
|
||||
'webcam-ipstreamer': Ipstreamer,
|
||||
'webcam-hlsstreamer': Hlsstreamer,
|
||||
},
|
||||
})
|
||||
export default class SettingsWebcamsTab extends Mixins(BaseMixin, WebcamMixin) {
|
||||
@@ -304,6 +315,7 @@ export default class SettingsWebcamsTab extends Mixins(BaseMixin, WebcamMixin) {
|
||||
{ value: 'mjpegstreamer-adaptive', text: this.$t('Settings.WebcamsTab.MjpegstreamerAdaptive') },
|
||||
{ value: 'uv4l-mjpeg', text: this.$t('Settings.WebcamsTab.Uv4lMjpeg') },
|
||||
{ value: 'ipstream', text: this.$t('Settings.WebcamsTab.Ipstream') },
|
||||
{ value: 'hlsstream', text: this.$t('Settings.WebcamsTab.Hlsstream') },
|
||||
]
|
||||
}
|
||||
|
||||
@@ -448,4 +460,8 @@ export default class SettingsWebcamsTab extends Mixins(BaseMixin, WebcamMixin) {
|
||||
border: 2px solid var(--color-primary) !important;
|
||||
}
|
||||
}
|
||||
|
||||
._webcam-settings-name-field ::v-deep .v-text-field__details {
|
||||
margin-bottom: -12px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<div class="d-flex justify-center">
|
||||
<video
|
||||
ref="video"
|
||||
v-observe-visibility="visibilityChanged"
|
||||
autoplay
|
||||
muted
|
||||
:style="webcamStyle"
|
||||
class="webcamImage" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import Hls from 'hls.js'
|
||||
|
||||
@Component
|
||||
export default class Hlsstreamer extends Mixins(BaseMixin) {
|
||||
private aspectRatio: null | number = null
|
||||
private isVisible = true
|
||||
private hls: Hls | null = null
|
||||
|
||||
@Prop({ required: true })
|
||||
camSettings: any
|
||||
|
||||
@Prop()
|
||||
printerUrl: string | undefined
|
||||
|
||||
declare $refs: {
|
||||
video: HTMLVideoElement
|
||||
}
|
||||
|
||||
get url() {
|
||||
if (!this.isVisible) return ''
|
||||
|
||||
return this.camSettings.urlStream || ''
|
||||
}
|
||||
|
||||
get webcamStyle() {
|
||||
const output = {
|
||||
transform: 'none',
|
||||
aspectRatio: 16 / 9,
|
||||
maxHeight: window.innerHeight - 155 + 'px',
|
||||
maxWidth: 'auto',
|
||||
}
|
||||
|
||||
let transforms = ''
|
||||
if ('flipX' in this.camSettings && this.camSettings.flipX) transforms += ' scaleX(-1)'
|
||||
if ('flipX' in this.camSettings && this.camSettings.flipY) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimStart().length) return { transform: transforms.trimStart() }
|
||||
|
||||
if (this.aspectRatio) {
|
||||
output.aspectRatio = this.aspectRatio
|
||||
output.maxWidth = (window.innerHeight - 155) * this.aspectRatio + 'px'
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
visibilityChanged(isVisible: boolean) {
|
||||
this.isVisible = isVisible
|
||||
}
|
||||
|
||||
mounted() {
|
||||
this.play()
|
||||
|
||||
const video = this.$refs.video
|
||||
video.onplaying = () => {
|
||||
this.aspectRatio = video.videoWidth / video.videoHeight
|
||||
}
|
||||
}
|
||||
|
||||
updated() {
|
||||
this.play()
|
||||
}
|
||||
|
||||
play() {
|
||||
const video = this.$refs.video
|
||||
|
||||
if (Hls.isSupported()) {
|
||||
this.hls?.destroy()
|
||||
|
||||
this.hls = new Hls({
|
||||
enableWorker: true,
|
||||
lowLatencyMode: true,
|
||||
maxLiveSyncPlaybackRate: 2,
|
||||
liveSyncDuration: 0.5,
|
||||
liveMaxLatencyDuration: 2,
|
||||
backBufferLength: 5,
|
||||
})
|
||||
this.hls.loadSource(this.url)
|
||||
this.hls.attachMedia(video)
|
||||
this.hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||
video.play()
|
||||
})
|
||||
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
fetch(this.url).then(() => {
|
||||
video.src = this.url
|
||||
video.play()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
beforeUnmount() {
|
||||
this.hls?.destroy()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.webcamImage {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,22 +1,5 @@
|
||||
<style scoped>
|
||||
.webcamImage {
|
||||
width: 100%;
|
||||
background: lightgray;
|
||||
}
|
||||
|
||||
.webcamFpsOutput {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: 6px;
|
||||
right: 0;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
padding: 3px 10px;
|
||||
border-top-left-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div style="position: relative">
|
||||
<div style="position: relative" class="d-flex justify-center">
|
||||
<img
|
||||
ref="image"
|
||||
v-observe-visibility="viewportVisibilityChanged"
|
||||
@@ -40,8 +23,10 @@ export default class Mjpegstreamer extends Mixins(BaseMixin) {
|
||||
private currentFPS = 0
|
||||
private streamState = false
|
||||
private aspectRatio: null | number = null
|
||||
private timerFPS: number | null = null
|
||||
private timerRestart: number | null = null
|
||||
// eslint-disable-next-line no-undef
|
||||
private timerFPS: NodeJS.Timeout | null = null
|
||||
// eslint-disable-next-line no-undef
|
||||
private timerRestart: NodeJS.Timeout | null = null
|
||||
private stream: ReadableStream | null = null
|
||||
private controller: AbortController | null = null
|
||||
private isVisibleViewport = false
|
||||
@@ -62,7 +47,8 @@ export default class Mjpegstreamer extends Mixins(BaseMixin) {
|
||||
|
||||
get url() {
|
||||
const baseUrl = this.camSettings.urlStream
|
||||
const url = new URL(baseUrl, this.printerUrl === undefined ? this.hostUrl.toString() : this.printerUrl)
|
||||
let url = new URL(baseUrl, this.printerUrl === undefined ? this.hostUrl.toString() : this.printerUrl)
|
||||
if (baseUrl.startsWith('http') || baseUrl.startsWith('://')) url = new URL(baseUrl)
|
||||
|
||||
return decodeURIComponent(url.toString())
|
||||
}
|
||||
@@ -71,6 +57,8 @@ export default class Mjpegstreamer extends Mixins(BaseMixin) {
|
||||
const output = {
|
||||
transform: 'none',
|
||||
aspectRatio: 16 / 9,
|
||||
maxHeight: window.innerHeight - 155 + 'px',
|
||||
maxWidth: 'auto',
|
||||
}
|
||||
|
||||
let transforms = ''
|
||||
@@ -78,7 +66,10 @@ export default class Mjpegstreamer extends Mixins(BaseMixin) {
|
||||
if ('flipX' in this.camSettings && this.camSettings.flipY) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimStart().length) output.transform = transforms.trimStart()
|
||||
|
||||
if (this.aspectRatio) output.aspectRatio = this.aspectRatio
|
||||
if (this.aspectRatio) {
|
||||
output.aspectRatio = this.aspectRatio
|
||||
output.maxWidth = (window.innerHeight - 155) * this.aspectRatio + 'px'
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
@@ -251,3 +242,20 @@ export default class Mjpegstreamer extends Mixins(BaseMixin) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.webcamImage {
|
||||
width: 100%;
|
||||
background: lightgray;
|
||||
}
|
||||
|
||||
.webcamFpsOutput {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: 6px;
|
||||
right: 0;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
padding: 3px 10px;
|
||||
border-top-left-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,21 +1,5 @@
|
||||
<style scoped>
|
||||
.webcamImage {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.webcamFpsOutput {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: 6px;
|
||||
right: 0;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
padding: 3px 10px;
|
||||
border-top-left-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div style="position: relative">
|
||||
<div style="position: relative" class="d-flex justify-center">
|
||||
<div v-if="!isLoaded" class="text-center py-5">
|
||||
<v-progress-circular indeterminate color="primary"></v-progress-circular>
|
||||
</div>
|
||||
@@ -44,7 +28,8 @@ export default class MjpegstreamerAdaptive extends Mixins(BaseMixin) {
|
||||
private isVisibleDocument = true
|
||||
private isVisibleViewport = false
|
||||
private isLoaded = true
|
||||
private timer: number | undefined = undefined
|
||||
// eslint-disable-next-line no-undef
|
||||
private timer: NodeJS.Timeout | undefined = undefined
|
||||
|
||||
private request_start_time = performance.now()
|
||||
private start_time = performance.now()
|
||||
@@ -67,6 +52,8 @@ export default class MjpegstreamerAdaptive extends Mixins(BaseMixin) {
|
||||
const output = {
|
||||
transform: 'none',
|
||||
aspectRatio: 16 / 9,
|
||||
maxHeight: window.innerHeight - 155 + 'px',
|
||||
maxWidth: 'auto',
|
||||
}
|
||||
|
||||
let transforms = ''
|
||||
@@ -75,7 +62,10 @@ export default class MjpegstreamerAdaptive extends Mixins(BaseMixin) {
|
||||
if ((this.camSettings.rotate ?? 0) === 180) transforms += ' rotate(180deg)'
|
||||
if (transforms.trimStart().length) output.transform = transforms.trimStart()
|
||||
|
||||
if (this.aspectRatio) output.aspectRatio = this.aspectRatio
|
||||
if (this.aspectRatio) {
|
||||
output.aspectRatio = this.aspectRatio
|
||||
output.maxWidth = (window.innerHeight - 155) * this.aspectRatio + 'px'
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
@@ -97,7 +87,9 @@ export default class MjpegstreamerAdaptive extends Mixins(BaseMixin) {
|
||||
|
||||
async setFrame() {
|
||||
const baseUrl = this.camSettings.urlSnapshot
|
||||
const url = new URL(baseUrl, this.printerUrl === undefined ? this.hostUrl.toString() : this.printerUrl)
|
||||
|
||||
let url = new URL(baseUrl, this.printerUrl === undefined ? this.hostUrl.toString() : this.printerUrl)
|
||||
if (baseUrl.startsWith('http') || baseUrl.startsWith('://')) url = new URL(baseUrl)
|
||||
|
||||
url.searchParams.append('bypassCache', this.refresh.toString())
|
||||
|
||||
@@ -112,10 +104,10 @@ export default class MjpegstreamerAdaptive extends Mixins(BaseMixin) {
|
||||
canvas.width = canvas.clientWidth
|
||||
if (this.rotate) {
|
||||
if (this.aspectRatio === null) this.aspectRatio = frame.height / frame.width
|
||||
canvas.height = canvas.clientWidth / (frame.height / frame.width)
|
||||
canvas.height = canvas.clientWidth / this.aspectRatio
|
||||
} else {
|
||||
if (this.aspectRatio === null) this.aspectRatio = frame.width / frame.height
|
||||
canvas.height = canvas.clientWidth * (frame.width / frame.height)
|
||||
canvas.height = canvas.clientWidth * this.aspectRatio
|
||||
}
|
||||
|
||||
if (this.rotate) {
|
||||
@@ -221,3 +213,19 @@ export default class MjpegstreamerAdaptive extends Mixins(BaseMixin) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.webcamImage {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.webcamFpsOutput {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: 6px;
|
||||
right: 0;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
padding: 3px 10px;
|
||||
border-top-left-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,17 +1,12 @@
|
||||
<style scoped>
|
||||
.webcamImage {
|
||||
width: 100%;
|
||||
background: lightgray;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<img
|
||||
ref="webcamUv4lMjpegImage"
|
||||
v-observe-visibility="viewportVisibilityChanged"
|
||||
:style="webcamStyle"
|
||||
class="webcamImage"
|
||||
@load="onload" />
|
||||
<div class="d-flex justify-center">
|
||||
<img
|
||||
ref="webcamUv4lMjpegImage"
|
||||
v-observe-visibility="viewportVisibilityChanged"
|
||||
:style="webcamStyle"
|
||||
class="webcamImage"
|
||||
@load="onload" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -27,7 +22,7 @@ export default class Uv4lMjpeg extends Mixins(BaseMixin) {
|
||||
private isVisibleDocument = true
|
||||
|
||||
@Prop({ required: true }) declare readonly camSettings: GuiWebcamStateWebcam
|
||||
@Prop({ default: null }) declare readonly printerUrl: string | null
|
||||
@Prop() declare printerUrl: string | undefined
|
||||
|
||||
declare $refs: {
|
||||
webcamUv4lMjpegImage: HTMLImageElement
|
||||
@@ -35,7 +30,8 @@ export default class Uv4lMjpeg extends Mixins(BaseMixin) {
|
||||
|
||||
get url() {
|
||||
const baseUrl = this.camSettings.urlStream
|
||||
const url = new URL(baseUrl, this.printerUrl === null ? this.hostUrl.toString() : this.printerUrl)
|
||||
let url = new URL(baseUrl, this.printerUrl === undefined ? this.hostUrl.toString() : this.printerUrl)
|
||||
if (baseUrl.startsWith('http') || baseUrl.startsWith('://')) url = new URL(baseUrl)
|
||||
|
||||
return decodeURIComponent(url.toString())
|
||||
}
|
||||
@@ -44,6 +40,8 @@ export default class Uv4lMjpeg extends Mixins(BaseMixin) {
|
||||
const output = {
|
||||
transform: 'none',
|
||||
aspectRatio: 16 / 9,
|
||||
maxHeight: window.innerHeight - 155 + 'px',
|
||||
maxWidth: 'auto',
|
||||
}
|
||||
|
||||
let transforms = ''
|
||||
@@ -51,7 +49,10 @@ export default class Uv4lMjpeg extends Mixins(BaseMixin) {
|
||||
if ('flipX' in this.camSettings && this.camSettings.flipY) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimStart().length) output.transform = transforms.trimStart()
|
||||
|
||||
if (this.aspectRatio) output.aspectRatio = this.aspectRatio
|
||||
if (this.aspectRatio) {
|
||||
output.aspectRatio = this.aspectRatio
|
||||
output.maxWidth = (window.innerHeight - 155) * this.aspectRatio + 'px'
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
@@ -115,3 +116,10 @@ export default class Uv4lMjpeg extends Mixins(BaseMixin) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.webcamImage {
|
||||
width: 100%;
|
||||
background: lightgray;
|
||||
}
|
||||
</style>
|
||||
@@ -16,6 +16,9 @@
|
||||
<template v-else-if="webcam.service === 'ipstream'">
|
||||
<webcam-ipstreamer :cam-settings="webcam"></webcam-ipstreamer>
|
||||
</template>
|
||||
<template v-else-if="webcam.service === 'hlsstream'">
|
||||
<webcam-hlsstreamer :cam-settings="webcam"></webcam-hlsstreamer>
|
||||
</template>
|
||||
<template v-else>
|
||||
<p class="text-center py-3 font-italic">{{ $t('Panels.WebcamPanel.UnknownWebcamService') }}</p>
|
||||
</template>
|
||||
@@ -31,6 +34,7 @@ import Mjpegstreamer from '@/components/webcams/Mjpegstreamer.vue'
|
||||
import MjpegstreamerAdaptive from '@/components/webcams/MjpegstreamerAdaptive.vue'
|
||||
import Uv4lMjpeg from '@/components/webcams/Uv4lMjpeg.vue'
|
||||
import Ipstreamer from '@/components/webcams/Ipstreamer.vue'
|
||||
import Hlsstreamer from '@/components/webcams/Hlsstreamer.vue'
|
||||
import { GuiWebcamStateWebcam } from '@/store/gui/webcams/types'
|
||||
|
||||
@Component({
|
||||
@@ -39,6 +43,7 @@ import { GuiWebcamStateWebcam } from '@/store/gui/webcams/types'
|
||||
'webcam-mjpegstreamer-adaptive': MjpegstreamerAdaptive,
|
||||
'webcam-uv4l-mjpeg': Uv4lMjpeg,
|
||||
'webcam-ipstreamer': Ipstreamer,
|
||||
'webcam-hlsstreamer': Hlsstreamer,
|
||||
},
|
||||
})
|
||||
export default class WebcamGrid extends Mixins(BaseMixin) {
|
||||
|
||||
+67
-10
@@ -107,6 +107,17 @@
|
||||
"UpdatingDone": "Opdatering af {software} udført!"
|
||||
}
|
||||
},
|
||||
"BedScrews": {
|
||||
"Abort": "Afbryd",
|
||||
"Accept": "Acceptér",
|
||||
"Adjusted": "Justeret",
|
||||
"Description": "Klik på <b>Justeret</b> hvis skruen blev justeret. Klik på <b>Acceptér</b> for at fortsætte uden justering.",
|
||||
"Headline": "Bed skruer",
|
||||
"ScrewAccepted": "Skrue accepteret",
|
||||
"ScrewIndex": "Skrue Index",
|
||||
"ScrewName": "Skrue Navn",
|
||||
"ScrewOutput": "{current} af {max}"
|
||||
},
|
||||
"ConnectionDialog": {
|
||||
"CannotConnectTo": "Kan ikke forbinde med Moonraker ({host}).",
|
||||
"CheckMoonrakerLog": "Hvis denne besked vises flere gange, kig da i logfilen her:",
|
||||
@@ -179,7 +190,10 @@
|
||||
"Free": "Ledig",
|
||||
"FreeDisk": "Ledig plads",
|
||||
"GCodeFiles": "G-Code Filer",
|
||||
"GcodesRootDirectoryDoesntExists": "Ingen mappe med g-koder fundet. Tjek at opsætning af \"path\" under [virtual_sdcard] sektionen i printer.cfg er korrekt.",
|
||||
"HiddenFiles": "Skjulte filer",
|
||||
"InvalidNameAlreadyExists": "Navnet eksisterer allerede, vælg venligst et andet navn.",
|
||||
"InvalidNameEmpty": "Feltet må ikke være tomt!",
|
||||
"LastEndTime": "Sidste slut tid",
|
||||
"LastFilamentUsed": "Sidste filament forbrug",
|
||||
"LastModified": "Sidst ændret",
|
||||
@@ -252,8 +266,8 @@
|
||||
"Max": "Maks",
|
||||
"Min": "Min",
|
||||
"Name": "Navn",
|
||||
"Size": "Størrelse",
|
||||
"Variance": "Variation"
|
||||
"Range": "Variation",
|
||||
"Size": "Størrelse"
|
||||
},
|
||||
"DeleteBedMeshProfile": "Slet Bed Mesh profil",
|
||||
"DoYouReallyWantToDelete": "Vil du slette \"{name}\"?",
|
||||
@@ -288,7 +302,6 @@
|
||||
"AllJobs": "Alle job",
|
||||
"AvgPrinttime": "Gns. printtid",
|
||||
"Cancel": "Annuller",
|
||||
"ChamberTemp": "Indelukke temperatur",
|
||||
"CreateNote": "Gem note",
|
||||
"Delete": "Slet",
|
||||
"DeleteSelectedQuestion": "Er du sikker på du vil slette alle {count} valgte jobs?",
|
||||
@@ -338,6 +351,7 @@
|
||||
"in_progress": "Igangværende",
|
||||
"klippy_disconnect": "Klippy afbrudt",
|
||||
"klippy_shutdown": "Klippy lukket ned",
|
||||
"Others": "Andre",
|
||||
"server_exit": "Server exit"
|
||||
},
|
||||
"TitleExportHistory": "Export History",
|
||||
@@ -363,6 +377,7 @@
|
||||
"AllFiles": "Alle",
|
||||
"Cancel": "Annuller",
|
||||
"ConfigFiles": "Konfigurationsfiler",
|
||||
"ConfigRootDirectoryDoesntExists": "Ingen konfiguration fundet. Tjek venligst opsætningen af \"config_path\" under [file_manager] sektionen af Moonraker konfigurationen.",
|
||||
"Create": "Ny",
|
||||
"CreateDirectory": "Ny mappe",
|
||||
"CreateFile": "Ny Fil",
|
||||
@@ -453,6 +468,12 @@
|
||||
"UpToDate": "up-to-date"
|
||||
}
|
||||
},
|
||||
"ManualProbe": {
|
||||
"Abort": "Afbryd",
|
||||
"Accept": "Acceptér",
|
||||
"Advanced": "Avanceret",
|
||||
"Headline": "Manuel Probing"
|
||||
},
|
||||
"Panels": {
|
||||
"ExtruderControlPanel": {
|
||||
"Allowed": "Tilladt",
|
||||
@@ -488,9 +509,9 @@
|
||||
"KlippyStatePanel": {
|
||||
"FirmwareRestart": "Genstart alt",
|
||||
"KlipperCheck": "Check at Klipper service kører og at en UDS (Unix Domain Socket) er konfigureret.",
|
||||
"KlippyState": "Klippy-Status",
|
||||
"MoonrakerCannotConnect": "Moonraker kan ikke forbinde til Klipper!",
|
||||
"Restart": "Genstart"
|
||||
"Restart": "Genstart",
|
||||
"ServiceReports": "{service} rapporter"
|
||||
},
|
||||
"MachineSettingsPanel": {
|
||||
"Headline": "Printer indstillinger",
|
||||
@@ -520,6 +541,12 @@
|
||||
},
|
||||
"MiscellaneousPanel": {
|
||||
"Headline": "Diverse",
|
||||
"Light": {
|
||||
"Blue": "blå",
|
||||
"Green": "grøn",
|
||||
"Red": "rød",
|
||||
"White": "hvid"
|
||||
},
|
||||
"RunoutSensor": {
|
||||
"Detected": "Fundet",
|
||||
"Disabled": "Deaktiveret",
|
||||
@@ -599,8 +626,6 @@
|
||||
"Absolute": "absolut",
|
||||
"ALL": "Alle",
|
||||
"Headline": "Kontrolpanel",
|
||||
"Invalid": "Ugyldig",
|
||||
"OutOfRange": "Uden for grænse!",
|
||||
"PleaseConfigureSteps": "Konfigurer steps",
|
||||
"Position": "Position",
|
||||
"QGL": "QGL",
|
||||
@@ -752,6 +777,8 @@
|
||||
"ShowAxes": "Vis akser"
|
||||
},
|
||||
"GeneralTab": {
|
||||
"12hours": "12-timers ({time})",
|
||||
"24hours": "24-timers ({time})",
|
||||
"Backup": "Backup",
|
||||
"BackupDialog": "Vælg de sektioner du ønsker at lave backup af:",
|
||||
"CalcEstimateTime": "Beregn estimeret printtid",
|
||||
@@ -767,6 +794,7 @@
|
||||
"Slicer": "Slicer (M73)"
|
||||
},
|
||||
"CannotReadJson": "Kan ikke læse backup-fil",
|
||||
"DateFormat": "Datoformat",
|
||||
"DbConsoleHistory": "Terminal Historik",
|
||||
"DbHistoryJobs": "Jobhistorik",
|
||||
"DbHistoryTotals": "Totalhistorik",
|
||||
@@ -786,7 +814,8 @@
|
||||
"PrinterName": "Printernavn",
|
||||
"Reset": "Nulstil",
|
||||
"Restore": "Gendan",
|
||||
"RestoreDialog": "Vælg de sektioner du ønsker at gendanne fra backup:"
|
||||
"RestoreDialog": "Vælg de sektioner du ønsker at gendanne fra backup:",
|
||||
"TimeFormat": "Tidsformat"
|
||||
},
|
||||
"InterfaceSettings": "Interfaceindstillinger",
|
||||
"MacrosTab": {
|
||||
@@ -825,6 +854,29 @@
|
||||
"UnknownGroup": "Ukendt gruppe",
|
||||
"Warning": "Advarsel"
|
||||
},
|
||||
"MiscellaneousTab": {
|
||||
"AddGroup": "Tilføj gruppe",
|
||||
"AddPreset": "Tilføj forudindstilling",
|
||||
"Color": "Farve",
|
||||
"CreateGroup": "Tilføj gruppe",
|
||||
"CreatePreset": "Tilføj forudindstilling",
|
||||
"End": "Slut",
|
||||
"EndDescription": "Sidste LED i denne gruppe.",
|
||||
"Groups": "Grupper",
|
||||
"GroupSubTitle": "Start: {start}, Slut: {end}",
|
||||
"LightGroups": "{name} - Grupper",
|
||||
"LightPresets": "{name} - Forudindstillinger",
|
||||
"Miscellaneous": "Diverse",
|
||||
"Name": "Navn",
|
||||
"NoDevicesFound": "Ingen enheder fundet",
|
||||
"NoGroupFound": "Ingen gruppe fundet",
|
||||
"NoPresetFound": "Ingen forudindstilling fundet",
|
||||
"Presets": "Forudindstillinger",
|
||||
"Start": "Første",
|
||||
"StartDescription": "Første LED i denne gruppe.",
|
||||
"UnableToLoadLight": "Kunne ikke indlæse LED",
|
||||
"UnableToLoadPreset": "Kunne ikke indlæse forudindstilling"
|
||||
},
|
||||
"PresetsTab": {
|
||||
"AddPreset": "Tilføj forudindstilling",
|
||||
"Cooldown": "Nedkøling",
|
||||
@@ -852,6 +904,7 @@
|
||||
"UpdatePrinter": "Opdater printer",
|
||||
"UseConfigJson": "InstanceDB = JSON fundet. Brug venligst config.json til at ændre på printerlisten."
|
||||
},
|
||||
"Store": "Gem",
|
||||
"TimelapseTab": {
|
||||
"Autorender": "Autorendering",
|
||||
"AutorenderDescription": "Hvis aktiv, vil Timelapse video automatisk blive renderet efter afsluttet print.",
|
||||
@@ -946,12 +999,14 @@
|
||||
"ShowWebcamInNavigation": "Vis Webcam i navigation",
|
||||
"UiSettings": "UI-indstillinger"
|
||||
},
|
||||
"Update": "Opdater",
|
||||
"WebcamsTab": {
|
||||
"AddWebcam": "Tilføj webcam",
|
||||
"CreateWebcam": "Nyt Webcam",
|
||||
"EditCrowsnestConf": "Redigér crowsnest.conf",
|
||||
"EditWebcam": "Rediger Webcam",
|
||||
"FlipHorizontally": "Vend webcam horisontalt",
|
||||
"FlipVertically": "Vend webcam vertikalt",
|
||||
"FlipWebcam": "Vend webcam-billedet:",
|
||||
"Horizontally": "horisontalt",
|
||||
"IconBed": "Bed",
|
||||
"IconCam": "Kamera",
|
||||
"IconDoor": "Dør",
|
||||
@@ -974,6 +1029,7 @@
|
||||
"UrlSnapshot": "URL Snapshot",
|
||||
"UrlStream": "URL Stream",
|
||||
"Uv4lMjpeg": "UV4L-MJPEG",
|
||||
"Vertically": "vertikalt",
|
||||
"Webcams": "Webcams"
|
||||
}
|
||||
},
|
||||
@@ -987,6 +1043,7 @@
|
||||
"Delete": "Slet",
|
||||
"DeleteDirectory": "Slet mappe",
|
||||
"DeleteDirectoryQuestion": "Vil du slette mappen \"{name}\" og alt dens indhold?",
|
||||
"DeleteSelectedQuestion": "Er du sikker på du vil slette alle {count} valgte filer?",
|
||||
"Download": "Download",
|
||||
"DuplicateLastframe": "Dupliker sidste frame",
|
||||
"Empty": "Ingen færdige Timelapse filer fundet.",
|
||||
|
||||
+75
-10
@@ -107,6 +107,17 @@
|
||||
"UpdatingDone": "Aktualisierung {software} abgeschlossen!"
|
||||
}
|
||||
},
|
||||
"BedScrews": {
|
||||
"Abort": "abbrechen",
|
||||
"Accept": "bestätigen",
|
||||
"Adjusted": "angepasst",
|
||||
"Description": "Klick auf <b>ANGEPASST</b> wenn die aktuelle Schraube eingestellt wurde. Klick auf <b>BESTÄTIGEN</b> um fortzufahren ohne Anpassung.",
|
||||
"Headline": "Bettschrauben",
|
||||
"ScrewAccepted": "bestätigte Schrauben",
|
||||
"ScrewIndex": "Index der Schraube",
|
||||
"ScrewName": "Name der Schraube",
|
||||
"ScrewOutput": "{current} von {max}"
|
||||
},
|
||||
"ConnectionDialog": {
|
||||
"CannotConnectTo": "Kann keine Verbindung zu Moonraker ({host}) herstellen.",
|
||||
"CheckMoonrakerLog": "Wenn diese Meldung wiederholt erscheint, schaue bitte in die Logdatei unter:",
|
||||
@@ -181,6 +192,8 @@
|
||||
"GCodeFiles": "G-Code Dateien",
|
||||
"GcodesRootDirectoryDoesntExists": "Keinen G-Code Ordner gefunden. Bitte überprüfe die Option \"path\" im Abschnitt [virtual_sdcard] in der Klipper Konfiguration.",
|
||||
"HiddenFiles": "Versteckte Dateien",
|
||||
"InvalidNameAlreadyExists": "Name existiert bereits, bitte wähle einen anderen Namen.",
|
||||
"InvalidNameEmpty": "Feld darf nicht leer sein!",
|
||||
"LastEndTime": "Letzte Endzeit",
|
||||
"LastFilamentUsed": "Letzter Filamentverbrauch",
|
||||
"LastModified": "Zuletzt geändert",
|
||||
@@ -253,8 +266,8 @@
|
||||
"Max": "Max",
|
||||
"Min": "Min",
|
||||
"Name": "Name",
|
||||
"Size": "Größe",
|
||||
"Variance": "Varianz"
|
||||
"Range": "Spannweite",
|
||||
"Size": "Größe"
|
||||
},
|
||||
"DeleteBedMeshProfile": "Lösche Bed Mesh",
|
||||
"DoYouReallyWantToDelete": "Möchtest du das Profil \"{name}\" wirklich löschen?",
|
||||
@@ -289,7 +302,6 @@
|
||||
"AllJobs": "Alle",
|
||||
"AvgPrinttime": "Druckzeit - Ø",
|
||||
"Cancel": "abbrechen",
|
||||
"ChamberTemp": "Kammer Temp.",
|
||||
"CreateNote": "Notiz anlegen",
|
||||
"Delete": "Löschen",
|
||||
"DeleteSelectedQuestion": "Sollen wirklich {count} ausgewählte Jobs gelöscht werden?",
|
||||
@@ -456,6 +468,12 @@
|
||||
"UpToDate": "aktuell"
|
||||
}
|
||||
},
|
||||
"ManualProbe": {
|
||||
"Abort": "abbrechen",
|
||||
"Accept": "akzeptieren",
|
||||
"Advanced": "Erweitert",
|
||||
"Headline": "Manuelle Messung"
|
||||
},
|
||||
"Panels": {
|
||||
"ExtruderControlPanel": {
|
||||
"Allowed": "Erlaubt",
|
||||
@@ -489,11 +507,14 @@
|
||||
"WebcamOff": "Aus"
|
||||
},
|
||||
"KlippyStatePanel": {
|
||||
"CheckKlippyAndUdsAddress": "Bitte überprüfen, ob der Klipper-Dienst läuft und klippy_uds_address in der moonraker.conf korrekt konfiguriert ist.",
|
||||
"FirmwareRestart": "Firmware Neustart",
|
||||
"KlipperCheck": "Bitte überprüfen Sie, ob der Klipper-Dienst läuft und ein UDS (Unix Domain Socket) konfiguriert ist.",
|
||||
"KlippyState": "Klippy-Status",
|
||||
"MoonrakerCannotConnect": "Moonraker kann keine Verbindung zu Klipper herstellen!",
|
||||
"Restart": "Neustart"
|
||||
"PowerOn": "Drucker einschalten",
|
||||
"PrinterSwitchedOff": "Drucker ist ausgeschaltet",
|
||||
"PrinterSwitchedOffDescription": "Der Drucker ist ausgeschaltet und es kann keine Verbindung zu Klipper hergestellt werden. Um den Drucker einzuschalten, auf die Schaltfläche unten klicken:",
|
||||
"Restart": "Neustart",
|
||||
"ServiceReports": "{service} meldet"
|
||||
},
|
||||
"MachineSettingsPanel": {
|
||||
"Headline": "Maschine",
|
||||
@@ -523,6 +544,12 @@
|
||||
},
|
||||
"MiscellaneousPanel": {
|
||||
"Headline": "Sonstiges",
|
||||
"Light": {
|
||||
"Blue": "blau",
|
||||
"Green": "grün",
|
||||
"Red": "rot",
|
||||
"White": "weiß"
|
||||
},
|
||||
"RunoutSensor": {
|
||||
"Detected": "erkannt",
|
||||
"Disabled": "deaktiviert",
|
||||
@@ -560,6 +587,18 @@
|
||||
"Layer": "Schicht",
|
||||
"Max": "max",
|
||||
"ObjectHeight": "Objekthöhe",
|
||||
"PauseAtLayer": {
|
||||
"Abort": "abbrechen",
|
||||
"Accept": "akzeptieren",
|
||||
"AtLayer": "bei Schicht",
|
||||
"Call": "Ausführen",
|
||||
"DescriptionPauseAtLayerActive": "Diese Funktion ist bereits aktiv und wird \"{call}\" bei Schicht {layer} ausführen. Wenn der Befehl nochmal ausgeführt wird, werden die Einstellungen überschreiben.",
|
||||
"DescriptionPauseNextLayerActive": "Diese Funktion ist bereits aktiv und bei der nächsten Schicht wird \"{call}\" ausgeführt.",
|
||||
"Layer": "Schicht",
|
||||
"NextLayer": "nächste Schicht",
|
||||
"PauseAtLayer": "Pause bei Schicht",
|
||||
"Type": "Art"
|
||||
},
|
||||
"PausePrint": "Druck pausieren",
|
||||
"Print": "Druck",
|
||||
"PrintTime": "Druckzeit",
|
||||
@@ -602,8 +641,6 @@
|
||||
"Absolute": "absolut",
|
||||
"ALL": "ALLE",
|
||||
"Headline": "Werkzeugkopf",
|
||||
"Invalid": "Ungültig",
|
||||
"OutOfRange": "Außerhalb der Maschinengrenze!",
|
||||
"PleaseConfigureSteps": "Bitte Schritte konfigurieren",
|
||||
"Position": "Position",
|
||||
"QGL": "QGL",
|
||||
@@ -828,6 +865,29 @@
|
||||
"UnknownGroup": "Unbekannte Gruppe",
|
||||
"Warning": "Warnung"
|
||||
},
|
||||
"MiscellaneousTab": {
|
||||
"AddGroup": "Gruppe hinzufügen",
|
||||
"AddPreset": "Voreinstellung hinzufügen",
|
||||
"Color": "Farbe",
|
||||
"CreateGroup": "Gruppe erstellen",
|
||||
"CreatePreset": "Voreinstellung erstellen",
|
||||
"End": "Ende",
|
||||
"EndDescription": "Letzte LED von dieser Gruppe.",
|
||||
"Groups": "Gruppen",
|
||||
"GroupSubTitle": "Start: {start}, Ende: {end}",
|
||||
"LightGroups": "{name} - Gruppen",
|
||||
"LightPresets": "{name} - Voreinstellungen",
|
||||
"Miscellaneous": "Sonstiges",
|
||||
"Name": "Name",
|
||||
"NoDevicesFound": "Keine Komponente gefunden",
|
||||
"NoGroupFound": "Keine Gruppe gefunden",
|
||||
"NoPresetFound": "Keine Voreinstellungen gefunden",
|
||||
"Presets": "Voreinstellungen",
|
||||
"Start": "Start",
|
||||
"StartDescription": "Erste LED von dieser Gruppe.",
|
||||
"UnableToLoadLight": "Licht konnte nicht geladen werden",
|
||||
"UnableToLoadPreset": "Voreinstellung konnte nicht geladen werden"
|
||||
},
|
||||
"PresetsTab": {
|
||||
"AddPreset": "Preset hinzufügen",
|
||||
"Cooldown": "Abkühlen",
|
||||
@@ -855,6 +915,7 @@
|
||||
"UpdatePrinter": "Drucker aktualisieren",
|
||||
"UseConfigJson": "InstanceDB = JSON erkannt. Bitte bearbeite die config.json um die Druckerliste zu modifizieren."
|
||||
},
|
||||
"Store": "anlegen",
|
||||
"TimelapseTab": {
|
||||
"Autorender": "Autorender",
|
||||
"AutorenderDescription": "Wenn diese Option aktiviert ist, wird das Zeitraffervideo am Ende des Druckvorgangs automatisch gerendert",
|
||||
@@ -936,6 +997,8 @@
|
||||
"GcodeThumbnails": "G-Code Vorschaubilder",
|
||||
"GcodeThumbnailsDescription": "Klicke auf die Schaltfläche um zum Leitfaden zu gelangen.",
|
||||
"Guide": "Leitfaden",
|
||||
"HideSaveConfigButtonForBedMesh": "SAVE_CONFIG Schaltfläche ausblenden bei bed_mesh Änderungen",
|
||||
"HideSaveConfigButtonForBedMeshDescription": "SAVE_CONFIG nicht anzeigen, wenn nur das Speichern eines bed_mesh in Klipper aussteht.",
|
||||
"LockSliders": "Sperre Schieberegler auf Touchscreen Geräten",
|
||||
"LockSlidersDelay": "Verzögerung der Sperre für Schieberegler",
|
||||
"LockSlidersDelayDescription": "Schieberegler werden nach einer bestimmten Verzögerung gesperrt. Wenn 0 oder leer, dann sperren Schieberegler nur nach wechseln/neuladen der Seite.",
|
||||
@@ -949,13 +1012,14 @@
|
||||
"ShowWebcamInNavigation": "Zeige Webcam in der Navigation",
|
||||
"UiSettings": "UI-Einstellungen"
|
||||
},
|
||||
"Update": "speichern",
|
||||
"WebcamsTab": {
|
||||
"AddWebcam": "Webcam hinzufügen",
|
||||
"CreateWebcam": "Erstelle Webcam",
|
||||
"EditCrowsnestConf": "crowsnest.conf bearbeiten",
|
||||
"EditWebcam": "Webcam bearbeiten",
|
||||
"FlipHorizontally": "Webcam waagerecht spiegeln",
|
||||
"FlipVertically": "Webcam vertikal spiegeln",
|
||||
"FlipWebcam": "Webcam-Bild spiegeln:",
|
||||
"Horizontally": "horizontal",
|
||||
"IconBed": "Bett",
|
||||
"IconCam": "Kamera",
|
||||
"IconDoor": "Tür",
|
||||
@@ -978,6 +1042,7 @@
|
||||
"UrlSnapshot": "Schnappschuss URL",
|
||||
"UrlStream": "Stream URL",
|
||||
"Uv4lMjpeg": "UV4L-MJPEG",
|
||||
"Vertically": "vertikal",
|
||||
"Webcams": "Webcams"
|
||||
}
|
||||
},
|
||||
|
||||
+108
-13
@@ -107,6 +107,17 @@
|
||||
"UpdatingDone": "Updating {software} done!"
|
||||
}
|
||||
},
|
||||
"BedScrews": {
|
||||
"Abort": "abort",
|
||||
"Accept": "accept",
|
||||
"Adjusted": "adjusted",
|
||||
"Description": "Click on <b>ADJUSTED</b> if the current screw was adjusted. Click on <b>ACCEPT</b> to continue without adjustment.",
|
||||
"Headline": "Bed Screws",
|
||||
"ScrewAccepted": "Screws accepted",
|
||||
"ScrewIndex": "Screw Index",
|
||||
"ScrewName": "Screw Name",
|
||||
"ScrewOutput": "{current} of {max}"
|
||||
},
|
||||
"ConnectionDialog": {
|
||||
"CannotConnectTo": "Cannot connect to Moonraker ({host}).",
|
||||
"CheckMoonrakerLog": "If this message appears repeatedly, please have a look in the log file located at:",
|
||||
@@ -153,11 +164,13 @@
|
||||
"Yes": "Yes"
|
||||
},
|
||||
"Files": {
|
||||
"AddBatchToQueue": "Add batch to Queue",
|
||||
"AddToQueue": "Add to Queue",
|
||||
"AllFiles": "All",
|
||||
"BedTemp": "Bed Temp.",
|
||||
"Cancel": "Cancel",
|
||||
"ChamberTemp": "Chamber Temp.",
|
||||
"Count": "Count",
|
||||
"Create": "Create",
|
||||
"CreateNewDirectory": "Create new Directory",
|
||||
"CurrentPath": "Current path",
|
||||
@@ -181,6 +194,8 @@
|
||||
"GCodeFiles": "G-Code Files",
|
||||
"GcodesRootDirectoryDoesntExists": "No G-Code directory found. Please check option \"path\" in the [virtual_sdcard] section of the Klipper configuration.",
|
||||
"HiddenFiles": "Hidden files",
|
||||
"InvalidNameAlreadyExists": "Name already exists, please choose another name.",
|
||||
"InvalidNameEmpty": "Input must not be empty!",
|
||||
"LastEndTime": "Last End Time",
|
||||
"LastFilamentUsed": "Last Filament Used",
|
||||
"LastModified": "Last modified",
|
||||
@@ -240,7 +255,9 @@
|
||||
"Tracking": "Tracking",
|
||||
"Transparency": "Transparency",
|
||||
"Ultra": "Ultra",
|
||||
"VoxelMode": "Voxel Mode (ASMBL)"
|
||||
"VoxelMode": "Voxel Mode (ASMBL)",
|
||||
"ShowGCode": "Show G-Code",
|
||||
"CNCMode": "CNC Mode"
|
||||
},
|
||||
"Heightmap": {
|
||||
"Abort": "abort",
|
||||
@@ -253,8 +270,8 @@
|
||||
"Max": "Max",
|
||||
"Min": "Min",
|
||||
"Name": "Name",
|
||||
"Size": "Size",
|
||||
"Variance": "Variance"
|
||||
"Range": "Range",
|
||||
"Size": "Size"
|
||||
},
|
||||
"DeleteBedMeshProfile": "Delete Bed Mesh Profile",
|
||||
"DoYouReallyWantToDelete": "Do you really want to delete the profile \"{name}\"?",
|
||||
@@ -289,8 +306,8 @@
|
||||
"AllJobs": "All",
|
||||
"AvgPrinttime": "Print Time - Ø",
|
||||
"Cancel": "Cancel",
|
||||
"ChamberTemp": "Chamber Temp.",
|
||||
"CreateNote": "Create Note",
|
||||
"Chart": "Chart",
|
||||
"Delete": "Delete",
|
||||
"DeleteSelectedQuestion": "Do you really want to delete {count} selected jobs?",
|
||||
"Details": "Details",
|
||||
@@ -342,6 +359,7 @@
|
||||
"Others": "Others",
|
||||
"server_exit": "Server exit"
|
||||
},
|
||||
"Table": "Table",
|
||||
"TitleExportHistory": "Export History",
|
||||
"TitleRefreshHistory": "Refresh History",
|
||||
"TitleSettings": "Settings",
|
||||
@@ -353,7 +371,12 @@
|
||||
},
|
||||
"JobQueue": {
|
||||
"AllJobs": "All Jobs",
|
||||
"ChangeCount": "Change count",
|
||||
"Cancel": "Cancel",
|
||||
"Count": "Count",
|
||||
"Empty": "Empty",
|
||||
"InvalidCountEmpty": "Input must not be empty!",
|
||||
"InvalidCountGreaterZero": "Input must be greater than 0!",
|
||||
"JobQueue": "Job Queue",
|
||||
"Jobs": "Jobs",
|
||||
"Pause": "Pause",
|
||||
@@ -405,7 +428,13 @@
|
||||
"TRIGGERED": "TRIGGERED"
|
||||
},
|
||||
"LogfilesPanel": {
|
||||
"Logfiles": "Log Files"
|
||||
"Accept": "accept",
|
||||
"Cancel": "cancel",
|
||||
"Logfiles": "Log Files",
|
||||
"Rollover": "Rollover Logs",
|
||||
"RolloverDescription": "Please select which logs should be reset:",
|
||||
"RolloverToastSuccessful": "Log for \"{name}\"was successfully reset.",
|
||||
"RolloverToastFailed": "Rollover log for \"{name}\": {message}"
|
||||
},
|
||||
"SystemPanel": {
|
||||
"Constants": "Constants",
|
||||
@@ -456,6 +485,12 @@
|
||||
"UpToDate": "up-to-date"
|
||||
}
|
||||
},
|
||||
"ManualProbe": {
|
||||
"Abort": "abort",
|
||||
"Accept": "accept",
|
||||
"Advanced": "Advanced",
|
||||
"Headline": "Manual Probe"
|
||||
},
|
||||
"Panels": {
|
||||
"ExtruderControlPanel": {
|
||||
"Allowed": "Allowed",
|
||||
@@ -489,11 +524,14 @@
|
||||
"WebcamOff": "Off"
|
||||
},
|
||||
"KlippyStatePanel": {
|
||||
"CheckKlippyAndUdsAddress": "Please check if the Klipper service is running and klippy_uds_address is correctly configured in the moonraker.conf.",
|
||||
"FirmwareRestart": "Firmware Restart",
|
||||
"KlipperCheck": "Please check if the Klipper service is running and an UDS (Unix Domain Socket) is configured.",
|
||||
"KlippyState": "Klippy-State",
|
||||
"MoonrakerCannotConnect": "Moonraker can't connect to Klipper!",
|
||||
"Restart": "Restart"
|
||||
"PowerOn": "Power on",
|
||||
"PrinterSwitchedOff": "Printer is powered off",
|
||||
"PrinterSwitchedOffDescription": "The printer is currently powered off and Klipper cannot connect. To power on the printer, click the button below:",
|
||||
"Restart": "Restart",
|
||||
"ServiceReports": "{service} reports"
|
||||
},
|
||||
"MachineSettingsPanel": {
|
||||
"Headline": "Machine",
|
||||
@@ -523,6 +561,12 @@
|
||||
},
|
||||
"MiscellaneousPanel": {
|
||||
"Headline": "Miscellaneous",
|
||||
"Light": {
|
||||
"Blue": "blue",
|
||||
"Green": "green",
|
||||
"Red": "red",
|
||||
"White": "white"
|
||||
},
|
||||
"RunoutSensor": {
|
||||
"Detected": "detected",
|
||||
"Disabled": "disabled",
|
||||
@@ -560,6 +604,18 @@
|
||||
"Layer": "Layer",
|
||||
"Max": "max",
|
||||
"ObjectHeight": "Object Height",
|
||||
"PauseAtLayer": {
|
||||
"Abort": "abort",
|
||||
"Accept": "accept",
|
||||
"AtLayer": "at Layer",
|
||||
"Call": "Call",
|
||||
"DescriptionPauseAtLayerActive": "This function is already active and will call \"{call}\" at layer {layer}. If you call the command again, these settings will be overwritten.",
|
||||
"DescriptionPauseNextLayerActive": "This function is already active and will call \"{call}\" at the next layer.",
|
||||
"Layer": "Layer",
|
||||
"NextLayer": "next Layer",
|
||||
"PauseAtLayer": "Pause at Layer",
|
||||
"Type": "Type"
|
||||
},
|
||||
"PausePrint": "Pause print",
|
||||
"Print": "Print",
|
||||
"PrintTime": "Print Time",
|
||||
@@ -602,8 +658,6 @@
|
||||
"Absolute": "absolute",
|
||||
"ALL": "ALL",
|
||||
"Headline": "Toolhead",
|
||||
"Invalid": "Invalid",
|
||||
"OutOfRange": "Out of range!",
|
||||
"PleaseConfigureSteps": "Please configure steps",
|
||||
"Position": "Position",
|
||||
"QGL": "QGL",
|
||||
@@ -755,6 +809,8 @@
|
||||
"ShowAxes": "Show Axes"
|
||||
},
|
||||
"GeneralTab": {
|
||||
"12hours": "12-hours ({time})",
|
||||
"24hours": "24-hours ({time})",
|
||||
"Backup": "Backup",
|
||||
"BackupDialog": "Please select all the sections you want to create a backup:",
|
||||
"CalcEstimateTime": "Estimate time calculation",
|
||||
@@ -770,6 +826,7 @@
|
||||
"Slicer": "Slicer (M73)"
|
||||
},
|
||||
"CannotReadJson": "Cannot read/parse backup file.",
|
||||
"DateFormat": "Date Format",
|
||||
"DbConsoleHistory": "Console History",
|
||||
"DbHistoryJobs": "History Jobs",
|
||||
"DbHistoryTotals": "History Totals",
|
||||
@@ -789,7 +846,8 @@
|
||||
"PrinterName": "Printer Name",
|
||||
"Reset": "reset",
|
||||
"Restore": "Restore",
|
||||
"RestoreDialog": "Please select all the sections you want to restore:"
|
||||
"RestoreDialog": "Please select all the sections you want to restore:",
|
||||
"TimeFormat": "Time Format"
|
||||
},
|
||||
"InterfaceSettings": "Interface Settings",
|
||||
"MacrosTab": {
|
||||
@@ -828,6 +886,29 @@
|
||||
"UnknownGroup": "Unknown Group",
|
||||
"Warning": "warning"
|
||||
},
|
||||
"MiscellaneousTab": {
|
||||
"AddGroup": "add group",
|
||||
"AddPreset": "add preset",
|
||||
"Color": "Color",
|
||||
"CreateGroup": "Create group",
|
||||
"CreatePreset": "Create preset",
|
||||
"End": "End",
|
||||
"EndDescription": "Last LED of this group.",
|
||||
"Groups": "Groups",
|
||||
"GroupSubTitle": "Start: {start}, End: {end}",
|
||||
"LightGroups": "{name} - Groups",
|
||||
"LightPresets": "{name} - Presets",
|
||||
"Miscellaneous": "Miscellaneous",
|
||||
"Name": "Name",
|
||||
"NoDevicesFound": "No devices found",
|
||||
"NoGroupFound": "No group found",
|
||||
"NoPresetFound": "No preset found",
|
||||
"Presets": "Presets",
|
||||
"Start": "Start",
|
||||
"StartDescription": "First LED of this group.",
|
||||
"UnableToLoadLight": "Unable to load light",
|
||||
"UnableToLoadPreset": "Unable to load preset"
|
||||
},
|
||||
"PresetsTab": {
|
||||
"AddPreset": "add preset",
|
||||
"Cooldown": "Cooldown",
|
||||
@@ -855,6 +936,7 @@
|
||||
"UpdatePrinter": "Update Printer",
|
||||
"UseConfigJson": "InstanceDB = JSON detected. Please use the config.json to modify the printers list."
|
||||
},
|
||||
"Store": "store",
|
||||
"TimelapseTab": {
|
||||
"Autorender": "Autorender",
|
||||
"AutorenderDescription": "If enabled, the timelapse video will automatically render at the end of the print",
|
||||
@@ -936,6 +1018,8 @@
|
||||
"GcodeThumbnails": "G-Code thumbnails",
|
||||
"GcodeThumbnailsDescription": "Click on the button to get to the instructions.",
|
||||
"Guide": "Guide",
|
||||
"HideSaveConfigButtonForBedMesh": "Hide SAVE_CONFIG button for bed_mesh changes",
|
||||
"HideSaveConfigButtonForBedMeshDescription": "Hide SAVE_CONFIG, if only bed_mesh changes are pending to be saved in Klipper.",
|
||||
"LockSliders": "Lock sliders on touchscreen devices",
|
||||
"LockSlidersDelay": "Slider lock delay",
|
||||
"LockSlidersDelayDescription": "Sliders will lock after a given delay. If set to 0 or left blank, sliders will only lock on page change/reload.",
|
||||
@@ -945,17 +1029,20 @@
|
||||
"NavigationStyleDescription": "Change navigation appearance",
|
||||
"NavigationStyleIconsAndText": "Icons + Text",
|
||||
"NavigationStyleIconsOnly": "Icons only",
|
||||
"PowerDeviceName": "Printer power device",
|
||||
"PowerDeviceNameDescription": "Select which Moonraker power device should be used to power on the printer.",
|
||||
"Primary": "Primary",
|
||||
"ShowWebcamInNavigation": "Show Webcam in navigation",
|
||||
"UiSettings": "UI-Settings"
|
||||
},
|
||||
"Update": "update",
|
||||
"WebcamsTab": {
|
||||
"AddWebcam": "add webcam",
|
||||
"CreateWebcam": "Create Webcam",
|
||||
"EditCrowsnestConf": "Edit crowsnest.conf",
|
||||
"EditWebcam": "Edit Webcam",
|
||||
"FlipHorizontally": "Flip webcam horizontally",
|
||||
"FlipVertically": "Flip webcam vertically",
|
||||
"FlipWebcam": "Flip webcam image:",
|
||||
"Horizontally": "horizontally",
|
||||
"IconBed": "Bed",
|
||||
"IconCam": "Cam",
|
||||
"IconDoor": "Door",
|
||||
@@ -965,6 +1052,7 @@
|
||||
"IconNozzle": "Nozzle",
|
||||
"IconPrinter": "Printer",
|
||||
"Ipstream": "IP Camera",
|
||||
"Hlsstream": "HLS Stream",
|
||||
"Mjpegstreamer": "MJPEG-Streamer",
|
||||
"MjpegstreamerAdaptive": "Adaptive MJPEG-Streamer (experimental)",
|
||||
"Name": "Name",
|
||||
@@ -978,9 +1066,16 @@
|
||||
"UrlSnapshot": "URL Snapshot",
|
||||
"UrlStream": "URL Stream",
|
||||
"Uv4lMjpeg": "UV4L-MJPEG",
|
||||
"Vertically": "vertically",
|
||||
"Webcams": "Webcams"
|
||||
}
|
||||
},
|
||||
"ScrewsTiltAdjust": {
|
||||
"Accept": "accept",
|
||||
"Base": "Base",
|
||||
"ErrorText": "Something went wrong during the probing process.",
|
||||
"Headline": "Screws tilt adjust"
|
||||
},
|
||||
"Timelapse": {
|
||||
"AllFiles": "All",
|
||||
"Autorender": "Auto-render",
|
||||
|
||||
+5
-39
@@ -131,13 +131,11 @@
|
||||
}
|
||||
},
|
||||
"Editor": {
|
||||
"Cancel": "Cancelar",
|
||||
"ConfigReference": "Configuración de referencia",
|
||||
"DontSave": "No guardar",
|
||||
"Downloading": "Descargando",
|
||||
"FailedSave": "¡{filename} no pudo cargarse!",
|
||||
"FileReadOnly": "Sólo lectura",
|
||||
"Minimap": "Mostrar minimapa",
|
||||
"SaveClose": "Guardar y cerrar",
|
||||
"SaveRestart": "Guardar y reiniciar",
|
||||
"SuccessfullySaved": "{filename} guardado con éxito.",
|
||||
@@ -164,7 +162,6 @@
|
||||
"DeleteDirectoryQuestion": "¿Realmente quiere borrar la carpeta \"{name}\" con todo su contenido?",
|
||||
"DeleteSelectedQuestion": "¿Realmente desea eliminar {count} archivos seleccionados?",
|
||||
"Download": "Descargar",
|
||||
"Downloading": "Descargando",
|
||||
"EditFile": "Editar archivo",
|
||||
"Empty": "Vacío",
|
||||
"Filament": "Filamento",
|
||||
@@ -206,7 +203,6 @@
|
||||
"SuccessfullyRenamed": "{filename} renombrado con éxito.",
|
||||
"SuccessfullyUploaded": "{filename} subido con éxito!",
|
||||
"Total": "Total",
|
||||
"Uploading": "Cargando",
|
||||
"UploadNewGcode": "Cargar nuevo G-Code",
|
||||
"Used": "Usado",
|
||||
"View3D": "Vista 3D"
|
||||
@@ -449,22 +445,6 @@
|
||||
}
|
||||
},
|
||||
"Panels": {
|
||||
"ControlPanel": {
|
||||
"ALL": "Todos",
|
||||
"AlternateControls": "Alternar controles",
|
||||
"Headline": "Controles",
|
||||
"InvertX": "Invertir X",
|
||||
"InvertY": "Invertir Y",
|
||||
"InvertZ": "Invertir Z",
|
||||
"PleaseConfigureSteps": "Por favor configure los pasos",
|
||||
"QGL": "QGL",
|
||||
"SettingsInterfaceControl": "Ajustes > Interfaz > Control",
|
||||
"SetupControls": "Controles de configuración",
|
||||
"X": "X",
|
||||
"Y": "Y",
|
||||
"Z": "Z",
|
||||
"ZTilt": "Z Tilt"
|
||||
},
|
||||
"ExtruderControlPanel": {
|
||||
"Allowed": "Permitida",
|
||||
"EstimatedExtrusion": "Extrusion estimada",
|
||||
@@ -480,15 +460,14 @@
|
||||
"UnretractSpeed": "Velocidad de post-retracción"
|
||||
},
|
||||
"Headline": "Extrusor",
|
||||
"Retract": "Retraer",
|
||||
"LoadFilament": "Cargar filamento",
|
||||
"PressureAdvanceSettings": {
|
||||
"Advance": "Avance",
|
||||
"Extruder": "Extrusor",
|
||||
"PressureAdvance": "Avance de presión",
|
||||
"SmoothTime": "Tiempo de suavizado"
|
||||
},
|
||||
"Requested": "Solicitada",
|
||||
"Retract": "Retraer",
|
||||
"TooLargeExtrusion": "¡Extrusión muy grande!",
|
||||
"UnloadFilament": "Descargar Filamento"
|
||||
},
|
||||
@@ -500,7 +479,6 @@
|
||||
"KlippyStatePanel": {
|
||||
"FirmwareRestart": "Reiniciar Firmware",
|
||||
"KlipperCheck": "Verifique que el servicio Klipper está corriendo y que un UDS (Unix Domain Socket) esta configurado.",
|
||||
"KlippyState": "Estado de Klippy",
|
||||
"MoonrakerCannotConnect": "¡Moonraker no se pudo conectar a Klipper!",
|
||||
"Restart": "Reiniciar"
|
||||
},
|
||||
@@ -584,7 +562,6 @@
|
||||
"TemperaturePanel": {
|
||||
"AutoscaleChart": "Autoescalar gráfico",
|
||||
"Avg": "Promedio",
|
||||
"Color": "Color",
|
||||
"Cooldown": "Enfriar",
|
||||
"Current": "Actual",
|
||||
"Dataset": {
|
||||
@@ -612,22 +589,12 @@
|
||||
"Absolute": "absoluta",
|
||||
"ALL": "TODO",
|
||||
"Headline": "Toolhead",
|
||||
"Invalid": "Invalido",
|
||||
"InvertX": "Invertir X",
|
||||
"InvertY": "Invertir Y",
|
||||
"InvertZ": "Invertir Z",
|
||||
"MotorsOff": "Motores Apagados",
|
||||
"OutOfRange": "Fuera de rango!",
|
||||
"PleaseConfigureSteps": "Por favor configure los pasos",
|
||||
"Position": "Posición",
|
||||
"QGL": "QGL",
|
||||
"Relative": "relativa",
|
||||
"SettingsInterfaceControl": "Configuración > Interfaz > Control",
|
||||
"SetupControls": "Configurar controles",
|
||||
"SpeedFactor": "Factor de velocidad",
|
||||
"XOffset": "X-Offset",
|
||||
"YOffset": "Y-Offset",
|
||||
"ZOffset": "Z-Offset",
|
||||
"ZTilt": "Z Tilt"
|
||||
},
|
||||
"WebcamPanel": {
|
||||
@@ -635,12 +602,10 @@
|
||||
"FPS": "FPS",
|
||||
"Headline": "Cámara web",
|
||||
"NoWebcam": "No hay cámara web disponible. Agregue una cámara web en \"Configuración\" -> \"Cámaras web\".",
|
||||
"UnknownWebcamService": "Servicio de cámara web desconocido",
|
||||
"UrlNotAvailable": "URL no disponible"
|
||||
"UnknownWebcamService": "Servicio de cámara web desconocido"
|
||||
},
|
||||
"ZoffsetPanel": {
|
||||
"Clear": "Limpiar",
|
||||
"CurrentOffset": "Offset actual",
|
||||
"Headline": "Z-Offset",
|
||||
"Later": "Más tarde",
|
||||
"Ok": "OK",
|
||||
@@ -962,8 +927,8 @@
|
||||
"AddWebcam": "Agregar cámara web",
|
||||
"CreateWebcam": "Crear cámara web",
|
||||
"EditWebcam": "Editar cámara web",
|
||||
"FlipHorizontally": "Voltear horizontalmente",
|
||||
"FlipVertically": "Voltear verticalmente",
|
||||
"FlipWebcam": "Voltear la imagen de la cámara web:",
|
||||
"Horizontally": "horizontalmente",
|
||||
"IconBed": "Cama",
|
||||
"IconCam": "Cámara",
|
||||
"IconDoor": "Puerta",
|
||||
@@ -985,6 +950,7 @@
|
||||
"UrlSnapshot": "URL Snapshot",
|
||||
"UrlStream": "URL Stream",
|
||||
"Uv4lMjpeg": "UV4L-MJPEG",
|
||||
"Vertically": "verticalmente",
|
||||
"Webcams": "Cámaras web"
|
||||
}
|
||||
},
|
||||
|
||||
+43
-51
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"_last_update": "26.05.2022",
|
||||
"_last_update": "12.09.2022",
|
||||
"App": {
|
||||
"Notifications": {
|
||||
"DependencyDescription": "La version actuelle de {name} ne supporte pas toutes les fonctionalités de Mainsail. Mettez {name} a jour vers la version {neededVersion}.",
|
||||
@@ -22,6 +22,7 @@
|
||||
"Never": "jamais",
|
||||
"NextReboot": "prochain redémarrage",
|
||||
"NoNotification": "Pas de notification(s) disponible(s)",
|
||||
"Notifications": "Notifications",
|
||||
"Remind": "Rappel:"
|
||||
},
|
||||
"NumberInput": {
|
||||
@@ -112,6 +113,7 @@
|
||||
"CheckMoonrakerLog": "Si ce message apparait régulièrement, contrôlez le fichier log à l'adresse suivante:",
|
||||
"Connecting": "Connection avec {host}",
|
||||
"Failed": "Connection échouée",
|
||||
"Initializing": "Initialisation",
|
||||
"TryAgain": " répétez"
|
||||
},
|
||||
"Console": {
|
||||
@@ -132,13 +134,11 @@
|
||||
}
|
||||
},
|
||||
"Editor": {
|
||||
"Cancel": "Annuler",
|
||||
"ConfigReference": "Référence de configuration",
|
||||
"DontSave": "Ne pas sauvegarder",
|
||||
"Downloading": "Téléchargement",
|
||||
"FailedSave": "Le fichier {filename} n'a pas pu être téléchargé",
|
||||
"FileReadOnly": "lecture seule",
|
||||
"Minimap": "Afficher minimap",
|
||||
"SaveClose": "Sauvegarde et fermeture",
|
||||
"SaveRestart": "Sauvegarde et redémarrage",
|
||||
"SuccessfullySaved": "Le fichier {filename} a été sauvegardé",
|
||||
@@ -156,7 +156,9 @@
|
||||
"Files": {
|
||||
"AddToQueue": "Ajouter à la queue",
|
||||
"AllFiles": "Tous",
|
||||
"BedTemp": "Température plateau",
|
||||
"Cancel": "Annuler",
|
||||
"ChamberTemp": "Température chambre",
|
||||
"Create": "Créer",
|
||||
"CreateNewDirectory": "Nouveau dossier",
|
||||
"CurrentPath": "Dossier actuel",
|
||||
@@ -165,9 +167,9 @@
|
||||
"DeleteDirectoryQuestion": "Voulez vous vraiment effacer le dossier \"{name}\" et tout son contenu ?",
|
||||
"DeleteSelectedQuestion": "Désirez-vous supprimer {count} fichiers ?",
|
||||
"Download": "Téléchargement",
|
||||
"Downloading": "Téléchargement en cours",
|
||||
"EditFile": "Editer Fichier",
|
||||
"Empty": "vide",
|
||||
"ExtruderTemp": "Température extrudeur",
|
||||
"Filament": "Filament",
|
||||
"FilamentName": "Nom du filament",
|
||||
"FilamentType": "Type de filament",
|
||||
@@ -178,6 +180,7 @@
|
||||
"Free": "Libre",
|
||||
"FreeDisk": "Disque libre",
|
||||
"GCodeFiles": "Fichiers G-Code",
|
||||
"GcodesRootDirectoryDoesntExists": "Pas trouvé de dossier G-Code. Contrôlez l'option \"path\" dans la section [virtual_sdcard] de la configuration de Klipper.",
|
||||
"HiddenFiles": "Fichiers cachés",
|
||||
"LastEndTime": "Dernière heure de fin d'impression",
|
||||
"LastFilamentUsed": "Dernier filament utilisé",
|
||||
@@ -207,7 +210,6 @@
|
||||
"SuccessfullyRenamed": "Fichier {filename} renommé",
|
||||
"SuccessfullyUploaded": "Fichier {filename} mis à jour",
|
||||
"Total": "Total",
|
||||
"Uploading": "Chargement",
|
||||
"UploadNewGcode": "Charger nouveau G-Code",
|
||||
"Used": "Utilisé",
|
||||
"View3D": "Vue 3D"
|
||||
@@ -260,6 +262,9 @@
|
||||
"ErrorKlipperNotReady": "Klipper pas prêt, maillage désactivé",
|
||||
"Flat": "Plat",
|
||||
"Heightmap": "Maillage de hauteur",
|
||||
"InvalidNameAlreadyExists": "Ce profil existe déjà, choisissez-en un autre.",
|
||||
"InvalidNameEmpty": "L'entrée ne doit pas être vide !",
|
||||
"InvalidNameReserved": "Le nom de profil \"default\" est réservé, choisissez-en un autre.",
|
||||
"Later": "Plus tard",
|
||||
"Mesh": "Calculé",
|
||||
"Name": "Nom",
|
||||
@@ -320,20 +325,13 @@
|
||||
"Save": "sauvegarder",
|
||||
"Search": "Recherche",
|
||||
"SelectedFilamentUsed": "Filament sélectionné utilisé",
|
||||
"SelectedJobs": "Travaux sélectionnés",
|
||||
"SelectedPrinttime": "Temps d'impression sélectionnés",
|
||||
"Slicer": "Trancheur",
|
||||
"SlicerVersion": "Version trancheur",
|
||||
"StartTime": "Heure de début d'impression",
|
||||
"Statistics": "Statistiques",
|
||||
"Status": "Status",
|
||||
"TitleRefreshHistory": "Rafraîchir l'historique",
|
||||
"TitleSettings": "Réglages",
|
||||
"TotalDuration": "Durée totale",
|
||||
"TotalFilamentUsed": "Total filament utilisé",
|
||||
"TotalJobs": "Nombre travaux",
|
||||
"TotalPrinttime": "Total temps d'impression",
|
||||
"TotalTime": "Durée totale",
|
||||
"SelectedJobs": "Travaux sélectionnés",
|
||||
"SelectedPrinttime": "Temps d'impression sélectionnés",
|
||||
"StatusValues": {
|
||||
"cancelled": "Annulé",
|
||||
"completed": "Terminé",
|
||||
@@ -341,9 +339,17 @@
|
||||
"in_progress": "en cours",
|
||||
"klippy_disconnect": "Klippy déconnecté",
|
||||
"klippy_shutdown": "Klippy arrêté",
|
||||
"Others": "Autres",
|
||||
"server_exit": "Serveur quitté"
|
||||
},
|
||||
"TitleExportHistory": "Exporter l'historique"
|
||||
"TitleExportHistory": "Exporter l'historique",
|
||||
"TitleRefreshHistory": "Rafraîchir l'historique",
|
||||
"TitleSettings": "Réglages",
|
||||
"TotalDuration": "Durée totale",
|
||||
"TotalFilamentUsed": "Total filament utilisé",
|
||||
"TotalJobs": "Nombre travaux",
|
||||
"TotalPrinttime": "Total temps d'impression",
|
||||
"TotalTime": "Durée totale"
|
||||
},
|
||||
"JobQueue": {
|
||||
"AllJobs": "Tous",
|
||||
@@ -359,6 +365,7 @@
|
||||
"AllFiles": "Tous",
|
||||
"Cancel": "Annuler",
|
||||
"ConfigFiles": "Fichiers de configuration",
|
||||
"ConfigRootDirectoryDoesntExists": "Pas trouvé de dossier racine de configuration. Contr^lez l'option \"config_path\" dans la section [file_manager] de la configuration de Moonraker.",
|
||||
"Create": "Créer",
|
||||
"CreateDirectory": "Nouveau dossier",
|
||||
"CreateFile": "Nouveau fichier",
|
||||
@@ -450,22 +457,6 @@
|
||||
}
|
||||
},
|
||||
"Panels": {
|
||||
"ControlPanel": {
|
||||
"ALL": "Tous",
|
||||
"AlternateControls": "Contrôles alternatifs",
|
||||
"Headline": "Contrôles",
|
||||
"InvertX": "Inversion X",
|
||||
"InvertY": "Inversion Y",
|
||||
"InvertZ": "Inversion Z",
|
||||
"PleaseConfigureSteps": "Configurez les pas",
|
||||
"QGL": "QGL",
|
||||
"SettingsInterfaceControl": "Paramètres > Interface > Contrôles",
|
||||
"SetupControls": "Configuration des contrôles",
|
||||
"X": "X",
|
||||
"Y": "Y",
|
||||
"Z": "Z",
|
||||
"ZTilt": "Z Tilt"
|
||||
},
|
||||
"ExtruderControlPanel": {
|
||||
"Allowed": "Permis",
|
||||
"EstimatedExtrusion": "Estimation d'extrusion:",
|
||||
@@ -485,11 +476,10 @@
|
||||
"PressureAdvanceSettings": {
|
||||
"Advance": "avance",
|
||||
"Extruder": "extrudeur",
|
||||
"PressureAdvance": "pression en avance",
|
||||
"SmoothTime": "Temps de lissage"
|
||||
},
|
||||
"Retract": "Rétractation",
|
||||
"Requested": "Demandé",
|
||||
"Retract": "Rétractation",
|
||||
"TooLargeExtrusion": "Extrusion trop grande !",
|
||||
"UnloadFilament": "Déchargement du filament"
|
||||
},
|
||||
@@ -501,7 +491,6 @@
|
||||
"KlippyStatePanel": {
|
||||
"FirmwareRestart": "Redémarrage Firmware",
|
||||
"KlipperCheck": "Contrôlez que le sevice Klipper est actif et qu'un UDS (Unix Domain Socket) est configuré",
|
||||
"KlippyState": "Etat-Klippy",
|
||||
"MoonrakerCannotConnect": "Moonraker n'arrive pas à se connecter à Klipper",
|
||||
"Restart": "Redémarrage"
|
||||
},
|
||||
@@ -585,7 +574,6 @@
|
||||
"TemperaturePanel": {
|
||||
"AutoscaleChart": "Echelle automatique",
|
||||
"Avg": "Moyenne",
|
||||
"Color": "Couleur",
|
||||
"Cooldown": "Refroidissement",
|
||||
"Current": "En cours",
|
||||
"Dataset": {
|
||||
@@ -613,22 +601,12 @@
|
||||
"Absolute": "absolue",
|
||||
"ALL": "Tous",
|
||||
"Headline": "Tête d'impression",
|
||||
"Invalid": "Invalide",
|
||||
"InvertX": "Inversion X",
|
||||
"InvertY": "Inversion Y",
|
||||
"InvertZ": "Inversion Z",
|
||||
"MotorsOff": "Arrêt des moteurs",
|
||||
"OutOfRange": "Hors limites !",
|
||||
"PleaseConfigureSteps": "Configurez Pas",
|
||||
"Position": "Position",
|
||||
"QGL": "QGL",
|
||||
"Relative": "relative",
|
||||
"SettingsInterfaceControl": "Réglages > Interface > Contrôle",
|
||||
"SetupControls": "Réglages",
|
||||
"SpeedFactor": "Facteur de vitesse",
|
||||
"XOffset": "Offset-X",
|
||||
"YOffset": "Offset-Y",
|
||||
"ZOffset": "Offset-Z",
|
||||
"ZTilt": "Z Tilt"
|
||||
},
|
||||
"WebcamPanel": {
|
||||
@@ -636,12 +614,10 @@
|
||||
"FPS": "IPS",
|
||||
"Headline": "Caméra",
|
||||
"NoWebcam": "Pas de caméra disponible. Ajoutez une caméra dans \"Réglages interface\" > \"Caméras\"",
|
||||
"UnknownWebcamService": "Service Caméra inconnu",
|
||||
"UrlNotAvailable": "URL non disponible"
|
||||
"UnknownWebcamService": "Service Caméra inconnu"
|
||||
},
|
||||
"ZoffsetPanel": {
|
||||
"Clear": "Effacer",
|
||||
"CurrentOffset": "Offset actuel",
|
||||
"Headline": "Offset Z",
|
||||
"Later": "Plus tard",
|
||||
"Ok": "Ok",
|
||||
@@ -675,6 +651,7 @@
|
||||
},
|
||||
"SelectPrinterDialog": {
|
||||
"AddPrinter": "Nouvelle d'imprimante",
|
||||
"AddPrintersToJson": "Veuillez ajouter les imprimantes dans le fichier config.json.",
|
||||
"CannotConnectTo": "Connection vers {host} impossible",
|
||||
"ChangePrinter": "Changement d'imprimante",
|
||||
"Connecting": "Connection vers {host}",
|
||||
@@ -771,6 +748,7 @@
|
||||
"GridColor": "Couleur de la grille",
|
||||
"MaxFeed": "Débit maximum",
|
||||
"MinFeed": "Débit minimum",
|
||||
"ProgressColor": "Couleur d'avancement",
|
||||
"ShowAxes": "Affiche les axes"
|
||||
},
|
||||
"GeneralTab": {
|
||||
@@ -780,6 +758,14 @@
|
||||
"CalcEstimateTimeDescription": "En cas de séléction multiple, une moyenne est calculée",
|
||||
"CalcEtaTime": "Calcul du TEA",
|
||||
"CalcEtaTimeDescription": "En cas de séléction multiple, une moyenne est calculée",
|
||||
"CalcPrintProgress": "Calculation progression d'impression",
|
||||
"CalcPrintProgressDescription": "Méthode pour calculer la progression d'impression",
|
||||
"CalcPrintProgressItems": {
|
||||
"Filament": "Filament",
|
||||
"FileAbsolute": "Posiiton (absolue) dans le fichier",
|
||||
"FileRelative": "Posiiton (relative) dans le fichier",
|
||||
"Slicer": "Trancheur (M73)"
|
||||
},
|
||||
"CannotReadJson": "Lecture/interprétation du fichier de sauvegarde impossible.",
|
||||
"DbConsoleHistory": "Historique des commandes de console",
|
||||
"DbHistoryJobs": "Historique des travaux",
|
||||
@@ -863,7 +849,8 @@
|
||||
"Hostname": "Nom d'hôte",
|
||||
"Port": "Port",
|
||||
"RemotePrinters": "Imprimantes",
|
||||
"UpdatePrinter": "Mise à jour imprimante"
|
||||
"UpdatePrinter": "Mise à jour imprimante",
|
||||
"UseConfigJson": "InstanceDB = JSON trouvé dans la configuration. Utilisez le fichier config.json pour modifier la liste des imprimantes."
|
||||
},
|
||||
"TimelapseTab": {
|
||||
"Autorender": "Rendu automatique",
|
||||
@@ -962,9 +949,10 @@
|
||||
"WebcamsTab": {
|
||||
"AddWebcam": "Nouvelle caméra",
|
||||
"CreateWebcam": "Nouvelle caméra",
|
||||
"EditCrowsnestConf": "Edition de crowsnest.conf",
|
||||
"EditWebcam": "Editer caméra",
|
||||
"FlipHorizontally": "Miroir horizontal",
|
||||
"FlipVertically": "Miroir vertical",
|
||||
"FlipWebcam": "Miroir l'image de la webcam:",
|
||||
"Horizontally": "horizontal",
|
||||
"IconBed": "Plateau",
|
||||
"IconCam": "Caméra",
|
||||
"IconDoor": "Porte",
|
||||
@@ -974,11 +962,13 @@
|
||||
"IconNozzle": "Buse",
|
||||
"IconPrinter": "Imprimante",
|
||||
"Ipstream": "Caméra IP",
|
||||
"Hlsstream": "Flux HLS",
|
||||
"Mjpegstreamer": "Flux-MJPEG",
|
||||
"MjpegstreamerAdaptive": "Flux-MJPEG Adaptatif (expérimental)",
|
||||
"Name": "Nom",
|
||||
"NameAlreadyExists": "Nom existe déjà",
|
||||
"Required": "requis",
|
||||
"Rotate": "Rotation",
|
||||
"SaveWebcam": "ajouter caméra",
|
||||
"Service": "Service",
|
||||
"TargetFPS": "IPS destination",
|
||||
@@ -986,6 +976,7 @@
|
||||
"UrlSnapshot": "URL des instantanés",
|
||||
"UrlStream": "URL du flux",
|
||||
"Uv4lMjpeg": "UV4L-MJPEG",
|
||||
"Vertically": "vertical",
|
||||
"Webcams": "Caméras"
|
||||
}
|
||||
},
|
||||
@@ -999,6 +990,7 @@
|
||||
"Delete": "Effacer",
|
||||
"DeleteDirectory": "Effacer dossier",
|
||||
"DeleteDirectoryQuestion": "Voulez-vous vraiment effacer le dossier \"{name}\" et tout son contenu ?",
|
||||
"DeleteSelectedQuestion": "Voulez-vous vraiment effacer les {count} fichiers sélectionnées ?",
|
||||
"Download": "Téléchargement",
|
||||
"DuplicateLastframe": "Multiplie la dernière image",
|
||||
"Empty": "Pas de fichier vidéo trouvé",
|
||||
|
||||
+4
-8
@@ -480,7 +480,6 @@
|
||||
"KlippyStatePanel": {
|
||||
"FirmwareRestart": "Firmware újraindítása",
|
||||
"KlipperCheck": "Kérjük, ellenőrizd, a Klipper szolgáltatás fut-e, konfigurálva van-e UDS (Unix Domain Socket).",
|
||||
"KlippyState": "Klippy-állapota",
|
||||
"MoonrakerCannotConnect": "A Moonraker nem tud csatlakozni a Klipperhez!",
|
||||
"Restart": "Újraindítás"
|
||||
},
|
||||
@@ -591,8 +590,6 @@
|
||||
"Absolute": "abszolút",
|
||||
"ALL": "MIND",
|
||||
"Headline": "Fúvókafej",
|
||||
"Invalid": "Érvénytelen",
|
||||
"OutOfRange": "Hatértéken túl!",
|
||||
"PleaseConfigureSteps": "Kérlek állítsd be a step értékét",
|
||||
"Position": "Pozíció",
|
||||
"QGL": "QGL",
|
||||
@@ -605,11 +602,9 @@
|
||||
"All": "Mind",
|
||||
"FPS": "FPS",
|
||||
"Headline": "Webkamera",
|
||||
"UnknownWebcamService": "Ismeretlen webkamera szolg.",
|
||||
"UrlNotAvailable": "Az URL nem elérhető"
|
||||
"UnknownWebcamService": "Ismeretlen webkamera szolg."
|
||||
},
|
||||
"ZoffsetPanel": {
|
||||
"CurrentOffset": "aktuális eltolás",
|
||||
"Headline": "Z-eltolás",
|
||||
"Later": "Később",
|
||||
"Ok": "OK",
|
||||
@@ -932,8 +927,8 @@
|
||||
"AddWebcam": "Webkamera hozzáadása",
|
||||
"CreateWebcam": "Webkamera létrehozása",
|
||||
"EditWebcam": "Webkamera szerkesztése",
|
||||
"FlipHorizontally": "Webkamera vízszintes tükrözése",
|
||||
"FlipVertically": "Webkamera függőleges tükrözése",
|
||||
"FlipWebcam": "Webkamera tükrözése:",
|
||||
"Horizontally": "vízszintes",
|
||||
"IconBed": "Asztal",
|
||||
"IconCam": "Kamera",
|
||||
"IconDoor": "Ajtó",
|
||||
@@ -955,6 +950,7 @@
|
||||
"UrlSnapshot": "Snapshot URL-je ",
|
||||
"UrlStream": "Stream URL-je ",
|
||||
"Uv4lMjpeg": "UV4L-MJPEG",
|
||||
"Vertically": "függőleges",
|
||||
"Webcams": "Webkamerák"
|
||||
}
|
||||
},
|
||||
|
||||
+4
-24
@@ -100,13 +100,11 @@
|
||||
"SetupConsole": "Impostazione Console"
|
||||
},
|
||||
"Editor": {
|
||||
"Cancel": "Cancella",
|
||||
"ConfigReference": "Configurazione di Riferimento",
|
||||
"DontSave": "Non salvare",
|
||||
"Downloading": "Scaricando",
|
||||
"FailedSave": " Impossibile caricare {filename} !",
|
||||
"FileReadOnly": "read-only",
|
||||
"Minimap": "Mostra minimappa",
|
||||
"SaveClose": "Salva e Chiudi",
|
||||
"SaveRestart": "Salva e Riavvia",
|
||||
"SuccessfullySaved": "{filename} salvato con successo.",
|
||||
@@ -132,7 +130,6 @@
|
||||
"DeleteDirectory": "Elimina Directory ",
|
||||
"DeleteDirectoryQuestion": "Vuoi davvero eliminare la directory \"{name}\" con tutto il suo contenuto?",
|
||||
"Download": "Scarica",
|
||||
"Downloading": "Scaricando",
|
||||
"EditFile": "Modifica file",
|
||||
"Empty": "Vuoto",
|
||||
"Filament": "Filamento",
|
||||
@@ -169,7 +166,6 @@
|
||||
"SuccessfullyRenamed": "Rinominato {filename} con successo.",
|
||||
"SuccessfullyUploaded": "Caricamento di {filename} riuscito!",
|
||||
"Total": "Totale",
|
||||
"Uploading": "Caricamento",
|
||||
"UploadNewGcode": "Carica nuovo Gcode",
|
||||
"Used": "Utilizzato",
|
||||
"View3D": "Vedi 3D"
|
||||
@@ -374,7 +370,6 @@
|
||||
"PressureAdvanceSettings": {
|
||||
"Advance": "Advance",
|
||||
"Extruder": "Estrusore",
|
||||
"PressureAdvance": "Pressure Advance",
|
||||
"SmoothTime": "Smooth Time"
|
||||
},
|
||||
"Retract": "Retrazione"
|
||||
@@ -387,7 +382,6 @@
|
||||
"KlippyStatePanel": {
|
||||
"FirmwareRestart": "Riavvio Firmware",
|
||||
"KlipperCheck": "Controlla se il servizio Klipper è in esecuzione e se è configurato un UDS (Unix Domain Socket).",
|
||||
"KlippyState": "Stato Klippy",
|
||||
"MoonrakerCannotConnect": "Moonraker non riesce a connettersi a Klipper!",
|
||||
"Restart": "Riavvia"
|
||||
},
|
||||
@@ -395,7 +389,6 @@
|
||||
"Headline": "Impostazioni Macchina",
|
||||
"MotionSettings": {
|
||||
"Acceleration": "Accelerazione",
|
||||
"Deceleration": "Decelerazione",
|
||||
"MaxAccelToDecel": "Max Accel. a Decel.",
|
||||
"SquareCornerVelocity": "Velocità Angolo Retto",
|
||||
"Velocity": "Velocità"
|
||||
@@ -426,13 +419,6 @@
|
||||
"Empty": "Vuoto"
|
||||
}
|
||||
},
|
||||
"MoonrakerFailedComponentsPanel": {},
|
||||
"MoonrakerStatePanel": {
|
||||
"DownloadLog": "Scarica il Registro",
|
||||
"FollowingPluginHasAnError": "Il seguente plugin ha un errore:",
|
||||
"MoonrakerErrorInfo": "È stato rilevato un errore durante il caricamento dei componenti di moonraker. Si prega di controllare il file di registro e risolvere il problema.",
|
||||
"MoonrakerWarnings": "Avvertenze di Moonraker"
|
||||
},
|
||||
"PowerControlPanel": {
|
||||
"Error": "Errore",
|
||||
"Off": "Spento",
|
||||
@@ -472,7 +458,6 @@
|
||||
"TemperaturePanel": {
|
||||
"AutoscaleChart": "Scala automaticamente il Grafico",
|
||||
"Avg": "Medio",
|
||||
"Color": "Colore",
|
||||
"Cooldown": "Raffreddamento",
|
||||
"Current": "Attuale",
|
||||
"Dataset": {
|
||||
@@ -499,15 +484,11 @@
|
||||
"ToolheadControlPanel": {
|
||||
"Absolute": "assoluto",
|
||||
"ALL": "TUTTI",
|
||||
"InvertX": "Inverti X",
|
||||
"InvertY": "Inverti Y",
|
||||
"InvertZ": "Inverti Z",
|
||||
"PleaseConfigureSteps": "Configura gli step",
|
||||
"Position": "Posizione",
|
||||
"QGL": "QGL",
|
||||
"Relative": "relativo",
|
||||
"SettingsInterfaceControl": "Impostazioni> Interfaccia> Controllo",
|
||||
"SetupControls": "Controlli Installazione",
|
||||
"SpeedFactor": "Fattore di velocità",
|
||||
"ZTilt": "Inclinazione Z"
|
||||
},
|
||||
@@ -515,11 +496,9 @@
|
||||
"All": "Tutto",
|
||||
"FPS": "FPS",
|
||||
"Headline": "Webcam",
|
||||
"UnknownWebcamService": "Servizio Webcam Sconosciuto",
|
||||
"UrlNotAvailable": "URL non disponibile"
|
||||
"UnknownWebcamService": "Servizio Webcam Sconosciuto"
|
||||
},
|
||||
"ZoffsetPanel": {
|
||||
"CurrentOffset": "offset corrente",
|
||||
"Headline": "Z-Offset",
|
||||
"Later": "Dopo",
|
||||
"Ok": "OK",
|
||||
@@ -815,8 +794,8 @@
|
||||
"AddWebcam": "aggiungi webcam",
|
||||
"CreateWebcam": "Crea Webcam",
|
||||
"EditWebcam": "Modifica Webcam",
|
||||
"FlipHorizontally": "Gira webcam orizzontalmente",
|
||||
"FlipVertically": "Gira webcam verticalmente",
|
||||
"FlipWebcam": "Specchio dell'immagine della webcam:",
|
||||
"Horizontally": "orizzontalmente",
|
||||
"IconBed": "Letto",
|
||||
"IconCam": "Cam",
|
||||
"IconDoor": "Porta",
|
||||
@@ -838,6 +817,7 @@
|
||||
"UrlSnapshot": "URL Snaphot",
|
||||
"UrlStream": "URL Stream",
|
||||
"Uv4lMjpeg": "UV4L-MJPEG",
|
||||
"Vertically": "verticalmente",
|
||||
"Webcams": "Webcam"
|
||||
}
|
||||
},
|
||||
|
||||
Loaded 100 of 154 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user