Compare commits

...

3 Commits

Author SHA1 Message Date
Aveline 3ede096af4
Merge 0baf6be8b5 into 403141c96a 2025-10-15 09:53:53 +02:00
Adam Shiervani 403141c96a
refactor: safe Comboxbox onChange (#886) 2025-10-14 22:45:48 -05:00
Siyuan Miao 0baf6be8b5 chore: generate release automatically 2025-09-25 16:55:04 +00:00
2 changed files with 26 additions and 9 deletions

View File

@ -69,3 +69,23 @@ jobs:
path: | path: |
bin/jetkvm_app bin/jetkvm_app
device-tests.tar.gz device-tests.tar.gz
release:
runs-on: ubuntu-latest
name: Release
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Draft release
uses: softprops/action-gh-release@v2
with:
# need review before making a real release
draft: true
files: bin/jetkvm_app
fail_on_unmatched_files: true
tag_name: ${{ github.ref }}
name: ${{ github.ref }}
generate_release_notes: true

View File

@ -2,7 +2,7 @@ import { useMemo } from "react";
import { LuArrowUp, LuArrowDown, LuX, LuTrash2 } from "react-icons/lu"; import { LuArrowUp, LuArrowDown, LuX, LuTrash2 } from "react-icons/lu";
import { Button } from "@/components/Button"; import { Button } from "@/components/Button";
import { Combobox } from "@/components/Combobox"; import { Combobox, ComboboxOption } from "@/components/Combobox";
import { SelectMenuBasic } from "@/components/SelectMenuBasic"; import { SelectMenuBasic } from "@/components/SelectMenuBasic";
import Card from "@/components/Card"; import Card from "@/components/Card";
import FieldLabel from "@/components/FieldLabel"; import FieldLabel from "@/components/FieldLabel";
@ -94,11 +94,9 @@ export function MacroStepCard({
})), })),
[keyDisplayMap] [keyDisplayMap]
); );
const filteredKeys = useMemo(() => { const filteredKeys = useMemo(() => {
const selectedKeys = ensureArray(step.keys); const selectedKeys = ensureArray(step.keys);
const availableKeys = keyOptions.filter(option => !selectedKeys.includes(option.value)); const availableKeys = keyOptions.filter(option => !selectedKeys.includes(option.value));
if (keyQuery === '') { if (keyQuery === '') {
return availableKeys; return availableKeys;
} else { } else {
@ -176,7 +174,6 @@ export function MacroStepCard({
))} ))}
</div> </div>
</div> </div>
<div className="w-full flex flex-col gap-1"> <div className="w-full flex flex-col gap-1">
<div className="flex items-center gap-1"> <div className="flex items-center gap-1">
<FieldLabel label="Keys" description={`Maximum ${MAX_KEYS_PER_STEP} keys per step.`} /> <FieldLabel label="Keys" description={`Maximum ${MAX_KEYS_PER_STEP} keys per step.`} />
@ -207,8 +204,9 @@ export function MacroStepCard({
)} )}
<div className="relative w-full"> <div className="relative w-full">
<Combobox <Combobox
onChange={(value) => { onChange={(option) => {
onKeySelect({ value: value as string | null }); const selectedOption = option as ComboboxOption | null;
onKeySelect({ value: selectedOption?.value ?? null });
onKeyQueryChange(''); onKeyQueryChange('');
}} }}
displayValue={() => keyQuery} displayValue={() => keyQuery}
@ -223,7 +221,6 @@ export function MacroStepCard({
/> />
</div> </div>
</div> </div>
<div className="w-full flex flex-col gap-1"> <div className="w-full flex flex-col gap-1">
<div className="flex items-center gap-1"> <div className="flex items-center gap-1">
<FieldLabel label="Step Duration" description="Time to wait before executing the next step." /> <FieldLabel label="Step Duration" description="Time to wait before executing the next step." />