Skip to content

🔥 🔥 🔥 A Free & Self-hostable Airtable Alternative

fix(nc-gui): add subtitle support in page not page component

Ramesh Mane4471cd4698b3
diff --git a/packages/nc-gui/components/general/PageDoesNotExist.vue b/packages/nc-gui/components/general/PageDoesNotExist.vue
index 8f782fdba9..7394135625 100644
--- a/packages/nc-gui/components/general/PageDoesNotExist.vue
+++ b/packages/nc-gui/components/general/PageDoesNotExist.vue
@@ -1,6 +1,10 @@
+<script setup lang="ts">
+defineProps<{ title?: string; subtitle?: string; containerClass?: string; actionButtonClass?: string }>()
+</script>
+
<template>
<div class="nc-h-screen grid place-items-center text-center">
- <div class="flex flex-col items-center gap-6">
+ <div class="flex flex-col items-center gap-6" :class="containerClass">
<slot name="icon">
<img width="48" alt="NocoDB" src="~/assets/img/icons/256x256.png" />
</slot>
@@ -10,8 +14,13 @@
{{ $t('title.thisPageDoesNotExist') }}
</slot>
</div>
+ <div class="text-xl text-nc-content-gray-subtle">
+ <slot name="subtitle"> {{ $t('title.thisPageDoesNotExistSubtile') }} </slot>
+ </div>
- <NcButton @click="navigateTo('/')">Go back home</NcButton>
+ <slot name="actions">
+ <NcButton @click="navigateTo('/')" :class="actionButtonClass">{{ $t('activity.goBackHome') }}</NcButton>
+ </slot>
</div>
</div>
</template>
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json
index a4347b7fee..4221ffec75 100644
--- a/packages/nc-gui/lang/en.json
+++ b/packages/nc-gui/lang/en.json
@@ -858,6 +858,7 @@
"yourBaseRole": "Your base role",
"lockedByUser": "Locked by {user}",
"thisPageDoesNotExist": "This page doesn’t exist",
+ "thisPageDoesNotExistSubtile": "It looks like the link you followed is invalid or the page has been removed.",
"customUrl": "Custom URL",
"viewSettingsCantBeChangedWhenViewIs": "View settings can't be changed when the view is {type}",
"youAreLeavingNocoDB": "You’re leaving NocoDB",
@@ -1756,7 +1757,8 @@
"viewFieldPermissions": "View field permissions",
"resetPermissions": "Reset permissions",
"confirmReset": "Confirm reset",
- "navigateToBilling": "Navigate to billing"
+ "navigateToBilling": "Navigate to billing",
+ "goBackHome": "Go back home"
},
"tooltip": {
"includeUserHint": "The user who triggered the webhook will be included in the payload as a 'user' object.",