修复局域网连接出错问题
This commit is contained in:
File diff suppressed because one or more lines are too long
2
frontend/dist/index.html
vendored
2
frontend/dist/index.html
vendored
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<title>AirShare Pro</title>
|
||||
<script type="module" crossorigin src="/assets/index-BjlDNx75.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-Dvss27fc.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-qzWUgf-t.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -49,6 +49,7 @@ const localDevice = ref({
|
||||
id: '',
|
||||
name: '',
|
||||
type: '',
|
||||
networkGroupKey: '',
|
||||
})
|
||||
|
||||
const persistedDeviceId = localStorage.getItem(DEVICE_ID_KEY) || ''
|
||||
@@ -233,6 +234,7 @@ async function registerCurrentDevice() {
|
||||
id: device.id,
|
||||
name: device.name,
|
||||
type: device.type,
|
||||
networkGroupKey: device.network_group_key || '',
|
||||
}
|
||||
|
||||
await loadPendingDownloads()
|
||||
@@ -1284,7 +1286,7 @@ function deriveNetworkGroupKey() {
|
||||
}
|
||||
|
||||
function isSameLocalNetwork(networkGroupKey) {
|
||||
const localNetworkGroupKey = deriveNetworkGroupKey()
|
||||
const localNetworkGroupKey = localDevice.value.networkGroupKey || deriveNetworkGroupKey()
|
||||
return !!localNetworkGroupKey && networkGroupKey === localNetworkGroupKey
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user