0
0
mirror of https://github.com/yude-jp/yude.jp synced 2024-12-22 20:20:09 +09:00

Compare commits

..

No commits in common. "290ece6aba56c5fcea31b5df23bb6ecedb12bb10" and "d7099acd8b85d627e2e4089f6b8e7f141978f1f0" have entirely different histories.

4 changed files with 7 additions and 29 deletions

View File

@ -4,7 +4,5 @@
"no_one": "No one is playing.",
"offline": "Server is down.",
"address": "Server address",
"fail": "Failed to retrieve server status.",
"loading": "Retrieving server status...",
"version": "Version"
"fail": "Failed to retrieve server status."
}

View File

@ -4,7 +4,5 @@
"no_one": "現在、誰もログインしていません。",
"offline": "サーバーがオフラインのようです。",
"address": "サーバー アドレス",
"fail": "サーバーの状態を取得できませんでした。",
"loading": "サーバーの状態を取得しています...",
"version": "バージョン"
"fail": "サーバーの状態を取得できませんでした。"
}

View File

@ -31,19 +31,16 @@ export default function Minecraft(props) {
const playing = t('minecraft:playing', {count: player})
const no_one = t('minecraft:no_one')
const offline = t('minecraft:offline')
const loading = t('minecraft:loading')
return (
<p className="text-center">
{(() => {
if (status == true) {
if (status) {
if (player == undefined || player == 0) {
return <span>{no_one}</span>
} else {
return <span>{playing}</span>
}}else if (status == false) {
}}else{
return <span>{offline}</span>
}else {
return <span>{loading}</span>
}
})()}
</p>

View File

@ -4,7 +4,7 @@ import useTranslation from 'next-translate/useTranslation'
import { useRouter } from 'next/router'
import Minecraft from './components/Minecraft'
import Image from 'next/image'
import { faMap, faCopy } from '@fortawesome/free-solid-svg-icons'
import { faMap } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import Link from 'next/link'
@ -14,11 +14,6 @@ export default function About(props) {
const { t, lang } = useTranslation("minecraft")
const title = t('title')
const address = t('address')
const version = t('version')
const copyText = () => {
navigator.clipboard.writeText("yude.jp");
};
return (
<Layout title={title}>
<div>
@ -34,21 +29,11 @@ export default function About(props) {
</div>
<div className="text-center">
<Minecraft />
<p>
<span>{address}: <code>yude.jp</code></span>
<button
className="bg-pink-600 text-white active:bg-pink-600 font-bold text-sm px-2 py-2 ml-2 rounded shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
type="button"
onClick={() => copyText()}
>
<FontAwesomeIcon icon={faCopy} className="w-5 h-5 inline"/>
</button>
</p>
<p>{version}: 1.16.x</p>
<p>{address}: <code>yude.jp</code></p>
<Link href="https://dynmap.yude.jp">
<a>
<button
className="bg-pink-600 text-white active:bg-pink-600 mt-3 font-bold text-sm px-6 py-3 rounded shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
className="bg-pink-600 text-white active:bg-pink-600 font-bold text-sm px-6 py-3 rounded shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
type="button"
>
<FontAwesomeIcon icon={faMap} className="w-5 h-5 inline"/> Dynmap