Translate all Chinese comments and strings to English
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
:class="{
|
||||
'h-[100px]': whichCurrentModal !== MODAL_CREATE_NEW,
|
||||
}"
|
||||
> <!-- 這裡會根據究竟是create彈窗還是edit彈窗來改變Password的排版 -->
|
||||
> <!-- Layout of Password field changes depending on whether this is the create or edit modal -->
|
||||
<span class="align-right-span flex h-full w-[122px] justify-end"
|
||||
:class="{
|
||||
'pt-[12px]': whichCurrentModal !== MODAL_CREATE_NEW,
|
||||
@@ -100,7 +100,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="false" id="confirm_pwd_row" class="input-row w-full grid grid-cols-2 grid-cols-[122px_1fr] gap-x-4
|
||||
mb-4 flex items-center"> <!-- 2-by-2 的格子,其中左下角是一個dummy格子,其沒有內容 -->
|
||||
mb-4 flex items-center"> <!-- 2-by-2 grid; the bottom-left cell is a dummy cell with no content -->
|
||||
<span v-show="false" class="field-label w-[122px] text-sm flex items-center justify-end text-right font-medium mr-4 whitespace-nowrap"
|
||||
:class="{
|
||||
'text-[#000000]': isPwdMatched,
|
||||
@@ -125,14 +125,14 @@
|
||||
@click="togglePwdConfirmEyeBtn" alt="eye"/>
|
||||
<img v-else src='@/assets/icon-eye-hide.svg' class="absolute right-[8px] cursor-pointer" @click="togglePwdConfirmEyeBtn" alt="eye"/>
|
||||
</div>
|
||||
<div class="dummy-grid h-[24px]"></div> <!-- 透過 dummy-grid 來撐起高度-->
|
||||
<div class="dummy-grid h-[24px]"></div> <!-- Use dummy-grid to maintain the height -->
|
||||
<div class="error-msg-section flex justify-start">
|
||||
<img v-show="!isPwdMatched" src="@/assets/icon-alert.svg" alt="!" class="exclamation-img flex mr-2">
|
||||
<span class="error-msg-text flex text-[#FF3366] h-[24px]">
|
||||
{{ isPwdMatched ? "" : i18next.t("AcctMgmt.PwdNotMatch") }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="dummy-grid h-[24px]"></div> <!-- 透過 dummy-grid 來撐起高度-->
|
||||
<div class="dummy-grid h-[24px]"></div> <!-- Use dummy-grid to maintain the height -->
|
||||
<div class="error-msg-section flex justify-start">
|
||||
<img v-show="!isPwdLengthValid" src="@/assets/icon-alert.svg" alt="!" class="exclamation-img flex mr-2">
|
||||
<span class="error-msg-text flex text-[#FF3366] h-[24px]">
|
||||
@@ -142,7 +142,7 @@
|
||||
</div>
|
||||
<div v-if="whichCurrentModal === MODAL_CREATE_NEW" class="checkbox-row w-full grid-cols-[122px_1fr] gap-x-4 flex py-2 h-[40px] my-4 items-center">
|
||||
<div class="dummy field-label flex items-center w-[122px]">
|
||||
</div> <!--這裡也使用了dummy欄位去撐起空間-->
|
||||
</div> <!-- A dummy field is also used here to maintain spacing -->
|
||||
<section id="account_create_checkboxes_section" class="flex flex-col">
|
||||
<div class="checkbox-and-text flex">
|
||||
<IconChecked :isChecked="isSetAsAdminChecked" @click="toggleIsAdmin"/>
|
||||
@@ -229,7 +229,7 @@ const inputPwd = ref("");
|
||||
const isAccountUnique = ref(true);
|
||||
const isEditable = ref(true);
|
||||
|
||||
// 自從加入這段 watch 之後,填寫密碼欄位之時,就不會胡亂清空掉 account 或是 full name 欄位了。
|
||||
// Since adding this watch, filling in the password field no longer clears the account or full name fields.
|
||||
watch(whichCurrentModal, (newVal) => {
|
||||
if (newVal === MODAL_CREATE_NEW) {
|
||||
inputUserAccount.value = '';
|
||||
@@ -253,7 +253,7 @@ const validatePwdLength = () => {
|
||||
}
|
||||
|
||||
const onInputDoubleClick = () => {
|
||||
// 允許編輯模式
|
||||
// Enable edit mode
|
||||
isEditable.value = true;
|
||||
}
|
||||
|
||||
@@ -288,8 +288,8 @@ const onConfirmBtnClick = async () => {
|
||||
if(!isAccountUnique.value) {
|
||||
return;
|
||||
}
|
||||
// 要注意的是舊的username跟新的username可以是不同的
|
||||
// 區分有無傳入密碼的情況
|
||||
// Note that the old username and new username can be different
|
||||
// Distinguish between cases with and without a password
|
||||
if(isResetPwdSectionShow.value) {
|
||||
await acctMgmtStore.editAccount(
|
||||
currentViewingUser.value.username, {
|
||||
@@ -315,7 +315,7 @@ const onConfirmBtnClick = async () => {
|
||||
}
|
||||
|
||||
const checkAccountIsUnique = async() => {
|
||||
// 如果使用者沒有更動過欄位,那就不用調用任何後端的API
|
||||
// If the user has not modified the field, no backend API call is needed
|
||||
if(inputUserAccount.value === username.value) {
|
||||
return true;
|
||||
}
|
||||
@@ -344,14 +344,14 @@ const onInputNameFocus = () => {
|
||||
|
||||
const onResetPwdButtonClick = () => {
|
||||
isResetPwdSectionShow.value = !isResetPwdSectionShow.value;
|
||||
// 必須清空密碼欄位輸入的字串
|
||||
// Must clear the password input field
|
||||
inputPwd.value = '';
|
||||
}
|
||||
|
||||
watch(
|
||||
[inputPwd, inputUserAccount, inputName],
|
||||
([newPwd, newAccount, newName]) => {
|
||||
// 只要[確認密碼]或[密碼]欄位有更動,且所有欄位都不是空的,confirm 按鈕就可點選
|
||||
// Enable the confirm button when all fields are non-empty
|
||||
if(newAccount.length > 0 && newName.length > 0) {
|
||||
isConfirmDisabled.value = false;
|
||||
}
|
||||
@@ -374,6 +374,6 @@ function onCancelBtnClick(){
|
||||
<style>
|
||||
#modal_account_edit {
|
||||
background-color: #ffffff;
|
||||
backdrop-filter: opacity(1); /*防止子元件繼承父元件的透明度 */
|
||||
backdrop-filter: opacity(1); /* Prevent child elements from inheriting parent's opacity */
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user