Compare commits
4
Commits
cc8f997600
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
419cefd00e | ||
|
|
14f9ccd1ef | ||
|
|
899a222e3f | ||
|
|
ca727ec1f7 |
@@ -164,6 +164,8 @@ const defaultHighlightStyle = {
|
|||||||
color: "rgba(255, 228, 0, 0.6)",
|
color: "rgba(255, 228, 0, 0.6)",
|
||||||
strokeColor: "rgba(254, 216, 71, 0.82)",
|
strokeColor: "rgba(254, 216, 71, 0.82)",
|
||||||
lineWidthRatio: 0.003,
|
lineWidthRatio: 0.003,
|
||||||
|
// 在最小线宽计算后应用倍数,确保不同靶面尺寸下按比例加粗。
|
||||||
|
lineWidthScale: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
// 合并默认靶纸样式和外部传入样式,ringColors 单独深合并。
|
// 合并默认靶纸样式和外部传入样式,ringColors 单独深合并。
|
||||||
@@ -319,7 +321,7 @@ const drawSectorHighlight = (
|
|||||||
(angles.endAngle - angles.startAngle) * safeRevealProgress,
|
(angles.endAngle - angles.startAngle) * safeRevealProgress,
|
||||||
style.color,
|
style.color,
|
||||||
style.strokeColor,
|
style.strokeColor,
|
||||||
Math.max(1, targetRadius * style.lineWidthRatio)
|
Math.max(1, targetRadius * style.lineWidthRatio) * style.lineWidthScale
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ const connectMode = ref("secure"); // secure | open | manual
|
|||||||
const connectError = ref("");
|
const connectError = ref("");
|
||||||
const connectStatusText = ref("");
|
const connectStatusText = ref("");
|
||||||
const isSubmittingWifi = ref(false);
|
const isSubmittingWifi = ref(false);
|
||||||
|
const wifiSuccessVisible = ref(false);
|
||||||
const keyboardHeight = ref(0);
|
const keyboardHeight = ref(0);
|
||||||
// 控制密码输入框是否显示明文
|
// 控制密码输入框是否显示明文
|
||||||
const showPassword = ref(false);
|
const showPassword = ref(false);
|
||||||
@@ -364,10 +365,13 @@ const submitDeviceWifiConfig = async ({ ssid, password }) => {
|
|||||||
secure: connectMode.value === "secure" || !!password,
|
secure: connectMode.value === "secure" || !!password,
|
||||||
};
|
};
|
||||||
connectError.value = "";
|
connectError.value = "";
|
||||||
currentState.value = STATES.CONNECTED;
|
|
||||||
void refreshConnectedWifiName();
|
void refreshConnectedWifiName();
|
||||||
if (fromFirmwareUpdate.value) {
|
if (fromFirmwareUpdate.value) {
|
||||||
|
currentState.value = STATES.CONNECTED;
|
||||||
openFirmwareCountdown();
|
openFirmwareCountdown();
|
||||||
|
} else {
|
||||||
|
// 保留配网输入界面,避免成功提示出现前先露出 WiFi 列表。
|
||||||
|
wifiSuccessVisible.value = true;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (requestId === wifiConnectRequestId) {
|
if (requestId === wifiConnectRequestId) {
|
||||||
@@ -382,6 +386,13 @@ const submitDeviceWifiConfig = async ({ ssid, password }) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 普通配网成功后,确认并收起输入界面,停留在当前 WiFi 页面。
|
||||||
|
const confirmWifiSuccess = () => {
|
||||||
|
if (!wifiSuccessVisible.value) return;
|
||||||
|
wifiSuccessVisible.value = false;
|
||||||
|
currentState.value = STATES.CONNECTED;
|
||||||
|
};
|
||||||
|
|
||||||
// 校验用户输入并提交 WiFi 配置,不再把手机连接结果当作设备连接成功。
|
// 校验用户输入并提交 WiFi 配置,不再把手机连接结果当作设备连接成功。
|
||||||
const joinNetwork = () => {
|
const joinNetwork = () => {
|
||||||
if (joinDisabled.value) return;
|
if (joinDisabled.value) return;
|
||||||
@@ -755,6 +766,14 @@ onUnmounted(() => {
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<ModalDialog
|
||||||
|
:show="wifiSuccessVisible"
|
||||||
|
content="WIFI连接成功"
|
||||||
|
confirmText="确定"
|
||||||
|
:showCancel="false"
|
||||||
|
:onConfirm="confirmWifiSuccess"
|
||||||
|
></ModalDialog>
|
||||||
|
|
||||||
<ModalDialog
|
<ModalDialog
|
||||||
:show="countdownVisible"
|
:show="countdownVisible"
|
||||||
title="WiFi连接成功"
|
title="WiFi连接成功"
|
||||||
|
|||||||
@@ -546,6 +546,7 @@ onBeforeUnmount(() => {
|
|||||||
:showCrosshair="false"
|
:showCrosshair="false"
|
||||||
:showRingLabels="false"
|
:showRingLabels="false"
|
||||||
:highlightOnly="true"
|
:highlightOnly="true"
|
||||||
|
:highlightStyle="{ strokeColor: '#00fffc', lineWidthScale: 3 }"
|
||||||
:sectorCount="sectorCount"
|
:sectorCount="sectorCount"
|
||||||
:activeSector="activeSector"
|
:activeSector="activeSector"
|
||||||
:activeRings="activeRings"
|
:activeRings="activeRings"
|
||||||
|
|||||||
Reference in New Issue
Block a user