Explorar o código

【修复】修复应用搜索和加载 CSS 文件的错误处理

- 在未找到匹配应用时,添加翻译处理
- 优化 CSS 文件加载失败的错误信息
PJ568 hai 1 ano
pai
achega
77e0c7c9ed
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      index.html

+ 2 - 1
index.html

@@ -248,6 +248,7 @@
         function renderApps(appList) {
           if (appList.length === 0) {
             appsGrid.innerHTML = '<div class="loading">未找到匹配的应用</div>';
+            translate.execute([appsGrid]);
             return;
           }
 
@@ -602,7 +603,7 @@
             link.onerror = null;
             link.onload = null;
             document.head.removeChild(link);
-            reject(new Error(`无法加载CSS文件: ${url}`));
+            reject(new Error(`无法加载 CSS 文件: ${url}`));
           };
 
           //// 添加到文档头部