diff --git a/src/components/AccountMenu/AcctMenu.vue b/src/components/AccountMenu/AcctMenu.vue index a294f20..9ab14d7 100644 --- a/src/components/AccountMenu/AcctMenu.vue +++ b/src/components/AccountMenu/AcctMenu.vue @@ -9,7 +9,7 @@
  • + items-center" @click="onBtnAcctMgmtClick"> accountManagement {{i18next.t("AcctMgmt.acctMgmt")}}
  • @@ -29,110 +29,90 @@ - \ No newline at end of file + diff --git a/src/components/AccountMenu/SearchBar.vue b/src/components/AccountMenu/SearchBar.vue index 1a8d0ed..e0a1c71 100644 --- a/src/components/AccountMenu/SearchBar.vue +++ b/src/components/AccountMenu/SearchBar.vue @@ -1,5 +1,5 @@ - \ No newline at end of file + +const handleKeyPressOfSearch = (event) => { + if (event.key === 'Enter') { + emit('on-search-account-button-click', inputQuery.value); + } +}; + diff --git a/src/components/Badge.vue b/src/components/Badge.vue index c2b1354..14db807 100644 --- a/src/components/Badge.vue +++ b/src/components/Badge.vue @@ -1,6 +1,6 @@ - \ No newline at end of file +const onMouseup = () => { + isPressed.value = false; +}; + diff --git a/src/components/ButtonFilled.vue b/src/components/ButtonFilled.vue index 72ab00f..e6a70cc 100644 --- a/src/components/ButtonFilled.vue +++ b/src/components/ButtonFilled.vue @@ -16,35 +16,23 @@ - \ No newline at end of file +const onMouseup = () => { + isPressed.value = false; +}; + diff --git a/src/components/Compare/SidebarStates.vue b/src/components/Compare/SidebarStates.vue index 15ed9ff..cc15767 100644 --- a/src/components/Compare/SidebarStates.vue +++ b/src/components/Compare/SidebarStates.vue @@ -146,128 +146,126 @@ - \ No newline at end of file + diff --git a/src/views/AccountManagement/ModalAccountEditCreate.vue b/src/views/AccountManagement/ModalAccountEditCreate.vue index 01678fc..2dea4b3 100644 --- a/src/views/AccountManagement/ModalAccountEditCreate.vue +++ b/src/views/AccountManagement/ModalAccountEditCreate.vue @@ -2,7 +2,7 @@
    {{ i18next.t("AcctMgmt.ConfirmPassword") }} - +
    {{ i18next.t("AcctMgmt.SetAsAdmin") }} - +
    @@ -159,7 +159,7 @@
    -
    - \ No newline at end of file + diff --git a/src/views/AccountManagement/ModalAccountInfo.vue b/src/views/AccountManagement/ModalAccountInfo.vue index 9cf9d6c..7f647c0 100644 --- a/src/views/AccountManagement/ModalAccountInfo.vue +++ b/src/views/AccountManagement/ModalAccountInfo.vue @@ -22,42 +22,25 @@ - \ No newline at end of file +onBeforeMount(async() => { + await acctMgmtStore.getUserDetail(currentViewingUser.value.username); + visitTime.value = currentViewingUser.value.detail.visits; +}); + diff --git a/src/views/AccountManagement/ModalContainer.vue b/src/views/AccountManagement/ModalContainer.vue index 8ea144a..2a78fa0 100644 --- a/src/views/AccountManagement/ModalContainer.vue +++ b/src/views/AccountManagement/ModalContainer.vue @@ -7,11 +7,11 @@ - + - - \ No newline at end of file + diff --git a/src/views/AccountManagement/ModalDeleteAlert.vue b/src/views/AccountManagement/ModalDeleteAlert.vue index 205d6c9..28953b8 100644 --- a/src/views/AccountManagement/ModalDeleteAlert.vue +++ b/src/views/AccountManagement/ModalDeleteAlert.vue @@ -27,39 +27,28 @@ - \ No newline at end of file +const onNoBtnClick = () => { + modalStore.closeModal(); +}; + diff --git a/src/views/AccountManagement/ModalHeader.vue b/src/views/AccountManagement/ModalHeader.vue index 0261eaa..a445f04 100644 --- a/src/views/AccountManagement/ModalHeader.vue +++ b/src/views/AccountManagement/ModalHeader.vue @@ -7,28 +7,20 @@ X - + - \ No newline at end of file +defineProps({ + headerText: { + type: String, + required: true, + } +}); + +const modalStore = useModalStore(); +const { closeModal } = modalStore; + diff --git a/src/views/AccountManagement/MyAccount.vue b/src/views/AccountManagement/MyAccount.vue index 91ba429..52b3da2 100644 --- a/src/views/AccountManagement/MyAccount.vue +++ b/src/views/AccountManagement/MyAccount.vue @@ -27,13 +27,13 @@ @@ -87,23 +87,23 @@ {{ isPwdLengthValid ? "" : i18next.t("AcctMgmt.PwdLengthNotEnough") }} - +
    -
    +
    -
    +
    - +
    @@ -114,8 +114,8 @@ - \ No newline at end of file +}; + +const onSavePwdClick = async() => { + validatePwdLength(); + if (isPwdLengthValid.value) { + isPwdEditable.value = false; + await acctMgmtStore.editAccountPwd(username, inputPwd.value); + await toast.success(i18next.t("AcctMgmt.MsgAccountEdited")); + inputPwd.value = ''; + await acctMgmtStore.getUserDetail(loginStore.userData.username); + } +}; + +const onCancelNameClick = () => { + isNameEditable.value = false; + inputName.value = name.value; +}; + +const onCancelPwdClick = () => { + isPwdEditable.value = false; + inputPwd.value = ''; + isPwdLengthValid.value = true; +}; + +const togglePwdEyeBtn = (toBeOpen) => { + isPwdEyeOn.value = toBeOpen; +}; + +onMounted(async() => { + loadingStore.setIsLoading(false); + await acctMgmtStore.getUserDetail(loginStore.userData.username); +}); + diff --git a/src/views/AuthContainer.vue b/src/views/AuthContainer.vue index 8e3ae45..fc1965a 100644 --- a/src/views/AuthContainer.vue +++ b/src/views/AuthContainer.vue @@ -8,15 +8,7 @@
    - diff --git a/src/views/Compare/Dashboard/Compare.vue b/src/views/Compare/Dashboard/Compare.vue index 2aa298c..a59ff3f 100644 --- a/src/views/Compare/Dashboard/Compare.vue +++ b/src/views/Compare/Dashboard/Compare.vue @@ -134,10 +134,10 @@
      -
    • - info @@ -149,7 +149,9 @@
    -