mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2025-12-12 22:06:18 +00:00
migrate layout icons form unicode to material symbols
migrate keymap to yml
This commit is contained in:
@@ -23,8 +23,7 @@ export const layout = writable<CharaLayout>([[], [], []])
|
||||
|
||||
export const syncing = writable(false)
|
||||
|
||||
/** @type {CharaDevice} */
|
||||
let device // @hmr:keep
|
||||
let device: CharaDevice // @hmr:keep
|
||||
|
||||
export async function initSerial() {
|
||||
syncing.set(true)
|
||||
|
||||
@@ -4,9 +4,6 @@ import type {Chord} from "$lib/serial/connection"
|
||||
|
||||
export const VENDOR_ID = 0x239a
|
||||
|
||||
/**
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
export async function hasSerialPermission() {
|
||||
return navigator.serial.getPorts().then(it => it.length > 0)
|
||||
}
|
||||
@@ -23,9 +20,6 @@ export class CharaDevice {
|
||||
version: Promise<string>
|
||||
deviceId: Promise<string>
|
||||
|
||||
/**
|
||||
* @param baudRate
|
||||
*/
|
||||
constructor(baudRate = 115200) {
|
||||
this.port = navigator.serial.getPorts().then(async ports => {
|
||||
const port =
|
||||
|
||||
@@ -6,6 +6,10 @@ import {SvelteKitPWA} from "@vite-pwa/sveltekit"
|
||||
import ViteYaml from "@modyfi/vite-plugin-yaml"
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
// we rely on the serial api, so just chrome is fine
|
||||
target: ["chrome114"],
|
||||
},
|
||||
plugins: [
|
||||
ViteYaml(),
|
||||
sveltekit(),
|
||||
|
||||
Reference in New Issue
Block a user