Allow desktop app to connect to selfhosted servers (#4902)

# Description of Changes
Changes the desktop app to allow connections to self-hosted servers on
first startup. This was quite involved and hit loads of CORS issues all
through the stack, but I think it's working now. This also changes the
bundled backend to spawn on an OS-decided port rather than always
spawning on `8080`, which means that the user can have other things
running on port `8080` now and the app will still work fine. There were
quite a few places that needed to be updated to decouple the app from
explicitly using `8080` and I was originally going to split those
changes out into another PR (#4939), but I couldn't get it working
independently in the time I had, so the diff here is just going to be
complex and contian two distinct changes - sorry 🙁
This commit is contained in:
James Brunton
2025-11-20 10:03:34 +00:00
committed by GitHub
parent 75414b89f9
commit f4725b98b0
43 changed files with 3209 additions and 218 deletions
@@ -5498,5 +5498,158 @@
"offline": "Backend Offline",
"starting": "Backend starting up...",
"wait": "Please wait for the backend to finish launching and try again."
},
"setup": {
"welcome": "Welcome to Stirling PDF",
"description": "Get started by choosing how you want to use Stirling PDF",
"step1": {
"label": "Choose Mode",
"description": "Offline or Server"
},
"step2": {
"label": "Select Server",
"description": "Self-hosted server"
},
"step3": {
"label": "Login",
"description": "Enter credentials"
},
"mode": {
"offline": {
"title": "Use Offline",
"description": "Run locally without an internet connection"
},
"server": {
"title": "Connect to Server",
"description": "Connect to a remote Stirling PDF server"
}
},
"server": {
"title": "Connect to Server",
"subtitle": "Enter your self-hosted server URL",
"type": {
"saas": "Stirling PDF SaaS",
"selfhosted": "Self-hosted server"
},
"url": {
"label": "Server URL",
"description": "Enter the full URL of your self-hosted Stirling PDF server"
},
"error": {
"emptyUrl": "Please enter a server URL",
"unreachable": "Could not connect to server",
"testFailed": "Connection test failed"
},
"testing": "Testing connection..."
},
"login": {
"title": "Sign In",
"subtitle": "Enter your credentials to continue",
"connectingTo": "Connecting to:",
"username": {
"label": "Username",
"placeholder": "Enter your username"
},
"password": {
"label": "Password",
"placeholder": "Enter your password"
},
"error": {
"emptyUsername": "Please enter your username",
"emptyPassword": "Please enter your password"
},
"submit": "Login"
}
},
"settings": {
"connection": {
"title": "Connection Mode",
"mode": {
"offline": "Offline",
"server": "Server"
},
"server": "Server",
"user": "Logged in as",
"switchToServer": "Connect to Server",
"switchToOffline": "Switch to Offline",
"logout": "Logout",
"selectServer": "Select Server",
"login": "Login"
},
"general": {
"title": "General",
"description": "Configure general application preferences.",
"user": "User",
"logout": "Log out",
"enableFeatures": {
"dismiss": "Dismiss",
"title": "For System Administrators",
"intro": "Enable user authentication, team management, and workspace features for your organisation.",
"action": "Configure",
"and": "and",
"benefit": "Enables user roles, team collaboration, admin controls, and enterprise features.",
"learnMore": "Learn more in documentation"
},
"defaultToolPickerMode": "Default tool picker mode",
"defaultToolPickerModeDescription": "Choose whether the tool picker opens in fullscreen or sidebar by default",
"mode": {
"sidebar": "Sidebar",
"fullscreen": "Fullscreen"
},
"autoUnzipTooltip": "Automatically extract ZIP files returned from API operations. Disable to keep ZIP files intact. This does not affect automation workflows.",
"autoUnzip": "Auto-unzip API responses",
"autoUnzipDescription": "Automatically extract files from ZIP responses",
"autoUnzipFileLimitTooltip": "Only unzip if the ZIP contains this many files or fewer. Set higher to extract larger ZIPs.",
"autoUnzipFileLimit": "Auto-unzip file limit",
"autoUnzipFileLimitDescription": "Maximum number of files to extract from ZIP",
"defaultPdfEditor": "Default PDF editor",
"defaultPdfEditorActive": "Stirling PDF is your default PDF editor",
"defaultPdfEditorInactive": "Another application is set as default",
"defaultPdfEditorChecking": "Checking...",
"defaultPdfEditorSet": "Already Default",
"setAsDefault": "Set as Default",
"updates": {
"title": "Software Updates",
"description": "Check for updates and view version information",
"currentVersion": "Current Version",
"latestVersion": "Latest Version",
"checkForUpdates": "Check for Updates",
"viewDetails": "View Details"
}
},
"hotkeys": {
"errorConflict": "Shortcut already used by {{tool}}.",
"searchPlaceholder": "Search tools...",
"none": "Not assigned",
"customBadge": "Custom",
"defaultLabel": "Default: {{shortcut}}",
"capturing": "Press keys… (Esc to cancel)",
"change": "Change shortcut",
"reset": "Reset",
"shortcut": "Shortcut",
"noShortcut": "No shortcut set"
}
},
"auth": {
"sessionExpired": "Session Expired",
"pleaseLoginAgain": "Please login again.",
"accessDenied": "Access Denied",
"insufficientPermissions": "You do not have permission to perform this action."
},
"common": {
"loading": "Loading...",
"back": "Back",
"continue": "Continue",
"preview": "Preview",
"previous": "Previous",
"next": "Next",
"copied": "Copied!",
"copy": "Copy",
"expand": "Expand",
"collapse": "Collapse",
"retry": "Retry",
"refresh": "Refresh",
"cancel": "Cancel",
"done": "Done"
}
}