mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
Add connect to server button to web UI using steam launch api
Does not work if factorio is already open. Resolves #608
This commit is contained in:
1 parent
98a15d3366
commit
c5c73c8c96
3 files changed
+36
-22
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import * as lib from "@clusterio/lib";
|
||||
|
||||
export function instancePublicAddress(instance: lib.InstanceDetails, host?: lib.HostDetails | null) {
|
||||
if (instance.assignedHost === undefined || !host || !host.publicAddress) {
|
||||
return "";
|
||||
}
|
||||
if (instance.gamePort === undefined) {
|
||||
return host.publicAddress;
|
||||
}
|
||||
return `${host.publicAddress}:${instance.gamePort}`;
|
||||
}
|
||||
Reference in new issue
Block a user