if available, show firmware build date in settings

This commit is contained in:
liamcottle
2025-02-19 21:26:45 +13:00
parent 466c63a5e6
commit a5b82b4171
4 changed files with 21 additions and 5 deletions

8
package-lock.json generated
View File

@@ -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",

View File

@@ -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",

View File

@@ -26,6 +26,9 @@
<div v-if="GlobalState.selfInfo?.publicKey" class="text-sm text-gray-500">
&lt;{{ bytesToHex(GlobalState.selfInfo.publicKey.slice(0, 4)) }}...{{ bytesToHex(GlobalState.selfInfo.publicKey.slice(-4)) }}&gt;
</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

View File

@@ -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);
}