diff --git a/Cargo.lock b/Cargo.lock index cabe2e0..b663519 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1845,6 +1845,15 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +[[package]] +name = "openssl-src" +version = "300.4.2+3.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.106" @@ -1853,6 +1862,7 @@ checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] diff --git a/Cargo.toml b/Cargo.toml index 7382973..11a46a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ showbits-typst.path = "./showbits-typst" tokio = "1.43.0" typst = "0.13.0" typst-assets = { version = "0.13.0", features = ["fonts"] } -typst-kit = "0.13.0" +typst-kit = { version = "0.13.0", features = ["vendor-openssl"] } typst-render = "0.13.0" [workspace.dependencies.mark] diff --git a/meta/spinch/deploy b/meta/spinch/deploy index 0cac3e3..fd6e6be 100755 --- a/meta/spinch/deploy +++ b/meta/spinch/deploy @@ -8,9 +8,6 @@ echo "## Build ##" echo "###########" set_color normal -./meta/build-typst-plugin -or return 1 - ./meta/build-thermal-printer-ui or return 1 diff --git a/meta/spinch/showbits-thermal-printer.service b/meta/spinch/showbits-thermal-printer.service index 944e67e..579aca8 100644 --- a/meta/spinch/showbits-thermal-printer.service +++ b/meta/spinch/showbits-thermal-printer.service @@ -3,7 +3,7 @@ Description=Showbits Thermal Printer [Service] Type=simple -ExecStart=/home/bondrucker/showbits-thermal-printer 0.0.0.0:8001 queue -p /dev/usb/lp0 +ExecStart=/home/bondrucker/showbits-thermal-printer queue -a 0.0.0.0:8001 -p /dev/usb/lp0 Restart=on-failure User=bondrucker diff --git a/showbits-thermal-printer-ui/src/components/CDocumentCalendar.vue b/showbits-thermal-printer-ui/src/components/CDocumentCalendar.vue index bf91e8c..5d1f530 100644 --- a/showbits-thermal-printer-ui/src/components/CDocumentCalendar.vue +++ b/showbits-thermal-printer-ui/src/components/CDocumentCalendar.vue @@ -15,7 +15,7 @@ function submit() { data.append("year", String(year.value)); data.append("month", String(month.value)); data.append("feed", String(feed.value)); - void makeRequest("/api/calendar", data); + void makeRequest("api/calendar", data); } diff --git a/showbits-thermal-printer-ui/src/components/CDocumentCells.vue b/showbits-thermal-printer-ui/src/components/CDocumentCells.vue index 6fc83a7..7c205e1 100644 --- a/showbits-thermal-printer-ui/src/components/CDocumentCells.vue +++ b/showbits-thermal-printer-ui/src/components/CDocumentCells.vue @@ -18,7 +18,7 @@ function submit() { data.append("rows", rows.value.toFixed()); data.append("scale", scale.value.toFixed()); data.append("feed", String(feed.value)); - void makeRequest("/api/cells", data); + void makeRequest("api/cells", data); } diff --git a/showbits-thermal-printer-ui/src/components/CDocumentChat.vue b/showbits-thermal-printer-ui/src/components/CDocumentChat.vue index e7cf222..82addf2 100644 --- a/showbits-thermal-printer-ui/src/components/CDocumentChat.vue +++ b/showbits-thermal-printer-ui/src/components/CDocumentChat.vue @@ -22,7 +22,7 @@ function submit() { data.append("username", username.value); data.append("content", content.value); data.append("feed", String(feed.value)); - void makeRequest("/api/chat", data); + void makeRequest("api/chat", data); } diff --git a/showbits-thermal-printer-ui/src/components/CDocumentEgg.vue b/showbits-thermal-printer-ui/src/components/CDocumentEgg.vue index a3ab706..ce7c748 100644 --- a/showbits-thermal-printer-ui/src/components/CDocumentEgg.vue +++ b/showbits-thermal-printer-ui/src/components/CDocumentEgg.vue @@ -14,7 +14,7 @@ function submit() { if (typeof seed.value === "number") data.append("seed", seed.value.toFixed()); data.append("mode", mode.value); data.append("feed", String(feed.value)); - void makeRequest("/api/egg", data); + void makeRequest("api/egg", data); } diff --git a/showbits-thermal-printer-ui/src/components/CDocumentImage.vue b/showbits-thermal-printer-ui/src/components/CDocumentImage.vue index ebf844d..25c6327 100644 --- a/showbits-thermal-printer-ui/src/components/CDocumentImage.vue +++ b/showbits-thermal-printer-ui/src/components/CDocumentImage.vue @@ -25,7 +25,7 @@ function submit() { data.append("bright", String(bright.value)); data.append("seamless", String(seamless.value)); data.append("feed", String(feed.value)); - void makeRequest("/api/image", data); + void makeRequest("api/image", data); } diff --git a/showbits-thermal-printer-ui/src/components/CDocumentText.vue b/showbits-thermal-printer-ui/src/components/CDocumentText.vue index 56a9eb6..41949a2 100644 --- a/showbits-thermal-printer-ui/src/components/CDocumentText.vue +++ b/showbits-thermal-printer-ui/src/components/CDocumentText.vue @@ -27,7 +27,7 @@ function submit() { data.append("text", text.value); data.append("force_wrap", String(forceWrap.value)); data.append("feed", String(feed.value)); - void makeRequest("/api/text", data); + void makeRequest("api/text", data); } diff --git a/showbits-thermal-printer-ui/src/components/CDocumentTictactoe.vue b/showbits-thermal-printer-ui/src/components/CDocumentTictactoe.vue index 59d9bef..8cc3ab2 100644 --- a/showbits-thermal-printer-ui/src/components/CDocumentTictactoe.vue +++ b/showbits-thermal-printer-ui/src/components/CDocumentTictactoe.vue @@ -10,7 +10,7 @@ const feed = ref(true); function submit() { const data = new URLSearchParams(); data.append("feed", String(feed.value)); - void makeRequest("/api/tictactoe", data); + void makeRequest("api/tictactoe", data); } diff --git a/showbits-thermal-printer-ui/src/components/CSelector.vue b/showbits-thermal-printer-ui/src/components/CSelector.vue index 52ec65c..918cd56 100644 --- a/showbits-thermal-printer-ui/src/components/CSelector.vue +++ b/showbits-thermal-printer-ui/src/components/CSelector.vue @@ -34,7 +34,7 @@ const mode = ref< - Take a photo + Take a photo diff --git a/showbits-thermal-printer-ui/vite.config.ts b/showbits-thermal-printer-ui/vite.config.ts index 1997450..12d2d89 100644 --- a/showbits-thermal-printer-ui/vite.config.ts +++ b/showbits-thermal-printer-ui/vite.config.ts @@ -6,6 +6,7 @@ import vueDevTools from "vite-plugin-vue-devtools"; // https://vite.dev/config/ export default defineConfig({ plugins: [vue(), vueDevTools()], + base: "", resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) }, },