mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-10 12:02:48 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
d9183f952a
|
|||
|
913a833824
|
|||
|
0d6ef4d011
|
|||
|
232045964c
|
|||
|
3659b80e41
|
|||
|
3a02caeb6d
|
|||
|
259fd3a989
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
echo "${{ secrets.DEPLOY_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
|
echo "${{ secrets.DEPLOY_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
|
||||||
|
|
||||||
- name: Publish Stable
|
- name: Publish Stable
|
||||||
if: ${{ github.ref == 'refs/heads/v*' }}
|
if: ${{ github.ref == 'refs/tags/v*' }}
|
||||||
run: rsync -rav --mkpath --delete build/ deploy@charachorder.io:/home/deploy/www/
|
run: rsync -rav --mkpath --delete build/ deploy@charachorder.io:/home/deploy/www/
|
||||||
|
|
||||||
- name: Publish Branch
|
- name: Publish Branch
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "charachorder-device-manager",
|
"name": "charachorder-device-manager",
|
||||||
"version": "2.0.0",
|
"version": "2.0.2",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"private": true,
|
"private": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "app"
|
name = "app"
|
||||||
version = "2.0.0"
|
version = "2.0.2"
|
||||||
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"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"devPath": "http://localhost:5173",
|
"devPath": "http://localhost:5173",
|
||||||
"distDir": "../build"
|
"distDir": "../build"
|
||||||
},
|
},
|
||||||
"package": { "productName": "amacc1ng", "version": "2.0.0" },
|
"package": { "productName": "amacc1ng", "version": "2.0.2" },
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": { "all": false },
|
"allowlist": { "all": false },
|
||||||
"bundle": {
|
"bundle": {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { browser } from "$app/environment";
|
|||||||
|
|
||||||
const PORT_FILTERS: Map<string, SerialPortFilter> = new Map([
|
const PORT_FILTERS: Map<string, SerialPortFilter> = new Map([
|
||||||
["ONE M0", { usbProductId: 32783, usbVendorId: 9114 }],
|
["ONE M0", { usbProductId: 32783, usbVendorId: 9114 }],
|
||||||
["TWO S3", { usbProductId: 0x8252, usbVendorId: 0x303a }], // TODO: remove this after everyone has migrated
|
["TWO S3 (pre-production)", { usbProductId: 0x8252, usbVendorId: 0x303a }], // TODO: remove this after everyone has migrated
|
||||||
["TWO S3", { usbProductId: 0x8253, usbVendorId: 0x303a }],
|
["TWO S3", { usbProductId: 0x8253, usbVendorId: 0x303a }],
|
||||||
["LITE S2", { usbProductId: 33070, usbVendorId: 12346 }],
|
["LITE S2", { usbProductId: 33070, usbVendorId: 12346 }],
|
||||||
["LITE M0", { usbProductId: 32796, usbVendorId: 9114 }],
|
["LITE M0", { usbProductId: 32796, usbVendorId: 9114 }],
|
||||||
@@ -513,11 +513,11 @@ export class CharaDevice {
|
|||||||
|
|
||||||
const writer2 = this.port.writable!.getWriter();
|
const writer2 = this.port.writable!.getWriter();
|
||||||
try {
|
try {
|
||||||
await writer2.write(new TextEncoder().encode(`RST REBOOT\r\n`));
|
await writer2.write(new TextEncoder().encode(`RST RESTART\r\n`));
|
||||||
serialLog.update((it) => {
|
serialLog.update((it) => {
|
||||||
it.push({
|
it.push({
|
||||||
type: "input",
|
type: "input",
|
||||||
value: "RST REBOOT",
|
value: "RST RESTART",
|
||||||
});
|
});
|
||||||
return it;
|
return it;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="/firmware/{currentDevice ? `${currentDevice}/` : ''}"
|
href="/ccos/{currentDevice ? `${currentDevice}/` : ''}"
|
||||||
use:action={{ title: "Updates" }}
|
use:action={{ title: "Updates" }}
|
||||||
>
|
>
|
||||||
CCOS {$serialPort?.version ?? "Updates"}
|
CCOS {$serialPort?.version ?? "Updates"}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h1><a href="/firmware">Firmware Updates</a></h1>
|
<h1><a href="/ccos">Firmware Updates</a></h1>
|
||||||
|
|
||||||
{@render children()}
|
{@render children()}
|
||||||
|
|
||||||
@@ -104,14 +104,16 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<div class="container">
|
||||||
<h2>
|
<h2>
|
||||||
Update <em
|
<a class="inline-link" href="/ccos">CCOS</a> /
|
||||||
class="device"
|
<a
|
||||||
|
href="/ccos/{data.device}"
|
||||||
|
class="device inline-link"
|
||||||
class:correct-device={isCorrectDevice === true}
|
class:correct-device={isCorrectDevice === true}
|
||||||
class:incorrect-device={isCorrectDevice === false}>{data.device}</em
|
class:incorrect-device={isCorrectDevice === false}>{data.device}</a
|
||||||
>
|
>
|
||||||
to <em class="version">{data.version}</em>
|
/ <em class="version">{data.version}</em>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{#if data.ota && !data.device.endsWith("m0")}
|
{#if data.ota && !data.device.endsWith("m0")}
|
||||||
@@ -127,8 +129,14 @@
|
|||||||
>
|
>
|
||||||
{#if $serialPort && isCorrectDevice}
|
{#if $serialPort && isCorrectDevice}
|
||||||
<div transition:slide>
|
<div transition:slide>
|
||||||
Your device is ready and compatible. Click the button to perform the
|
Your
|
||||||
update.
|
<b
|
||||||
|
>{$serialPort.company}
|
||||||
|
{$serialPort.device}
|
||||||
|
{$serialPort.chipset}</b
|
||||||
|
>
|
||||||
|
will be updated from <b class="version">{$serialPort.version}</b> to
|
||||||
|
<b class="version">{data.version}</b>
|
||||||
</div>
|
</div>
|
||||||
{:else if $serialPort && isCorrectDevice === false}
|
{:else if $serialPort && isCorrectDevice === false}
|
||||||
<div class="error" transition:slide>
|
<div class="error" transition:slide>
|
||||||
@@ -147,8 +155,6 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<h3>Manual Update</h3>
|
<h3>Manual Update</h3>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
@@ -229,6 +235,10 @@
|
|||||||
transition: color 200ms ease;
|
transition: color 200ms ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
margin-block-start: 4em;
|
||||||
|
}
|
||||||
|
|
||||||
.primary {
|
.primary {
|
||||||
color: var(--md-sys-color-primary);
|
color: var(--md-sys-color-primary);
|
||||||
}
|
}
|
||||||
@@ -237,6 +247,10 @@
|
|||||||
color: var(--md-sys-color-error);
|
color: var(--md-sys-color-error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: calc(min(100%, 16cm));
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes rotate {
|
@keyframes rotate {
|
||||||
0% {
|
0% {
|
||||||
transform: rotate(120deg);
|
transform: rotate(120deg);
|
||||||
@@ -375,6 +389,11 @@
|
|||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inline-link {
|
||||||
|
display: inline;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.correct-device {
|
.correct-device {
|
||||||
color: var(--md-sys-color-primary);
|
color: var(--md-sys-color-primary);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
Reference in New Issue
Block a user