refactor: renamed primary-font to font-primary

This commit is contained in:
Settel 2022-07-30 11:49:50 +02:00
parent 9678a2bdeb
commit 72901cacbd
7 changed files with 20 additions and 7 deletions

View File

@ -1,4 +1,4 @@
@import './colors.scss'; @import './colors.scss';
$primary-font: 'Wendy One'; $font-primary: 'Wendy One';
$secondary-font: 'Dosis'; $font-secondary: 'Dosis';

View File

@ -31,7 +31,7 @@ defineProps({
background-color: inherit; background-color: inherit;
color: $text-secondary-color; color: $text-secondary-color;
text-align: center; text-align: center;
font-family: $secondary-font; font-family: $font-secondary;
font-weight: bold; font-weight: bold;
font-size: 24px; font-size: 24px;
border: none; border: none;

View File

@ -52,7 +52,7 @@ const login = (): void => {
border: none; border: none;
border-bottom: $box-primary-border; border-bottom: $box-primary-border;
color: $text-primary-color; color: $text-primary-color;
font-family: $secondary-font; font-family: font-secondary;
font-weight: 800; font-weight: 800;
font-size: 24px; font-size: 24px;
outline: none; outline: none;

View File

@ -56,7 +56,7 @@
&__title { &__title {
font-size: 64px; font-size: 64px;
font-family: $primary-font; font-family: $font-primary;
color: $box-primary-text-color; color: $box-primary-text-color;
text-align: center; text-align: center;
} }

View File

@ -5,7 +5,7 @@
</div> </div>
<div class="topbar__separator" /> <div class="topbar__separator" />
<div class="topbar__actionbar"> <div class="topbar__actionbar">
Topbar {{ userInfo.role }}
</div> </div>
<div class="topbar__separator" /> <div class="topbar__separator" />
<div class="topbar__logout-button-container"> <div class="topbar__logout-button-container">
@ -38,6 +38,9 @@ const actionLogout = async () => {
height: 64px; height: 64px;
align-items: center; align-items: center;
background-color: $topbar-background-color; background-color: $topbar-background-color;
font-size: 16px;
font-family: $font-primary;
font-weight: bold;
} }
&__username, &__username,
@ -47,6 +50,7 @@ const actionLogout = async () => {
text-align: center; text-align: center;
color: $text-primary-color; color: $text-primary-color;
} }
&__actionbar { &__actionbar {
flex-grow: 1; flex-grow: 1;
} }
@ -61,6 +65,7 @@ const actionLogout = async () => {
&__logout-button { &__logout-button {
color: $text-primary-color; color: $text-primary-color;
font-size: 16px; font-size: 16px;
font-family: $font-primary;
&:hover { &:hover {
color: $text-primary-hover-color; color: $text-primary-hover-color;

View File

@ -21,7 +21,7 @@ body,
body { body {
background-color: $background-primary-color; background-color: $background-primary-color;
font-family: $primary-font; font-family: $font-primary;
} }
a { a {

View File

@ -6,6 +6,14 @@ export const useUserinfoStore = defineStore('UserinfoStore', {
userInfo: null, userInfo: null,
} }
}, },
getters: {
isAdmin(): boolean {
return this.userInfo && this.userInfo.role === 'admin'
},
isGamemaster(): boolean {
return this.userInfo && ( this.userInfo.role === 'gamemaster' || this.userInfo.role === 'admin' )
},
},
actions: { actions: {
setUserInfo(userInfo: unknown): void { setUserInfo(userInfo: unknown): void {
this.userInfo = userInfo this.userInfo = userInfo