Explorar o código

chore: only show two digits

JustSong %!s(int64=2) %!d(string=hai) anos
pai
achega
68e53d3e10
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);
     }