mirror of
https://github.com/Nezumi-2711/Sink.git
synced 2026-09-22 13:48:35 +00:00
feat: init
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<script setup>
|
||||
provide('id', ref())
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="space-y-6">
|
||||
<DashboardBreadcrumb title="Analysis" />
|
||||
<Dashboard />
|
||||
</main>
|
||||
</template>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,6 @@
|
||||
<template>
|
||||
<main class="space-y-6">
|
||||
<DashboardBreadcrumb title="Links" />
|
||||
<DashboardLinks />
|
||||
</main>
|
||||
</template>
|
||||
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<main class="flex items-center justify-center h-full">
|
||||
<Login />
|
||||
</main>
|
||||
</template>
|
||||
Reference in New Issue
Block a user