mirror of
https://gh.wpcy.net/https://github.com/fairpm/aspirecloud.git
synced 2026-06-20 02:22:28 +08:00
* feat: Changes required on existing files to setup Jetstream * feat: add the Inertia Home and Dashboard * feat: Add all required files and migrations to setup Jetstream * feat: Add the Sanctum middleware to the API endpoints - Added Sanctum to the API endpoints to requiere an API Key - Added a setting to control if the app should use authenticated API or not (see .env.example) - Fix redirection on API routes to the login page when a request was unauthenticated * feat: Users Management and Authication API Keys - Refactor existing tests to make authenticated request is enable - Hide the permissions setting on the UI, for now we only have a read-only API - Add tests to test authenticated and unauthenticated calls
24 lines
1 KiB
Vue
24 lines
1 KiB
Vue
<script setup>
|
|
import { Link } from '@inertiajs/vue3';
|
|
|
|
defineProps({
|
|
href: String,
|
|
as: String,
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<button v-if="as == 'button'" type="submit" class="block w-full px-4 py-2 text-start text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-800 transition duration-150 ease-in-out">
|
|
<slot />
|
|
</button>
|
|
|
|
<a v-else-if="as =='a'" :href="href" class="block px-4 py-2 text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-800 transition duration-150 ease-in-out">
|
|
<slot />
|
|
</a>
|
|
|
|
<Link v-else :href="href" class="block px-4 py-2 text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-800 transition duration-150 ease-in-out">
|
|
<slot />
|
|
</Link>
|
|
</div>
|
|
</template>
|