@fdm-monster/client-next 0.0.1 → 0.0.3

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.
Files changed (199) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/RELEASE_NOTES.MD +28 -1
  3. package/dist/assets/MaterialIcons-Regular-BjXOXp5c.eot +0 -0
  4. package/dist/assets/MaterialIcons-Regular-DEUTIz1o.ttf +0 -0
  5. package/dist/assets/MaterialIcons-Regular-DOtZ65Va.woff2 +0 -0
  6. package/dist/assets/MaterialIcons-Regular-FsbMSDLx.woff +0 -0
  7. package/dist/assets/index-CHzfWKPO.css +5 -0
  8. package/dist/assets/index-WVqTlgq7.js +90 -0
  9. package/dist/assets/index-WVqTlgq7.js.map +1 -0
  10. package/dist/favicon.ico +0 -0
  11. package/dist/img/DavidZwart.jpg +0 -0
  12. package/dist/img/OIG.JYDC2RaWdz7g9.jpg +0 -0
  13. package/dist/img/OIG.jpg +0 -0
  14. package/dist/img/icons/android-chrome-256x256.png +0 -0
  15. package/dist/img/icons/android-chrome-384x384.png +0 -0
  16. package/dist/img/icons/android-chrome-512x512.png +0 -0
  17. package/dist/img/icons/favicon.svg +1 -0
  18. package/dist/img/logo.png +0 -0
  19. package/dist/img/logo.svg +1 -0
  20. package/dist/img/manifest.webmanifest +33 -0
  21. package/dist/img/octoprint-tentacle.svg +144 -0
  22. package/dist/img/thumbail_unknown.jpg +0 -0
  23. package/dist/img/vbanner.jpg +0 -0
  24. package/dist/index.html +24 -0
  25. package/dist/robots.txt +2 -0
  26. package/package.json +1 -1
  27. package/.all-contributorsrc +0 -57
  28. package/.editorconfig +0 -5
  29. package/.eslintrc.js +0 -126
  30. package/.github/FUNDING.yml +0 -3
  31. package/.github/workflows/release-client.yml +0 -94
  32. package/.github/workflows/vue-publish.yml +0 -26
  33. package/.prettierignore +0 -15
  34. package/.whitesource +0 -12
  35. package/renovate.json +0 -30
  36. package/src/App.vue +0 -60
  37. package/src/AppLoader.vue +0 -383
  38. package/src/assets/adjectives.json +0 -1468
  39. package/src/assets/logo.svg +0 -6
  40. package/src/assets/nouns.json +0 -4309
  41. package/src/auto-imports.d.ts +0 -139
  42. package/src/backend/app.service.ts +0 -39
  43. package/src/backend/auth.service.ts +0 -56
  44. package/src/backend/base.service.ts +0 -57
  45. package/src/backend/batch.service.ts +0 -37
  46. package/src/backend/camera-stream.service.ts +0 -33
  47. package/src/backend/custom-gcode.service.ts +0 -11
  48. package/src/backend/dto/octoprint-settings.dto.ts +0 -168
  49. package/src/backend/first-time-setup.service.ts +0 -17
  50. package/src/backend/floor.service.ts +0 -84
  51. package/src/backend/index.ts +0 -4
  52. package/src/backend/print-completions.service.ts +0 -11
  53. package/src/backend/printer-file.service.ts +0 -91
  54. package/src/backend/printer-group.service.ts +0 -62
  55. package/src/backend/printer-job.service.ts +0 -20
  56. package/src/backend/printer-settings.service.ts +0 -28
  57. package/src/backend/printers.service.ts +0 -136
  58. package/src/backend/server-private.service.ts +0 -55
  59. package/src/backend/server.api.ts +0 -132
  60. package/src/backend/settings.service.ts +0 -85
  61. package/src/backend/user.service.ts +0 -51
  62. package/src/components/AboutHelp/AboutView.vue +0 -164
  63. package/src/components/CameraGrid/CameraGridView.vue +0 -111
  64. package/src/components/FirstTimeSetup/FirstTimeSetupView.vue +0 -354
  65. package/src/components/Generic/Actions/PrinterConnectionAction.vue +0 -56
  66. package/src/components/Generic/Actions/PrinterCreateAction.vue +0 -22
  67. package/src/components/Generic/Actions/PrinterDeleteAction.vue +0 -29
  68. package/src/components/Generic/Actions/PrinterQuickStopAction.vue +0 -35
  69. package/src/components/Generic/Actions/PrinterSettingsAction.vue +0 -35
  70. package/src/components/Generic/Actions/PrinterUrlAction.vue +0 -24
  71. package/src/components/Generic/Actions/RefreshFilesAction.vue +0 -50
  72. package/src/components/Generic/Actions/SyncPrinterNameAction.vue +0 -36
  73. package/src/components/Generic/Dialogs/AddOrUpdateCameraStreamDialog.vue +0 -131
  74. package/src/components/Generic/Dialogs/AddOrUpdateFloorDialog.vue +0 -141
  75. package/src/components/Generic/Dialogs/AddOrUpdatePrinterDialog.vue +0 -303
  76. package/src/components/Generic/Dialogs/BaseDialog.vue +0 -81
  77. package/src/components/Generic/Dialogs/BatchJsonCreateDialog.vue +0 -109
  78. package/src/components/Generic/Dialogs/BatchReprintDialog.vue +0 -190
  79. package/src/components/Generic/Dialogs/PrinterChecksPanel.vue +0 -37
  80. package/src/components/Generic/Dialogs/PrinterControlDialog.vue +0 -202
  81. package/src/components/Generic/Dialogs/PrinterMaintenanceDialog.vue +0 -130
  82. package/src/components/Generic/Dialogs/YamlImportExportDialog.vue +0 -186
  83. package/src/components/Generic/Dialogs/dialog.constants.ts +0 -19
  84. package/src/components/Generic/FileExplorerSideNav.vue +0 -734
  85. package/src/components/Generic/Loaders/GridLoader.vue +0 -68
  86. package/src/components/Generic/NavigationDrawer.vue +0 -69
  87. package/src/components/Generic/PrintJobsMenu.vue +0 -148
  88. package/src/components/Generic/Snackbars/AppErrorSnackbar.vue +0 -64
  89. package/src/components/Generic/Snackbars/AppInfoSnackbar.vue +0 -63
  90. package/src/components/Generic/Snackbars/AppProgressSnackbar.vue +0 -158
  91. package/src/components/Generic/Vuetify/TooltipButton.vue +0 -47
  92. package/src/components/HelpOverlay/HelpOverlay.vue +0 -57
  93. package/src/components/Login/LoginForm.vue +0 -206
  94. package/src/components/Login/LoginView.spec.ts +0 -64
  95. package/src/components/Login/LoginView.vue +0 -65
  96. package/src/components/Login/Logo.vue +0 -13
  97. package/src/components/Login/PermissionDenied.vue +0 -109
  98. package/src/components/Login/RegistrationForm.vue +0 -207
  99. package/src/components/Login/RegistrationView.vue +0 -17
  100. package/src/components/Login/__snapshots__/LoginView.spec.ts.snap +0 -1051
  101. package/src/components/NotFound/NotFoundView.vue +0 -39
  102. package/src/components/PrintStatistics/PrintStatistics.vue +0 -168
  103. package/src/components/PrintStatistics/PrintStatisticsView.vue +0 -15
  104. package/src/components/PrinterGrid/HomeToolbar.vue +0 -90
  105. package/src/components/PrinterGrid/PrinterGrid.vue +0 -164
  106. package/src/components/PrinterGrid/PrinterGridTile.vue +0 -438
  107. package/src/components/PrinterGrid/PrinterGridView.vue +0 -210
  108. package/src/components/PrinterList/FileControlList.vue +0 -40
  109. package/src/components/PrinterList/PrinterDetails.vue +0 -91
  110. package/src/components/PrinterList/PrintersView.vue +0 -492
  111. package/src/components/Settings/AccountSettings.vue +0 -163
  112. package/src/components/Settings/DiagnosticsSettings.vue +0 -137
  113. package/src/components/Settings/EmergencyCommands.vue +0 -265
  114. package/src/components/Settings/FloorSettings.vue +0 -276
  115. package/src/components/Settings/GridSettings.vue +0 -127
  116. package/src/components/Settings/OctoPrintSettings.vue +0 -188
  117. package/src/components/Settings/ServerProtectionSettings.vue +0 -370
  118. package/src/components/Settings/SettingsView.vue +0 -73
  119. package/src/components/Settings/SoftwareUpgradeSettings.vue +0 -297
  120. package/src/components/Settings/UserManagementSettings.vue +0 -257
  121. package/src/components/TopBar.vue +0 -147
  122. package/src/components.d.ts +0 -70
  123. package/src/directives/file-upload.directive.ts +0 -117
  124. package/src/directives/printer-drop-position.directive.ts +0 -92
  125. package/src/env.d.ts +0 -6
  126. package/src/main.ts +0 -76
  127. package/src/models/batch/reprint.dto.ts +0 -79
  128. package/src/models/batch.model.ts +0 -11
  129. package/src/models/camera-streams/camera-stream.ts +0 -19
  130. package/src/models/floors/floor.model.ts +0 -30
  131. package/src/models/octoprint/connection-options.model.ts +0 -8
  132. package/src/models/plugins/firmware-updates/prusa-firmware-release.model.ts +0 -57
  133. package/src/models/print-completions/print-completions.model.ts +0 -49
  134. package/src/models/printers/crud/create-printer.model.ts +0 -26
  135. package/src/models/printers/file-upload-commands.model.ts +0 -4
  136. package/src/models/printers/gcode/gcode-analysis.model.ts +0 -30
  137. package/src/models/printers/printer-current-job.model.ts +0 -90
  138. package/src/models/printers/printer-file.model.ts +0 -48
  139. package/src/models/printers/printer.model.ts +0 -18
  140. package/src/models/server/client-releases.model.ts +0 -27
  141. package/src/models/server/export-yaml.model.ts +0 -11
  142. package/src/models/server/features.model.ts +0 -37
  143. package/src/models/server/github-rate-limit.model.ts +0 -21
  144. package/src/models/server/version.model.ts +0 -14
  145. package/src/models/settings/printer-file-clean-settings.model.ts +0 -5
  146. package/src/models/settings/server-settings.dto.ts +0 -19
  147. package/src/models/settings/settings.model.ts +0 -57
  148. package/src/models/socketio-messages/socketio-message.model.ts +0 -53
  149. package/src/models/uploads/queued-upload.model.ts +0 -12
  150. package/src/models/user.model.ts +0 -15
  151. package/src/plugins/README.md +0 -3
  152. package/src/plugins/index.ts +0 -17
  153. package/src/plugins/vuetify.ts +0 -53
  154. package/src/router/index.ts +0 -192
  155. package/src/router/route-names.ts +0 -14
  156. package/src/router/utils.ts +0 -23
  157. package/src/shared/alert.events.ts +0 -14
  158. package/src/shared/app.constants.ts +0 -23
  159. package/src/shared/auth.constants.ts +0 -34
  160. package/src/shared/dialog.composable.ts +0 -41
  161. package/src/shared/drag.constants.ts +0 -19
  162. package/src/shared/experimental.constants.ts +0 -1
  163. package/src/shared/http-client.ts +0 -162
  164. package/src/shared/noun-adjectives.data.ts +0 -24
  165. package/src/shared/printer-grid.constants.ts +0 -5
  166. package/src/shared/printer-state.constants.ts +0 -194
  167. package/src/shared/snackbar.composable.ts +0 -66
  168. package/src/shared/socketio.service.ts +0 -104
  169. package/src/store/auth.store.ts +0 -255
  170. package/src/store/connection.store.ts +0 -66
  171. package/src/store/dialog.store.ts +0 -114
  172. package/src/store/features.store.ts +0 -57
  173. package/src/store/floor.store.ts +0 -173
  174. package/src/store/grid.store.ts +0 -10
  175. package/src/store/index.ts +0 -4
  176. package/src/store/printer-state.store.ts +0 -246
  177. package/src/store/printer.store.ts +0 -236
  178. package/src/store/profile.store.ts +0 -25
  179. package/src/store/settings.store.ts +0 -64
  180. package/src/store/test-printer.store.ts +0 -70
  181. package/src/store/uploads.store.ts +0 -75
  182. package/src/styles/README.md +0 -3
  183. package/src/styles/settings.scss +0 -10
  184. package/src/types/global.d.ts +0 -15
  185. package/src/utils/array.utils.ts +0 -15
  186. package/src/utils/date.utils.ts +0 -5
  187. package/src/utils/download-file.util.ts +0 -25
  188. package/src/utils/error.utils.ts +0 -3
  189. package/src/utils/file-size.util.ts +0 -11
  190. package/src/utils/id.type.ts +0 -1
  191. package/src/utils/sentry.util.ts +0 -8
  192. package/src/utils/test.util.ts +0 -30
  193. package/src/utils/time.utils.ts +0 -2
  194. package/src/utils/uploads-state.utils.ts +0 -58
  195. package/src/utils/validation.utils.ts +0 -14
  196. package/src/vite-env.d.ts +0 -7
  197. package/test/setup-axios-mock.ts +0 -15
  198. /package/{src/assets/logo.png → dist/assets/logo-CJVdjy51.png} +0 -0
  199. /package/{src/assets → dist/img/icons}/android-chrome-192x192.png +0 -0
@@ -1,370 +0,0 @@
1
- <template>
2
- <v-card>
3
- <v-toolbar color="primary">
4
- <v-avatar>
5
- <v-icon>settings</v-icon>
6
- </v-avatar>
7
- <v-toolbar-title> Server Protection Settings </v-toolbar-title>
8
- </v-toolbar>
9
- <v-list lines="three">
10
- <v-list-item v-if="!whitelistSettingsHidden">
11
- <v-list-item-title> IP Whitelist </v-list-item-title>
12
- <v-list-item-subtitle>
13
- <v-alert color="warning">
14
- <v-icon>info</v-icon> &nbsp; Be cautious, setting the wrong
15
- whitelist could make you lose access to the server!
16
- </v-alert>
17
- Only allow access from specific IP Adresses or subnets. Note:
18
- 127.0.0.1 will always be allowed access. Examples:
19
- <br />
20
- <v-chip size="small"> 192.168 </v-chip>
21
- <v-chip size="small"> 192.168.1 </v-chip>
22
- <v-chip size="small"> 192.168.1.1 </v-chip>
23
- <br />
24
- <v-row>
25
- <v-col
26
- cols="12"
27
- md="2"
28
- >
29
- <v-checkbox
30
- v-model="whitelistEnabled"
31
- label="Enable IP Whitelist"
32
- />
33
- </v-col>
34
- </v-row>
35
- <v-row class="mt-0">
36
- <v-col
37
- cols="12"
38
- md="2"
39
- >
40
- <v-text-field
41
- v-model="ipAddress"
42
- :disabled="!whitelistEnabled"
43
- :rules="[ipAddressRule, (val) => !!val]"
44
- append-icon="add"
45
- label="IP Address"
46
- @click:append="appendIpAddress(ipAddress)"
47
- />
48
- </v-col>
49
- <v-col>
50
- <v-chip-group>
51
- <v-chip
52
- v-for="ip in whitelistedIpAddresses"
53
- :key="ip"
54
- :disabled="!whitelistEnabled"
55
- closable
56
- @click:close="removeIpWhitelist(ip)"
57
- >
58
- {{ ip }}
59
- </v-chip>
60
- </v-chip-group>
61
- </v-col>
62
- </v-row>
63
- <v-row>
64
- <v-col>
65
- <v-btn
66
- color="default"
67
- @click="resetWhitelistSettingsToDefault()"
68
- >
69
- reset to default
70
- </v-btn>
71
- <v-btn
72
- color="primary"
73
- @click="setWhitelistSettings()"
74
- >
75
- save whitelist settings
76
- </v-btn>
77
- </v-col>
78
- </v-row>
79
- </v-list-item-subtitle>
80
- </v-list-item>
81
-
82
- <v-list-item>
83
- <v-list-item-title> Login Required </v-list-item-title>
84
-
85
- <v-list-item-subtitle>
86
- <v-row>
87
- <v-col
88
- cols="12"
89
- md="2"
90
- >
91
- <v-checkbox
92
- v-model="loginRequired"
93
- label="Require Login"
94
- />
95
- </v-col>
96
- </v-row>
97
- <v-row>
98
- <v-col>
99
- <v-btn
100
- color="primary"
101
- @click="setLoginRequired()"
102
- >
103
- save login required setting
104
- </v-btn>
105
- </v-col>
106
- </v-row>
107
- </v-list-item-subtitle>
108
- </v-list-item>
109
-
110
- <v-list-item>
111
- <v-list-item-title> Registration Enabled </v-list-item-title>
112
- <v-list-item-subtitle>
113
- <v-row>
114
- <v-col
115
- cols="12"
116
- md="2"
117
- >
118
- <v-checkbox
119
- v-model="registrationEnabled"
120
- label="Enable Registration"
121
- />
122
- </v-col>
123
- </v-row>
124
- <v-row>
125
- <v-col>
126
- <v-btn
127
- color="primary"
128
- @click="setRegistrationEnabled()"
129
- >
130
- save registration enabled setting
131
- </v-btn>
132
- </v-col>
133
- </v-row>
134
- </v-list-item-subtitle>
135
- </v-list-item>
136
-
137
- <v-list-item>
138
- <v-list-item-title>
139
- Login Expiry Settings (advanced)
140
- </v-list-item-title>
141
-
142
- <v-list-item-subtitle>
143
- <v-row>
144
- <v-col
145
- cols="12"
146
- md="2"
147
- >
148
- <v-text-field
149
- v-model="jwtExpiresIn"
150
- :rules="[(val) => !!val && val >= 2 && val <= 120]"
151
- label="JWT Expiry (minutes)"
152
- />
153
- </v-col>
154
- </v-row>
155
- <v-row>
156
- <v-col
157
- cols="12"
158
- md="2"
159
- >
160
- <v-checkbox
161
- v-model="refreshTokenAttemptsEnabled"
162
- label="Enable Refresh Token Attempts"
163
- @update:model-value="onRefreshTokenEnabledChange()"
164
- />
165
- </v-col>
166
- </v-row>
167
- <v-row>
168
- <v-col
169
- cols="12"
170
- md="2"
171
- >
172
- <v-text-field
173
- v-model="refreshTokenAttempts"
174
- :disabled="!refreshTokenAttemptsEnabled"
175
- :rules="[(val) => !!val && val >= 50]"
176
- label="Refresh Token Attempts (disabled: -1)"
177
- type="number"
178
- />
179
- </v-col>
180
- </v-row>
181
- <v-row>
182
- <v-col
183
- cols="12"
184
- md="2"
185
- >
186
- <v-text-field
187
- v-model="refreshTokenExpiry"
188
- :rules="[(val) => !!val && val >= 1 && val <= 30]"
189
- label="Refresh Token Expiry (days)"
190
- />
191
- </v-col>
192
- </v-row>
193
-
194
- <v-alert color="secondary">
195
- <v-icon>info</v-icon> &nbsp; Be cautious, setting the wrong expiry
196
- could make you lose access to the server or make your user
197
- experience highly degraded!
198
- </v-alert>
199
-
200
- <v-row>
201
- <v-col>
202
- <v-btn
203
- color="primary"
204
- @click="saveLoginExpirySettings()"
205
- >
206
- save login expiry settings
207
- </v-btn>
208
- <v-btn
209
- color="default"
210
- @click="resetLoginExpirySettingsToDefault()"
211
- >
212
- reset to default
213
- </v-btn>
214
- </v-col>
215
- </v-row>
216
- </v-list-item-subtitle>
217
- </v-list-item>
218
- </v-list>
219
- </v-card>
220
- </template>
221
-
222
- <script lang="ts" setup>
223
- import { onMounted, ref } from 'vue'
224
- import { whitelistSettingsHidden } from '@/shared/experimental.constants'
225
- import { isValidIPOrMask } from '@/utils/validation.utils'
226
- import { SettingsService } from '@/backend'
227
- import { useSnackbar } from '@/shared/snackbar.composable'
228
- import { useAuthStore } from '@/store/auth.store'
229
- import { useRouter } from 'vue-router'
230
- import { RouteNames } from '@/router/route-names'
231
-
232
- const router = useRouter()
233
- const snackbar = useSnackbar()
234
- const authStore = useAuthStore()
235
-
236
- const ipAddress = ref<string>('')
237
- const whitelistEnabled = ref<boolean>(false)
238
- const whitelistedIpAddresses = ref<string[]>([])
239
-
240
- const loginRequired = ref<boolean>(false)
241
- const registrationEnabled = ref<boolean>(false)
242
-
243
- const jwtExpiresIn = ref<number>(3200)
244
- const refreshTokenAttemptsEnabled = ref<boolean>(false)
245
- const refreshTokenAttempts = ref<number>(-1)
246
- const refreshTokenExpiry = ref<number>(14)
247
-
248
- const ipAddressRule = (val: string) =>
249
- isValidIPOrMask(val) ? true : 'Not a valid IP Address'
250
-
251
- async function loadSettings() {
252
- const settings = await SettingsService.getSettings()
253
- loginRequired.value = settings.server.loginRequired
254
- registrationEnabled.value = settings.server.registration
255
-
256
- ipAddress.value = settings.connection?.clientIp ?? '127.0.0.1'
257
- whitelistEnabled.value = settings.server.whitelistEnabled
258
- whitelistedIpAddresses.value = settings.server.whitelistedIpAddresses
259
-
260
- const sensitiveSettings = await SettingsService.getSettingsSensitive()
261
- jwtExpiresIn.value = sensitiveSettings.credentials.jwtExpiresIn / 60
262
- refreshTokenAttemptsEnabled.value =
263
- sensitiveSettings.credentials.refreshTokenAttempts !== -1
264
- refreshTokenAttempts.value =
265
- sensitiveSettings.credentials.refreshTokenAttempts
266
- refreshTokenExpiry.value =
267
- sensitiveSettings.credentials.refreshTokenExpiry / 24 / 3600
268
- }
269
-
270
- onMounted(async () => {
271
- await loadSettings()
272
- })
273
-
274
- function onRefreshTokenEnabledChange() {
275
- if (!refreshTokenAttemptsEnabled.value) {
276
- refreshTokenAttempts.value = -1
277
- }
278
- }
279
-
280
- function removeIpWhitelist(removedIp: string) {
281
- whitelistedIpAddresses.value = whitelistedIpAddresses.value.filter(
282
- (ip) => ip.toLowerCase() !== removedIp.toLowerCase()
283
- )
284
- }
285
-
286
- function appendIpAddress(ip: string) {
287
- if (!isValidIPOrMask(ip)) return
288
- whitelistedIpAddresses.value.push(ip.toLowerCase())
289
- }
290
-
291
- async function resetWhitelistSettingsToDefault() {
292
- whitelistedIpAddresses.value = ['127.0.0.1', '::12']
293
- whitelistEnabled.value = false
294
- await setWhitelistSettings(false)
295
- snackbar.info('Whitelist settings reset to default')
296
- }
297
-
298
- async function setWhitelistSettings(showSuccess = true) {
299
- await SettingsService.setWhitelistSettings({
300
- whitelistedIpAddresses: whitelistedIpAddresses.value,
301
- whitelistEnabled: whitelistEnabled.value
302
- })
303
- if (showSuccess) {
304
- snackbar.info('Whitelist settings updated')
305
- }
306
-
307
- await loadSettings()
308
- }
309
-
310
- async function setLoginRequired() {
311
- const loginRequiredVal = loginRequired.value
312
- if (
313
- !loginRequiredVal &&
314
- !confirm('Disabling login will expose your server. Continue?')
315
- ) {
316
- return
317
- }
318
-
319
- await SettingsService.updateLoginRequiredSettings(loginRequiredVal)
320
-
321
- await authStore.logout(true)
322
-
323
- await authStore.checkAuthenticationRequirements()
324
- if (!loginRequiredVal) {
325
- await router.push({ name: RouteNames.Home })
326
- } else {
327
- await router.push({ name: RouteNames.Login })
328
- }
329
- snackbar.info('Login Required settings updated')
330
- }
331
-
332
- async function setRegistrationEnabled() {
333
- await SettingsService.updateRegistrationEnabledSettings(
334
- registrationEnabled.value
335
- )
336
- await authStore.checkAuthenticationRequirements()
337
- snackbar.info('Registration settings updated')
338
- }
339
-
340
- async function resetLoginExpirySettingsToDefault() {
341
- jwtExpiresIn.value = 120
342
- refreshTokenAttemptsEnabled.value = false
343
- refreshTokenAttempts.value = -1
344
- refreshTokenExpiry.value = 14
345
- await saveLoginExpirySettings()
346
- snackbar.info('Login expiry settings reset to default')
347
- }
348
-
349
- async function saveLoginExpirySettings(showSnackbar = true) {
350
- if (jwtExpiresIn.value < 2 || jwtExpiresIn.value > 120) {
351
- throw new Error('JWT Expiry must be between 2 and 120 minutes')
352
- }
353
- if (
354
- refreshTokenAttemptsEnabled.value &&
355
- (refreshTokenAttempts.value < 50 || refreshTokenAttempts.value > 1000)
356
- ) {
357
- throw new Error('Refresh Token Attempts must be between 50 and 1000')
358
- }
359
- if (refreshTokenExpiry.value < 1 || refreshTokenExpiry.value > 30) {
360
- throw new Error('Refresh Token Expiry must be between 1 and 30 days')
361
- }
362
-
363
- await SettingsService.updateCredentialSettings(
364
- jwtExpiresIn.value * 60,
365
- refreshTokenAttempts.value,
366
- refreshTokenExpiry.value * 24 * 3600
367
- )
368
- snackbar.info('Login expiry settings updated')
369
- }
370
- </script>
@@ -1,73 +0,0 @@
1
- <template>
2
- <v-row no-gutters>
3
- <div>
4
- <v-navigation-drawer :permanent="true">
5
- <v-list-item>
6
- <v-list-item-title class="text-h6"> Settings </v-list-item-title>
7
- <v-list-item-subtitle> Adjust your Fdm Monster </v-list-item-subtitle>
8
- </v-list-item>
9
-
10
- <v-divider />
11
-
12
- <v-list
13
- density="compact"
14
- nav
15
- >
16
- <v-list-item
17
- v-for="item in items"
18
- :key="item.title"
19
- :to="item.path"
20
- link
21
- :prepend-icon="item.icon"
22
- :title="item.title"
23
- router-link
24
- />
25
- </v-list>
26
- </v-navigation-drawer>
27
- </div>
28
-
29
- <router-view class="grow" />
30
- </v-row>
31
- </template>
32
-
33
- <script lang="ts" setup>
34
- const items = ref([
35
- {
36
- title: 'Grid',
37
- icon: 'grid_on',
38
- path: '/settings/grid'
39
- },
40
- {
41
- title: 'Floors',
42
- icon: 'house_siding',
43
- path: '/settings/floors'
44
- },
45
- {
46
- title: 'User Management',
47
- icon: 'group',
48
- path: '/settings/user-management'
49
- },
50
- {
51
- title: 'Account Settings',
52
- icon: 'account_circle',
53
- path: '/settings/account'
54
- },
55
- {
56
- title: 'Server Protection',
57
- icon: 'security',
58
- path: '/settings/server-protection'
59
- },
60
- { title: 'OctoPrint Settings', icon: 'image', path: '/settings/octoprint' },
61
- {
62
- title: 'Emergency Commands',
63
- icon: 'warning',
64
- path: '/settings/emergency-commands'
65
- },
66
- {
67
- title: 'Software Upgrade',
68
- icon: 'upgrade',
69
- path: '/settings/software-upgrade'
70
- },
71
- { title: 'Diagnostics', icon: 'bug_report', path: '/settings/diagnostics' }
72
- ])
73
- </script>