-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fa0550
commit 7f2ccd8
Showing
35 changed files
with
323 additions
and
234 deletions.
There are no files selected for viewing
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,37 @@ | ||
<script setup lang="ts"> | ||
import { Button } from '@/components/ui/button' | ||
import Sidebar from '@/components/Sidebar.vue' | ||
defineProps({ user: Object }) | ||
import MainView from '@/components/MainView.vue' | ||
import { Link } from '@inertiajs/vue3' | ||
import type { User } from '@/types/UserType' | ||
import type { Project } from '@/types/ProjectType' | ||
import { ref, inject } from 'vue' | ||
import { Input } from '@/components/ui/input' | ||
import { useDebounceFn } from '@vueuse/core' | ||
const props = defineProps<{ user: User, projects: Project[] }>() | ||
const projects = ref(props.projects) | ||
const search = ref('') | ||
const debouncedSearch = useDebounceFn(searchProjects, 100) | ||
const route = inject('route') | ||
console.log(route('projects')) | ||
function searchProjects() { | ||
projects.value = props.projects.filter(project => project.name.toLowerCase().includes(search.value.toLowerCase())) | ||
} | ||
</script> | ||
|
||
<template> | ||
<Sidebar /> | ||
<p>Hello {{ user }}, welcome to your first Inertia app!</p> | ||
<Button>Click me</Button> | ||
<MainView> | ||
<template #title> | ||
Dashboard | ||
</template> | ||
<template #subtitle>Your self-hosted infrastructure.</template> | ||
<Input size="xs" v-model="search" placeholder="Search" @update:model-value="debouncedSearch" /> | ||
<div v-for="project in projects" :key="project.uuid"> | ||
<Link :href="route('projects')" class="flex flex-col bg-coolgray-100 rounded-lg p-4 border dark:border-black hover:bg-coolgray-200 transition-all duration-300 cursor-pointer"> | ||
<h3 class="text-lg font-bold">{{ project.name }}</h3> | ||
<p class="text-sm text-muted-foreground">{{ project.description }}</p> | ||
</Link> | ||
</div> | ||
</MainView> | ||
</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,13 @@ | ||
<script setup lang="ts"> | ||
import MainView from '@/components/MainView.vue' | ||
defineProps({ user: Object }) | ||
</script> | ||
|
||
<template> | ||
<MainView> | ||
<template #title> | ||
Projects | ||
</template> | ||
<template #subtitle>Manage your projects.</template> | ||
</MainView> | ||
</template> |
Oops, something went wrong.