feat: add file import and prompt() methods for API key entry in OBS

OBS Browser Source lacks clipboard support, making it impractical to
enter long API keys. Add two workarounds: "Import from File" reads a
key from a .txt file via the native file picker, and "Paste Key" uses
window.prompt() where OS-level paste should work.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cottongin
2026-05-03 01:30:56 -04:00
parent 3bd5752cb5
commit d7a834a992
2 changed files with 49 additions and 5 deletions

View File

@@ -764,6 +764,11 @@
<div class="control-row">
<input type="password" id="api-key-input" placeholder="Enter API key">
</div>
<div class="control-row" style="gap: 6px;">
<button id="import-key-btn" title="Import API key from a .txt file">Import from File</button>
<button id="prompt-key-btn" title="Enter API key via dialog (paste works)">Paste Key</button>
<input type="file" id="import-key-file" accept=".txt,.key" style="display: none;">
</div>
<div class="control-row">
<button id="ws-connect-btn">Connect</button>
</div>