This commit is contained in:
1 parent
fe9f7aa1b2
commit
fd5bc240c4
3 files changed
+144
-113
No files matched your search
@@ -3,9 +3,9 @@
|
||||
<section class="authorization-section">
|
||||
<div class="authorization-header">
|
||||
<div class="header-main">
|
||||
<h3>???????</h3>
|
||||
<h3>邮件客户端协议</h3>
|
||||
<p class="authorization-desc">
|
||||
?? IMAP?POP3?SMTP ????????????????????????????
|
||||
为 IMAP、POP3、SMTP 配置专属授权码,平时安全隐藏,验证密码后可查看或复制。
|
||||
</p>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
@@ -16,7 +16,7 @@
|
||||
size="small"
|
||||
@click="openVerifyDialog"
|
||||
>
|
||||
?????????
|
||||
安全验证查看授权码
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else-if="codesRevealed"
|
||||
@@ -25,13 +25,13 @@
|
||||
size="small"
|
||||
@click="hideRevealedCodes"
|
||||
>
|
||||
???????
|
||||
安全隐藏授权码
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-alert
|
||||
title="???????????????????????????????????????????????????????????????"
|
||||
title="使用完整邮箱地址作为登录名,专属授权码作为密码。授权码平时处于加密保护状态,验证密码后可完整查看与一键复制。"
|
||||
type="info"
|
||||
:closable="false"
|
||||
show-icon
|
||||
@@ -47,16 +47,16 @@
|
||||
<div class="protocol-title">
|
||||
<strong>{{ protocolLabel(item.protocol) }}</strong>
|
||||
<el-tag size="small" :type="item.enabled ? 'success' : 'info'">
|
||||
{{ item.enabled ? '???' : '???' }}
|
||||
{{ item.enabled ? '已开启' : '已关闭' }}
|
||||
</el-tag>
|
||||
<el-tag size="small" :type="item.configured ? 'success' : 'warning'">
|
||||
{{ item.configured ? '??????' : '??????' }}
|
||||
{{ item.configured ? '已配置授权码' : '未生成授权码' }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<p class="protocol-guide">???????????????????????</p>
|
||||
<p class="protocol-guide">登录名:完整邮箱地址;密码:本协议专属授权码。</p>
|
||||
|
||||
<div class="protocol-credential-slot">
|
||||
<span class="slot-label">??????</span>
|
||||
<span class="slot-label">当前授权码:</span>
|
||||
<template v-if="item.configured">
|
||||
<template v-if="codesRevealed && revealedCodes[item.protocol]">
|
||||
<code class="revealed-code">{{ revealedCodes[item.protocol] }}</code>
|
||||
@@ -67,11 +67,11 @@
|
||||
class="copy-btn"
|
||||
@click="copyProtocolCode(revealedCodes[item.protocol])"
|
||||
>
|
||||
??
|
||||
复制
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span class="masked-code">????????????????</span>
|
||||
<span class="masked-code">••••••••••••••••</span>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@@ -79,12 +79,12 @@
|
||||
class="reveal-btn"
|
||||
@click="openVerifyDialog"
|
||||
>
|
||||
??????
|
||||
验证查看
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span class="unconfigured-tip">???????????????????</span>
|
||||
<span class="unconfigured-tip">尚未生成专属授权码,请点击右侧生成</span>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,9 +93,9 @@
|
||||
<el-switch
|
||||
:model-value="item.enabled"
|
||||
:loading="protocolLoading"
|
||||
active-text="??"
|
||||
inactive-text="??"
|
||||
:aria-label="`${protocolLabel(item.protocol)} ?????????`"
|
||||
active-text="开启"
|
||||
inactive-text="关闭"
|
||||
:aria-label="`${protocolLabel(item.protocol)} 当前账号客户端访问`"
|
||||
@change="value => setProtocolEnabled(item, value)"
|
||||
/>
|
||||
<el-button
|
||||
@@ -104,7 +104,7 @@
|
||||
:disabled="!item.enabled"
|
||||
@click="generateProtocolCode(item)"
|
||||
>
|
||||
{{ item.configured ? '???????' : '?????' }}
|
||||
{{ item.configured ? '重新生成授权码' : '生成授权码' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item.configured"
|
||||
@@ -113,17 +113,17 @@
|
||||
size="small"
|
||||
@click="revokeProtocolCode(item)"
|
||||
>
|
||||
?????
|
||||
撤销授权码
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ???????? -->
|
||||
<!-- 密码验证弹窗 -->
|
||||
<el-dialog
|
||||
v-model="verifyDialogVisible"
|
||||
title="??????"
|
||||
title="安全身份验证"
|
||||
width="min(440px, calc(100vw - 32px))"
|
||||
:close-on-click-modal="false"
|
||||
class="verify-reveal-dialog"
|
||||
@@ -131,15 +131,15 @@
|
||||
>
|
||||
<div class="verify-dialog-body">
|
||||
<p class="verify-dialog-tip">
|
||||
?????????????????????????????????
|
||||
查看已持久保存的协议授权码前,请先验证当前账号的登录密码:
|
||||
</p>
|
||||
<el-form @submit.prevent="submitVerifyAndReveal">
|
||||
<el-form-item label="??????">
|
||||
<el-form-item label="登录密码">
|
||||
<el-input
|
||||
v-model="verifyPassword"
|
||||
type="password"
|
||||
show-password
|
||||
placeholder="???????????"
|
||||
placeholder="请输入当前账号登录密码"
|
||||
autocomplete="current-password"
|
||||
@keyup.enter="submitVerifyAndReveal"
|
||||
/>
|
||||
@@ -148,14 +148,14 @@
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="verify-dialog-footer">
|
||||
<el-button @click="closeVerifyDialog">??</el-button>
|
||||
<el-button @click="closeVerifyDialog">取消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="verifyLoading"
|
||||
:disabled="!verifyPassword.trim()"
|
||||
@click="submitVerifyAndReveal"
|
||||
>
|
||||
???????
|
||||
验证并查看授权码
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -192,4 +192,4 @@ const hasConfiguredProtocols = computed(() =>
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped src="./ThirdPartyAuthorization.css"></style>
|
||||
<style scoped src="./ThirdPartyAuthorization.css"></style>
|
||||
Reference in new issue
Block a user