Skip to content

Commit

Permalink
fixup! feat(security): add subscription info fetching and error handl…
Browse files Browse the repository at this point in the history
…ing in FlashStartView
  • Loading branch information
stephdl committed Dec 2, 2024
1 parent 75e8f16 commit c58713a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/views/standalone/security/FlashStartView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
NeButton,
NeSkeleton
} from '@nethesis/vue-components'
import { getProductName } from '@/lib/config'
import { ubusCall } from '@/lib/standalone/ubus'
import FlashstartContent from '@/components/standalone/security/FlashstartContent.vue'
import { ref, onMounted } from 'vue'
Expand Down Expand Up @@ -58,15 +59,19 @@ onMounted(() => {
class="mb-6"
kind="error"
/>
<NeSkeleton v-if="loading.getSubscriptionInfo" :lines="7" />
<NeSkeleton v-if="loading.getSubscriptionInfo" :lines="7" size="lg" />
<template v-else>
<div v-if="activeSubscription">
<FlashstartContent />
</div>
<div v-else>
<NeEmptyState
:title="t('standalone.flashstart.flashstart_disabled')"
:description="t('standalone.flashstart.flashstart_disabled_description')"
:description="
t('standalone.flashstart.flashstart_disabled_description', {
product: getProductName()
})
"
:icon="['fas', 'shield']"
class="pb-8"
><NeButton
Expand All @@ -82,7 +87,7 @@ onMounted(() => {
class="h-4 w-4"
aria-hidden="true"
/> </template
>{{ t('standalone.flashstart.go_to_subscription') }}</NeButton
>{{ t('common.go_to_page', { page: t('standalone.subscription.title') })}}</NeButton
></NeEmptyState
>
</div>
Expand Down

0 comments on commit c58713a

Please sign in to comment.