Compare commits

7 Commits

22 changed files with 466 additions and 239 deletions

6
android/.idea/AndroidProjectSystem.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidProjectSystem">
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
</component>
</project>

6
android/.idea/compiler.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="21" />
</component>
</project>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates>
</component>
</project>

10
android/.idea/migrations.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

5
android/.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK" />
</project>

17
android/.idea/runConfigurations.xml generated Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
</set>
</option>
</component>
</project>

View File

@@ -13,7 +13,7 @@ dependencies {
implementation project(':capacitor-haptics')
implementation project(':capacitor-keyboard')
implementation project(':capacitor-status-bar')
implementation "androidx.annotation:annotation:*"
}

View File

@@ -7,7 +7,9 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:networkSecurityConfig="@xml/network_security_config"
>
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation"

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<!-- Allow cleartext only for the CORS proxy used by the library -->
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">cors.emaker.limited</domain>
</domain-config>
<!-- Optional: keep everything else blocked (default) -->
</network-security-config>

View File

@@ -3,7 +3,21 @@ import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: 'io.ionic.starter',
appName: 'UpdaterApp',
webDir: 'dist'
webDir: 'dist',
cordova: {
preferences: {
bluetooth_restore_state: "true",
accessBackgroundLocation: "true",
},
},
"server": {
"androidScheme": "http",
},
// plugins: {
// CapacitorHttp: {
// enabled: true,
// },
// },
};
export default config;

356
package-lock.json generated
View File

@@ -16,9 +16,10 @@
"@capacitor/status-bar": "7.0.3",
"@ionic/vue": "^8.0.0",
"@ionic/vue-router": "^8.0.0",
"cordova-plugin-ble-central": "^2.0.0",
"ionicons": "^7.0.0",
"pinia": "^3.0.3",
"updaterweblibrary": "^1.0.4",
"updaterweblibrary": "1.0.37",
"vue": "^3.3.0",
"vue-router": "^4.2.0"
},
@@ -70,7 +71,6 @@
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.28.5",
@@ -1656,7 +1656,6 @@
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-7.4.3.tgz",
"integrity": "sha512-wCWr8fQ9Wxn0466vPg7nMn0tivbNVjNy1yL4GvDSIZuZx7UpU2HeVGNe9QjN/quEd+YLRFeKEBLBw619VqUiNg==",
"license": "MIT",
"peer": true,
"dependencies": {
"tslib": "^2.1.0"
}
@@ -2306,9 +2305,9 @@
}
},
"node_modules/@ionic/core": {
"version": "8.7.8",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.7.8.tgz",
"integrity": "sha512-GLWb/lz3kocpzTZTeQQ5xxoWz4CKHD6zpnbwJknTKsncebohAaw2KTe7uOw5toKQEDdohTseFuSGoDDBoRQ1Ug==",
"version": "8.7.11",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.7.11.tgz",
"integrity": "sha512-9UX9IeEztWWXymi+xCUMEBnnY+TbaR8crZLOwFnxPUEq4FFWSUCSv5XeHHQBpgZjBO2MJuDGcNv0GCQumIjVcQ==",
"license": "MIT",
"dependencies": {
"@stencil/core": "4.38.0",
@@ -2459,23 +2458,23 @@
}
},
"node_modules/@ionic/vue": {
"version": "8.7.8",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.7.8.tgz",
"integrity": "sha512-vB8JBfIduHDD8+MnhGX8w3zXB/abNqjqwOjv+0SOrMx1sp9TvpPi2vYGjtSrFlg1PvOv8EGNzVYTbURmwgvcHA==",
"version": "8.7.11",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.7.11.tgz",
"integrity": "sha512-HDEcjhxWfimVQxvXfghrqlAWpXnJvcUDTIVE2Mvq8ul+s7gL/OZCpXTAODJOfFCBAGJ0o9QXyC7OPjyN4UbO8Q==",
"license": "MIT",
"dependencies": {
"@ionic/core": "8.7.8",
"@ionic/core": "8.7.11",
"@stencil/vue-output-target": "0.10.7",
"ionicons": "^8.0.13"
}
},
"node_modules/@ionic/vue-router": {
"version": "8.7.8",
"resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-8.7.8.tgz",
"integrity": "sha512-/GKrlBwhGJfkQU+jhXz9ivrG5YcDUYDhmnDrrvQ1//GNpV8dAUIqjMQMQf+QGUw5ZZKrDutq2kPHppb5hI+YmQ==",
"version": "8.7.11",
"resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-8.7.11.tgz",
"integrity": "sha512-6k/bWLORJucLIPYqcrXnSs3KEI69qaWo6V4bGAEOSkt9dISdTy65gafi4gtFFyV+n81LIU00WnajJYLadDG3Cg==",
"license": "MIT",
"dependencies": {
"@ionic/vue": "8.7.8"
"@ionic/vue": "8.7.11"
}
},
"node_modules/@ionic/vue/node_modules/ionicons": {
@@ -3090,8 +3089,7 @@
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz",
"integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==",
"dev": true,
"license": "MIT",
"peer": true
"license": "MIT"
},
"node_modules/@types/chai-subset": {
"version": "1.3.6",
@@ -3128,9 +3126,9 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "24.9.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.9.2.tgz",
"integrity": "sha512-uWN8YqxXxqFMX2RqGOrumsKeti4LlmIMIyV0lgut4jx7KQBcBiW6vkDtIBvHnHIquwNfJhk8v2OtmO8zXWHfPA==",
"version": "24.10.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz",
"integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3218,7 +3216,6 @@
"integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
"dev": true,
"license": "BSD-2-Clause",
"peer": true,
"dependencies": {
"@typescript-eslint/scope-manager": "6.21.0",
"@typescript-eslint/types": "6.21.0",
@@ -3470,9 +3467,9 @@
}
},
"node_modules/@vitest/runner/node_modules/yocto-queue": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz",
"integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz",
"integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3555,13 +3552,13 @@
}
},
"node_modules/@vue/compiler-core": {
"version": "3.5.22",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.22.tgz",
"integrity": "sha512-jQ0pFPmZwTEiRNSb+i9Ow/I/cHv2tXYqsnHKKyCQ08irI2kdF5qmYedmF8si8mA7zepUFmJ2hqzS8CQmNOWOkQ==",
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.25.tgz",
"integrity": "sha512-vay5/oQJdsNHmliWoZfHPoVZZRmnSWhug0BYT34njkYTPqClh3DNWLkZNJBVSjsNMrg0CCrBfoKkjZQPM/QVUw==",
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.28.4",
"@vue/shared": "3.5.22",
"@babel/parser": "^7.28.5",
"@vue/shared": "3.5.25",
"entities": "^4.5.0",
"estree-walker": "^2.0.2",
"source-map-js": "^1.2.1"
@@ -3580,40 +3577,40 @@
}
},
"node_modules/@vue/compiler-dom": {
"version": "3.5.22",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.22.tgz",
"integrity": "sha512-W8RknzUM1BLkypvdz10OVsGxnMAuSIZs9Wdx1vzA3mL5fNMN15rhrSCLiTm6blWeACwUwizzPVqGJgOGBEN/hA==",
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.25.tgz",
"integrity": "sha512-4We0OAcMZsKgYoGlMjzYvaoErltdFI2/25wqanuTu+S4gismOTRTBPi4IASOjxWdzIwrYSjnqONfKvuqkXzE2Q==",
"license": "MIT",
"dependencies": {
"@vue/compiler-core": "3.5.22",
"@vue/shared": "3.5.22"
"@vue/compiler-core": "3.5.25",
"@vue/shared": "3.5.25"
}
},
"node_modules/@vue/compiler-sfc": {
"version": "3.5.22",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.22.tgz",
"integrity": "sha512-tbTR1zKGce4Lj+JLzFXDq36K4vcSZbJ1RBu8FxcDv1IGRz//Dh2EBqksyGVypz3kXpshIfWKGOCcqpSbyGWRJQ==",
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.25.tgz",
"integrity": "sha512-PUgKp2rn8fFsI++lF2sO7gwO2d9Yj57Utr5yEsDf3GNaQcowCLKL7sf+LvVFvtJDXUp/03+dC6f2+LCv5aK1ag==",
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.28.4",
"@vue/compiler-core": "3.5.22",
"@vue/compiler-dom": "3.5.22",
"@vue/compiler-ssr": "3.5.22",
"@vue/shared": "3.5.22",
"@babel/parser": "^7.28.5",
"@vue/compiler-core": "3.5.25",
"@vue/compiler-dom": "3.5.25",
"@vue/compiler-ssr": "3.5.25",
"@vue/shared": "3.5.25",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.19",
"magic-string": "^0.30.21",
"postcss": "^8.5.6",
"source-map-js": "^1.2.1"
}
},
"node_modules/@vue/compiler-ssr": {
"version": "3.5.22",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.22.tgz",
"integrity": "sha512-GdgyLvg4R+7T8Nk2Mlighx7XGxq/fJf9jaVofc3IL0EPesTE86cP/8DD1lT3h1JeZr2ySBvyqKQJgbS54IX1Ww==",
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.25.tgz",
"integrity": "sha512-ritPSKLBcParnsKYi+GNtbdbrIE1mtuFEJ4U1sWeuOMlIziK5GtOL85t5RhsNy4uWIXPgk+OUdpnXiTdzn8o3A==",
"license": "MIT",
"dependencies": {
"@vue/compiler-dom": "3.5.22",
"@vue/shared": "3.5.22"
"@vue/compiler-dom": "3.5.25",
"@vue/shared": "3.5.25"
}
},
"node_modules/@vue/compiler-vue2": {
@@ -3628,21 +3625,21 @@
}
},
"node_modules/@vue/devtools-api": {
"version": "7.7.7",
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.7.7.tgz",
"integrity": "sha512-lwOnNBH2e7x1fIIbVT7yF5D+YWhqELm55/4ZKf45R9T8r9dE2AIOy8HKjfqzGsoTHFbWbr337O4E0A0QADnjBg==",
"version": "7.7.9",
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.7.9.tgz",
"integrity": "sha512-kIE8wvwlcZ6TJTbNeU2HQNtaxLx3a84aotTITUuL/4bzfPxzajGBOoqjMhwZJ8L9qFYDU/lAYMEEm11dnZOD6g==",
"license": "MIT",
"dependencies": {
"@vue/devtools-kit": "^7.7.7"
"@vue/devtools-kit": "^7.7.9"
}
},
"node_modules/@vue/devtools-kit": {
"version": "7.7.7",
"resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.7.7.tgz",
"integrity": "sha512-wgoZtxcTta65cnZ1Q6MbAfePVFxfM+gq0saaeytoph7nEa7yMXoi6sCPy4ufO111B9msnw0VOWjPEFCXuAKRHA==",
"version": "7.7.9",
"resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.7.9.tgz",
"integrity": "sha512-PyQ6odHSgiDVd4hnTP+aDk2X4gl2HmLDfiyEnn3/oV+ckFDuswRs4IbBT7vacMuGdwY/XemxBoh302ctbsptuA==",
"license": "MIT",
"dependencies": {
"@vue/devtools-shared": "^7.7.7",
"@vue/devtools-shared": "^7.7.9",
"birpc": "^2.3.0",
"hookable": "^5.5.3",
"mitt": "^3.0.1",
@@ -3652,9 +3649,9 @@
}
},
"node_modules/@vue/devtools-shared": {
"version": "7.7.7",
"resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.7.7.tgz",
"integrity": "sha512-+udSj47aRl5aKb0memBvcUG9koarqnxNM5yjuREvqwK6T3ap4mn3Zqqc17QrBFTqSMjr3HK1cvStEZpMDpfdyw==",
"version": "7.7.9",
"resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.7.9.tgz",
"integrity": "sha512-iWAb0v2WYf0QWmxCGy0seZNDPdO3Sp5+u78ORnyeonS6MT4PC7VPrryX2BpMJrwlDeaZ6BD4vP4XKjK0SZqaeA==",
"license": "MIT",
"dependencies": {
"rfdc": "^1.4.1"
@@ -3711,53 +3708,53 @@
}
},
"node_modules/@vue/reactivity": {
"version": "3.5.22",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.22.tgz",
"integrity": "sha512-f2Wux4v/Z2pqc9+4SmgZC1p73Z53fyD90NFWXiX9AKVnVBEvLFOWCEgJD3GdGnlxPZt01PSlfmLqbLYzY/Fw4A==",
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.25.tgz",
"integrity": "sha512-5xfAypCQepv4Jog1U4zn8cZIcbKKFka3AgWHEFQeK65OW+Ys4XybP6z2kKgws4YB43KGpqp5D/K3go2UPPunLA==",
"license": "MIT",
"dependencies": {
"@vue/shared": "3.5.22"
"@vue/shared": "3.5.25"
}
},
"node_modules/@vue/runtime-core": {
"version": "3.5.22",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.22.tgz",
"integrity": "sha512-EHo4W/eiYeAzRTN5PCextDUZ0dMs9I8mQ2Fy+OkzvRPUYQEyK9yAjbasrMCXbLNhF7P0OUyivLjIy0yc6VrLJQ==",
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.25.tgz",
"integrity": "sha512-Z751v203YWwYzy460bzsYQISDfPjHTl+6Zzwo/a3CsAf+0ccEjQ8c+0CdX1WsumRTHeywvyUFtW6KvNukT/smA==",
"license": "MIT",
"dependencies": {
"@vue/reactivity": "3.5.22",
"@vue/shared": "3.5.22"
"@vue/reactivity": "3.5.25",
"@vue/shared": "3.5.25"
}
},
"node_modules/@vue/runtime-dom": {
"version": "3.5.22",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.22.tgz",
"integrity": "sha512-Av60jsryAkI023PlN7LsqrfPvwfxOd2yAwtReCjeuugTJTkgrksYJJstg1e12qle0NarkfhfFu1ox2D+cQotww==",
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.25.tgz",
"integrity": "sha512-a4WrkYFbb19i9pjkz38zJBg8wa/rboNERq3+hRRb0dHiJh13c+6kAbgqCPfMaJ2gg4weWD3APZswASOfmKwamA==",
"license": "MIT",
"dependencies": {
"@vue/reactivity": "3.5.22",
"@vue/runtime-core": "3.5.22",
"@vue/shared": "3.5.22",
"@vue/reactivity": "3.5.25",
"@vue/runtime-core": "3.5.25",
"@vue/shared": "3.5.25",
"csstype": "^3.1.3"
}
},
"node_modules/@vue/server-renderer": {
"version": "3.5.22",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.22.tgz",
"integrity": "sha512-gXjo+ao0oHYTSswF+a3KRHZ1WszxIqO7u6XwNHqcqb9JfyIL/pbWrrh/xLv7jeDqla9u+LK7yfZKHih1e1RKAQ==",
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.25.tgz",
"integrity": "sha512-UJaXR54vMG61i8XNIzTSf2Q7MOqZHpp8+x3XLGtE3+fL+nQd+k7O5+X3D/uWrnQXOdMw5VPih+Uremcw+u1woQ==",
"license": "MIT",
"dependencies": {
"@vue/compiler-ssr": "3.5.22",
"@vue/shared": "3.5.22"
"@vue/compiler-ssr": "3.5.25",
"@vue/shared": "3.5.25"
},
"peerDependencies": {
"vue": "3.5.22"
"vue": "3.5.25"
}
},
"node_modules/@vue/shared": {
"version": "3.5.22",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.22.tgz",
"integrity": "sha512-F4yc6palwq3TT0u+FYf0Ns4Tfl9GRFURDN2gWG7L1ecIaS/4fCIuFOjMTnCyjsu/OK6vaDKLCrGAa+KvvH+h4w==",
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.25.tgz",
"integrity": "sha512-AbOPdQQnAnzs58H2FrrDxYj/TJfmeS2jdfEEhgiKINy+bnOANmVizIEgq1r+C5zsbs6l1CCQxtcj71rwNQ4jWg==",
"license": "MIT"
},
"node_modules/@vue/test-utils": {
@@ -3805,7 +3802,6 @@
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true,
"license": "MIT",
"peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -4152,9 +4148,9 @@
"license": "MIT"
},
"node_modules/baseline-browser-mapping": {
"version": "2.8.21",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.21.tgz",
"integrity": "sha512-JU0h5APyQNsHOlAM7HnQnPToSDQoEBZqzu/YBlqDnEeymPnZDREeXJA3KBMQee+dKteAxZ2AtvQEvVYdZf241Q==",
"version": "2.8.32",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.32.tgz",
"integrity": "sha512-OPz5aBThlyLFgxyhdwf/s2+8ab3OvT7AdTNvKHBwpXomIYeXqpUUuT8LrdtxZSsWJ4R4CU1un4XGh5Ez3nlTpw==",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -4182,9 +4178,9 @@
}
},
"node_modules/birpc": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/birpc/-/birpc-2.6.1.tgz",
"integrity": "sha512-LPnFhlDpdSH6FJhJyn4M0kFO7vtQ5iPw24FnG0y21q09xC7e8+1LeR31S1MAIrDAHp4m7aas4bEkTDTvMAtebQ==",
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/birpc/-/birpc-2.8.0.tgz",
"integrity": "sha512-Bz2a4qD/5GRhiHSwj30c/8kC8QGj12nNDwz3D4ErQ4Xhy35dsSDvF+RA/tWpjyU0pdGtSDiEk6B5fBGE1qNVhw==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/antfu"
@@ -4248,9 +4244,9 @@
}
},
"node_modules/browserslist": {
"version": "4.27.0",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz",
"integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==",
"version": "4.28.0",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz",
"integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==",
"dev": true,
"funding": [
{
@@ -4267,12 +4263,11 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.8.19",
"caniuse-lite": "^1.0.30001751",
"electron-to-chromium": "^1.5.238",
"node-releases": "^2.0.26",
"baseline-browser-mapping": "^2.8.25",
"caniuse-lite": "^1.0.30001754",
"electron-to-chromium": "^1.5.249",
"node-releases": "^2.0.27",
"update-browserslist-db": "^1.1.4"
},
"bin": {
@@ -4405,9 +4400,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001751",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz",
"integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==",
"version": "1.0.30001757",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001757.tgz",
"integrity": "sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ==",
"dev": true,
"funding": [
{
@@ -4715,10 +4710,16 @@
"url": "https://github.com/sponsors/mesqueeb"
}
},
"node_modules/cordova-plugin-ble-central": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-ble-central/-/cordova-plugin-ble-central-2.0.0.tgz",
"integrity": "sha512-IYXIR6EeKJiIprKiGV/9shNktBqAI8AVgACSlJKbF6pqCOXuFXdjaUG9f6ODssSGnV0LEaL9gKtoLLHGaW+FzA==",
"license": "Apache-2.0"
},
"node_modules/core-js": {
"version": "3.46.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.46.0.tgz",
"integrity": "sha512-vDMm9B0xnqqZ8uSBpZ8sNtRtOdmfShrvT6h2TuQGLs0Is+cR0DYbj/KWP6ALVNbWPpqA/qPLoOuppJN07humpA==",
"version": "3.47.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.47.0.tgz",
"integrity": "sha512-c3Q2VVkGAUyupsjRnaNX6u8Dq2vAdzm9iuPj5FW0fRxzlxgq9Q39MDq10IvmQSpLgHQNyQzQmOo6bgGHmH3NNg==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -4728,13 +4729,13 @@
}
},
"node_modules/core-js-compat": {
"version": "3.46.0",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz",
"integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==",
"version": "3.47.0",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.47.0.tgz",
"integrity": "sha512-IGfuznZ/n7Kp9+nypamBhvwdwLsW6KC8IOaURw2doAK5e98AG3acVLdh0woOnEqCfUtS+Vu882JE4k/DAm3ItQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"browserslist": "^4.26.3"
"browserslist": "^4.28.0"
},
"funding": {
"type": "opencollective",
@@ -4790,9 +4791,9 @@
}
},
"node_modules/csstype": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
"license": "MIT"
},
"node_modules/cypress": {
@@ -4909,9 +4910,9 @@
}
},
"node_modules/dayjs": {
"version": "1.11.18",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.18.tgz",
"integrity": "sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==",
"version": "1.11.19",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
"integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==",
"dev": true,
"license": "MIT"
},
@@ -5116,9 +5117,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.5.244",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.244.tgz",
"integrity": "sha512-OszpBN7xZX4vWMPJwB9illkN/znA8M36GQqQxi6MNy9axWxhOfJyZZJtSLQCpEFLHP2xK33BiWx9aIuIEXVCcw==",
"version": "1.5.262",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.262.tgz",
"integrity": "sha512-NlAsMteRHek05jRUxUR0a5jpjYq9ykk6+kO0yRaMi5moe7u0fVIOeQ3Y30A8dIiWFBNUoQGi1ljb1i5VtS9WQQ==",
"dev": true,
"license": "ISC"
},
@@ -5158,7 +5159,6 @@
"integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"ansi-colors": "^4.1.1",
"strip-ansi": "^6.0.1"
@@ -5308,7 +5308,6 @@
"deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
@@ -5365,7 +5364,6 @@
"integrity": "sha512-174lJKuNsuDIlLpjeXc5E2Tss8P44uIimAfGD0b90k0NoirJqpG7stLuU9Vp/9ioTOrQdWVREc4mRd1BD+CvGw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"globals": "^13.24.0",
@@ -5855,9 +5853,9 @@
}
},
"node_modules/form-data": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
"integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
"integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6047,9 +6045,9 @@
}
},
"node_modules/glob": {
"version": "10.4.5",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
"integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
"version": "10.5.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
"integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -6667,9 +6665,9 @@
"license": "MIT"
},
"node_modules/js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7689,19 +7687,19 @@
}
},
"node_modules/pinia": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/pinia/-/pinia-3.0.3.tgz",
"integrity": "sha512-ttXO/InUULUXkMHpTdp9Fj4hLpD/2AoJdmAbAeW2yu1iy1k+pkFekQXw5VpC0/5p51IOR/jDaDRfRWRnMMsGOA==",
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/pinia/-/pinia-3.0.4.tgz",
"integrity": "sha512-l7pqLUFTI/+ESXn6k3nu30ZIzW5E2WZF/LaHJEpoq6ElcLD+wduZoB2kBN19du6K/4FDpPMazY2wJr+IndBtQw==",
"license": "MIT",
"dependencies": {
"@vue/devtools-api": "^7.7.2"
"@vue/devtools-api": "^7.7.7"
},
"funding": {
"url": "https://github.com/sponsors/posva"
},
"peerDependencies": {
"typescript": ">=4.4.4",
"vue": "^2.7.0 || ^3.5.11"
"typescript": ">=4.5.0",
"vue": "^3.5.11"
},
"peerDependenciesMeta": {
"typescript": {
@@ -8129,13 +8127,13 @@
"license": "MIT"
},
"node_modules/rimraf": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.0.tgz",
"integrity": "sha512-DxdlA1bdNzkZK7JiNWH+BAx1x4tEJWoTofIopFo6qWUU94jYrFZ0ubY05TqH3nWPJ1nKa1JWVFDINZ3fnrle/A==",
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz",
"integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"glob": "^11.0.3",
"glob": "^13.0.0",
"package-json-from-dist": "^1.0.1"
},
"bin": {
@@ -8149,37 +8147,15 @@
}
},
"node_modules/rimraf/node_modules/glob": {
"version": "11.0.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz",
"integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==",
"dev": true,
"license": "ISC",
"dependencies": {
"foreground-child": "^3.3.1",
"jackspeak": "^4.1.1",
"minimatch": "^10.0.3",
"minipass": "^7.1.2",
"package-json-from-dist": "^1.0.0",
"path-scurry": "^2.0.0"
},
"bin": {
"glob": "dist/esm/bin.mjs"
},
"engines": {
"node": "20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/jackspeak": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz",
"integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==",
"version": "13.0.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz",
"integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/cliui": "^8.0.2"
"minimatch": "^10.1.1",
"minipass": "^7.1.2",
"path-scurry": "^2.0.0"
},
"engines": {
"node": "20 || >=22"
@@ -8215,9 +8191,9 @@
}
},
"node_modules/rimraf/node_modules/path-scurry": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz",
"integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz",
"integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
@@ -8827,9 +8803,9 @@
}
},
"node_modules/superjson": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.5.tgz",
"integrity": "sha512-zWPTX96LVsA/eVYnqOM2+ofcdPqdS1dAF1LN4TS2/MWuUpfitd9ctTa87wt4xrYnZnkLtS69xpBdSxVBP5Rm6w==",
"version": "2.2.6",
"resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.6.tgz",
"integrity": "sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==",
"license": "MIT",
"dependencies": {
"copy-anything": "^4"
@@ -8917,12 +8893,11 @@
"license": "ISC"
},
"node_modules/terser": {
"version": "5.44.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.44.0.tgz",
"integrity": "sha512-nIVck8DK+GM/0Frwd+nIhZ84pR/BX7rmXMfYwyg+Sri5oGVE99/E3KvXqpC2xHFxyqXyGHTKBSioxxplrO4I4w==",
"version": "5.44.1",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz",
"integrity": "sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==",
"dev": true,
"license": "BSD-2-Clause",
"peer": true,
"dependencies": {
"@jridgewell/source-map": "^0.3.3",
"acorn": "^8.15.0",
@@ -9164,7 +9139,6 @@
"integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
"devOptional": true,
"license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -9283,12 +9257,13 @@
}
},
"node_modules/updaterweblibrary": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/updaterweblibrary/-/updaterweblibrary-1.0.8.tgz",
"integrity": "sha512-cKc1zICpjFEj2vFHzj3+T/CCsUnm+lKLdwyDJzkMmwUhM2QQXQ8JN81hJe+2H7DP6DRjLNNnbwP1CoCBlCpGaQ==",
"version": "1.0.37",
"resolved": "https://registry.npmjs.org/updaterweblibrary/-/updaterweblibrary-1.0.37.tgz",
"integrity": "sha512-cAaOlWH1F6ZoBuCyF4thOb8qLtuHl7oJP2k/jBKKHbdIXybADXk0RwiKViUz4asATqTLNkJ66GV0UBU9qo+zuQ==",
"license": "MIT",
"dependencies": {
"@rgrove/parse-xml": "^4.2.0"
"@rgrove/parse-xml": "^4.2.0",
"cordova-plugin-ble-central": "^2.0.0"
}
},
"node_modules/uri-js": {
@@ -9350,7 +9325,6 @@
"integrity": "sha512-TFQLuwWLPms+NBNlh0D9LZQ+HXW471COABxw/9TEUBrjuHMo9BrYBPrN/SYAwIuVL+rLerycxiLT41t4f5MZpA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"esbuild": "^0.20.1",
"postcss": "^8.4.38",
@@ -9511,17 +9485,16 @@
"license": "MIT"
},
"node_modules/vue": {
"version": "3.5.22",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.22.tgz",
"integrity": "sha512-toaZjQ3a/G/mYaLSbV+QsQhIdMo9x5rrqIpYRObsJ6T/J+RyCSFwN2LHNVH9v8uIcljDNa3QzPVdv3Y6b9hAJQ==",
"version": "3.5.25",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.25.tgz",
"integrity": "sha512-YLVdgv2K13WJ6n+kD5owehKtEXwdwXuj2TTyJMsO7pSeKw2bfRNZGjhB7YzrpbMYj5b5QsUebHpOqR3R3ziy/g==",
"license": "MIT",
"peer": true,
"dependencies": {
"@vue/compiler-dom": "3.5.22",
"@vue/compiler-sfc": "3.5.22",
"@vue/runtime-dom": "3.5.22",
"@vue/server-renderer": "3.5.22",
"@vue/shared": "3.5.22"
"@vue/compiler-dom": "3.5.25",
"@vue/compiler-sfc": "3.5.25",
"@vue/runtime-dom": "3.5.25",
"@vue/server-renderer": "3.5.25",
"@vue/shared": "3.5.25"
},
"peerDependencies": {
"typescript": "*"
@@ -9569,7 +9542,6 @@
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.6.3.tgz",
"integrity": "sha512-ARBedLm9YlbvQomnmq91Os7ck6efydTSpRP3nuOKCvgJOHNrhRoJDSKtee8kcL1Vf7nz6U+PMBL+hTvR3bTVQg==",
"license": "MIT",
"peer": true,
"dependencies": {
"@vue/devtools-api": "^6.6.4"
},

View File

@@ -1,7 +1,7 @@
{
"name": "UpdaterApp",
"private": true,
"version": "0.0.1",
"version": "0.0.2",
"type": "module",
"scripts": {
"dev": "ionic serve",
@@ -21,9 +21,10 @@
"@capacitor/status-bar": "7.0.3",
"@ionic/vue": "^8.0.0",
"@ionic/vue-router": "^8.0.0",
"cordova-plugin-ble-central": "^2.0.0",
"ionicons": "^7.0.0",
"pinia": "^3.0.3",
"updaterweblibrary": "^1.0.4",
"updaterweblibrary": "1.1.0",
"vue": "^3.3.0",
"vue-router": "^4.2.0"
},

View File

@@ -6,4 +6,7 @@
<script setup lang="ts">
import { IonApp, IonRouterOutlet } from '@ionic/vue';
import updater from './utils/updater';
updater.obj.bleObject = ble;
</script>

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import useArchiveStore from "@/stores/archive";
import { versionNotes } from "@/utils/types";
import updater from "@/utils/updater";
import {
IonButton,
IonCard,
@@ -14,11 +15,12 @@ IonLabel, IonItem,
IonList
} from "@ionic/vue";
import {chevronForward} from "ionicons/icons";
import { ref, watch } from "vue";
import { onBeforeMount, ref, watch } from "vue";
const archive = useArchiveStore();
const emit = defineEmits<{(e: "back"): void, (e: "disconnect"): void, (e: "details"):void}>();
const versions = ref<versionNotes[]>([]);
const version = ref<string>("");
const back = () => {
emit("back");
@@ -35,6 +37,9 @@ const details = (index: number) => {
watch(() => archive.getArchive, (newValue) => versions.value = newValue, {immediate: true});
onBeforeMount(async () => {
version.value = await updater.obj.getBoardVersion();
});
</script>
<template>
@@ -43,7 +48,7 @@ watch(() => archive.getArchive, (newValue) => versions.value = newValue, {immedi
<div class="header-column">
<ion-card-title>ARCHIVE</ion-card-title>
<ion-card-title>Board</ion-card-title>
<ion-card-subtitle>v1.1.1</ion-card-subtitle>
<ion-card-subtitle>{{ version }}</ion-card-subtitle>
</div>
<div style="flex-grow: 1"></div>
<div>

View File

@@ -9,11 +9,13 @@ import {
IonCardTitle,
} from "@ionic/vue";
import { versionNotes } from "@/utils/types";
import { ref } from "vue";
import { onBeforeMount, ref } from "vue";
import updater from "@/utils/updater";
const archive = useArchiveStore();
const emit = defineEmits<{(e:"back"):void, (e: "disconnect"): void, (e:"choose"): void}>();
const record = ref<versionNotes>(archive.getArchive[archive.getShownI]);
const version = ref<string>("");
const back = () => {
emit("back");
@@ -27,7 +29,12 @@ const choose = () => {
emit("choose");
};
console.log(archive.getArchive)
// TODO: remove
// console.log(archive.getArchive)
onBeforeMount(async () => {
version.value = await updater.obj.getBoardVersion();
});
</script>
<template>
@@ -36,7 +43,7 @@ console.log(archive.getArchive)
<div>
<ion-card-title>DETAILS</ion-card-title>
<ion-card-title>Board</ion-card-title>
<ion-card-subtitle>v1.1.1</ion-card-subtitle>
<ion-card-subtitle>{{ version }}</ion-card-subtitle>
</div>
<div style="flex-grow: 1"></div>
<div>

View File

@@ -1,12 +1,46 @@
<script setup lang="ts">
import useArchiveStore from "@/stores/archive";
import updater from "@/utils/updater";
import {IonButton, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle} from "@ionic/vue";
import { onBeforeMount, ref } from "vue";
const emit = defineEmits<{(e:"back"):void}>();
const emit = defineEmits<{(e:"back"):void, (e: "home"):void}>();
const archive = useArchiveStore();
const view = ref<number>(0);
const version = ref<string>("");
const logValue = ref<string>("");
const filesize = ref<number>(0);
const back = () => {
emit("back");
}
async function flash() {
view.value = 1;
logValue.value = "Downloading file";
await updater.obj.getFirmware( archive.getArchive[archive.getShownI]);
logValue.value = "File recieved";
filesize.value = updater.obj.getFileSize();
logValue.value = "Starting to flash (0%)";
await updater.obj.flashFirmware((message: string) => {
logValue.value = message;
}).catch((reason) => {
logValue.value = reason;
});
// await updater.obj.flashFirmware();
// logValue.value = "Flash complete!";
view.value = 2;
}
function home() {
emit("home");
}
onBeforeMount(async () => {
version.value = await updater.obj.getBoardVersion();
});
</script>
<template>
@@ -15,7 +49,7 @@ const back = () => {
<div class="header-column">
<ion-card-title>FLASH</ion-card-title>
<ion-card-title>Board</ion-card-title>
<ion-card-subtitle>v1.1.1</ion-card-subtitle>
<ion-card-subtitle>{{ version }}</ion-card-subtitle>
</div>
<!-- <div style="flex-grow: 1"></div>-->
<!-- <div>-->
@@ -24,10 +58,24 @@ const back = () => {
</ion-card-header>
<ion-card-content>
<p>v1.1.1 -> v1.1.2</p> <br>
<ion-button>Flash</ion-button>
<p>{{ version }} -> {{ archive.getArchive[archive.getShownI].title }}</p> <br>
<!-- BEFORE FLASHING -->
<ion-button @click="flash" v-if="view==0">Flash</ion-button>
<ion-button @click="back" v-if="view==0">Cancel</ion-button>
<!-- DURING FLASHING -->
<p v-if="view!=0">Status info</p><br />
<p v-if="view!=0"><strong>DO NOT CLOSE WHILE THE UPDATE IS RUNNING</strong></p><br />
<p v-if="view!=0">Size: {{ filesize }}</p>
<p v-if="view!=0">{{ logValue }}</p>
<!-- AFTER FLASHING -->
<ion-button @click="home" v-if="view==2">Finish</ion-button>
<ion-button @click="back">Cancel</ion-button>
</ion-card-content>
</ion-card>
</template>

View File

@@ -4,7 +4,7 @@
<div class="header-column">
<ion-card-title>HOME</ion-card-title>
<ion-card-title>Board</ion-card-title>
<ion-card-subtitle>v1.1.1</ion-card-subtitle>
<ion-card-subtitle>{{ version }}</ion-card-subtitle>
</div>
<div style="flex-grow: 1"></div>
<div>
@@ -13,24 +13,33 @@
</ion-card-header>
<ion-card-content>
<ion-button @click="update">Update</ion-button>
<ion-button @click="update" v-if="showUpdater">Update</ion-button>
<br>
<ion-button @click="archive">View older versions</ion-button>
<ion-button @click="openArchive">View older versions</ion-button>
<br>
<ion-button @click="settings">Settings</ion-button>
</ion-card-content>
</ion-card>
</template>
<script setup lang="ts">
import useArchiveStore from "@/stores/archive";
import updater from "@/utils/updater";
import {IonButton, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle} from "@ionic/vue";
import { onBeforeMount, ref } from "vue";
const emit = defineEmits<{(e: 'update'): void, (e: 'archive'): void, (e: "disconnect"): void, (e: "settings"): void}>();
const archive = useArchiveStore();
const showUpdater = ref<boolean>(false);
const version = ref<string>("");
const update = () => {
archive.setShownI(0);
emit("update");
};
const archive = () => {
const openArchive = () => {
emit("archive");
};
@@ -42,6 +51,10 @@ const settings = () => {
emit("settings")
}
onBeforeMount(async () => {
version.value = await updater.obj.getBoardVersion();
showUpdater.value = await updater.obj.checkForUpdate();
});
</script>
<style scoped>

View File

@@ -1,13 +1,32 @@
/// <reference types="cordova-plugin-ble-central" />
<script setup lang="ts">
import {IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonButton, IonIcon, IonNote, IonLabel, IonItem, IonList
import useBluetoothStore from '@/stores/bluetooth';
import {
IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonButton, IonIcon, IonNote, IonLabel, IonItem, IonList
} from '@ionic/vue';
import { chevronForward } from 'ionicons/icons';
import { onBeforeMount, ref, watch } from 'vue';
const emit = defineEmits<{(e: "connect"):void}>();
const emit = defineEmits<{ (e: "connect"): void }>();
const bleStore = useBluetoothStore();
const connect = () => {
const devices = ref<BLECentralPlugin.PeripheralData[]>([]);
const connect = (device: BLECentralPlugin.PeripheralData) => {
bleStore.connect(device);
emit("connect");
}
const scan = () => {
bleStore.scan();
}
onBeforeMount(async () => {
bleStore.enableBLE();
});
watch(() => bleStore.devices, (newValue) => {devices.value = newValue}, {immediate: true});
</script>
<template>
@@ -20,29 +39,28 @@ const connect = () => {
</div>
<div style="flex-grow: 1"></div>
<div>
<ion-button>Scan</ion-button>
<ion-button @click="scan">Scan</ion-button>
</div>
</ion-card-header>
<ion-card-content class="item-scroll">
<ion-list lines="full" :inset="true">
<ion-item button v-for="i in 10" :key="i" @click="connect">
<ion-label>
<strong>Device {{i}}</strong> <br>
<ion-note>EA-EA-EA-EA-EA</ion-note>
</ion-label>
<div slot="end" class="metadata-end-wrapper">
<ion-note>{{(i*Math.random()).toFixed(2)}}dB</ion-note>
<ion-icon color="medium" :icon="chevronForward"></ion-icon>
</div>
</ion-item>
</ion-list>
<ion-list lines="full" :inset="true">
<ion-item button v-for="(device, index) in devices" :key="index" @click="connect(device)">
<ion-label>
<strong>Device: {{ device.name }}</strong> <br>
<ion-note>{{ device.id }}</ion-note>
</ion-label>
<div slot="end" class="metadata-end-wrapper">
<ion-note>{{ device.rssi }} dB</ion-note>
<ion-icon color="medium" :icon="chevronForward"></ion-icon>
</div>
</ion-item>
</ion-list>
</ion-card-content>
</ion-card>
</template>
<style scoped>
.two-column {
display: flex;
flex-direction: row;

View File

@@ -1,17 +1,17 @@
import { defineStore } from "pinia";
import Updater from "updaterweblibrary";
import type { versionNotes } from "@/utils/types";
import updater from "@/utils/updater";
const useArchiveStore = defineStore("archive", {
state: () => (
{updater: new Updater(), archive: <versionNotes[]>[], shownI: 0}
{ archive: <versionNotes[]>[], shownI: 0}
),
getters: {
getUrl(): string {
if (this.updater.archiveURL == "/")
if (updater.obj.archiveURL == "/")
return ""
else
return this.updater.archiveURL;
return updater.obj.archiveURL;
},
getArchive(): versionNotes[] {
console.log(this.archive)
@@ -23,8 +23,10 @@ const useArchiveStore = defineStore("archive", {
},
actions: {
async setUrl(value: string): Promise<void> {
this.updater = new Updater(value, "atom");
this.archive = await this.updater.getArchive()
// updater.obj = new Updater(value, "atom");
updater.obj.archiveURL = value;
updater.obj.feedType = "atom";
this.archive = await updater.obj.getArchive()
},
setShownI(value: number): void {
this.shownI = value;

66
src/stores/bluetooth.ts Normal file
View File

@@ -0,0 +1,66 @@
/// <reference types="cordova-plugin-ble-central" />
import { defineStore } from "pinia";
import updater from "@/utils/updater";
const useBluetoothStore = defineStore('bluetooth', {
state: () => (
{ devices: <BLECentralPlugin.PeripheralData[]>[], device: <BLECentralPlugin.PeripheralData | undefined>{}}
),
actions: {
async enableBLE(): Promise<boolean> {
return new Promise((resolve, reject) => {
ble.enable(
() => {
},
() => {
reject("Failed to enable");
}
);
ble.isEnabled(
() => {
resolve(true);
},
() => {
reject("Failed to enable");
});
})
},
scan(): void {
this.devices = [];
ble.scan([], 5, (device: BLECentralPlugin.PeripheralData) => {
console.log(device);
this.devices.push(device);
}, (e) => {
console.log(e)
})
},
async connect(device: BLECentralPlugin.PeripheralData): Promise<boolean> {
return new Promise( (resolve, reject) => {
ble.connect(device.id,
(data: BLECentralPlugin.PeripheralDataExtended) => {
console.log(`Connected: ${data}`);
updater.obj.setDeviceId(device.id);
this.device = device;
resolve(true);
},
(error: string | BLECentralPlugin.BLEError) => {
console.error(`Connection error: ${error}`);
reject(false);
}
);
});
},
async disconnect(): Promise<boolean> {
return new Promise((resolve, reject) => {
ble.disconnect(this.device?.id as string, () => {
this.device = undefined;
resolve(true);
}, (err: string | BLECentralPlugin.BLEError) => {
reject(err);
})
})
}
}
});
export default useBluetoothStore;

5
src/utils/updater.ts Normal file
View File

@@ -0,0 +1,5 @@
import Updater from "updaterweblibrary";
const updater = {obj: new Updater()}
export default updater;

View File

@@ -13,12 +13,12 @@
</ion-toolbar>
</ion-header>
<home-card v-if="shownCard == 1" @archive="showArchive" @disconnect="showScan" @update="showDetails" @settings="showSettings"></home-card>
<home-card v-if="shownCard == 1" @archive="showArchive" @disconnect="disconnect" @update="showDetails" @settings="showSettings"></home-card>
<scan-card v-else-if="shownCard == 0" @connect="goHome"></scan-card>
<details-card v-else-if="shownCard == 2" @back="goBack" @choose="showFlash"></details-card>
<archive-card v-else-if="shownCard == 3" @back="goBack" @details="showDetails"></archive-card>
<flash-card v-else-if="shownCard == 4" @back="goBack"></flash-card>
<settings-card v-else-if="shownCard == 5" @back="goBack"></settings-card>
<details-card v-else-if="shownCard == 2" @back="goBack" @choose="showFlash" @disconnect="disconnect"></details-card>
<archive-card v-else-if="shownCard == 3" @back="goBack" @details="showDetails" @disconnect="disconnect"></archive-card>
<flash-card v-else-if="shownCard == 4" @back="goBack" @home="goHome"></flash-card>
<settings-card v-else-if="shownCard == 5" @back="goBack" @disconnect="disconnect"></settings-card>
</ion-content>
</ion-page>
</template>
@@ -32,10 +32,13 @@ import ArchiveCard from "@/components/ArchiveCard.vue";
import FlashCard from "@/components/FlashCard.vue";
import {ref} from "vue";
import SettingsCard from "@/components/SettingsCard.vue";
import useBluetoothStore from '@/stores/bluetooth';
let prevCard = 0;
const shownCard = ref<number>(0);
const bleStore = useBluetoothStore();
const showArchive = () => {
prevCard = shownCard.value;
shownCard.value = 3;
@@ -70,6 +73,11 @@ const showSettings = () => {
prevCard = shownCard.value;
shownCard.value = 5;
}
async function disconnect() {
await bleStore.disconnect();
showScan();
}
</script>
<style scoped>