4 Commits

Author SHA1 Message Date
5b6a5ea36d 1.3.0 2024-01-20 22:24:39 +01:00
14cbb5553b feat: add auto-space info 2024-01-20 22:24:00 +01:00
duianto
8ed72fe958 fix: typo 2024-01-11 09:36:33 +01:00
06b83f79ef feat: add refresh button
resolves #82
2024-01-05 00:12:42 +01:00
11 changed files with 40 additions and 18 deletions

View File

@@ -92,6 +92,7 @@ const config = {
"stat_2", "stat_2",
"description", "description",
"add_circle", "add_circle",
"refresh",
], ],
codePoints: { codePoints: {
speed: "e9e4", speed: "e9e4",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "charachorder-device-manager", "name": "charachorder-device-manager",
"version": "1.2.0", "version": "1.3.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "charachorder-device-manager", "name": "charachorder-device-manager",
"version": "1.2.0", "version": "1.3.0",
"hasInstallScript": true, "hasInstallScript": true,
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"devDependencies": { "devDependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "charachorder-device-manager", "name": "charachorder-device-manager",
"version": "1.2.0", "version": "1.3.0",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"private": true, "private": true,
"repository": { "repository": {

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "app" name = "app"
version = "1.2.0" version = "1.3.0"
description = "A Tauri App" description = "A Tauri App"
authors = ["Thea Schöbl <dev@theaninova.de>"] authors = ["Thea Schöbl <dev@theaninova.de>"]
license = "AGPL-3" license = "AGPL-3"

View File

@@ -6,7 +6,7 @@
"devPath": "http://localhost:5173", "devPath": "http://localhost:5173",
"distDir": "../build" "distDir": "../build"
}, },
"package": { "productName": "amacc1ng", "version": "1.2.0" }, "package": { "productName": "amacc1ng", "version": "1.3.0" },
"tauri": { "tauri": {
"allowlist": { "all": false }, "allowlist": { "all": false },
"bundle": { "bundle": {

View File

@@ -14,6 +14,7 @@ const de = {
sync: { sync: {
TITLE_READ: "Neueste Änderungen werden abgerufen", TITLE_READ: "Neueste Änderungen werden abgerufen",
TITLE_WRITE: "Änderungen werden gespeichert", TITLE_WRITE: "Änderungen werden gespeichert",
RELOAD: "Neu laden",
}, },
backup: { backup: {
TITLE: "Verlauf speichern", TITLE: "Verlauf speichern",

View File

@@ -21,6 +21,7 @@ const en = {
sync: { sync: {
TITLE_READ: "Reading latest changes", TITLE_READ: "Reading latest changes",
TITLE_WRITE: "Saving changes to device", TITLE_WRITE: "Saving changes to device",
RELOAD: "Reload",
}, },
modal: { modal: {
CLOSE: "Close", CLOSE: "Close",

View File

@@ -3,7 +3,9 @@ description: OS-Layout sensitive keycodes
actions: actions:
256: 256:
id: "KSC_00" id: "KSC_00"
icon: block
title: No Key Pressed title: No Key Pressed
description: Also commonly used at the end of a chord to remove auto-spaces
257: 257:
id: "KSC_01" id: "KSC_01"
title: Keyboard Error Roll Over title: Keyboard Error Roll Over

View File

@@ -55,6 +55,12 @@ export async function initSerial(manual = false) {
const device = get(serialPort) ?? new CharaDevice() const device = get(serialPort) ?? new CharaDevice()
await device.init(manual) await device.init(manual)
serialPort.set(device) serialPort.set(device)
sync()
}
export async function sync() {
const device = get(serialPort)
if (!device) return
const chordCount = await device.getChordCount() const chordCount = await device.getChordCount()
syncStatus.set("downloading") syncStatus.set("downloading")

View File

@@ -1,11 +1,12 @@
<script lang="ts"> <script lang="ts">
import {syncProgress, syncStatus} from "$lib/serial/connection" import {serialPort, syncProgress, syncStatus, sync} from "$lib/serial/connection"
import LL from "../i18n/i18n-svelte" import LL from "../i18n/i18n-svelte"
import {fly} from "svelte/transition" import {slide} from "svelte/transition"
</script> </script>
{#if $syncStatus !== "done"} <div class="container">
<div transition:fly={{y: 40}}> {#if $syncStatus !== "done"}
<div transition:slide>
<progress max={$syncProgress?.max ?? 1} value={$syncProgress?.current ?? 1}></progress> <progress max={$syncProgress?.max ?? 1} value={$syncProgress?.current ?? 1}></progress>
{#if $syncStatus === "downloading"} {#if $syncStatus === "downloading"}
<div>{$LL.sync.TITLE_READ()}</div> <div>{$LL.sync.TITLE_READ()}</div>
@@ -13,9 +14,19 @@
<div>{$LL.sync.TITLE_WRITE()}</div> <div>{$LL.sync.TITLE_WRITE()}</div>
{/if} {/if}
</div> </div>
{/if} {:else if $serialPort}
<button transition:slide on:click={sync}><span class="icon">refresh</span>{$LL.sync.RELOAD()}</button>
{/if}
</div>
<style lang="scss"> <style lang="scss">
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
div { div {
font-size: 12px; font-size: 12px;
} }

View File

@@ -11,7 +11,7 @@
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
</script> </script>
<h3>Type the following to confim the action</h3> <h3>Type the following to confirm the action</h3>
<p>{challengeString}</p> <p>{challengeString}</p>
<input type="text" bind:value={challengeInput} placeholder={challengeString} /> <input type="text" bind:value={challengeInput} placeholder={challengeString} />