| 155 | } |
| 156 | |
| 157 | function getConnectionName(connectionData) { |
| 158 | if (!connectionData.createdAt) return '未命名连接'; |
| 159 | |
| 160 | const date = new Date(connectionData.createdAt); |
| 161 | const year = date.getFullYear(); |
| 162 | const month = String(date.getMonth() + 1).padStart(2, '0'); |
| 163 | const day = String(date.getDate()).padStart(2, '0'); |
| 164 | const hours = String(date.getHours()).padStart(2, '0'); |
| 165 | const minutes = String(date.getMinutes()).padStart(2, '0'); |
| 166 | const seconds = String(date.getSeconds()).padStart(2, '0'); |
| 167 | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| 168 | } |
| 169 | |
| 170 | export function getStorageStats() { |
| 171 | return { |