-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #57 from IV1201-Group-2/develop
Merge latest changes into main
Showing
30 changed files
with
651 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
|
||
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> | ||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> | ||
<level>INFO</level> | ||
</filter> | ||
<encoder> | ||
<pattern> | ||
%-30(%d %p) %-30.30([%t] %C): %msg%n%throwable | ||
</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<root level="DEBUG"> | ||
<appender-ref ref="Console" /> | ||
</root> | ||
|
||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,11 @@ | ||
<script setup lang="ts"> | ||
import { useI18n } from "vue-i18n"; | ||
import { RouterLink, RouterView } from "vue-router"; | ||
import { storeToRefs } from "pinia"; | ||
import { useAuthStore } from "./stores/auth"; | ||
const authStore = useAuthStore(); | ||
const { isAuthenticated } = storeToRefs(authStore); | ||
const i18n = useI18n(); | ||
function changeLocale(locale: string) { | ||
i18n.locale.value = locale; | ||
} | ||
import { RouterView } from "vue-router"; | ||
import Header from "./components/generic/PageHeader.vue"; | ||
import GenericError from "@/components/generic/GenericError.vue"; | ||
</script> | ||
|
||
<template> | ||
<header> | ||
<nav> | ||
<RouterLink v-if="isAuthenticated" @click="authStore.logout()" to="">{{ $t("navigation.logout") }}</RouterLink> | ||
<RouterLink v-if="!isAuthenticated" to="/">{{ $t("navigation.login") }}</RouterLink> | ||
<RouterLink v-if="!isAuthenticated" to="/register">{{ $t("navigation.register") }}</RouterLink> | ||
</nav> | ||
<v-btn> | ||
<v-icon icon="mdi-translate" /> | ||
<v-menu activator="parent"> | ||
<v-list> | ||
<v-list-item | ||
v-for="language in i18n.availableLocales" | ||
:key="language" | ||
:value="language" | ||
@click="() => changeLocale(language)" | ||
> | ||
<v-list-item-title> | ||
{{ $t("languages." + language) }} | ||
</v-list-item-title> | ||
</v-list-item> | ||
</v-list> | ||
</v-menu> | ||
</v-btn> | ||
</header> | ||
|
||
<Header /> | ||
<RouterView /> | ||
<GenericError /> | ||
</template> | ||
|
||
<style scoped> | ||
header { | ||
line-height: 1.5; | ||
max-height: 100vh; | ||
width: 100%; | ||
} | ||
nav a.router-link-exact-active { | ||
color: var(--color-text); | ||
} | ||
nav a.router-link-exact-active:hover { | ||
background-color: transparent; | ||
} | ||
nav a { | ||
display: inline-block; | ||
padding: 0 1rem; | ||
border-left: 1px solid var(--color-border); | ||
} | ||
nav a:first-of-type { | ||
border: 0; | ||
} | ||
@media (min-width: 1024px) { | ||
header { | ||
display: flex; | ||
flex-direction: row; | ||
place-items: center; | ||
justify-content: space-between; | ||
} | ||
.logo { | ||
margin: 0 2rem 0 0; | ||
} | ||
nav { | ||
text-align: left; | ||
font-size: 1rem; | ||
} | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<script setup lang="ts"> | ||
import { storeToRefs } from "pinia"; | ||
import { useErrorStore } from "@/stores/error"; | ||
import { useAuthStore } from "@/stores/auth"; | ||
import { useI18n } from "vue-i18n"; | ||
import router from "@/router"; | ||
import { computed } from "vue"; | ||
const errorStore = useErrorStore(); | ||
const authStore = useAuthStore(); | ||
const { t } = useI18n(); | ||
const { genericErrorMsgIsVisible, specificMsg } = storeToRefs(errorStore); | ||
const { logout } = authStore; | ||
const { hideGenericErrorMsg } = errorStore; | ||
const basePath = "generic-error."; | ||
const msg = computed(() => t(basePath + (specificMsg.value ? specificMsg.value : "generic-msg"))); | ||
function resetPage() { | ||
logout(); | ||
router.push("/"); | ||
hideGenericErrorMsg(); | ||
} | ||
</script> | ||
|
||
<template> | ||
<v-dialog persistent v-model="genericErrorMsgIsVisible" width="auto"> | ||
<v-card> | ||
<v-card-title> | ||
{{ $t(basePath + "header") }} | ||
</v-card-title> | ||
<v-card-text> | ||
<div v-html="msg" /> | ||
</v-card-text> | ||
<v-card-actions> | ||
<v-spacer></v-spacer> | ||
<v-btn @click="resetPage">{{ $t(basePath + "take-me-back") }}</v-btn> | ||
</v-card-actions> | ||
</v-card> | ||
</v-dialog> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<script setup lang="ts"> | ||
import { RouterLink } from "vue-router"; | ||
import { useI18n } from "vue-i18n"; | ||
import { storeToRefs } from "pinia"; | ||
import { useAuthStore } from "@/stores/auth"; | ||
const authStore = useAuthStore(); | ||
const { isAuthenticated } = storeToRefs(authStore); | ||
const i18n = useI18n(); | ||
function changeLocale(locale: string) { | ||
i18n.locale.value = locale; | ||
} | ||
</script> | ||
|
||
<template> | ||
<header> | ||
<nav> | ||
<RouterLink v-if="isAuthenticated" @click="authStore.logout()" to="">{{ $t("navigation.logout") }}</RouterLink> | ||
<RouterLink v-if="!isAuthenticated" to="/">{{ $t("navigation.login") }}</RouterLink> | ||
<RouterLink v-if="!isAuthenticated" to="/register">{{ $t("navigation.register") }}</RouterLink> | ||
</nav> | ||
<v-btn> | ||
<v-icon icon="mdi-translate" /> | ||
<v-menu activator="parent"> | ||
<v-list> | ||
<v-list-item | ||
v-for="language in i18n.availableLocales" | ||
:key="language" | ||
:value="language" | ||
@click="() => changeLocale(language)" | ||
> | ||
<v-list-item-title> | ||
{{ $t("languages." + language) }} | ||
</v-list-item-title> | ||
</v-list-item> | ||
</v-list> | ||
</v-menu> | ||
</v-btn> | ||
</header> | ||
</template> | ||
|
||
<style scoped> | ||
header { | ||
line-height: 1.5; | ||
max-height: 100vh; | ||
width: 100%; | ||
} | ||
nav a.router-link-exact-active { | ||
color: var(--color-text); | ||
} | ||
nav a.router-link-exact-active:hover { | ||
background-color: transparent; | ||
} | ||
nav a { | ||
display: inline-block; | ||
padding: 0 1rem; | ||
border-left: 1px solid var(--color-border); | ||
} | ||
nav a:first-of-type { | ||
border: 0; | ||
} | ||
@media (min-width: 1024px) { | ||
header { | ||
display: flex; | ||
flex-direction: row; | ||
place-items: center; | ||
justify-content: space-between; | ||
} | ||
.logo { | ||
margin: 0 2rem 0 0; | ||
} | ||
nav { | ||
text-align: left; | ||
font-size: 1rem; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.