mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-03 08:32:52 +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)
|
export const syncing = writable(false)
|
||||||
|
|
||||||
/** @type {CharaDevice} */
|
let device: CharaDevice // @hmr:keep
|
||||||
let device // @hmr:keep
|
|
||||||
|
|
||||||
export async function initSerial() {
|
export async function initSerial() {
|
||||||
syncing.set(true)
|
syncing.set(true)
|
||||||
|
|||||||
@@ -4,9 +4,6 @@ import type {Chord} from "$lib/serial/connection"
|
|||||||
|
|
||||||
export const VENDOR_ID = 0x239a
|
export const VENDOR_ID = 0x239a
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Promise<boolean>}
|
|
||||||
*/
|
|
||||||
export async function hasSerialPermission() {
|
export async function hasSerialPermission() {
|
||||||
return navigator.serial.getPorts().then(it => it.length > 0)
|
return navigator.serial.getPorts().then(it => it.length > 0)
|
||||||
}
|
}
|
||||||
@@ -23,9 +20,6 @@ export class CharaDevice {
|
|||||||
version: Promise<string>
|
version: Promise<string>
|
||||||
deviceId: Promise<string>
|
deviceId: Promise<string>
|
||||||
|
|
||||||
/**
|
|
||||||
* @param baudRate
|
|
||||||
*/
|
|
||||||
constructor(baudRate = 115200) {
|
constructor(baudRate = 115200) {
|
||||||
this.port = navigator.serial.getPorts().then(async ports => {
|
this.port = navigator.serial.getPorts().then(async ports => {
|
||||||
const port =
|
const port =
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import {SvelteKitPWA} from "@vite-pwa/sveltekit"
|
|||||||
import ViteYaml from "@modyfi/vite-plugin-yaml"
|
import ViteYaml from "@modyfi/vite-plugin-yaml"
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
// we rely on the serial api, so just chrome is fine
|
||||||
|
target: ["chrome114"],
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
ViteYaml(),
|
ViteYaml(),
|
||||||
sveltekit(),
|
sveltekit(),
|
||||||
|
|||||||
Reference in New Issue
Block a user