-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: community templates placeholder
- Loading branch information
Showing
6 changed files
with
83 additions
and
25 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script setup lang="ts"> | ||
import { LayoutsEnum } from '@/layouts/model' | ||
definePage({ | ||
meta: { | ||
requiresAuth: true, | ||
layout: LayoutsEnum.empty, | ||
}, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<p> | ||
test | ||
</p> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<script setup lang="ts"> | ||
import { ImportTemplate } from '@/entities/template' | ||
import UiButton from '@/shared/ui/button/UiButton.vue' | ||
import UiDialog from '@/shared/ui/dialog/UiDialog.vue' | ||
import UiDialogContent from '@/shared/ui/dialog/UiDialogContent.vue' | ||
import UiDialogTrigger from '@/shared/ui/dialog/UiDialogTrigger.vue' | ||
import { AllTemplates } from '@/widgets/templates' | ||
import { useHead } from '@unhead/vue' | ||
import { ref, useTemplateRef } from 'vue' | ||
import { useRoute, useRouter } from 'vue-router' | ||
definePage({ | ||
meta: { | ||
requiresAuth: true, | ||
}, | ||
}) | ||
useHead({ | ||
title: 'Jenda | Templates', | ||
}) | ||
const sheet = useTemplateRef<InstanceType<typeof UiDialog> | null>('sheet') | ||
const route = useRoute() | ||
const router = useRouter() | ||
function toggleModalRoute() { | ||
if (sheet.value && !sheet.value.open && route.name === '/templates/community/') { | ||
router.back() | ||
} | ||
} | ||
const isModalOpen = ref<boolean>(false) | ||
</script> | ||
|
||
<template> | ||
<div class="flex items-center justify-between mb-5"> | ||
<p class="text-sm text-neutral-600 dark:text-neutral-300"> | ||
{{ $t('templates.description') }} | ||
</p> | ||
<div> | ||
<UiDialog ref="sheet" v-model:open="isModalOpen" @update:open="toggleModalRoute"> | ||
<UiDialogTrigger as-child> | ||
<UiButton variant="outline" @click="isModalOpen = true"> | ||
{{ $t('templates.community') }} | ||
</UiButton> | ||
</UiDialogTrigger> | ||
<UiDialogContent> | ||
<div> | ||
placeholder | ||
</div> | ||
</UiDialogContent> | ||
</UiDialog> | ||
<UiButton variant="solid" class="ml-2" @click="$router.push('/templates/new')"> | ||
{{ $t('templates.create') }} | ||
</UiButton> | ||
</div> | ||
</div> | ||
<ImportTemplate /> | ||
<AllTemplates /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters