Skip to content

Commit 6fe15d4

Browse files
authored
Merge pull request #141 from fyzhu/release
[style] use image instead of emoji in login page
2 parents 4eb6308 + 90f8b77 commit 6fe15d4

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

resource/login/image/history.png

4.63 KB
Loading
5.12 KB
Loading
5.05 KB
Loading

resource/login/index.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,8 @@
495495
.password-toggle {
496496
position: absolute;
497497
right: 12px;
498-
top: 46px; /* 精确计算:label(18px) + margin(8px) + border(1px) + padding(12px) + 文本中心(7px) */
499-
transform: translateY(-50%);
498+
bottom: 21px;/* input height 42px / 2 */
499+
transform: translateY(50%);
500500
background: none;
501501
border: none;
502502
color: rgba(255, 255, 255, 0.6);
@@ -521,8 +521,8 @@
521521
.history-btn {
522522
position: absolute;
523523
right: 12px;
524-
top: 46px; /* 精确计算:label(18px) + margin(8px) + border(1px) + padding(12px) + 文本中心(7px) */
525-
transform: translateY(-50%);
524+
bottom: 21px;/* input height 42px / 2 */
525+
transform: translateY(50%);
526526
background: none;
527527
border: none;
528528
color: rgba(255, 255, 255, 0.6);
@@ -898,7 +898,7 @@
898898
<div class="form-group has-button">
899899
<label for="domain">域名/IP地址/FN ID</label>
900900
<input type="text" id="domain" placeholder="请输入服务器域名、IP地址或 FN ID" spellcheck="false" tabindex="1" />
901-
<button type="button" class="history-btn" id="historyBtn" title="选择历史记录">📝</button>
901+
<button type="button" class="history-btn" id="historyBtn" title="选择历史记录"><img width="20px" src="./image/history.png" alt="历史记录" /></button>
902902
<div class="history-dropdown" id="historyDropdown">
903903
<div class="no-history">暂无历史记录</div>
904904
</div>
@@ -911,7 +911,7 @@
911911
<div class="form-group has-button">
912912
<label for="password">密码</label>
913913
<input type="password" id="password" placeholder="请输入密码" spellcheck="false" tabindex="3" />
914-
<button type="button" class="password-toggle" id="passwordToggle" title="显示/隐藏密码">👁</button>
914+
<button type="button" class="password-toggle" id="passwordToggle" title="显示/隐藏密码"><img id="passwordToggleImg" width="20px" src="./image/password-show.png" alt="显示密码" /></button>
915915
</div>
916916
<div class="switch-container">
917917
<label class="switch">
@@ -1001,6 +1001,7 @@
10011001
const usernameInput = document.getElementById('username');
10021002
const passwordInput = document.getElementById('password');
10031003
const passwordToggle = document.getElementById('passwordToggle');
1004+
const passwordToggleImg = document.getElementById('passwordToggleImg');
10041005
const historyBtn = document.getElementById('historyBtn');
10051006
const historyDropdown = document.getElementById('historyDropdown');
10061007
const customConfirm = document.getElementById('customConfirm');
@@ -1265,11 +1266,11 @@
12651266
passwordToggle.addEventListener('click', function () {
12661267
if (passwordInput.type === 'password') {
12671268
passwordInput.type = 'text';
1268-
passwordToggle.textContent = '🙈';
1269+
passwordToggleImg.src = './image/password-hide.png';
12691270
passwordToggle.title = '隐藏密码';
12701271
} else {
12711272
passwordInput.type = 'password';
1272-
passwordToggle.textContent = '👁';
1273+
passwordToggleImg.src = './image/password-show.png';
12731274
passwordToggle.title = '显示密码';
12741275
}
12751276
});

0 commit comments

Comments
 (0)