reconnect desktop on tunnel lost, add download logs button
This commit is contained in:
1 parent
c029fc8e50
commit
149c9d680c
6 files changed
+78
-10
No files matched your search
@@ -34,11 +34,21 @@ const logEl = $('log') as HTMLPreElement;
|
||||
const statusEl = $('status');
|
||||
const startBtn = $('start') as HTMLButtonElement;
|
||||
const stopBtn = $('stop') as HTMLButtonElement;
|
||||
const downloadLogsBtn = $('downloadLogs') as HTMLImageElement;
|
||||
const platformHint = $('platformHint');
|
||||
const linkInput = input('link');
|
||||
|
||||
stopBtn.disabled = true;
|
||||
|
||||
downloadLogsBtn.addEventListener('click', () => {
|
||||
const blob = new Blob([logEl.textContent || ''], { type: 'text/plain' });
|
||||
const anchor = document.createElement('a');
|
||||
anchor.href = URL.createObjectURL(blob);
|
||||
anchor.download = 'joiner-logs-' + new Date().toISOString().replace(/[:.]/g, '-') + '.txt';
|
||||
anchor.click();
|
||||
URL.revokeObjectURL(anchor.href);
|
||||
});
|
||||
|
||||
function refreshPlatformHint() {
|
||||
const p = detectPlatform(linkInput.value.trim());
|
||||
platformHint.textContent = `Detected platform: ${platformLabel(p)}`;
|
||||
|
||||
Reference in new issue
Block a user