s/network/server/

Closes: https://todo.sr.ht/~emersion/gamja/46
This commit is contained in:
Simon Ser 2021-06-03 11:46:50 +02:00
parent 63a71e5f5d
commit fe9c483570
5 changed files with 156 additions and 156 deletions

View file

@ -1,7 +1,7 @@
import { html, Component } from "../lib/index.js";
import linkify from "../lib/linkify.js";
import { strip as stripANSI } from "../lib/ansi.js";
import { BufferType, NetworkStatus, getNetworkName } from "../state.js";
import { BufferType, ServerStatus, getServerName } from "../state.js";
const UserStatus = {
HERE: "here",
@ -40,17 +40,17 @@ export default function BufferHeader(props) {
var description = null, actions = null;
switch (props.buffer.type) {
case BufferType.SERVER:
switch (props.network.status) {
case NetworkStatus.DISCONNECTED:
switch (props.server.status) {
case ServerStatus.DISCONNECTED:
description = "Disconnected";
break;
case NetworkStatus.CONNECTING:
case ServerStatus.CONNECTING:
description = "Connecting...";
break;
case NetworkStatus.REGISTERING:
case ServerStatus.REGISTERING:
description = "Logging in...";
break;
case NetworkStatus.REGISTERED:
case ServerStatus.REGISTERED:
if (props.bouncerNetwork) {
switch (props.bouncerNetwork.state) {
case "disconnected":
@ -74,7 +74,7 @@ export default function BufferHeader(props) {
}
if (props.isBouncer) {
if (props.network.isupport.get("BOUNCER_NETID")) {
if (props.server.isupport.get("BOUNCER_NETID")) {
actions = html`
<button
key="join"
@ -156,7 +156,7 @@ export default function BufferHeader(props) {
var name = props.buffer.name;
if (props.buffer.type == BufferType.SERVER) {
name = getNetworkName(props.network, props.bouncerNetwork, props.isBouncer);
name = getServerName(server, props.bouncerNetwork, props.isBouncer);
}
return html`