19 lines
377 B
JavaScript
19 lines
377 B
JavaScript
export class ServerAuth {
|
|
constructor (address, port, tlsEnabled) {
|
|
this.address = address;
|
|
this.port = port;
|
|
this.isTLSenabled = !!tlsEnabled;
|
|
}
|
|
|
|
getAuth () {
|
|
const serverdata = JSON.parse(localStorage.getItem(`server:${
|
|
!!this.isTLSenabled ? "wss" : "ws"
|
|
}:${address}:${port}`) ?? "null");
|
|
if (!serverdata) return null;
|
|
|
|
}
|
|
|
|
renderAuth (type) {
|
|
|
|
}
|
|
} |