no message
This commit is contained in:
@@ -226,8 +226,8 @@ h2 {
|
||||
border: 1px solid #0f3460;
|
||||
border-radius: 6px;
|
||||
padding: 0 2px;
|
||||
width: 190px;
|
||||
height: 24px;
|
||||
width: 220px;
|
||||
height: 22px;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -757,7 +757,7 @@ h2 {
|
||||
}
|
||||
|
||||
.btn-io {
|
||||
padding: 4px 10px;
|
||||
padding: 4px 1px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
|
||||
+3
-3
@@ -130,8 +130,8 @@
|
||||
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7"/><path d="M21 21l-4.3-4.3"/></svg>
|
||||
</button>
|
||||
<div id="searchBox" class="search-box-inline" hidden>
|
||||
<input type="text" id="searchInput" data-i18n-placeholder="searchPlaceholder" placeholder="搜索域名 / 用户名 / 别名">
|
||||
<button type="button" id="searchClear" class="search-clear" title="清除">×</button>
|
||||
<input type="text" id="searchInput" data-i18n-placeholder="searchPlaceholder" placeholder="搜索域名/用户名/别名">
|
||||
<button type="button" id="searchClear" class="search-clear" title="清除" hidden>×</button>
|
||||
<button type="button" id="searchToggleBtn" class="btn-io btn-icon" data-i18n-title="searchBtnTitle" title="搜索">
|
||||
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7"/><path d="M21 21l-4.3-4.3"/></svg>
|
||||
</button>
|
||||
@@ -154,7 +154,7 @@
|
||||
</section>
|
||||
|
||||
<footer class="footer">
|
||||
<p class="powered-by" data-i18n="poweredBy">power by chenxuan</p>
|
||||
<p class="powered-by"><span data-i18n="poweredBy">power by chenxuan</span> <span id="versionLabel">v1.0.0</span></p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
|
||||
applyI18n();
|
||||
|
||||
const versionLabel = $("versionLabel");
|
||||
if (versionLabel) versionLabel.textContent = "v" + chrome.runtime.getManifest().version;
|
||||
|
||||
const domainInput = $("domain");
|
||||
const aliasInput = $("alias");
|
||||
const usernameInput = $("username");
|
||||
@@ -664,10 +667,12 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
exportBtn.disabled = isEmpty;
|
||||
exportBtn.classList.toggle("btn-disabled", isEmpty);
|
||||
const parent = addSection.parentElement;
|
||||
if (isEmpty) {
|
||||
if (parent.children[0] !== addSection) parent.insertBefore(addSection, listSection);
|
||||
} else {
|
||||
if (parent.children[0] !== listSection) parent.insertBefore(listSection, addSection);
|
||||
const addIdx = Array.prototype.indexOf.call(parent.children, addSection);
|
||||
const listIdx = Array.prototype.indexOf.call(parent.children, listSection);
|
||||
if (isEmpty && addIdx > listIdx) {
|
||||
parent.insertBefore(addSection, listSection);
|
||||
} else if (!isEmpty && listIdx > addIdx) {
|
||||
parent.insertBefore(listSection, addSection);
|
||||
}
|
||||
|
||||
if (isEmpty) {
|
||||
@@ -937,6 +942,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
searchToggleBtn.addEventListener("click", () => {
|
||||
searchInput.value = "";
|
||||
searchKeyword = "";
|
||||
searchClear.hidden = true;
|
||||
searchBox.hidden = true;
|
||||
searchBtn.hidden = false;
|
||||
renderConfigList();
|
||||
@@ -945,6 +951,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
// 搜索输入:实时过滤
|
||||
searchInput.addEventListener("input", () => {
|
||||
searchKeyword = searchInput.value;
|
||||
searchClear.hidden = !searchKeyword;
|
||||
renderConfigList();
|
||||
});
|
||||
|
||||
@@ -952,6 +959,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
searchClear.addEventListener("click", () => {
|
||||
searchInput.value = "";
|
||||
searchKeyword = "";
|
||||
searchClear.hidden = true;
|
||||
renderConfigList();
|
||||
searchInput.focus();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user