mirror of
https://github.com/ad1217/PrinterStatus
synced 2024-11-23 07:53:48 -05:00
Apply prettier
This commit is contained in:
parent
1fc0776771
commit
8c18460995
@ -2,8 +2,8 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<link rel="alternate icon" href="/favicon.ico">
|
<link rel="alternate icon" href="/favicon.ico" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>3D Printer Status</title>
|
<title>3D Printer Status</title>
|
||||||
</head>
|
</head>
|
||||||
|
@ -15,8 +15,8 @@ const PORT = process.env.PORT || 1234;
|
|||||||
|
|
||||||
type configuration = {
|
type configuration = {
|
||||||
printers: {
|
printers: {
|
||||||
[key: string]: { address: string; apikey: string }
|
[key: string]: { address: string; apikey: string };
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Load config
|
// Load config
|
||||||
@ -100,7 +100,7 @@ class PrinterStatus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
connect_websocket(authToken: string): void {
|
connect_websocket(authToken: string): void {
|
||||||
const url = new URL('/sockjs/websocket', this.address)
|
const url = new URL('/sockjs/websocket', this.address);
|
||||||
url.protocol = 'ws';
|
url.protocol = 'ws';
|
||||||
this.websocket = new WebSocket(url.toString());
|
this.websocket = new WebSocket(url.toString());
|
||||||
this.websocket
|
this.websocket
|
||||||
@ -160,7 +160,8 @@ class PrinterStatus {
|
|||||||
|
|
||||||
function initPrinters() {
|
function initPrinters() {
|
||||||
printerStatuses = Object.entries(config.printers).map(
|
printerStatuses = Object.entries(config.printers).map(
|
||||||
([slug, printer]) => new PrinterStatus(slug, printer.address, printer.apikey)
|
([slug, printer]) =>
|
||||||
|
new PrinterStatus(slug, printer.address, printer.apikey)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,5 +2,4 @@ import * as Vue from 'vue';
|
|||||||
|
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
|
|
||||||
const app = Vue.createApp(App)
|
const app = Vue.createApp(App).mount('#app');
|
||||||
.mount('#app');
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite';
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@ -7,12 +7,12 @@ export default defineConfig({
|
|||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/ws': {
|
'/ws': {
|
||||||
target: "ws://localhost:1234",
|
target: 'ws://localhost:1234',
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
"/webcam": {
|
'/webcam': {
|
||||||
target: "http://localhost:1234",
|
target: 'http://localhost:1234',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user