feat: init

This commit is contained in:
ccbikai
2024-05-25 08:09:30 +08:00
commit bd47e755d5
298 changed files with 21915 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
<script setup>
provide('id', ref())
</script>
<template>
<main class="space-y-6">
<DashboardBreadcrumb title="Analysis" />
<Dashboard />
</main>
</template>
+44
View File
@@ -0,0 +1,44 @@
<script setup>
const slug = useRoute().query.slug
const link = ref({})
const id = computed(() => link.value.id)
provide('id', id)
async function getLink() {
const data = await useAPI('/api/link/query', {
query: {
slug,
},
})
// data.id = 'y1c4fhirl5'
link.value = data
}
function updateLink(link, type) {
if (type === 'delete')
navigateTo('/dashboard/links', {
replace: true,
})
}
onMounted(() => {
getLink()
})
</script>
<template>
<main class="space-y-6">
<DashboardBreadcrumb title="Link" />
<DashboardLinksLink
v-if="link.id"
:link="link"
@update:link="updateLink"
/>
<Dashboard
v-if="link.id"
:link="link"
/>
</main>
</template>
+6
View File
@@ -0,0 +1,6 @@
<template>
<main class="space-y-6">
<DashboardBreadcrumb title="Links" />
<DashboardLinks />
</main>
</template>
+5
View File
@@ -0,0 +1,5 @@
<template>
<main class="flex items-center justify-center h-full">
<Login />
</main>
</template>
+9
View File
@@ -0,0 +1,9 @@
<template>
<main class="flex flex-col justify-center">
<HomeTwitter />
<HomeHero />
<HomeFeatures />
<HomeLogos />
<HomeCta />
</main>
</template>