Sfoglia il codice sorgente

chore: only show two digits

JustSong 2 anni fa
parent
commit
68e53d3e10
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      web/src/components/ChannelsTable.js

+ 1 - 1
web/src/components/ChannelsTable.js

@@ -164,7 +164,7 @@ const ChannelsTable = () => {
       newChannels[realIdx].response_time = time * 1000;
       newChannels[realIdx].test_time = Date.now() / 1000;
       setChannels(newChannels);
-      showInfo(`通道 ${name} 测试成功,耗时 ${time} 秒。`);
+      showInfo(`通道 ${name} 测试成功,耗时 ${time.toFixed(2)} 秒。`);
     } else {
       showError(message);
     }