Skip to content
Snippets Groups Projects
Verified Commit 6f97aad6 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Vuetify

parent 7af9324a
No related branches found
No related tags found
1 merge request!1Vuetify
<template>
<v-app>
<v-app-bar color="black" flat="true">
<template v-slot:prepend>
<v-app-bar-nav-icon></v-app-bar-nav-icon>
</template>
<div>
<button @click="$keycloak.logout()" v-if="$keycloak.authenticated">Logout</button>
<button @click="$keycloak.login()" v-else>Login</button>
</div>
<template v-slot:append>
<v-btn v-if="$keycloak.authenticated" variant="text" @click="$keycloak.logout()" append-icon="mdi-logout-variant" class="auth-button">
{{ $keycloak.tokenParsed.name }}
<template v-slot:append>
<v-icon color="success" title="Odhlásit se"></v-icon>
</template>
</v-btn>
<v-btn v-else variant="outlined" @click="$keycloak.login()" class="auth-button">Přihlásit se</v-btn>
</template>
<v-app-bar-title>Pirátská aplikace</v-app-bar-title>
</v-app-bar>
<v-main>
<v-container>
<slot />
</v-container>
</v-main>
</v-app>
</template>
<script>
......@@ -19,3 +39,10 @@ export default {
},
}
</script>
<style>
.auth-button {
text-transform: none;
font-weight: bold;
}
</style>
......@@ -4,6 +4,13 @@ export default defineNuxtConfig({
devtools: { enabled: false },
ssr: false,
// app: {
// head: {
// link: [
// { rel: 'stylesheet', href: 'https://styleguide.pirati.cz/2.9.1/css/styles.css' }
// ]
// }
// },
runtimeConfig: {
public: {
keycloakUrl: "https://auth.pirati.cz/auth",
......@@ -12,12 +19,14 @@ export default defineNuxtConfig({
},
},
// app: {
// head: {
// link: [
// { rel: 'stylesheet', href: 'https://styleguide.pirati.cz/2.9.1/css/styles.css' }
// ]
// }
// },
modules: ["vuetify-nuxt-module"],
vuetify: {
moduleOptions: {
/* module specific options */
},
vuetifyOptions: {
/* vuetify options */
}
}
})
This diff is collapsed.
......@@ -14,6 +14,7 @@
"nuxt": "^3.16.1",
"remeda": "^2.21.2",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
"vue-router": "^4.5.0",
"vuetify-nuxt-module": "^0.18.4"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment