personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Split remote key modal into Server URL and Key fields

The modal previously showed a single `observer --remote <url>` command.
Now it shows Server URL and Key as two separate copyable fields, aligning
with native clients (macOS, future) that accept host and key as separate
inputs.

+41 -24
+41 -24
apps/remote/workspace.html
··· 192 192 .copy-btn.copied { 193 193 background: #28a745; 194 194 } 195 + .credential-label { 196 + font-weight: bold; 197 + font-size: 0.85em; 198 + color: #333; 199 + margin-bottom: 0.25em; 200 + } 195 201 .modal-actions { 196 202 display: flex; 197 203 justify-content: flex-end; ··· 234 240 <div class="modal-content"> 235 241 <span class="modal-close" id="keyModalClose">&times;</span> 236 242 <h3 id="keyModalTitle">Remote: <span id="modalRemoteName"></span></h3> 237 - <p>Run this command on your observer machine:</p> 243 + <p>Use these credentials in your solstone app's service settings:</p> 244 + <div class="credential-label">Server URL</div> 245 + <div class="command-box"> 246 + <code id="serverUrlText"></code> 247 + <button class="copy-btn" id="copyServerUrlBtn">Copy</button> 248 + </div> 249 + <div class="credential-label">Key</div> 238 250 <div class="command-box"> 239 - <code id="commandText"></code> 240 - <button class="copy-btn" id="copyBtn">Copy</button> 251 + <code id="keyText"></code> 252 + <button class="copy-btn" id="copyKeyBtn">Copy</button> 241 253 </div> 242 254 <p style="font-size: 0.9em; color: #666;"> 243 - The observer will upload captured segments to this server for processing. 244 - Keep this URL secret - anyone with it can upload files to your journal. 255 + Keep this key secret — anyone with it can upload to your journal. 245 256 </p> 246 257 <div class="modal-actions"> 247 258 <button id="doneBtn" style="background: #007bff; color: white; border: none;">Done</button> ··· 255 266 const remoteNameInput = document.getElementById('remoteName'); 256 267 const keyModal = document.getElementById('keyModal'); 257 268 const modalRemoteName = document.getElementById('modalRemoteName'); 258 - const commandText = document.getElementById('commandText'); 259 - const copyBtn = document.getElementById('copyBtn'); 269 + const serverUrlText = document.getElementById('serverUrlText'); 270 + const keyText = document.getElementById('keyText'); 271 + const copyServerUrlBtn = document.getElementById('copyServerUrlBtn'); 272 + const copyKeyBtn = document.getElementById('copyKeyBtn'); 260 273 const doneBtn = document.getElementById('doneBtn'); 261 274 const keyModalClose = document.getElementById('keyModalClose'); 262 275 ··· 370 383 throw new Error(data.error || 'Failed to get key'); 371 384 } 372 385 373 - showKeyModal(name, data.ingest_url); 386 + showKeyModal(name, data.key); 374 387 } catch (err) { 375 388 if (window.showError) showError(err.message); 376 389 } 377 390 } 378 391 379 - function showKeyModal(name, ingestUrl) { 380 - const baseUrl = window.location.origin; 381 - const fullUrl = `${baseUrl}${ingestUrl}`; 392 + function showKeyModal(name, key) { 382 393 modalRemoteName.textContent = name; 383 - commandText.textContent = `observer --remote ${fullUrl}`; 394 + serverUrlText.textContent = window.location.origin; 395 + keyText.textContent = key; 384 396 keyModal.style.display = 'block'; 385 397 } 386 398 ··· 405 417 throw new Error(data.error || 'Failed to create remote'); 406 418 } 407 419 408 - // Show modal with command 409 - showKeyModal(name, data.ingest_url); 420 + // Show modal with key 421 + showKeyModal(name, data.key); 410 422 411 423 // Clear input and reload list 412 424 remoteNameInput.value = ''; ··· 433 445 } 434 446 }; 435 447 436 - copyBtn.onclick = () => { 437 - navigator.clipboard.writeText(commandText.textContent).then(() => { 438 - copyBtn.textContent = 'Copied!'; 439 - copyBtn.classList.add('copied'); 440 - setTimeout(() => { 441 - copyBtn.textContent = 'Copy'; 442 - copyBtn.classList.remove('copied'); 443 - }, 2000); 444 - }); 445 - }; 448 + function setupCopyBtn(btn, codeEl) { 449 + btn.onclick = () => { 450 + navigator.clipboard.writeText(codeEl.textContent).then(() => { 451 + btn.textContent = 'Copied!'; 452 + btn.classList.add('copied'); 453 + setTimeout(() => { 454 + btn.textContent = 'Copy'; 455 + btn.classList.remove('copied'); 456 + }, 2000); 457 + }); 458 + }; 459 + } 460 + 461 + setupCopyBtn(copyServerUrlBtn, serverUrlText); 462 + setupCopyBtn(copyKeyBtn, keyText); 446 463 447 464 // Initial load 448 465 loadRemotes();