Compare commits
No commits in common. "dd936a1d0a1e36b262e0f38f8b9a1622caeb8c89" and "6c267b232c36b5324a03a1f368a9349810183f09" have entirely different histories.
dd936a1d0a
...
6c267b232c
6 changed files with 36 additions and 58 deletions
|
@ -1,5 +1,4 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import TableComponent from './TableComponent.vue';
|
|
||||||
const { tableHeader, tableRows } = defineProps<{ tableHeader: string[], tableRows: any[][] }>()
|
const { tableHeader, tableRows } = defineProps<{ tableHeader: string[], tableRows: any[][] }>()
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
@ -7,8 +6,31 @@ const { tableHeader, tableRows } = defineProps<{ tableHeader: string[], tableRow
|
||||||
<h1 class="text-xl normal-case">Allowed Servers</h1>
|
<h1 class="text-xl normal-case">Allowed Servers</h1>
|
||||||
<button class="btn btn-circle btn-success">Add</button>
|
<button class="btn btn-circle btn-success">Add</button>
|
||||||
</div>
|
</div>
|
||||||
<TableComponent :tableHeader="tableHeader" :tableRows="tableRows">
|
<div class="overflow-x-auto">
|
||||||
|
<table class="table w-full">
|
||||||
|
<!-- head -->
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<template v-for="header in tableHeader">
|
||||||
|
<th>{{ header }}</th>
|
||||||
|
</template>
|
||||||
|
<th>Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<!-- row -->
|
||||||
|
<tr>
|
||||||
|
<template v-for="rows in tableRows">
|
||||||
|
<template v-for="data in rows">
|
||||||
|
<th>{{ data }}</th>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<th>
|
||||||
<button class="btn btn-sm btn-info m-1">Edit</button>
|
<button class="btn btn-sm btn-info m-1">Edit</button>
|
||||||
<button class="btn btn-sm btn-error m-1">Delete</button>
|
<button class="btn btn-sm btn-error m-1">Delete</button>
|
||||||
</TableComponent>
|
</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<header>
|
<header>
|
||||||
<div class="navbar bg-base-100">
|
<div class="navbar bg-base-100">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<a class="btn btn-ghost normal-case text-xl"><RouterLink to="/">dchat</RouterLink></a>
|
<a class="btn btn-ghost normal-case text-xl">daisyUI</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-none">
|
<div class="flex-none">
|
||||||
<ul class="menu menu-horizontal px-1">
|
<ul class="menu menu-horizontal px-1">
|
||||||
|
@ -11,6 +11,11 @@
|
||||||
<RouterLink to="/login">Login</RouterLink>
|
<RouterLink to="/login">Login</RouterLink>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a>
|
||||||
|
<RouterLink to="/">Home</RouterLink>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
<script lang="ts" setup>
|
|
||||||
const { tableHeader, tableRows } = defineProps<{ tableHeader: string[], tableRows: any[][] }>()
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<div class="overflow-x-auto">
|
|
||||||
<table class="table w-full">
|
|
||||||
<!-- head -->
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<template v-for="header in tableHeader">
|
|
||||||
<th>{{ header }}</th>
|
|
||||||
</template>
|
|
||||||
<th>Action</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<!-- row -->
|
|
||||||
<tr>
|
|
||||||
<template v-for="rows in tableRows">
|
|
||||||
<template v-for="data in rows">
|
|
||||||
<th>{{ data }}</th>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<th>
|
|
||||||
<slot />
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<template>
|
|
||||||
<Nav />
|
|
||||||
<slot />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import Nav from "../components/Nav.vue"
|
|
||||||
|
|
||||||
</script>
|
|
|
@ -1,11 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<DefaultLayout>
|
<Nav />
|
||||||
<AllowedServers :tableHeader="tableHeader" :tableRows="tableRows" />
|
<AllowedServers :tableHeader="tableHeader" :tableRows="tableRows" />
|
||||||
</DefaultLayout>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import DefaultLayout from "../layouts/DefaultLayout.vue"
|
import Nav from "../components/Nav.vue"
|
||||||
import AllowedServers from "../components/AllowedServers.vue"
|
import AllowedServers from "../components/AllowedServers.vue"
|
||||||
|
|
||||||
const tableHeader = ["ID", "User", "Comment", "Date"]
|
const tableHeader = ["ID", "User", "Comment", "Date"]
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import DefaultLayout from "../../layouts/DefaultLayout.vue"
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<DefaultLayout>
|
|
||||||
|
|
||||||
</DefaultLayout>
|
|
||||||
</template>
|
|
Loading…
Reference in a new issue