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