From 448bf8adedf6170343aac1f6ad14d1f9d3777461 Mon Sep 17 00:00:00 2001 From: kvass <1356957408@qq.com> Date: Sat, 11 Apr 2026 12:23:26 +0800 Subject: [PATCH 1/9] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AE=E8=BD=B4?= =?UTF-8?q?=E4=BD=93=E8=A1=8C=E7=A8=8B=E5=8A=9F=E8=83=BD=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/configure/calibration/calibration.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/configure/calibration/calibration.tsx b/src/components/configure/calibration/calibration.tsx index 29506db..19a2d5c 100644 --- a/src/components/configure/calibration/calibration.tsx +++ b/src/components/configure/calibration/calibration.tsx @@ -27,6 +27,8 @@ import {BasePanel, BaseTitle} from 'src/components/common/layout' import {KeySelector} from 'src/components/common/key-selector' const AUTO_DURATION = 5 +/** 设为 true 可恢复「设置按键行程」入口按钮 */ +const SHOW_SET_SWITCH_TRAVEL_BUTTON = false const Container = styled.div` width: 100%; @@ -309,7 +311,9 @@ export const Calibration = () => { <> {caliTips ? ( {caliTips} - ) : switchRule && deviceMode !== 'edit' ? ( + ) : SHOW_SET_SWITCH_TRAVEL_BUTTON && + switchRule && + deviceMode !== 'edit' ? ( dispatch(setAxCfg(true))}> {t('Set Switch Travel')} -- Gitee From 8d9f5ceb701818109ecc477c1d32191ff8b5c2e9 Mon Sep 17 00:00:00 2001 From: kvass <1356957408@qq.com> Date: Sat, 11 Apr 2026 12:53:35 +0800 Subject: [PATCH 2/9] =?UTF-8?q?feat:=20=E8=A7=A6=E5=8F=91=E6=BC=94?= =?UTF-8?q?=E7=A4=BA=E9=A1=B5=E9=9D=A2=E4=B8=A4=E4=B8=AA=E6=8C=89=E9=94=AE?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=8C=89=E4=BC=9A=E4=B9=B1=E5=8A=A8=EF=BC=88?= =?UTF-8?q?=E5=85=88=E6=8C=89=E4=BD=8F=E5=B7=A6=E8=BE=B9=E4=B8=8D=E6=9D=BE?= =?UTF-8?q?=E6=89=8B=E5=86=8D=E7=8B=82=E6=8C=89=E5=8F=B3=E8=BE=B9=E6=B2=A1?= =?UTF-8?q?=E4=BA=8B=EF=BC=8C=E5=8F=8D=E4=B9=8B=E5=88=99=E4=BC=9A=E6=8A=96?= =?UTF-8?q?=E5=8A=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/test.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/common/test.tsx b/src/components/common/test.tsx index 667349e..4fd0869 100644 --- a/src/components/common/test.tsx +++ b/src/components/common/test.tsx @@ -179,7 +179,7 @@ export const Test = () => { window.removeEventListener('keyup', upHandler) window.removeEventListener('blur', blurHandler) - clearInterval(timer2.current) + clearTimeout(timer2.current) pressedKeysRef.current = [] setPressedKeys([]) } @@ -189,13 +189,13 @@ export const Test = () => { {t('Key Test')} - {releasedKeys.map((k, i) => ( - + {releasedKeys.map(k => ( + {k.k} ))} - {pressedKeys.map((k, i) => ( - + {pressedKeys.map(k => ( + {k.k} ))} -- Gitee From 3cf66ca1f7ff3d408cc6e442326de6b347f30167 Mon Sep 17 00:00:00 2001 From: kvass <1356957408@qq.com> Date: Sat, 11 Apr 2026 12:54:20 +0800 Subject: [PATCH 3/9] =?UTF-8?q?feat:=20=E9=80=89=E6=8B=A9=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E5=A4=84=E5=A2=9E=E5=8A=A0=E4=B8=8B=E6=8B=89=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/configure/side/Lang.tsx | 69 +++++++++--- src/components/form/select.tsx | 149 +++++++++++++++++-------- 2 files changed, 153 insertions(+), 65 deletions(-) diff --git a/src/components/configure/side/Lang.tsx b/src/components/configure/side/Lang.tsx index dcc4f4c..43361f2 100644 --- a/src/components/configure/side/Lang.tsx +++ b/src/components/configure/side/Lang.tsx @@ -1,6 +1,7 @@ import React, {useMemo} from 'react' import {useTranslation} from 'react-i18next' import styled from 'styled-components' +import {Select} from 'src/components/form/select' const Container = styled.div<{$nobg?: boolean}>` width: 100%; @@ -21,8 +22,10 @@ const langs = [ {value: 'ja', label: '日本語'}, ] +const LANG_TRIGGER_WIDTH = 91 + const LangButton = styled.div` - width: 91px; + width: ${LANG_TRIGGER_WIDTH}px; height: 36px; border-radius: 36px; font-size: 14px; @@ -53,7 +56,13 @@ export const Lang = (props: { : i18n.languages[i18n.languages.length - 1] }, [i18n.resolvedLanguage, i18n.languages]) - return ( + const selectValue = useMemo(() => { + const code = selectLang ?? '' + return langs.find(l => code === l.value || code.startsWith(`${l.value}-`)) + ?.value ?? 'en' + }, [selectLang]) + + return ( <> - { - const currentIndex = langs.findIndex(lang => lang.value === selectLang) - const nextIndex = (currentIndex + 1) % langs.length - changeLanguage(langs[nextIndex].value) - }} - > - {(() => { - const currentLang = langs.find(lang => lang.value === selectLang) - return currentLang ? currentLang.label : 'English' - })()} - - {/* setSliding(true)} onTouchStart={() => setSliding(true)} onKeyDown={e => { + if (mouseOnlyRail) { + const block = + e.key === 'ArrowLeft' || + e.key === 'ArrowRight' || + e.key === 'ArrowUp' || + e.key === 'ArrowDown' || + e.key === 'Home' || + e.key === 'End' || + e.key === 'PageUp' || + e.key === 'PageDown' || + e.key === ' ' + if (block) e.preventDefault() + return + } if ( e.key === 'ArrowLeft' || e.key === 'ArrowRight' || -- Gitee From 1a5d279d63cebbf3dd85884d0877e67411aedd75 Mon Sep 17 00:00:00 2001 From: kvass <1356957408@qq.com> Date: Sat, 11 Apr 2026 13:48:57 +0800 Subject: [PATCH 5/9] =?UTF-8?q?feat:=20=E5=AD=97=E7=AC=A6=E4=B8=8D?= =?UTF-8?q?=E5=BA=94=E8=B6=85=E5=87=BA=E6=A1=86=E5=A4=96=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AD=97=E7=AC=A6=E9=99=90=E5=88=B6(=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E6=9C=80=E5=A4=9A=E8=BE=93=E5=85=A515=E4=B8=AA?= =?UTF-8?q?=EF=BC=8C=E6=B1=89=E5=AD=97=E6=9C=80=E5=A4=9A=E4=B9=9D=E4=B8=AA?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/configure/keyboard/profile.tsx | 4 ++-- src/components/configure/keyboard/save-load.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/configure/keyboard/profile.tsx b/src/components/configure/keyboard/profile.tsx index 6e746db..8b3d73c 100644 --- a/src/components/configure/keyboard/profile.tsx +++ b/src/components/configure/keyboard/profile.tsx @@ -893,7 +893,7 @@ const EditDialog = (props: { spellCheck={false} value={decodeProfileName(name)} placeholder={t('Please enter the profile name')} - maxLength={20} + maxLength={15} /> @@ -1081,7 +1081,7 @@ const NewProfileDialog = (props: { spellCheck={false} value={name} placeholder={t('Please enter the profile name')} - maxLength={20} + maxLength={15} /> diff --git a/src/components/configure/keyboard/save-load.tsx b/src/components/configure/keyboard/save-load.tsx index 7896491..9cc2ee8 100644 --- a/src/components/configure/keyboard/save-load.tsx +++ b/src/components/configure/keyboard/save-load.tsx @@ -300,7 +300,7 @@ export function ProfileImportForm(props: ProfileImportFormProps) { placeholder={t( 'The profile name will be filled in automatically' )} - maxLength={20} + maxLength={15} /> -- Gitee From 0926165f01c480b3b0aa24eb72365bb59b9554e5 Mon Sep 17 00:00:00 2001 From: kvass <1356957408@qq.com> Date: Sat, 11 Apr 2026 14:08:00 +0800 Subject: [PATCH 6/9] =?UTF-8?q?feat:=20AP=E5=92=8C=E9=AB=98=E7=BA=A7?= =?UTF-8?q?=E9=94=AE=E7=9A=84AP=E5=80=BC=20=E6=B2=A1=E6=9C=89=E7=BB=9F?= =?UTF-8?q?=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configure/adv-key/common/aprt.tsx | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/components/configure/adv-key/common/aprt.tsx b/src/components/configure/adv-key/common/aprt.tsx index 7b22d6f..9453752 100644 --- a/src/components/configure/adv-key/common/aprt.tsx +++ b/src/components/configure/adv-key/common/aprt.tsx @@ -1,4 +1,4 @@ -import {useMemo, useState, useEffect} from 'react' +import {useMemo, useState, useEffect, useRef} from 'react' import {useTranslation} from 'react-i18next' import {Slider} from 'src/components/form/slider' import { @@ -14,7 +14,7 @@ import { } from 'src/store/actuationSlice' import {useAppDispatch, useAppSelector} from 'src/store/hook' import {getSelectedKeys} from 'src/store/keymapSlice' -import {APData, RTData} from 'src/types/types' +import {AK, APData, RTData} from 'src/types/types' import styled from 'styled-components' import {Switch} from 'src/components/form/switch' import {getSelectedAdvKey} from 'src/store/advkeySlice' @@ -136,6 +136,21 @@ const AP = () => { dispatch(updatePerKeyActuation(selectedKeys, data)) } + const rsSocdApSig = useRef('') + useEffect(() => { + const t = advKey?.type + if (t !== AK.RS && t !== AK.SOCD) { + rsSocdApSig.current = '' + return + } + if (!selectedKeys?.length) return + const sig = `${t}-${selectedKeys.join(',')}` + if (rsSocdApSig.current === sig) return + rsSocdApSig.current = sig + setAPData(ap) + dispatch(updatePerKeyActuation(selectedKeys, ap)) + }, [advKey?.type, selectedKeys, ap, dispatch]) + useEffect(() => { setAPData(ap) }, [selectedKeys, actuationMap]) @@ -206,6 +221,21 @@ export const RT = () => { dispatch(updatePerKeyRT(selectedKeys, rtData)) } + const rsSocdRtSig = useRef('') + useEffect(() => { + const t = advKey?.type + if (t !== AK.RS && t !== AK.SOCD) { + rsSocdRtSig.current = '' + return + } + if (!selectedKeys?.length) return + const sig = `${t}-${selectedKeys.join(',')}` + if (rsSocdRtSig.current === sig) return + rsSocdRtSig.current = sig + setRTData(rt) + dispatch(updatePerKeyRT(selectedKeys, rt)) + }, [advKey?.type, selectedKeys, rt, dispatch]) + useEffect(() => { setRTData(rt) }, [selectedKeys, actuationMap]) -- Gitee From 4ab897ca01a51f6fe0c0f46e0ad72990ca2713d8 Mon Sep 17 00:00:00 2001 From: kvass <1356957408@qq.com> Date: Sat, 11 Apr 2026 17:32:33 +0800 Subject: [PATCH 7/9] =?UTF-8?q?feat:=20=E5=9C=86=E8=A7=92=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E5=8A=A0=E5=A4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.css b/src/index.css index d34dbfe..c6324a5 100644 --- a/src/index.css +++ b/src/index.css @@ -39,7 +39,7 @@ } html { - --radius-default: 12px; + --radius-default: 24px; --font-menu-1: 900 16px var(--font); --font-menu-2: 700 20px var(--font); -- Gitee From 711b2271b053c8db52b416239de29cc81f4b2fbe Mon Sep 17 00:00:00 2001 From: kvass <1356957408@qq.com> Date: Sat, 11 Apr 2026 17:43:17 +0800 Subject: [PATCH 8/9] =?UTF-8?q?feat:=20=E6=89=93=E5=8C=85=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/configure/firmware/FirmwareUpdate.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/configure/firmware/FirmwareUpdate.tsx b/src/components/configure/firmware/FirmwareUpdate.tsx index e26a926..c759d6d 100644 --- a/src/components/configure/firmware/FirmwareUpdate.tsx +++ b/src/components/configure/firmware/FirmwareUpdate.tsx @@ -181,11 +181,11 @@ const LogLine = styled.div` } `; -const FileName = styled.span` - color: var(--color-primary); - font-size: 14px; - font-weight: 500; -`; +// const FileName = styled.span` +// color: var(--color-primary); +// font-size: 14px; +// font-weight: 500; +// `; const InfoRow = styled.div` display: flex; -- Gitee From 436c720345a0ca13cc15cc77500f4edbe913ce99 Mon Sep 17 00:00:00 2001 From: kvass <1356957408@qq.com> Date: Sat, 11 Apr 2026 22:11:02 +0800 Subject: [PATCH 9/9] =?UTF-8?q?feat:=20=E6=89=93=E5=8C=85=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/configure/firmware/FirmwareUpdate.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/configure/firmware/FirmwareUpdate.tsx b/src/components/configure/firmware/FirmwareUpdate.tsx index c759d6d..cccd856 100644 --- a/src/components/configure/firmware/FirmwareUpdate.tsx +++ b/src/components/configure/firmware/FirmwareUpdate.tsx @@ -181,11 +181,11 @@ const LogLine = styled.div` } `; -// const FileName = styled.span` -// color: var(--color-primary); -// font-size: 14px; -// font-weight: 500; -// `; +/* const FileName = styled.span` + color: var(--color-primary); + font-size: 14px; + font-weight: 500; +`; */ const InfoRow = styled.div` display: flex; -- Gitee