Marco
dfdae284ff
Show checkmate screen, once the server sends the 'gameEnded' message. Additionally, show an icon that lets users copy the passphrase to the clipboard.
35 lines
622 B
Dart
35 lines
622 B
Dart
const prodURL = 'chess.sw-gross.de:9999';
|
|
const debugURL = 'localhost:8080';
|
|
|
|
const dbgUrl = true;
|
|
|
|
String getHostURL() {
|
|
var prot = 'https';
|
|
var domain = prodURL;
|
|
if (dbgUrl) {
|
|
prot = 'http';
|
|
domain = debugURL;
|
|
}
|
|
return '$prot://$domain/api/hostPrivate';
|
|
}
|
|
|
|
String getJoinURL() {
|
|
var prot = 'https';
|
|
var domain = prodURL;
|
|
if (dbgUrl) {
|
|
prot = 'http';
|
|
domain = debugURL;
|
|
}
|
|
return '$prot://$domain/api/joinPrivate';
|
|
}
|
|
|
|
String getWebsocketURL() {
|
|
var prot = 'wss';
|
|
var domain = prodURL;
|
|
if (dbgUrl) {
|
|
prot = 'ws';
|
|
domain = debugURL;
|
|
}
|
|
return '$prot://$domain/api/ws';
|
|
}
|