2
0
mirror of https://github.com/ad1217/PrinterStatus synced 2024-11-26 17:24:39 -05:00

Apply prettier

This commit is contained in:
Adam Goldsmith 2021-10-28 01:06:08 -04:00
parent 1fc0776771
commit 8c18460995
4 changed files with 17 additions and 17 deletions

View File

@ -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>

View File

@ -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)
);
}

View File

@ -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');

View File

@ -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',
},
},
},
});