@fdm-monster/client-next 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/install-state.gz +0 -0
- package/dist/assets/MaterialIcons-Regular-BjXOXp5c.eot +0 -0
- package/dist/assets/MaterialIcons-Regular-DEUTIz1o.ttf +0 -0
- package/dist/assets/MaterialIcons-Regular-DOtZ65Va.woff2 +0 -0
- package/dist/assets/MaterialIcons-Regular-FsbMSDLx.woff +0 -0
- package/dist/assets/index-CHzfWKPO.css +5 -0
- package/dist/assets/index-CnWtkGvw.js +90 -0
- package/dist/assets/index-CnWtkGvw.js.map +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/img/DavidZwart.jpg +0 -0
- package/dist/img/OIG.JYDC2RaWdz7g9.jpg +0 -0
- package/dist/img/OIG.jpg +0 -0
- package/dist/img/icons/android-chrome-256x256.png +0 -0
- package/dist/img/icons/android-chrome-384x384.png +0 -0
- package/dist/img/icons/android-chrome-512x512.png +0 -0
- package/dist/img/icons/favicon.svg +1 -0
- package/dist/img/logo.png +0 -0
- package/dist/img/logo.svg +1 -0
- package/dist/img/manifest.webmanifest +33 -0
- package/dist/img/octoprint-tentacle.svg +144 -0
- package/dist/img/thumbail_unknown.jpg +0 -0
- package/dist/img/vbanner.jpg +0 -0
- package/dist/index.html +24 -0
- package/dist/robots.txt +2 -0
- package/package.json +1 -1
- package/.all-contributorsrc +0 -57
- package/.editorconfig +0 -5
- package/.eslintrc.js +0 -126
- package/.github/FUNDING.yml +0 -3
- package/.github/workflows/release-client.yml +0 -94
- package/.github/workflows/vue-publish.yml +0 -26
- package/.prettierignore +0 -15
- package/.whitesource +0 -12
- package/renovate.json +0 -30
- package/src/App.vue +0 -60
- package/src/AppLoader.vue +0 -383
- package/src/assets/adjectives.json +0 -1468
- package/src/assets/logo.svg +0 -6
- package/src/assets/nouns.json +0 -4309
- package/src/auto-imports.d.ts +0 -139
- package/src/backend/app.service.ts +0 -39
- package/src/backend/auth.service.ts +0 -56
- package/src/backend/base.service.ts +0 -57
- package/src/backend/batch.service.ts +0 -37
- package/src/backend/camera-stream.service.ts +0 -33
- package/src/backend/custom-gcode.service.ts +0 -11
- package/src/backend/dto/octoprint-settings.dto.ts +0 -168
- package/src/backend/first-time-setup.service.ts +0 -17
- package/src/backend/floor.service.ts +0 -84
- package/src/backend/index.ts +0 -4
- package/src/backend/print-completions.service.ts +0 -11
- package/src/backend/printer-file.service.ts +0 -91
- package/src/backend/printer-group.service.ts +0 -62
- package/src/backend/printer-job.service.ts +0 -20
- package/src/backend/printer-settings.service.ts +0 -28
- package/src/backend/printers.service.ts +0 -136
- package/src/backend/server-private.service.ts +0 -55
- package/src/backend/server.api.ts +0 -132
- package/src/backend/settings.service.ts +0 -85
- package/src/backend/user.service.ts +0 -51
- package/src/components/AboutHelp/AboutView.vue +0 -164
- package/src/components/CameraGrid/CameraGridView.vue +0 -111
- package/src/components/FirstTimeSetup/FirstTimeSetupView.vue +0 -354
- package/src/components/Generic/Actions/PrinterConnectionAction.vue +0 -56
- package/src/components/Generic/Actions/PrinterCreateAction.vue +0 -22
- package/src/components/Generic/Actions/PrinterDeleteAction.vue +0 -29
- package/src/components/Generic/Actions/PrinterQuickStopAction.vue +0 -35
- package/src/components/Generic/Actions/PrinterSettingsAction.vue +0 -35
- package/src/components/Generic/Actions/PrinterUrlAction.vue +0 -24
- package/src/components/Generic/Actions/RefreshFilesAction.vue +0 -50
- package/src/components/Generic/Actions/SyncPrinterNameAction.vue +0 -36
- package/src/components/Generic/Dialogs/AddOrUpdateCameraStreamDialog.vue +0 -131
- package/src/components/Generic/Dialogs/AddOrUpdateFloorDialog.vue +0 -141
- package/src/components/Generic/Dialogs/AddOrUpdatePrinterDialog.vue +0 -303
- package/src/components/Generic/Dialogs/BaseDialog.vue +0 -81
- package/src/components/Generic/Dialogs/BatchJsonCreateDialog.vue +0 -109
- package/src/components/Generic/Dialogs/BatchReprintDialog.vue +0 -190
- package/src/components/Generic/Dialogs/PrinterChecksPanel.vue +0 -37
- package/src/components/Generic/Dialogs/PrinterControlDialog.vue +0 -202
- package/src/components/Generic/Dialogs/PrinterMaintenanceDialog.vue +0 -130
- package/src/components/Generic/Dialogs/YamlImportExportDialog.vue +0 -186
- package/src/components/Generic/Dialogs/dialog.constants.ts +0 -19
- package/src/components/Generic/FileExplorerSideNav.vue +0 -734
- package/src/components/Generic/Loaders/GridLoader.vue +0 -68
- package/src/components/Generic/NavigationDrawer.vue +0 -69
- package/src/components/Generic/PrintJobsMenu.vue +0 -148
- package/src/components/Generic/Snackbars/AppErrorSnackbar.vue +0 -64
- package/src/components/Generic/Snackbars/AppInfoSnackbar.vue +0 -63
- package/src/components/Generic/Snackbars/AppProgressSnackbar.vue +0 -158
- package/src/components/Generic/Vuetify/TooltipButton.vue +0 -47
- package/src/components/HelpOverlay/HelpOverlay.vue +0 -57
- package/src/components/Login/LoginForm.vue +0 -206
- package/src/components/Login/LoginView.spec.ts +0 -64
- package/src/components/Login/LoginView.vue +0 -65
- package/src/components/Login/Logo.vue +0 -13
- package/src/components/Login/PermissionDenied.vue +0 -109
- package/src/components/Login/RegistrationForm.vue +0 -207
- package/src/components/Login/RegistrationView.vue +0 -17
- package/src/components/Login/__snapshots__/LoginView.spec.ts.snap +0 -1051
- package/src/components/NotFound/NotFoundView.vue +0 -39
- package/src/components/PrintStatistics/PrintStatistics.vue +0 -168
- package/src/components/PrintStatistics/PrintStatisticsView.vue +0 -15
- package/src/components/PrinterGrid/HomeToolbar.vue +0 -90
- package/src/components/PrinterGrid/PrinterGrid.vue +0 -164
- package/src/components/PrinterGrid/PrinterGridTile.vue +0 -438
- package/src/components/PrinterGrid/PrinterGridView.vue +0 -210
- package/src/components/PrinterList/FileControlList.vue +0 -40
- package/src/components/PrinterList/PrinterDetails.vue +0 -91
- package/src/components/PrinterList/PrintersView.vue +0 -492
- package/src/components/Settings/AccountSettings.vue +0 -163
- package/src/components/Settings/DiagnosticsSettings.vue +0 -137
- package/src/components/Settings/EmergencyCommands.vue +0 -265
- package/src/components/Settings/FloorSettings.vue +0 -276
- package/src/components/Settings/GridSettings.vue +0 -127
- package/src/components/Settings/OctoPrintSettings.vue +0 -188
- package/src/components/Settings/ServerProtectionSettings.vue +0 -370
- package/src/components/Settings/SettingsView.vue +0 -73
- package/src/components/Settings/SoftwareUpgradeSettings.vue +0 -297
- package/src/components/Settings/UserManagementSettings.vue +0 -257
- package/src/components/TopBar.vue +0 -147
- package/src/components.d.ts +0 -70
- package/src/directives/file-upload.directive.ts +0 -117
- package/src/directives/printer-drop-position.directive.ts +0 -92
- package/src/env.d.ts +0 -6
- package/src/main.ts +0 -76
- package/src/models/batch/reprint.dto.ts +0 -79
- package/src/models/batch.model.ts +0 -11
- package/src/models/camera-streams/camera-stream.ts +0 -19
- package/src/models/floors/floor.model.ts +0 -30
- package/src/models/octoprint/connection-options.model.ts +0 -8
- package/src/models/plugins/firmware-updates/prusa-firmware-release.model.ts +0 -57
- package/src/models/print-completions/print-completions.model.ts +0 -49
- package/src/models/printers/crud/create-printer.model.ts +0 -26
- package/src/models/printers/file-upload-commands.model.ts +0 -4
- package/src/models/printers/gcode/gcode-analysis.model.ts +0 -30
- package/src/models/printers/printer-current-job.model.ts +0 -90
- package/src/models/printers/printer-file.model.ts +0 -48
- package/src/models/printers/printer.model.ts +0 -18
- package/src/models/server/client-releases.model.ts +0 -27
- package/src/models/server/export-yaml.model.ts +0 -11
- package/src/models/server/features.model.ts +0 -37
- package/src/models/server/github-rate-limit.model.ts +0 -21
- package/src/models/server/version.model.ts +0 -14
- package/src/models/settings/printer-file-clean-settings.model.ts +0 -5
- package/src/models/settings/server-settings.dto.ts +0 -19
- package/src/models/settings/settings.model.ts +0 -57
- package/src/models/socketio-messages/socketio-message.model.ts +0 -53
- package/src/models/uploads/queued-upload.model.ts +0 -12
- package/src/models/user.model.ts +0 -15
- package/src/plugins/README.md +0 -3
- package/src/plugins/index.ts +0 -17
- package/src/plugins/vuetify.ts +0 -53
- package/src/router/index.ts +0 -192
- package/src/router/route-names.ts +0 -14
- package/src/router/utils.ts +0 -23
- package/src/shared/alert.events.ts +0 -14
- package/src/shared/app.constants.ts +0 -23
- package/src/shared/auth.constants.ts +0 -34
- package/src/shared/dialog.composable.ts +0 -41
- package/src/shared/drag.constants.ts +0 -19
- package/src/shared/experimental.constants.ts +0 -1
- package/src/shared/http-client.ts +0 -162
- package/src/shared/noun-adjectives.data.ts +0 -24
- package/src/shared/printer-grid.constants.ts +0 -5
- package/src/shared/printer-state.constants.ts +0 -194
- package/src/shared/snackbar.composable.ts +0 -66
- package/src/shared/socketio.service.ts +0 -104
- package/src/store/auth.store.ts +0 -255
- package/src/store/connection.store.ts +0 -66
- package/src/store/dialog.store.ts +0 -114
- package/src/store/features.store.ts +0 -57
- package/src/store/floor.store.ts +0 -173
- package/src/store/grid.store.ts +0 -10
- package/src/store/index.ts +0 -4
- package/src/store/printer-state.store.ts +0 -246
- package/src/store/printer.store.ts +0 -236
- package/src/store/profile.store.ts +0 -25
- package/src/store/settings.store.ts +0 -64
- package/src/store/test-printer.store.ts +0 -70
- package/src/store/uploads.store.ts +0 -75
- package/src/styles/README.md +0 -3
- package/src/styles/settings.scss +0 -10
- package/src/types/global.d.ts +0 -15
- package/src/utils/array.utils.ts +0 -15
- package/src/utils/date.utils.ts +0 -5
- package/src/utils/download-file.util.ts +0 -25
- package/src/utils/error.utils.ts +0 -3
- package/src/utils/file-size.util.ts +0 -11
- package/src/utils/id.type.ts +0 -1
- package/src/utils/sentry.util.ts +0 -8
- package/src/utils/test.util.ts +0 -30
- package/src/utils/time.utils.ts +0 -2
- package/src/utils/uploads-state.utils.ts +0 -58
- package/src/utils/validation.utils.ts +0 -14
- package/src/vite-env.d.ts +0 -7
- package/test/setup-axios-mock.ts +0 -15
- /package/{src/assets/logo.png → dist/assets/logo-CJVdjy51.png} +0 -0
- /package/{src/assets → dist/img/icons}/android-chrome-192x192.png +0 -0
package/src/components.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
// Generated by unplugin-vue-components
|
|
4
|
-
// Read more: https://github.com/vuejs/core/pull/3399
|
|
5
|
-
export {}
|
|
6
|
-
|
|
7
|
-
/* prettier-ignore */
|
|
8
|
-
declare module 'vue' {
|
|
9
|
-
export interface GlobalComponents {
|
|
10
|
-
AboutView: typeof import('./components/AboutHelp/AboutView.vue')['default']
|
|
11
|
-
AccountSettings: typeof import('./components/Settings/AccountSettings.vue')['default']
|
|
12
|
-
AddOrUpdateCameraStreamDialog: typeof import('./components/Generic/Dialogs/AddOrUpdateCameraStreamDialog.vue')['default']
|
|
13
|
-
AddOrUpdateFloorDialog: typeof import('./components/Generic/Dialogs/AddOrUpdateFloorDialog.vue')['default']
|
|
14
|
-
AddOrUpdatePrinterDialog: typeof import('./components/Generic/Dialogs/AddOrUpdatePrinterDialog.vue')['default']
|
|
15
|
-
AppErrorSnackbar: typeof import('./components/Generic/Snackbars/AppErrorSnackbar.vue')['default']
|
|
16
|
-
AppInfoSnackbar: typeof import('./components/Generic/Snackbars/AppInfoSnackbar.vue')['default']
|
|
17
|
-
AppProgressSnackbar: typeof import('./components/Generic/Snackbars/AppProgressSnackbar.vue')['default']
|
|
18
|
-
BaseDialog: typeof import('./components/Generic/Dialogs/BaseDialog.vue')['default']
|
|
19
|
-
BatchJsonCreateDialog: typeof import('./components/Generic/Dialogs/BatchJsonCreateDialog.vue')['default']
|
|
20
|
-
BatchReprintDialog: typeof import('./components/Generic/Dialogs/BatchReprintDialog.vue')['default']
|
|
21
|
-
CameraGridView: typeof import('./components/CameraGrid/CameraGridView.vue')['default']
|
|
22
|
-
DiagnosticsSettings: typeof import('./components/Settings/DiagnosticsSettings.vue')['default']
|
|
23
|
-
EmergencyCommands: typeof import('./components/Settings/EmergencyCommands.vue')['default']
|
|
24
|
-
FileControlList: typeof import('./components/PrinterList/FileControlList.vue')['default']
|
|
25
|
-
FileExplorerSideNav: typeof import('./components/Generic/FileExplorerSideNav.vue')['default']
|
|
26
|
-
FirstTimeSetupView: typeof import('./components/FirstTimeSetup/FirstTimeSetupView.vue')['default']
|
|
27
|
-
FloorSettings: typeof import('./components/Settings/FloorSettings.vue')['default']
|
|
28
|
-
GridLoader: typeof import('./components/Generic/Loaders/GridLoader.vue')['default']
|
|
29
|
-
GridSettings: typeof import('./components/Settings/GridSettings.vue')['default']
|
|
30
|
-
HelpOverlay: typeof import('./components/HelpOverlay/HelpOverlay.vue')['default']
|
|
31
|
-
HomeToolbar: typeof import('./components/PrinterGrid/HomeToolbar.vue')['default']
|
|
32
|
-
LoginForm: typeof import('./components/Login/LoginForm.vue')['default']
|
|
33
|
-
LoginView: typeof import('./components/Login/LoginView.vue')['default']
|
|
34
|
-
Logo: typeof import('./components/Login/Logo.vue')['default']
|
|
35
|
-
NavigationDrawer: typeof import('./components/Generic/NavigationDrawer.vue')['default']
|
|
36
|
-
NotFoundView: typeof import('./components/NotFound/NotFoundView.vue')['default']
|
|
37
|
-
OctoPrintSettings: typeof import('./components/Settings/OctoPrintSettings.vue')['default']
|
|
38
|
-
PermissionDenied: typeof import('./components/Login/PermissionDenied.vue')['default']
|
|
39
|
-
PrinterChecksPanel: typeof import('./components/Generic/Dialogs/PrinterChecksPanel.vue')['default']
|
|
40
|
-
PrinterConnectionAction: typeof import('./components/Generic/Actions/PrinterConnectionAction.vue')['default']
|
|
41
|
-
PrinterControlDialog: typeof import('./components/Generic/Dialogs/PrinterControlDialog.vue')['default']
|
|
42
|
-
PrinterCreateAction: typeof import('./components/Generic/Actions/PrinterCreateAction.vue')['default']
|
|
43
|
-
PrinterDeleteAction: typeof import('./components/Generic/Actions/PrinterDeleteAction.vue')['default']
|
|
44
|
-
PrinterDetails: typeof import('./components/PrinterList/PrinterDetails.vue')['default']
|
|
45
|
-
PrinterGrid: typeof import('./components/PrinterGrid/PrinterGrid.vue')['default']
|
|
46
|
-
PrinterGridTile: typeof import('./components/PrinterGrid/PrinterGridTile.vue')['default']
|
|
47
|
-
PrinterGridView: typeof import('./components/PrinterGrid/PrinterGridView.vue')['default']
|
|
48
|
-
PrinterMaintenanceDialog: typeof import('./components/Generic/Dialogs/PrinterMaintenanceDialog.vue')['default']
|
|
49
|
-
PrinterQuickStopAction: typeof import('./components/Generic/Actions/PrinterQuickStopAction.vue')['default']
|
|
50
|
-
PrinterSettingsAction: typeof import('./components/Generic/Actions/PrinterSettingsAction.vue')['default']
|
|
51
|
-
PrintersView: typeof import('./components/PrinterList/PrintersView.vue')['default']
|
|
52
|
-
PrinterUrlAction: typeof import('./components/Generic/Actions/PrinterUrlAction.vue')['default']
|
|
53
|
-
PrintJobsMenu: typeof import('./components/Generic/PrintJobsMenu.vue')['default']
|
|
54
|
-
PrintStatistics: typeof import('./components/PrintStatistics/PrintStatistics.vue')['default']
|
|
55
|
-
PrintStatisticsView: typeof import('./components/PrintStatistics/PrintStatisticsView.vue')['default']
|
|
56
|
-
RefreshFilesAction: typeof import('./components/Generic/Actions/RefreshFilesAction.vue')['default']
|
|
57
|
-
RegistrationForm: typeof import('./components/Login/RegistrationForm.vue')['default']
|
|
58
|
-
RegistrationView: typeof import('./components/Login/RegistrationView.vue')['default']
|
|
59
|
-
RouterLink: typeof import('vue-router')['RouterLink']
|
|
60
|
-
RouterView: typeof import('vue-router')['RouterView']
|
|
61
|
-
ServerProtectionSettings: typeof import('./components/Settings/ServerProtectionSettings.vue')['default']
|
|
62
|
-
SettingsView: typeof import('./components/Settings/SettingsView.vue')['default']
|
|
63
|
-
SoftwareUpgradeSettings: typeof import('./components/Settings/SoftwareUpgradeSettings.vue')['default']
|
|
64
|
-
SyncPrinterNameAction: typeof import('./components/Generic/Actions/SyncPrinterNameAction.vue')['default']
|
|
65
|
-
TooltipButton: typeof import('./components/Generic/Vuetify/TooltipButton.vue')['default']
|
|
66
|
-
TopBar: typeof import('./components/TopBar.vue')['default']
|
|
67
|
-
UserManagementSettings: typeof import('./components/Settings/UserManagementSettings.vue')['default']
|
|
68
|
-
YamlImportExportDialog: typeof import('./components/Generic/Dialogs/YamlImportExportDialog.vue')['default']
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { PrinterDto } from '@/models/printers/printer.model'
|
|
2
|
-
import {
|
|
3
|
-
convertMultiPrinterFileToQueue,
|
|
4
|
-
convertPrinterMultiFileToQueue
|
|
5
|
-
} from '@/utils/uploads-state.utils'
|
|
6
|
-
import { usePrinterStore } from '@/store/printer.store'
|
|
7
|
-
import { useUploadsStore } from '@/store/uploads.store'
|
|
8
|
-
import { useSnackbar } from '@/shared/snackbar.composable'
|
|
9
|
-
import { AppContext, Directive } from 'vue'
|
|
10
|
-
|
|
11
|
-
const bindDropConditionally = (
|
|
12
|
-
el: HTMLElement,
|
|
13
|
-
printers: PrinterDto[],
|
|
14
|
-
context?: AppContext | null
|
|
15
|
-
) => {
|
|
16
|
-
const printersStore = usePrinterStore()
|
|
17
|
-
const uploadsStore = useUploadsStore()
|
|
18
|
-
const snackbar = useSnackbar()
|
|
19
|
-
|
|
20
|
-
if (printers?.length) {
|
|
21
|
-
const isSinglePrinter = printers.length === 1
|
|
22
|
-
const firstPrinter = printers[0]
|
|
23
|
-
|
|
24
|
-
el.ondrop = async (e) => {
|
|
25
|
-
e.preventDefault()
|
|
26
|
-
el.style.border = defaultBorder
|
|
27
|
-
|
|
28
|
-
const filesArray = e.dataTransfer?.files
|
|
29
|
-
if (!filesArray?.length) return
|
|
30
|
-
|
|
31
|
-
const clonedFiles = [...Array.from(filesArray)]
|
|
32
|
-
let convertedUploads = []
|
|
33
|
-
if (isSinglePrinter) {
|
|
34
|
-
const printedFilename =
|
|
35
|
-
clonedFiles.length === 1 ? clonedFiles[0].name : null
|
|
36
|
-
console.debug(
|
|
37
|
-
'Single printer upload mode',
|
|
38
|
-
printers.length,
|
|
39
|
-
clonedFiles.length,
|
|
40
|
-
printedFilename
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
// Convert the file and bound printer to a file upload
|
|
44
|
-
convertedUploads = convertPrinterMultiFileToQueue(
|
|
45
|
-
firstPrinter,
|
|
46
|
-
clonedFiles,
|
|
47
|
-
printedFilename
|
|
48
|
-
)
|
|
49
|
-
} else {
|
|
50
|
-
if (clonedFiles.length > 1) {
|
|
51
|
-
throw 'Cannot upload multiple files to multiple printers'
|
|
52
|
-
}
|
|
53
|
-
console.debug(
|
|
54
|
-
'Multi printer upload mode',
|
|
55
|
-
printers.length,
|
|
56
|
-
clonedFiles.length
|
|
57
|
-
)
|
|
58
|
-
const clonedFile = clonedFiles[0]
|
|
59
|
-
convertedUploads = convertMultiPrinterFileToQueue(
|
|
60
|
-
printers,
|
|
61
|
-
clonedFile,
|
|
62
|
-
{
|
|
63
|
-
select: true,
|
|
64
|
-
print: true
|
|
65
|
-
}
|
|
66
|
-
)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
uploadsStore.queueUploads(convertedUploads)
|
|
70
|
-
|
|
71
|
-
printersStore.clearSelectedPrinters()
|
|
72
|
-
}
|
|
73
|
-
} else {
|
|
74
|
-
el.ondrop = async (e) => {
|
|
75
|
-
e.preventDefault()
|
|
76
|
-
el.style.border = defaultBorder
|
|
77
|
-
snackbar.openInfoMessage({
|
|
78
|
-
title: 'No action performed',
|
|
79
|
-
subtitle: 'Please select one or more printers',
|
|
80
|
-
warning: true
|
|
81
|
-
})
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const defaultBorder = '1px solid #2b2a27'
|
|
87
|
-
const defaultTransition = 'background-color 0.5s ease'
|
|
88
|
-
const hoverBorder = '1px solid red'
|
|
89
|
-
|
|
90
|
-
export function getFileDropDirective(): Directive {
|
|
91
|
-
return {
|
|
92
|
-
// When the bound element is inserted into the DOM...
|
|
93
|
-
mounted: (el, binding, vnode) => {
|
|
94
|
-
el.style.border = defaultBorder
|
|
95
|
-
el.style.transition = defaultTransition
|
|
96
|
-
|
|
97
|
-
el.ondragenter = (ev: DragEvent) => {
|
|
98
|
-
ev.preventDefault()
|
|
99
|
-
el.style.border = hoverBorder
|
|
100
|
-
}
|
|
101
|
-
el.ondragover = (ev: DragEvent) => {
|
|
102
|
-
ev.preventDefault()
|
|
103
|
-
el.style.border = hoverBorder
|
|
104
|
-
}
|
|
105
|
-
el.ondragleave = (ev: DragEvent) => {
|
|
106
|
-
ev.preventDefault()
|
|
107
|
-
el.style.border = defaultBorder
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// The bound printer is not set
|
|
111
|
-
bindDropConditionally(el, binding.value?.printers, vnode.appContext)
|
|
112
|
-
},
|
|
113
|
-
beforeUpdate: (el, binding, vnode) => {
|
|
114
|
-
bindDropConditionally(el, binding.value, vnode.appContext)
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isPrinterPlaceDataTransfer,
|
|
3
|
-
PrinterPlace
|
|
4
|
-
} from '@/shared/drag.constants'
|
|
5
|
-
import { FloorService } from '@/backend/floor.service'
|
|
6
|
-
import { useFloorStore } from '@/store/floor.store'
|
|
7
|
-
import { PrinterDto } from '@/models/printers/printer.model'
|
|
8
|
-
import { AppContext, Directive } from 'vue'
|
|
9
|
-
|
|
10
|
-
interface PrinterBindingValue {
|
|
11
|
-
printerSet: PrinterDto | null
|
|
12
|
-
x: number
|
|
13
|
-
y: number
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const defaultBorder = '1px solid #2b2a27'
|
|
17
|
-
const hoverBorder = '1px solid gray'
|
|
18
|
-
|
|
19
|
-
const bindDropConditionally = (
|
|
20
|
-
el: HTMLElement,
|
|
21
|
-
bindingValue: PrinterBindingValue,
|
|
22
|
-
context?: AppContext | null
|
|
23
|
-
) => {
|
|
24
|
-
const printerSet = bindingValue?.printerSet
|
|
25
|
-
|
|
26
|
-
const floorStore = useFloorStore()
|
|
27
|
-
|
|
28
|
-
// If a printer is placed, we will not (yet) allow placing another printer
|
|
29
|
-
if (printerSet) {
|
|
30
|
-
el.ondrop = null
|
|
31
|
-
el.ondragover = null
|
|
32
|
-
el.ondragleave = null
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
el.style.border = defaultBorder
|
|
37
|
-
el.ondrop = async (e) => {
|
|
38
|
-
el.style.border = defaultBorder
|
|
39
|
-
e.preventDefault()
|
|
40
|
-
if (!e.dataTransfer) {
|
|
41
|
-
return
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const buffer = e.dataTransfer.getData('text')
|
|
45
|
-
const data = JSON.parse(buffer) as PrinterPlace
|
|
46
|
-
const isRecognized = isPrinterPlaceDataTransfer(data)
|
|
47
|
-
if (!isRecognized) {
|
|
48
|
-
console.debug('Drop not recognized', data)
|
|
49
|
-
return
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const floorId = floorStore.selectedFloor?.id
|
|
53
|
-
if (!floorId) throw new Error('Floor is not set')
|
|
54
|
-
const printerId = data.printerId
|
|
55
|
-
if (!printerId) throw new Error('PrinterId was not provided')
|
|
56
|
-
|
|
57
|
-
await FloorService.addPrinterToFloor(floorId, {
|
|
58
|
-
printerId,
|
|
59
|
-
x: bindingValue.x,
|
|
60
|
-
y: bindingValue.y
|
|
61
|
-
})
|
|
62
|
-
}
|
|
63
|
-
el.ondragover = (ev: DragEvent) => {
|
|
64
|
-
if (!ev?.dataTransfer) {
|
|
65
|
-
return
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (
|
|
69
|
-
ev.dataTransfer &&
|
|
70
|
-
Array.from(ev.dataTransfer.items).filter((i) => i.kind === 'file').length
|
|
71
|
-
) {
|
|
72
|
-
return
|
|
73
|
-
}
|
|
74
|
-
el.style.border = hoverBorder
|
|
75
|
-
ev.preventDefault()
|
|
76
|
-
}
|
|
77
|
-
el.ondragleave = (ev: DragEvent) => {
|
|
78
|
-
el.style.border = defaultBorder
|
|
79
|
-
ev.preventDefault()
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function getDropPrinterPositionDirective(): Directive {
|
|
84
|
-
return {
|
|
85
|
-
mounted: (el, binding, vnode) => {
|
|
86
|
-
bindDropConditionally(el, binding.value, vnode.appContext)
|
|
87
|
-
},
|
|
88
|
-
beforeUpdate: (el, binding, vnode) => {
|
|
89
|
-
bindDropConditionally(el, binding.value, vnode.appContext)
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
package/src/env.d.ts
DELETED
package/src/main.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import App from '@/App.vue'
|
|
2
|
-
import router from './router'
|
|
3
|
-
import { registerPlugins } from '@/plugins'
|
|
4
|
-
import * as Sentry from '@sentry/vue'
|
|
5
|
-
import { createApp } from 'vue'
|
|
6
|
-
import { AxiosError } from 'axios'
|
|
7
|
-
import { useSnackbar } from './shared/snackbar.composable'
|
|
8
|
-
import {
|
|
9
|
-
browserTracingIntegration,
|
|
10
|
-
captureException,
|
|
11
|
-
replayIntegration
|
|
12
|
-
} from '@sentry/vue'
|
|
13
|
-
import { getFileDropDirective } from './directives/file-upload.directive'
|
|
14
|
-
import { getDropPrinterPositionDirective } from './directives/printer-drop-position.directive'
|
|
15
|
-
import { generateAppConstants } from '@/shared/app.constants'
|
|
16
|
-
|
|
17
|
-
const app = createApp(App)
|
|
18
|
-
|
|
19
|
-
console.log(
|
|
20
|
-
`[DEV: ${import.meta.env.DEV}][PROD: ${import.meta.env.PROD}]`,
|
|
21
|
-
import.meta.env.PACKAGE_VERSION
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
Sentry.init({
|
|
25
|
-
app,
|
|
26
|
-
dsn: 'https://f64683e8d1cb4ac291434993cff1bf9b@o4503975545733120.ingest.sentry.io/4503975546912768',
|
|
27
|
-
integrations: [
|
|
28
|
-
browserTracingIntegration({
|
|
29
|
-
router
|
|
30
|
-
}),
|
|
31
|
-
replayIntegration()
|
|
32
|
-
],
|
|
33
|
-
release: import.meta.env.PACKAGE_VERSION,
|
|
34
|
-
environment: process.env.NODE_ENV,
|
|
35
|
-
enabled: process.env.NODE_ENV === 'production', // Set tracesSampleRate to 1.0 to capture 100%
|
|
36
|
-
// of transactions for performance monitoring.
|
|
37
|
-
// We recommend adjusting this value in production
|
|
38
|
-
tracesSampleRate: 1.0, // tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
|
|
39
|
-
// Capture Replay for 10% of all sessions,
|
|
40
|
-
// plus for 100% of sessions with an error
|
|
41
|
-
replaysSessionSampleRate: 0.1,
|
|
42
|
-
replaysOnErrorSampleRate: 1.0
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
app.config.errorHandler = (err: AxiosError | any) => {
|
|
46
|
-
if (err instanceof AxiosError) {
|
|
47
|
-
console.error(
|
|
48
|
-
`An error was caught [${err.name}]:\n ${err.message}\n ${err.config?.url}\n${err.stack}`
|
|
49
|
-
)
|
|
50
|
-
useSnackbar().openErrorMessage({
|
|
51
|
-
title: 'An error occurred',
|
|
52
|
-
subtitle: err.message,
|
|
53
|
-
timeout: 5000
|
|
54
|
-
})
|
|
55
|
-
return
|
|
56
|
-
} else {
|
|
57
|
-
console.error(
|
|
58
|
-
`An error was caught [${err.name}]:\n ${err.message}\n ${err.stack}`
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
useSnackbar().openErrorMessage({
|
|
62
|
-
title: 'An error occurred',
|
|
63
|
-
subtitle: err.message,
|
|
64
|
-
timeout: 5000
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
captureException(err)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
app.directive('drop-upload', getFileDropDirective())
|
|
71
|
-
app.directive('drop-printer-position', getDropPrinterPositionDirective())
|
|
72
|
-
|
|
73
|
-
registerPlugins(app)
|
|
74
|
-
app.provide('appConstants', generateAppConstants())
|
|
75
|
-
app.use(router)
|
|
76
|
-
app.mount('#app')
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { IdType } from '@/utils/id.type'
|
|
2
|
-
import {
|
|
3
|
-
OctoPrintStatisticsDto,
|
|
4
|
-
Prints,
|
|
5
|
-
Refs
|
|
6
|
-
} from '@/models/printers/printer-file.model'
|
|
7
|
-
import { GcodeAnalysisDto } from '@/models/printers/gcode/gcode-analysis.model'
|
|
8
|
-
|
|
9
|
-
export interface ReprintFileDto {
|
|
10
|
-
file?: CreateOrUpdatePrinterFileDto
|
|
11
|
-
reprintState: ReprintState
|
|
12
|
-
connectionState: ConnectionState | null
|
|
13
|
-
printerId: IdType
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export enum ReprintState {
|
|
17
|
-
PrinterNotAvailable = 0,
|
|
18
|
-
NoLastPrint = 1,
|
|
19
|
-
LastPrintReady = 2
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export type ConnectionState =
|
|
23
|
-
| 'Operational'
|
|
24
|
-
| 'Printing'
|
|
25
|
-
| 'Starting print from SD'
|
|
26
|
-
| 'Starting to send file to SD'
|
|
27
|
-
| 'Printing from SD'
|
|
28
|
-
| 'Transferring file to SD'
|
|
29
|
-
| 'Sending file to SD'
|
|
30
|
-
| 'Starting'
|
|
31
|
-
| 'Pausing'
|
|
32
|
-
| 'Paused'
|
|
33
|
-
| 'Resuming'
|
|
34
|
-
| 'Finishing'
|
|
35
|
-
| 'Cancelling'
|
|
36
|
-
| 'Error'
|
|
37
|
-
| 'Offline'
|
|
38
|
-
| 'Offline after error'
|
|
39
|
-
| 'Opening serial connection'
|
|
40
|
-
| 'Detecting serial connection'
|
|
41
|
-
| 'Unknown State'
|
|
42
|
-
|
|
43
|
-
export interface CreateOrUpdatePrinterFileDto {
|
|
44
|
-
id?: IdType
|
|
45
|
-
printerId?: IdType
|
|
46
|
-
|
|
47
|
-
name: string
|
|
48
|
-
date: number
|
|
49
|
-
display: string
|
|
50
|
-
gcodeAnalysis?: GcodeAnalysisDto
|
|
51
|
-
|
|
52
|
-
hash: string
|
|
53
|
-
origin: string
|
|
54
|
-
path: string
|
|
55
|
-
prints: Prints
|
|
56
|
-
refs: Refs
|
|
57
|
-
size: number
|
|
58
|
-
statistics: OctoPrintStatisticsDto
|
|
59
|
-
type: string
|
|
60
|
-
typePath: string[] // machinecode gcode
|
|
61
|
-
|
|
62
|
-
customData?: OctoPrintCustomDto
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface OctoPrintCustomDto {
|
|
66
|
-
// Custom metadata that is updated on hash changes only
|
|
67
|
-
userdata?: any
|
|
68
|
-
|
|
69
|
-
// Optional parts due to plugins and such
|
|
70
|
-
displayLayerProgress?: DisplayLayerProgressDto
|
|
71
|
-
thumbnail?: string
|
|
72
|
-
thumbnail_src?: string
|
|
73
|
-
[k: string]: any
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface DisplayLayerProgressDto {
|
|
77
|
-
// numberstring
|
|
78
|
-
totalLayerCountWithoutOffset: string
|
|
79
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { PrinterDto } from '@/models/printers/printer.model'
|
|
2
|
-
import { IdType } from '@/utils/id.type'
|
|
3
|
-
|
|
4
|
-
export interface CreateCameraStreamDto {
|
|
5
|
-
streamURL: string
|
|
6
|
-
name?: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface CameraStream {
|
|
10
|
-
id?: IdType
|
|
11
|
-
printerId?: IdType
|
|
12
|
-
streamURL: string
|
|
13
|
-
name?: string
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface CameraWithPrinter {
|
|
17
|
-
printer: PrinterDto
|
|
18
|
-
cameraStream: CameraStream
|
|
19
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { newRandomNamePair } from '@/shared/noun-adjectives.data'
|
|
2
|
-
import { IdType } from '@/utils/id.type'
|
|
3
|
-
|
|
4
|
-
export interface PrinterInFloorDto {
|
|
5
|
-
id?: IdType
|
|
6
|
-
printerId: IdType
|
|
7
|
-
x: number
|
|
8
|
-
y: number
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface FloorDto {
|
|
12
|
-
id: IdType
|
|
13
|
-
name: string
|
|
14
|
-
floor: number
|
|
15
|
-
printers: PrinterInFloorDto[]
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface PreCreateFloor {
|
|
19
|
-
id?: IdType
|
|
20
|
-
name: string
|
|
21
|
-
floor: string
|
|
22
|
-
printers: PrinterInFloorDto[]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const getDefaultCreateFloor = (): PreCreateFloor => ({
|
|
26
|
-
id: undefined,
|
|
27
|
-
name: newRandomNamePair(),
|
|
28
|
-
floor: '1',
|
|
29
|
-
printers: []
|
|
30
|
-
})
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export interface GithubPerson {
|
|
2
|
-
login: string
|
|
3
|
-
id: number
|
|
4
|
-
node_id: string
|
|
5
|
-
avatar_url: string
|
|
6
|
-
gravatar_id: string
|
|
7
|
-
url: string
|
|
8
|
-
html_url: string
|
|
9
|
-
followers_url: string
|
|
10
|
-
following_url: string
|
|
11
|
-
gists_url: string
|
|
12
|
-
starred_url: string
|
|
13
|
-
subscriptions_url: string
|
|
14
|
-
organizations_url: string
|
|
15
|
-
repos_url: string
|
|
16
|
-
events_url: string
|
|
17
|
-
received_events_url: string
|
|
18
|
-
type: string
|
|
19
|
-
site_admin: false
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface GithubReleaseAsset {
|
|
23
|
-
name: string
|
|
24
|
-
size: number
|
|
25
|
-
browser_download_url: string
|
|
26
|
-
url: string
|
|
27
|
-
|
|
28
|
-
content_type: string
|
|
29
|
-
created_at: string
|
|
30
|
-
download_count: number
|
|
31
|
-
id: number
|
|
32
|
-
label: string
|
|
33
|
-
node_id: number
|
|
34
|
-
updated_at: string
|
|
35
|
-
uploader: GithubPerson
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface PrusaFirmwareReleaseModel {
|
|
39
|
-
id: number
|
|
40
|
-
tag_name: string
|
|
41
|
-
prerelease: boolean
|
|
42
|
-
|
|
43
|
-
assets: GithubReleaseAsset[]
|
|
44
|
-
assets_url: string
|
|
45
|
-
draft: boolean
|
|
46
|
-
created_at: string
|
|
47
|
-
published_at: string
|
|
48
|
-
author: GithubPerson
|
|
49
|
-
body: string
|
|
50
|
-
html_url: string
|
|
51
|
-
node_id: number
|
|
52
|
-
tarball_url: string
|
|
53
|
-
target_commitish: string
|
|
54
|
-
upload_url: string
|
|
55
|
-
url: string
|
|
56
|
-
zipball_url: string
|
|
57
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { IdType } from '@/utils/id.type'
|
|
2
|
-
|
|
3
|
-
export interface ShortEvent {
|
|
4
|
-
status: string
|
|
5
|
-
fileName: string
|
|
6
|
-
createdAt: number
|
|
7
|
-
completionLog?: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface ContextEvent extends ShortEvent {
|
|
11
|
-
context?: {
|
|
12
|
-
correlationId: string
|
|
13
|
-
[k: string]:
|
|
14
|
-
| string
|
|
15
|
-
| {
|
|
16
|
-
status: string
|
|
17
|
-
createdAt: number
|
|
18
|
-
printerId: IdType
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type PrintJobEvents = {
|
|
24
|
-
correlationId: string
|
|
25
|
-
events: ShortEvent[] // ... others
|
|
26
|
-
lastEvent: ShortEvent
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface PrinterCompletions {
|
|
30
|
-
printerId: IdType
|
|
31
|
-
printCount: number
|
|
32
|
-
eventCount: number
|
|
33
|
-
failureCount: number
|
|
34
|
-
lastFailure: ContextEvent
|
|
35
|
-
failureEventsLastWeek: number
|
|
36
|
-
failureEventsLast48H: number
|
|
37
|
-
failureEventsLast24H: number
|
|
38
|
-
successCount: number
|
|
39
|
-
lastSuccess: ContextEvent
|
|
40
|
-
successEventsLastWeek: number
|
|
41
|
-
successEventsLast48H: number
|
|
42
|
-
successEventsLast24H: number
|
|
43
|
-
|
|
44
|
-
printJobs: PrintJobEvents[]
|
|
45
|
-
|
|
46
|
-
correlationIds: IdType[]
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export type PrintCompletionsModel = PrinterCompletions[]
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { newRandomNamePair } from '@/shared/noun-adjectives.data'
|
|
2
|
-
import { IdType } from '@/utils/id.type'
|
|
3
|
-
|
|
4
|
-
export const getDefaultCreatePrinter = (): PreCreatePrinter => ({
|
|
5
|
-
id: undefined,
|
|
6
|
-
name: newRandomNamePair(),
|
|
7
|
-
apiKey: '',
|
|
8
|
-
printerURL: '',
|
|
9
|
-
enabled: true
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
export interface PreCreatePrinter {
|
|
13
|
-
id?: IdType // Only in case of update
|
|
14
|
-
enabled: boolean
|
|
15
|
-
name: string
|
|
16
|
-
printerURL: string | undefined
|
|
17
|
-
apiKey: string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface CreatePrinter {
|
|
21
|
-
id?: IdType // Only in case of update
|
|
22
|
-
enabled: boolean
|
|
23
|
-
name: string
|
|
24
|
-
printerURL: string
|
|
25
|
-
apiKey: string
|
|
26
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface GCodeDimensions {
|
|
2
|
-
depth: number
|
|
3
|
-
height: number
|
|
4
|
-
width: number
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface FilamentTool {
|
|
8
|
-
length: number
|
|
9
|
-
volume: number
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface FilamentToolCollection {
|
|
13
|
-
[k: string]: FilamentTool
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface PrintingArea {
|
|
17
|
-
maxX: number
|
|
18
|
-
maxY: number
|
|
19
|
-
maxZ: number
|
|
20
|
-
minX: number
|
|
21
|
-
minY: number
|
|
22
|
-
minZ: number
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface GcodeAnalysisDto {
|
|
26
|
-
dimensions: GCodeDimensions
|
|
27
|
-
estimatedPrintTime: number
|
|
28
|
-
filament: FilamentToolCollection
|
|
29
|
-
printingArea: PrintingArea
|
|
30
|
-
}
|