+
+
+
- {{ $t('global.pageNotFound') }}
+ {{ $t("global.pageNotFound") }}
- {{ $t('global.goHome') }}
+ {{
+ $t("global.goHome")
+ }}
diff --git a/src/components/account/AccountMenu.vue b/src/components/account/AccountMenu.vue
index eb4430f..c730c81 100644
--- a/src/components/account/AccountMenu.vue
+++ b/src/components/account/AccountMenu.vue
@@ -5,22 +5,30 @@
*
* Lists the different sub menus the user can access
*/
-import { UserCircleIcon, Cog8ToothIcon } from '@heroicons/vue/24/outline'
+import { UserCircleIcon, Cog8ToothIcon } from "@heroicons/vue/24/outline";
-import AccountMenuButton from '@/components/account/AccountMenuButton.vue'
-import { useRoute } from 'vue-router'
-import { useI18n } from 'vue-i18n'
-import { ref } from 'vue'
+import AccountMenuButton from "@/components/account/AccountMenuButton.vue";
+import { useRoute } from "vue-router";
+import { useI18n } from "vue-i18n";
+import { ref } from "vue";
-const { t } = useI18n()
-const route = useRoute()
+const { t } = useI18n();
+const route = useRoute();
const menuRoutes = ref([
- { title: t('menu.profile'), icon: UserCircleIcon, routeName: 'accountProfile' },
- { title: t('menu.account'), icon: Cog8ToothIcon, routeName: 'accountSettings' },
-])
+ {
+ title: t("menu.profile"),
+ icon: UserCircleIcon,
+ routeName: "accountProfile",
+ },
+ {
+ title: t("menu.account"),
+ icon: Cog8ToothIcon,
+ routeName: "accountSettings",
+ },
+]);
function accountRouteSelected(routeName: string) {
- return route.name === routeName
+ return route.name === routeName;
}
diff --git a/src/components/account/AccountMenuButton.vue b/src/components/account/AccountMenuButton.vue
index 6b6a35f..f5ba427 100644
--- a/src/components/account/AccountMenuButton.vue
+++ b/src/components/account/AccountMenuButton.vue
@@ -2,34 +2,35 @@
/**
* Link to a sub menu, used in the AccountMenu component
*/
-import { computed, toRefs } from 'vue'
-import type { FunctionalComponent, HTMLAttributes, VNodeProps } from 'vue'
+import { computed, toRefs } from "vue";
+import type { FunctionalComponent, HTMLAttributes, VNodeProps } from "vue";
const props = withDefaults(
defineProps<{
- title: string
- icon: FunctionalComponent
- routeName: string
- selected?: boolean
+ title: string;
+ icon: FunctionalComponent;
+ routeName: string;
+ selected?: boolean;
}>(),
- { selected: false },
-)
+ { selected: false }
+);
-const { title, icon, selected, routeName } = toRefs(props)
+const { title, icon, selected, routeName } = toRefs(props);
const selectedLinkClass =
- 'bg-primary/5 border-primary-focus text-primary hover:bg-primary/10 hover:text-primary-focus'
-const normalLinkClass = 'text-base-content/50 hover:bg-base-200 hover:text-base-content/70'
-const selectedIconClass = 'group-hover:text-primary-focus'
-const normalIconClass = 'text-base-content/50 group-hover:text-base-content/70'
+ "bg-primary/5 border-primary-focus text-primary hover:bg-primary/10 hover:text-primary-focus";
+const normalLinkClass =
+ "text-base-content/50 hover:bg-base-200 hover:text-base-content/70";
+const selectedIconClass = "group-hover:text-primary-focus";
+const normalIconClass = "text-base-content/50 group-hover:text-base-content/70";
const linkClass = computed(() => {
- return selected.value ? selectedLinkClass : normalLinkClass
-})
+ return selected.value ? selectedLinkClass : normalLinkClass;
+});
const iconClass = computed(() => {
- return selected.value ? selectedIconClass : normalIconClass
-})
+ return selected.value ? selectedIconClass : normalIconClass;
+});
-import '@vuepic/vue-datepicker/dist/main.css'
+import "@vuepic/vue-datepicker/dist/main.css";
-import { ref } from 'vue'
-import { userSessionStore } from '@/store/userSession'
-import { UserApi } from '@transmitsecurity-dev/ts-demo-client-lib'
+import { ref } from "vue";
+import { userSessionStore } from "@/store/userSession";
+import { UserApi } from "@transmitsecurity-dev/ts-demo-client-lib";
-import { storeToRefs } from 'pinia'
-import ConfirmationDialog from './ConfirmationDialog.vue'
-import router from '@/router'
-import { clearSession } from '@/helpers/session'
-import { handleError } from '@/helpers/errors'
+import { storeToRefs } from "pinia";
+import ConfirmationDialog from "./ConfirmationDialog.vue";
+import router from "@/router";
+import { clearSession } from "@/helpers/session";
+import { handleError } from "@/helpers/errors";
-const userApi = new UserApi(undefined, import.meta.env.VITE_BACKEND_URL)
+const userApi = new UserApi(undefined, import.meta.env.VITE_BACKEND_URL);
-const sessionStore = userSessionStore()
-const sessionStoreRefs = storeToRefs(sessionStore)
+const sessionStore = userSessionStore();
+const sessionStoreRefs = storeToRefs(sessionStore);
// Personal information
-const { creationDate, firstName } = sessionStoreRefs
-const showConfirmationDialog = ref(false)
-const loading = ref(false)
+const { creationDate, firstName } = sessionStoreRefs;
+const showConfirmationDialog = ref(false);
+const loading = ref(false);
async function deleteAccount() {
try {
- console.log('Deleting account')
- loading.value = true
- const result = await userApi.remove()
- loading.value = false
- console.log(result)
- showConfirmationDialog.value = false
+ console.log("Deleting account");
+ loading.value = true;
+ const result = await userApi.remove();
+ loading.value = false;
+ console.log(result);
+ showConfirmationDialog.value = false;
if (result.status == 204) {
- clearSession()
- const event = new CustomEvent('userLoggedOut')
- document.dispatchEvent(event)
- router.push({ name: 'home' })
+ clearSession();
+ const event = new CustomEvent("userLoggedOut");
+ document.dispatchEvent(event);
+ router.push({ name: "home" });
}
} catch (error) {
- handleError(error)
+ handleError(error);
} finally {
- loading.value = false
+ loading.value = false;
}
}
@@ -48,18 +48,21 @@ async function deleteAccount() {
@cancel="showConfirmationDialog = false"
@confirm="deleteAccount"
>
- {{ $t('account.deletionConfirmationMessage') }}
+ {{ $t("account.deletionConfirmationMessage") }}
- {{ $t('account.yourAccount') }}
+ {{ $t("account.yourAccount") }}
-
{{ $t('account.reviewYourSettings') }}
+
+ {{ $t("account.reviewYourSettings") }}
+
- Hi {{ firstName }}, you have been with us since {{ creationDate.toDateString() }}!
+ Hi {{ firstName }}, you have been with us since
+ {{ creationDate.toDateString() }}!
@@ -67,16 +70,19 @@ async function deleteAccount() {
- {{ $t('account.deleteYourAccount') }}
+ {{ $t("account.deleteYourAccount") }}
- {{ $t('account.permanentlyDeleteYourAccount') }}
+ {{ $t("account.permanentlyDeleteYourAccount") }}
-
- {{ $t('account.deleteYourAccount') }}
+
+ {{ $t("account.deleteYourAccount") }}
diff --git a/src/components/account/ConfirmationDialog.vue b/src/components/account/ConfirmationDialog.vue
index 911169f..6f293a9 100644
--- a/src/components/account/ConfirmationDialog.vue
+++ b/src/components/account/ConfirmationDialog.vue
@@ -1,5 +1,5 @@
@@ -32,7 +32,9 @@ const emits = defineEmits(['cancel', 'confirm'])
-
+
- {{ $t('global.areYouSure') }}
+ {{
+ $t("global.areYouSure")
+ }}
This operation cannot be undone.
-
- {{ $t('global.cancel') }}
+
+ {{ $t("global.cancel") }}
- {{ $t('global.confirm') }}
+ {{ $t("global.confirm") }}
diff --git a/src/components/account/ProfileView.vue b/src/components/account/ProfileView.vue
index efa5957..a11765b 100644
--- a/src/components/account/ProfileView.vue
+++ b/src/components/account/ProfileView.vue
@@ -1,8 +1,8 @@
@@ -122,14 +122,17 @@ async function updatePostalAddress() {
- {{ $t('menu.profile') }}
+ {{ $t("menu.profile") }}
- {{ $t('account.profile.manageYourInformation') }}
+ {{ $t("account.profile.manageYourInformation") }}
-
@@ -213,10 +224,10 @@ async function updatePostalAddress() {
@@ -274,19 +287,25 @@ async function updatePostalAddress() {
- {{ $t('account.profile.privacy') }}
+ {{ $t("account.profile.privacy") }}
- {{ $t('account.profile.managePrivacySettings') }}
+ {{ $t("account.profile.managePrivacySettings") }}
-
+
Available to hire
-
+
Nulla amet tempus sit accumsan. Aliquet turpis sed sit lacinia.
@@ -295,11 +314,18 @@ async function updatePostalAddress() {
-
+
Make account private
-
- Pharetra morbi dui mi mattis tellus sollicitudin cursus pharetra.
+
+ Pharetra morbi dui mi mattis tellus sollicitudin cursus
+ pharetra.
@@ -307,10 +333,16 @@ async function updatePostalAddress() {
-
+
Allow commenting
-
+
Integer amet, nunc hendrerit adipiscing nam. Elementum ame
@@ -319,10 +351,16 @@ async function updatePostalAddress() {
-
+
Allow mentions
-
+
Adipiscing est venenatis enim molestie commodo eu gravid
@@ -332,8 +370,12 @@ async function updatePostalAddress() {
- {{ $t('global.cancel') }}
- {{ $t('global.save') }}
+
+ {{ $t("global.cancel") }}
+
+
+ {{ $t("global.save") }}
+
diff --git a/src/components/account/VerifiableInformation.vue b/src/components/account/VerifiableInformation.vue
index 9268c40..c14d292 100644
--- a/src/components/account/VerifiableInformation.vue
+++ b/src/components/account/VerifiableInformation.vue
@@ -1,19 +1,19 @@