fix: No token refresh or revocation mechanism~
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
<script setup>
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useRoleAccess } from '@/composables/roleAccess'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
|
||||
const route = useRoute()
|
||||
const authStore = useAuthStore()
|
||||
const { mainNavLinks, adminNavLinks, showAdminSection } = useRoleAccess()
|
||||
|
||||
function linkClasses(path) {
|
||||
@@ -219,5 +221,25 @@ function linkClasses(path) {
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="border-t border-gray-200 px-4 py-4 dark:border-gray-800">
|
||||
<div class="mb-2 px-4">
|
||||
<p class="truncate text-sm font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ authStore.displayName }}
|
||||
</p>
|
||||
<p class="truncate text-xs text-gray-500 dark:text-gray-400">
|
||||
{{ authStore.role }}
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="flex w-full items-center gap-4 rounded-lg px-4 py-2 text-sm font-medium text-gray-700 transition duration-200 hover:bg-red-50 hover:text-red-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-500 dark:text-gray-300 dark:hover:bg-red-950/50 dark:hover:text-red-400"
|
||||
@click="authStore.logout()"
|
||||
>
|
||||
<svg class="h-6 w-6 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" />
|
||||
</svg>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
</aside>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user