MCPcopy Create free account
hub / github.com/bywwcnll/StreamPanel / getConnectionName

Function getConnectionName

devtools/panel.bundle.js:347–358  ·  view source on GitHub ↗
(connectionData)

Source from the content-addressed store, hash-verified

345 }
346
347 function getConnectionName(connectionData) {
348 if (!connectionData.createdAt) return '未命名连接';
349
350 const date = new Date(connectionData.createdAt);
351 const year = date.getFullYear();
352 const month = String(date.getMonth() + 1).padStart(2, '0');
353 const day = String(date.getDate()).padStart(2, '0');
354 const hours = String(date.getHours()).padStart(2, '0');
355 const minutes = String(date.getMinutes()).padStart(2, '0');
356 const seconds = String(date.getSeconds()).padStart(2, '0');
357 return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
358 }
359
360 // Connection management module
361

Callers 1

saveConnectionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected