Apply repository-wide ESLint auto-fix formatting pass
Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
@@ -1,19 +1,35 @@
|
||||
<template>
|
||||
<div id='header.vue' class="mx-auto px-4 h-14 z-50">
|
||||
<div id="header.vue" class="mx-auto px-4 h-14 z-50">
|
||||
<div class="flex justify-between items-center h-full">
|
||||
<figure>
|
||||
<DspLogo />
|
||||
<DspLogo />
|
||||
</figure>
|
||||
<div class="flex justify-between items-center relative"
|
||||
v-show="showMember">
|
||||
<img id="acct_mgmt_button" v-if="!isHeadHovered" src="@/assets/icon-head-black.svg" @mouseenter='isHeadHovered = true'
|
||||
width="32" height="32" @click="toggleIsAcctMenuOpen"
|
||||
class="cursor-pointer z-50" alt="user-head"
|
||||
/>
|
||||
<img id="acct_mgmt_button" v-else src="@/assets/icon-head-blue.svg" @mouseleave='isHeadHovered = false'
|
||||
width="32" height="32" @click="toggleIsAcctMenuOpen"
|
||||
class="cursor-pointer z-50" alt="user-head"
|
||||
/>
|
||||
<div
|
||||
class="flex justify-between items-center relative"
|
||||
v-show="showMember"
|
||||
>
|
||||
<img
|
||||
id="acct_mgmt_button"
|
||||
v-if="!isHeadHovered"
|
||||
src="@/assets/icon-head-black.svg"
|
||||
@mouseenter="isHeadHovered = true"
|
||||
width="32"
|
||||
height="32"
|
||||
@click="toggleIsAcctMenuOpen"
|
||||
class="cursor-pointer z-50"
|
||||
alt="user-head"
|
||||
/>
|
||||
<img
|
||||
id="acct_mgmt_button"
|
||||
v-else
|
||||
src="@/assets/icon-head-blue.svg"
|
||||
@mouseleave="isHeadHovered = false"
|
||||
width="32"
|
||||
height="32"
|
||||
@click="toggleIsAcctMenuOpen"
|
||||
class="cursor-pointer z-50"
|
||||
alt="user-head"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,16 +47,16 @@
|
||||
* user account menu toggle button.
|
||||
*/
|
||||
|
||||
import { ref, onMounted, } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { storeToRefs, } from 'pinia';
|
||||
import emitter from '@/utils/emitter';
|
||||
import { useLoginStore } from '@/stores/login';
|
||||
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
||||
import DspLogo from '@/components/icons/DspLogo.vue';
|
||||
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||
import { useConformanceStore } from '@/stores/conformance';
|
||||
import { leaveFilter, leaveConformance } from '@/module/alertModal.js';
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { storeToRefs } from "pinia";
|
||||
import emitter from "@/utils/emitter";
|
||||
import { useLoginStore } from "@/stores/login";
|
||||
import { useAcctMgmtStore } from "@/stores/acctMgmt";
|
||||
import DspLogo from "@/components/icons/DspLogo.vue";
|
||||
import { useAllMapDataStore } from "@/stores/allMapData";
|
||||
import { useConformanceStore } from "@/stores/conformance";
|
||||
import { leaveFilter, leaveConformance } from "@/module/alertModal.js";
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
@@ -49,8 +65,13 @@ const { logOut } = store;
|
||||
const allMapDataStore = useAllMapDataStore();
|
||||
const conformanceStore = useConformanceStore();
|
||||
const acctMgmtStore = useAcctMgmtStore();
|
||||
const { tempFilterId, temporaryData, postRuleData, ruleData } = storeToRefs(allMapDataStore);
|
||||
const { conformanceLogTempCheckId, conformanceFilterTempCheckId, conformanceFileName } = storeToRefs(conformanceStore);
|
||||
const { tempFilterId, temporaryData, postRuleData, ruleData } =
|
||||
storeToRefs(allMapDataStore);
|
||||
const {
|
||||
conformanceLogTempCheckId,
|
||||
conformanceFilterTempCheckId,
|
||||
conformanceFileName,
|
||||
} = storeToRefs(conformanceStore);
|
||||
|
||||
const isHeadHovered = ref(false);
|
||||
const showMember = ref(false);
|
||||
@@ -64,21 +85,31 @@ const toggleIsAcctMenuOpen = () => {
|
||||
* and Conformance pages.
|
||||
*/
|
||||
function logOutButton() {
|
||||
if ((route.name === 'Map' || route.name === 'CheckMap') && tempFilterId.value) {
|
||||
if (
|
||||
(route.name === "Map" || route.name === "CheckMap") &&
|
||||
tempFilterId.value
|
||||
) {
|
||||
// Notify Map to close the Sidebar.
|
||||
emitter.emit('leaveFilter', false);
|
||||
leaveFilter(false, allMapDataStore.addFilterId, false, logOut)
|
||||
} else if((route.name === 'Conformance' || route.name === 'CheckConformance')
|
||||
&& (conformanceLogTempCheckId.value || conformanceFilterTempCheckId.value)) {
|
||||
leaveConformance(false, conformanceStore.addConformanceCreateCheckId, false, logOut)
|
||||
emitter.emit("leaveFilter", false);
|
||||
leaveFilter(false, allMapDataStore.addFilterId, false, logOut);
|
||||
} else if (
|
||||
(route.name === "Conformance" || route.name === "CheckConformance") &&
|
||||
(conformanceLogTempCheckId.value || conformanceFilterTempCheckId.value)
|
||||
) {
|
||||
leaveConformance(
|
||||
false,
|
||||
conformanceStore.addConformanceCreateCheckId,
|
||||
false,
|
||||
logOut,
|
||||
);
|
||||
} else {
|
||||
logOut();
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (route.name === 'Login' || route.name === 'NotFound404') {
|
||||
showMember.value = false
|
||||
if (route.name === "Login" || route.name === "NotFound404") {
|
||||
showMember.value = false;
|
||||
} else {
|
||||
showMember.value = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user