feat(sh-admin): introducing data analytics and newsletter configurations (#3845)
Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com> Co-authored-by: nivedin <nivedinp@gmail.com>
This commit is contained in:
committed by
GitHub
parent
4798d7bbbd
commit
919579b1da
40
packages/hoppscotch-sh-admin/src/pages/setup.vue
Normal file
40
packages/hoppscotch-sh-admin/src/pages/setup.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<SetupDataSharingAndNewsletter
|
||||
@setup-complete="(status: boolean) => (isDataSharingAndNewsletterSetup = status)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from '~/composables/i18n';
|
||||
import { useToast } from '~/composables/toast';
|
||||
import { auth } from '~/helpers/auth';
|
||||
|
||||
const t = useI18n();
|
||||
const toast = useToast();
|
||||
const router = useRouter();
|
||||
|
||||
const isDataSharingAndNewsletterSetup = ref(false);
|
||||
|
||||
// Watcher is added for future proofing as we can have multiple setup steps in future
|
||||
watch(
|
||||
() => isDataSharingAndNewsletterSetup.value,
|
||||
async (status) => {
|
||||
if (status) {
|
||||
const result = await auth.updateFirstTimeInfraSetupStatus();
|
||||
if (result) {
|
||||
toast.success(t('state.setup_success'));
|
||||
router.push('/dashboard');
|
||||
} else {
|
||||
toast.error(t('state.setup_failure'));
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<route lang="yaml">
|
||||
meta:
|
||||
layout: empty
|
||||
</route>
|
||||
@@ -4,7 +4,9 @@
|
||||
<HoppSmartSpinner />
|
||||
</div>
|
||||
|
||||
<div v-else-if="error">{{ t('teams.load_info_error') }}</div>
|
||||
<div v-else-if="error" class="text-lg">
|
||||
{{ t('teams.load_info_error') }}
|
||||
</div>
|
||||
|
||||
<div v-else-if="team" class="flex flex-col">
|
||||
<div class="flex items-center space-x-4">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="fetching" class="flex justify-center"><HoppSmartSpinner /></div>
|
||||
<div v-else-if="error">{{ t('users.load_info_error') }}</div>
|
||||
<div v-else-if="error" class="text-lg">{{ t('users.load_info_error') }}</div>
|
||||
<div v-else-if="user" class="flex flex-col space-y-4">
|
||||
<div class="flex gap-x-3">
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user