Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions client/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4534,9 +4534,9 @@ class Dashboard {
}

async installWindowsStartup() {
const serverUrl = window.location.port === '2080' ? 'http://localhost:3000' :
window.location.port === '2081' ? 'http://localhost:4000' :
window.location.origin;
// Same-origin: the client dev server proxies /api to the backend, which
// also works from remote browsers (a hardcoded localhost:PORT does not).
const serverUrl = window.location.origin;

// First check if we're on WSL
try {
Expand Down Expand Up @@ -4589,9 +4589,9 @@ class Dashboard {
}

async checkRecoveryState(workspaceId) {
const serverUrl = window.location.port === '2080' ? 'http://localhost:3000' :
window.location.port === '2081' ? 'http://localhost:4000' :
window.location.origin;
// Same-origin: the client dev server proxies /api to the backend, which
// also works from remote browsers (a hardcoded localhost:PORT does not).
const serverUrl = window.location.origin;

try {
const response = await fetch(`${serverUrl}/api/recovery/${encodeURIComponent(workspaceId)}`);
Expand Down Expand Up @@ -4687,9 +4687,9 @@ class Dashboard {

document.body.appendChild(modal);

const serverUrl = window.location.port === '2080' ? 'http://localhost:3000' :
window.location.port === '2081' ? 'http://localhost:4000' :
window.location.origin;
// Same-origin: the client dev server proxies /api to the backend, which
// also works from remote browsers (a hardcoded localhost:PORT does not).
const serverUrl = window.location.origin;

const setButtonsDisabled = (disabled) => {
modal.querySelectorAll('button').forEach((btn) => { btn.disabled = !!disabled; });
Expand Down
Loading