@@ -327,5 +351,89 @@ function setCategory(mainId, subId) {
document.getElementById('modalAppMainCategory').value = mainId;
document.getElementById('modalAppSubCategory').value = subId;
}
+
+function filterIcons() {
+ const searchTerm = document.getElementById('iconSearch').value.toLowerCase();
+ const iconItems = document.querySelectorAll('.icon-item');
+
+ iconItems.forEach(item => {
+ const iconName = item.getAttribute('data-icon').toLowerCase();
+ const iconComment = item.getAttribute('data-comment').toLowerCase();
+ if (iconName.includes(searchTerm) || iconComment.includes(searchTerm)) {
+ item.style.display = 'block';
+ } else {
+ item.style.display = 'none';
+ }
+ });
+}
+
+function selectIcon(element, icon, comment) {
+ // 移除所有选中状态
+ document.querySelectorAll('.icon-card').forEach(card => {
+ card.classList.remove('border-primary', 'bg-light');
+ });
+
+ // 添加选中状态
+ element.classList.add('border-primary', 'bg-light');
+
+ // 更新隐藏的select元素
+ const select = document.getElementById('iconSelect');
+ select.value = icon;
+
+ // 显示选中的图标信息
+ const selectedIconInfo = document.getElementById('selectedIconInfo');
+ document.getElementById('selectedIconCode').textContent = icon;
+ document.getElementById('selectedIconComment').textContent = " - " + comment;
+ selectedIconInfo.style.display = 'block';
+
+ // 触发change事件
+ const event = new Event('change');
+ select.dispatchEvent(event);
+}
+
+// 初始化时隐藏select元素并显示图标网格
+document.addEventListener('DOMContentLoaded', function() {
+ const select = document.getElementById('iconSelect');
+ select.style.display = 'none';
+});
+
+
{% endblock %}
\ No newline at end of file
diff --git a/templates/index.html b/templates/index.html
index bb493ea..e773492 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -831,7 +831,7 @@ body.dark-theme .secondary-filters-container::after {
.app-description {
position: absolute;
bottom: calc(100% + 10px);
- left: 20px;
+ left: -15px;
transform: none;
background-color: var(--tooltip-bg);
color: var(--tooltip-text);