| | |
| | | v-if="showDevToolsWarning" |
| | | class="fixed top-0 left-0 z-[999999] flex-cc w-full h-full text-white bg-gradient-to-br from-[#1e1e1e] to-black animate-fade-in" |
| | | > |
| | | <div class="p-5 text-center select-none"> |
| | | <div class="p-5 text-center select-none"> |
| | | <div class="mb-7.5 text-5xl">🔒</div> |
| | | <h1 class="m-0 mb-5 text-3xl font-semibold text-danger">系统已锁定</h1> |
| | | <h1 class="m-0 mb-5 text-3xl font-semibold text-danger"> |
| | | {{ $t('lockScreen.devTools.title') }} |
| | | </h1> |
| | | <p class="max-w-125 m-0 text-lg leading-relaxed text-white"> |
| | | 检测到开发者工具已打开<br /> |
| | | 为了系统安全,请关闭开发者工具后继续使用 |
| | | {{ $t('lockScreen.devTools.descriptionLine1') }}<br /> |
| | | {{ $t('lockScreen.devTools.descriptionLine2') }} |
| | | </p> |
| | | <div class="mt-7.5 text-sm text-gray-400">Security Lock Activated</div> |
| | | <div class="mt-7.5 text-sm text-gray-400">{{ $t('lockScreen.devTools.footer') }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div v-if="!isLock"> |
| | | <ElDialog v-model="visible" :width="370" :show-close="false" @open="handleDialogOpen"> |
| | | <div class="flex-c flex-col"> |
| | | <img class="w-16 h-16 rounded-full" src="@imgs/user/avatar.webp" alt="用户头像" /> |
| | | <img |
| | | class="w-16 h-16 rounded-full" |
| | | src="@imgs/user/avatar.webp" |
| | | :alt="$t('lockScreen.avatarAlt')" |
| | | /> |
| | | <div class="mt-7.5 mb-3.5 text-base font-medium">{{ userInfo.userName }}</div> |
| | | <ElForm |
| | | ref="formRef" |
| | |
| | | <!-- 解锁界面 --> |
| | | <div v-else class="unlock-content"> |
| | | <div class="flex-c flex-col w-80"> |
| | | <img class="w-16 h-16 mt-5 rounded-full" src="@imgs/user/avatar.webp" alt="用户头像" /> |
| | | <img |
| | | class="w-16 h-16 mt-5 rounded-full" |
| | | src="@imgs/user/avatar.webp" |
| | | :alt="$t('lockScreen.avatarAlt')" |
| | | /> |
| | | <div class="mt-3 mb-3.5 text-base font-medium"> |
| | | {{ userInfo.userName }} |
| | | </div> |
| | |
| | | ) |
| | | return inputPassword === decryptedPassword |
| | | } catch (error) { |
| | | console.error('密码解密失败:', error) |
| | | console.error(t('lockScreen.errors.decryptFailed'), error) |
| | | return false |
| | | } |
| | | } |
| | |
| | | visible.value = false |
| | | formData.password = '' |
| | | } else { |
| | | console.error('表单验证失败:', fields) |
| | | console.error(t('lockScreen.errors.validationFailed'), fields) |
| | | } |
| | | }) |
| | | } |
| | |
| | | visible.value = false |
| | | showDevToolsWarning.value = false |
| | | } catch (error) { |
| | | console.error('更新store失败:', error) |
| | | console.error(t('lockScreen.errors.updateStoreFailed'), error) |
| | | } |
| | | } else { |
| | | const inputElement = unlockInputRef.value?.$el |
| | |
| | | unlockForm.password = '' |
| | | } |
| | | } else { |
| | | console.error('表单验证失败:', fields) |
| | | console.error(t('lockScreen.errors.validationFailed'), fields) |
| | | } |
| | | }) |
| | | } |