Skip to content

Commit

Permalink
perf: ♻️ Optimize QR code connection experience
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Dec 20, 2024
1 parent c214e5a commit 86f5e69
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/locales/languages/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"device.wireless.connect.qr": "QR Code Connection",
"device.wireless.connect.qr.pairing": "Pairing",
"device.wireless.connect.qr.connecting": "Connecting",
"device.wireless.connect.qr.connecting-fallback": "Connecting",
"device.wireless.connect.qr.connected": "Connection Successful",
"device.wireless.connect.qr.error": "QR Code Connection",
"device.wireless.connect.name": "Connect",
Expand Down
1 change: 1 addition & 0 deletions src/locales/languages/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"device.wireless.connect.qr": "Подключение по QR-коду",
"device.wireless.connect.qr.pairing": "Сопряжение",
"device.wireless.connect.qr.connecting": "Подключение",
"device.wireless.connect.qr.connecting-fallback": "Подключение",
"device.wireless.connect.qr.connected": "Подключение успешно",
"device.wireless.connect.qr.error": "Подключение по QR-коду",
"device.wireless.connect.name": "Подключиться",
Expand Down
1 change: 1 addition & 0 deletions src/locales/languages/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"device.wireless.connect.qr": "二维码连接",
"device.wireless.connect.qr.pairing": "配对中",
"device.wireless.connect.qr.connecting": "连接中",
"device.wireless.connect.qr.connecting-fallback": "连接中",
"device.wireless.connect.qr.connected": "连接成功",
"device.wireless.connect.qr.error": "二维码连接",
"device.wireless.connect.name": "连接设备",
Expand Down
1 change: 1 addition & 0 deletions src/locales/languages/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"device.wireless.connect.qr": "二維碼連接",
"device.wireless.connect.qr.pairing": "配對中",
"device.wireless.connect.qr.connecting": "連接中",
"device.wireless.connect.qr.connecting-fallback": "連接中",
"device.wireless.connect.qr.connected": "連接成功",
"device.wireless.connect.qr.error": "二維碼連接",
"device.wireless.connect.name": "連接裝置",
Expand Down
7 changes: 6 additions & 1 deletion src/pages/device/components/WirelessGroup/QrAction/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<el-popover
ref="popoverRef"
placement="top"
:width="200"
trigger="click"
Expand Down Expand Up @@ -39,6 +40,8 @@ const loading = ref(false)
const loadingText = ref('')
const popoverRef = ref()
function onStatus(type) {
loadingText.value = window.t(`device.wireless.connect.qr.${type}`)
}
Expand All @@ -58,7 +61,9 @@ async function handleClick() {
console.warn(error.message)
}
props.handleRefresh()
await props.handleRefresh()
popoverRef.value.hide()
loading.value = false
}
Expand Down

0 comments on commit 86f5e69

Please sign in to comment.