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> <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> <template v-slot:append>
<button @click="$keycloak.logout()" v-if="$keycloak.authenticated">Logout</button> <v-btn v-if="$keycloak.authenticated" variant="text" @click="$keycloak.logout()" append-icon="mdi-logout-variant" class="auth-button">
<button @click="$keycloak.login()" v-else>Login</button> {{ $keycloak.tokenParsed.name }}
</div> <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 /> <slot />
</v-container>
</v-main>
</v-app>
</template> </template>
<script> <script>
...@@ -19,3 +39,10 @@ export default { ...@@ -19,3 +39,10 @@ export default {
}, },
} }
</script> </script>
<style>
.auth-button {
text-transform: none;
font-weight: bold;
}
</style>
...@@ -4,6 +4,13 @@ export default defineNuxtConfig({ ...@@ -4,6 +4,13 @@ export default defineNuxtConfig({
devtools: { enabled: false }, devtools: { enabled: false },
ssr: false, ssr: false,
// app: {
// head: {
// link: [
// { rel: 'stylesheet', href: 'https://styleguide.pirati.cz/2.9.1/css/styles.css' }
// ]
// }
// },
runtimeConfig: { runtimeConfig: {
public: { public: {
keycloakUrl: "https://auth.pirati.cz/auth", keycloakUrl: "https://auth.pirati.cz/auth",
...@@ -12,12 +19,14 @@ export default defineNuxtConfig({ ...@@ -12,12 +19,14 @@ export default defineNuxtConfig({
}, },
}, },
// app: { modules: ["vuetify-nuxt-module"],
// head: {
// link: [
// { rel: 'stylesheet', href: 'https://styleguide.pirati.cz/2.9.1/css/styles.css' }
// ]
// }
// },
vuetify: {
moduleOptions: {
/* module specific options */
},
vuetifyOptions: {
/* vuetify options */
}
}
}) })
This diff is collapsed.
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
"nuxt": "^3.16.1", "nuxt": "^3.16.1",
"remeda": "^2.21.2", "remeda": "^2.21.2",
"vue": "^3.5.13", "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