mirror of
https://github.com/aljazceru/meshcore-web.git
synced 2025-12-17 08:14:19 +01:00
if available, show firmware build date in settings
This commit is contained in:
8
package-lock.json
generated
8
package-lock.json
generated
@@ -9,7 +9,7 @@
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@liamcottle/meshcore.js": "^1.0.6",
|
||||
"@liamcottle/meshcore.js": "^1.0.7",
|
||||
"@tailwindcss/forms": "^0.5.10",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
@@ -1122,9 +1122,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@liamcottle/meshcore.js": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@liamcottle/meshcore.js/-/meshcore.js-1.0.6.tgz",
|
||||
"integrity": "sha512-xdebsV1qWG+gXVVB2GBwoJi17dZgBcXmfWPzAGpmUMBEQAvbIs0DAc66zue+X3cHv7+29zKATa9JWMNOC/VEjg=="
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@liamcottle/meshcore.js/-/meshcore.js-1.0.7.tgz",
|
||||
"integrity": "sha512-BevdkkJFeFsMfnki3upnxqRiJzAFg+DaPsu3C+wBuu/8Lra3vFeKySH5X2MEJSNT0iSNUnqVRlZVtiyDmUTzkw=="
|
||||
},
|
||||
"node_modules/@mongodb-js/saslprep": {
|
||||
"version": "1.2.0",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"author": "Liam Cottle <liam@liamcottle.com>",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@liamcottle/meshcore.js": "^1.0.6",
|
||||
"@liamcottle/meshcore.js": "^1.0.7",
|
||||
"@tailwindcss/forms": "^0.5.10",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
<div v-if="GlobalState.selfInfo?.publicKey" class="text-sm text-gray-500">
|
||||
<{{ bytesToHex(GlobalState.selfInfo.publicKey.slice(0, 4)) }}...{{ bytesToHex(GlobalState.selfInfo.publicKey.slice(-4)) }}>
|
||||
</div>
|
||||
<div v-if="deviceInfo" class="text-sm text-gray-500">
|
||||
<span>Firmware Build Date: {{ deviceInfo.firmware_build_date }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- setting groups -->
|
||||
@@ -166,6 +169,7 @@ export default {
|
||||
txPower: null,
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
deviceInfo: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -175,6 +179,7 @@ export default {
|
||||
async load() {
|
||||
|
||||
await Connection.loadSelfInfo();
|
||||
await this.loadDeviceInfo();
|
||||
|
||||
this.name = GlobalState.selfInfo.name;
|
||||
|
||||
@@ -193,6 +198,13 @@ export default {
|
||||
this.longitude = GlobalState.selfInfo.advLon / 1000000;
|
||||
|
||||
},
|
||||
async loadDeviceInfo() {
|
||||
try {
|
||||
this.deviceInfo = await Connection.deviceQuery();
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
async save() {
|
||||
|
||||
// show loading
|
||||
|
||||
@@ -202,6 +202,10 @@ class Connection {
|
||||
}
|
||||
}
|
||||
|
||||
static async deviceQuery(appTargetVer = 1) {
|
||||
return await GlobalState.connection.deviceQuery(appTargetVer);
|
||||
}
|
||||
|
||||
static async setAdvertName(name) {
|
||||
await GlobalState.connection.setAdvertName(name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user