aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/views/DeveloperView.vue
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2022-10-19 15:40:22 +0200
committerGitHub <noreply@github.com>2022-10-19 15:40:22 +0200
commit6365220063527735fca0134f0649b97d82525990 (patch)
tree822d28793cdb757507e9d30a66f1cc56cc852f35 /src-vue/src/views/DeveloperView.vue
parent4e55dce30214a426c8621c565f525303b43fbf7f (diff)
downloadFlightCore-6365220063527735fca0134f0649b97d82525990.tar.gz
FlightCore-6365220063527735fca0134f0649b97d82525990.zip
refactor: Use `Result<>` return type for Linux checks (#21)
* refactor: Use result return type for Linux checks * refactor: Store min required ldd version in const This way we only need to update a single variable in case min required version changes.
Diffstat (limited to 'src-vue/src/views/DeveloperView.vue')
-rw-r--r--src-vue/src/views/DeveloperView.vue32
1 files changed, 17 insertions, 15 deletions
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue
index 80390432..e1f9eb7c 100644
--- a/src-vue/src/views/DeveloperView.vue
+++ b/src-vue/src/views/DeveloperView.vue
@@ -50,22 +50,24 @@ export default defineComponent({
});
},
async checkLinuxCompatibility() {
- let LinuxCompatible = await invoke("linux_checks");
- if (!LinuxCompatible) {
- ElNotification({
- title: 'Not linux compatible',
- message: 'GLIBC is not version 2.33 or greater',
- type: 'error',
- position: 'bottom-right'
- });
- } else {
- ElNotification({
- title: 'Linux compatible',
- message: 'No error reported',
- type: 'success',
- position: 'bottom-right'
+ await invoke("linux_checks")
+ .then(() => {
+ ElNotification({
+ title: 'Linux compatible',
+ message: 'All checks passed',
+ type: 'success',
+ position: 'bottom-right'
+ });
+ })
+ .catch((error) => {
+ ElNotification({
+ title: 'Not linux compatible',
+ message: error,
+ type: 'error',
+ position: 'bottom-right'
+ });
+ console.error(error);
});
- }
},
async toggleReleaseCandidate() {
// Flip between RELEASE and RELEASE_CANDIDATE