From f7fc24572d9558c967c1ff768370b1a39863ef7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=9A=E7=8E=89=E5=B8=86?= Date: Tue, 4 Jun 2024 14:51:04 +0800 Subject: [PATCH] update --- src/locale/en-US.ts | 2 ++ src/locale/zh-CN.ts | 2 ++ src/views/dashboard/workplace/components/banner.vue | 2 +- src/views/list/image/index.vue | 13 ++++++++++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/locale/en-US.ts b/src/locale/en-US.ts index 871ac3e..ad133e0 100644 --- a/src/locale/en-US.ts +++ b/src/locale/en-US.ts @@ -147,6 +147,8 @@ export default { 'global.username': 'Username', 'global.password': 'Password', 'global.password2': 'Retype password ', + 'image.negative': 'Negative', + 'workplace.clickNotice': ' (Official firmware can only detect 8KB/64Kbit)', ...localeSettings, ...localeMessageBox, ...localeLogin, diff --git a/src/locale/zh-CN.ts b/src/locale/zh-CN.ts index 39d7f68..b46b6a8 100644 --- a/src/locale/zh-CN.ts +++ b/src/locale/zh-CN.ts @@ -147,6 +147,8 @@ export default { 'global.username': '请输入用户名', 'global.password': '请输入密码', 'global.password2': '请再次输入密码', + 'image.negative': '反色', + 'workplace.clickNotice': '(官方固件只能检测 8KB/64Kbit)', ...localeSettings, ...localeMessageBox, ...localeLogin, diff --git a/src/views/dashboard/workplace/components/banner.vue b/src/views/dashboard/workplace/components/banner.vue index 0cb67ae..f5d015c 100644 --- a/src/views/dashboard/workplace/components/banner.vue +++ b/src/views/dashboard/workplace/components/banner.vue @@ -10,7 +10,7 @@ {{ $t('workplace.current') }}{{ appStore.firmwareVersion }}
{{ $t('workplace.writeconfig') }}{{ appStore.configuration?.name }}
- {{ $t('workplace.eepromSize') }}{{ state.eepromSize }} {{ $t('workplace.checkIt') }} + {{ $t('workplace.eepromSize') }}{{ state.eepromSize }} {{ state.eepromSize != t('workplace.clickCheck') && appStore.configuration?.uart == 'official' ? t('workplace.clickNotice') : ''}} {{ $t('workplace.checkIt') }}
diff --git a/src/views/list/image/index.vue b/src/views/list/image/index.vue index 726e481..de682ec 100644 --- a/src/views/list/image/index.vue +++ b/src/views/list/image/index.vue @@ -16,7 +16,8 @@
{{ $t('tool.selectImage') }} - 保存 + {{ $t('image.negative') }} + {{ $t('cps.save') }} {{ $t('tool.write') }} @@ -57,6 +58,16 @@ onMounted(async ()=>{ } }) +const negativeIt = () => { + const matrix = state.matrix + matrix.map((y: any, yi: any)=>{ + y.map((x: any, xi: any)=>{ + matrix[yi][xi] = x == '#fff' ? '#000' : '#fff' + }) + }) + state.matrix = matrix +} + const changePixel = (x: int, y: int) => { if(state.mousedown){ const matrix = state.matrix