|
|
@@ -9,22 +9,29 @@
|
|
|
class="flex justify-between bg-surface"
|
|
|
style="border-radius: 6px !important"
|
|
|
>
|
|
|
- <q-btn dense flat @click="toggleLeftDrawer">
|
|
|
- <q-icon name="menu" :color="$q.dark.isActive ? 'white' : 'black'" />
|
|
|
+ <q-btn
|
|
|
+ dense
|
|
|
+ flat
|
|
|
+ @click="toggleLeftDrawer"
|
|
|
+ >
|
|
|
+ <q-icon
|
|
|
+ name="menu"
|
|
|
+ :color="$q.dark.isActive ? 'white' : 'black'"
|
|
|
+ />
|
|
|
</q-btn>
|
|
|
|
|
|
<q-btn dense flat>
|
|
|
<img
|
|
|
- :src="someAvatar()"
|
|
|
alt="avatar"
|
|
|
style="width: 20px; height: 20px; border-radius: 50%"
|
|
|
+ :src="someAvatar()"
|
|
|
/>
|
|
|
|
|
|
<q-menu anchor="center right" self="top start">
|
|
|
<q-list class="column no-wrap overflow-hidden">
|
|
|
<q-item
|
|
|
- v-ripple
|
|
|
v-close-popup
|
|
|
+ v-ripple
|
|
|
clickable
|
|
|
exact
|
|
|
exact-active-class="menu-selected"
|
|
|
@@ -39,13 +46,17 @@
|
|
|
/>
|
|
|
</q-item-section>
|
|
|
|
|
|
- <q-item-section>{{
|
|
|
- $t("ui.navigation.profile")
|
|
|
- }}</q-item-section>
|
|
|
+ <q-item-section>
|
|
|
+ {{ $t("user.profile.singular") }}
|
|
|
+ </q-item-section>
|
|
|
</div>
|
|
|
</q-item>
|
|
|
|
|
|
- <q-item v-ripple clickable @click="logoutFn">
|
|
|
+ <q-item
|
|
|
+ v-ripple
|
|
|
+ clickable
|
|
|
+ @click="logoutFn"
|
|
|
+ >
|
|
|
<div class="flex">
|
|
|
<q-item-section avatar>
|
|
|
<q-icon
|
|
|
@@ -55,7 +66,9 @@
|
|
|
/>
|
|
|
</q-item-section>
|
|
|
|
|
|
- <q-item-section>{{ $t("auth.logout") }}</q-item-section>
|
|
|
+ <q-item-section>
|
|
|
+ {{ $t("auth.logout") }}
|
|
|
+ </q-item-section>
|
|
|
</div>
|
|
|
</q-item>
|
|
|
</q-list>
|
|
|
@@ -90,9 +103,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, useTemplateRef, watch } from "vue";
|
|
|
-import { useRoute } from "vue-router";
|
|
|
+import { onMounted, ref, useTemplateRef, watch } from "vue";
|
|
|
+import { syncExecutionStore } from "src/stores/syncExecution";
|
|
|
import { useAuth } from "src/composables/useAuth";
|
|
|
+import { useRoute } from "vue-router";
|
|
|
import { useRouter } from "vue-router";
|
|
|
|
|
|
import LeftMenuLayout from "src/components/layout/LeftMenuLayout.vue";
|
|
|
@@ -106,23 +120,23 @@ const { logout } = useAuth();
|
|
|
|
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
|
-
|
|
|
const scrollAreaRef = useTemplateRef("scrollAreaRef");
|
|
|
|
|
|
+const syncExecution = syncExecutionStore();
|
|
|
+
|
|
|
const leftDrawerOpen = ref(false);
|
|
|
|
|
|
let oldValue = route.path;
|
|
|
|
|
|
-const someAvatar = () => {
|
|
|
- return "https://cdn.quasar.dev/img/avatar4.jpg";
|
|
|
-};
|
|
|
-
|
|
|
const logoutFn = async () => {
|
|
|
await logout();
|
|
|
-
|
|
|
router.push({ name: "LoginPage" });
|
|
|
};
|
|
|
|
|
|
+const someAvatar = () => {
|
|
|
+ return "https://cdn.quasar.dev/img/avatar4.jpg";
|
|
|
+};
|
|
|
+
|
|
|
const toggleLeftDrawer = () => {
|
|
|
leftDrawerOpen.value = !leftDrawerOpen.value;
|
|
|
};
|
|
|
@@ -135,6 +149,10 @@ watch(route, (value) => {
|
|
|
|
|
|
oldValue = value.path;
|
|
|
});
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ syncExecution.fetchLastSyncExecution();
|
|
|
+});
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
.v-enter-active {
|