Leave blank and it will be chosen automatically
const { LitElement, html, css } = require('lit') const { commonCss, displayScreen } = require('./components/common') class PlayScreen extends LitElement { static get styles () { return css` ${commonCss} .title { top: 12px; } .edit-boxes { position: absolute; top: 59px; left: 50%; display: flex; flex-direction: column; gap: 14px 0; transform: translate(-50%); width: 310px; } .wrapper { width: 100%; display: flex; flex-direction: row; gap: 0 4px; } .button-wrapper { display: flex; flex-direction: row; gap: 0 4px; position: absolute; bottom: 9px; left: 50%; transform: translate(-50%); width: 310px; } .extra-info-bv { font-size: 10px; color: rgb(206, 206, 206); text-shadow: 1px 1px black; position: absolute; left: calc(50% + 2px); bottom: -34px; } ` } static get properties () { return { server: { type: String }, serverport: { type: Number }, proxy: { type: String }, proxyport: { type: Number }, username: { type: String }, password: { type: String }, version: { type: String } } } constructor () { super() this.server = '' this.serverport = 25565 this.proxy = '' this.proxyport = '' this.username = window.localStorage.getItem('username') ?? 'pviewer' + (Math.floor(Math.random() * 1000)) this.password = '' this.version = '' window.fetch('config.json').then(res => res.json()).then(config => { this.server = config.defaultHost this.serverport = config.defaultHostPort ?? 25565 this.proxy = config.defaultProxy this.proxyport = !config.defaultProxy && !config.defaultProxyPort ? '' : config.defaultProxyPort ?? 443 this.version = config.defaultVersion }) } render () { return html`
Join a Server
Leave blank and it will be chosen automatically