From 3fb314a1cbde2c0da5034e9918f880cd1f9a5ff4 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 13 Jun 2025 16:31:35 +0200 Subject: [PATCH] Handle invalid Cloudron registration case in appstore view --- dashboard/src/views/AppstoreView.vue | 47 ++++++++++++++++------------ 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/dashboard/src/views/AppstoreView.vue b/dashboard/src/views/AppstoreView.vue index 01e0b30e4..9b54a7919 100644 --- a/dashboard/src/views/AppstoreView.vue +++ b/dashboard/src/views/AppstoreView.vue @@ -71,6 +71,7 @@ const searchInput = useTemplateRef('searchInput'); const inputDialog = useTemplateRef('inputDialog'); const features = inject('features'); const installedApps = ref([]); +const appstoreTokenError = ref(false); const category = ref(''); const categories = [ @@ -113,7 +114,10 @@ function onInstall(app) { async function getAppList() { const [error, result] = await appstoreModel.list(); - if (error) return console.error(error); + if (error) { + if (error.status === 402) return appstoreTokenError.value = true; + return console.error(error); + } apps.value = result; } @@ -173,32 +177,35 @@ onMounted(async () => { -
- - -
-
- -
-

{{ $t('appstore.category.popular') }}

-
- +
+ Cloudron not registered. Reset registration here. +
+
+
+ +
-

{{ $t('appstore.category.all') }}

-
- +
+

{{ $t('appstore.category.popular') }}

+
+ +
+ +

{{ $t('appstore.category.all') }}

+
+ +
+
+
+
+ +
-
-
- -
-
-