mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-12-14 11:56:15 +08:00
[-] remove munet migration notice
This commit is contained in:
@@ -1,32 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
export let username: string;
|
|
||||||
export let email: string;
|
|
||||||
|
|
||||||
let shouldShow = navigator.language.startsWith('zh');
|
|
||||||
|
|
||||||
// 会导致瞬间出现,但是不知道为什么 svelte 的 transition 动画不工作
|
|
||||||
// if (!shouldShow) {
|
|
||||||
// fetch('https://47.122.72.135/ip/isChina')
|
|
||||||
// .then(it => it.json())
|
|
||||||
// .then(it => shouldShow = it)
|
|
||||||
// .catch(() => shouldShow = false);
|
|
||||||
// }
|
|
||||||
|
|
||||||
const jump = () => {
|
|
||||||
const params = new URLSearchParams();
|
|
||||||
if (username) params.set('username', username);
|
|
||||||
if (email) params.set('email', email);
|
|
||||||
location.href = `https://portal.mumur.net/register?${params.toString()}`;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if shouldShow}
|
|
||||||
<div class="cursor-pointer" on:click={jump}>
|
|
||||||
<h2>MuNET 了解一下!</h2>
|
|
||||||
<div>
|
|
||||||
<p>MuNET 是 AquaDX 的继任者,提供更适合中国用户的服务器和更好的游戏体验。</p>
|
|
||||||
<p>如果你还没有游戏数据,建议在 MuNET 上创建账号并开始游戏。点击立即前往</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
import { t } from "../libs/i18n";
|
import { t } from "../libs/i18n";
|
||||||
import ImportDataAction from "./Home/ImportDataAction.svelte";
|
import ImportDataAction from "./Home/ImportDataAction.svelte";
|
||||||
import Communities from "./Home/Communities.svelte";
|
import Communities from "./Home/Communities.svelte";
|
||||||
import MigrateAction from "./Home/MigrateAction.svelte";
|
|
||||||
|
|
||||||
USER.ensureLoggedIn();
|
USER.ensureLoggedIn();
|
||||||
|
|
||||||
@@ -59,9 +58,6 @@
|
|||||||
</ActionCard>
|
</ActionCard>
|
||||||
|
|
||||||
<ImportDataAction/>
|
<ImportDataAction/>
|
||||||
{#if me}
|
|
||||||
<MigrateAction username={me.username}/>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
{:else if tab === 1}
|
{:else if tab === 1}
|
||||||
<div out:fade={FADE_OUT} in:fade={FADE_IN}>
|
<div out:fade={FADE_OUT} in:fade={FADE_IN}>
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
import { fade } from "svelte/transition"
|
|
||||||
import { t } from "../../libs/i18n";
|
|
||||||
import ActionCard from "../../components/ActionCard.svelte";
|
|
||||||
import { CARD, GAME, USER } from "../../libs/sdk";
|
|
||||||
|
|
||||||
export let username: string;
|
|
||||||
let shouldShow = navigator.language.startsWith('zh');
|
|
||||||
let showWarning = false;
|
|
||||||
let isCardBindIssue = false;
|
|
||||||
|
|
||||||
if (!shouldShow) {
|
|
||||||
fetch('https://47.122.72.135/ip/isChina')
|
|
||||||
.then(it => it.json())
|
|
||||||
.then(it => shouldShow = it)
|
|
||||||
.catch(() => shouldShow = false);
|
|
||||||
}
|
|
||||||
|
|
||||||
CARD.userGames(username).then(games => {
|
|
||||||
if (!Object.values(games).some(it => it)) {
|
|
||||||
isCardBindIssue = true;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const handleClick = () => {
|
|
||||||
if (isCardBindIssue) {
|
|
||||||
showWarning = true;
|
|
||||||
return
|
|
||||||
}
|
|
||||||
jump()
|
|
||||||
}
|
|
||||||
|
|
||||||
const jump = () => {
|
|
||||||
const token = localStorage.getItem('token')
|
|
||||||
location.href = `https://portal.mumur.net/migrateFromAquaDx/${token}`
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if shouldShow}
|
|
||||||
<ActionCard color="190, 149, 255" icon="system-uicons:jump-up" on:click={handleClick}>
|
|
||||||
<h3>迁移到 MuNET</h3>
|
|
||||||
<span>更适合中国宝宝体质的服务器,AquaDX 的继任者。点击查看详情</span>
|
|
||||||
</ActionCard>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if showWarning}
|
|
||||||
<div class="overlay" transition:fade>
|
|
||||||
<div>
|
|
||||||
<h2>提示</h2>
|
|
||||||
<p>看起来你在 AquaDX 还没有游戏数据,也许是因为没有绑卡或者绑定的卡不是在游戏中点击“查看卡号”获取的…</p>
|
|
||||||
<p>现在迁移的话,大概会导致你的游戏数据无法被正确的迁移。建议你先去检查一下吧</p>
|
|
||||||
<div class="buttons">
|
|
||||||
<button on:click={() => showWarning = false}>{t('action.cancel')}</button>
|
|
||||||
<button on:click={jump}>继续</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<style lang="sass">
|
|
||||||
h3
|
|
||||||
font-size: 1.3rem
|
|
||||||
margin: 0
|
|
||||||
|
|
||||||
.buttons
|
|
||||||
display: grid
|
|
||||||
grid-template-columns: 1fr 1fr
|
|
||||||
gap: 1rem
|
|
||||||
</style>
|
|
||||||
@@ -5,7 +5,6 @@
|
|||||||
import Icon from "@iconify/svelte";
|
import Icon from "@iconify/svelte";
|
||||||
import { USER } from "../libs/sdk";
|
import { USER } from "../libs/sdk";
|
||||||
import { t } from "../libs/i18n"
|
import { t } from "../libs/i18n"
|
||||||
import MunetRegisterBanner from "../components/MunetRegisterBanner.svelte";
|
|
||||||
|
|
||||||
let params = new URLSearchParams(window.location.search)
|
let params = new URLSearchParams(window.location.search)
|
||||||
|
|
||||||
@@ -162,7 +161,7 @@
|
|||||||
return submitting = false
|
return submitting = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send request to server
|
// Send request to server
|
||||||
await USER.changePassword({ token, password })
|
await USER.changePassword({ token, password })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
state = 'verify'
|
state = 'verify'
|
||||||
@@ -221,9 +220,6 @@
|
|||||||
on:turnstile-expired={_ => window.location.reload()}
|
on:turnstile-expired={_ => window.location.reload()}
|
||||||
on:turnstile-timeout={_ => console.log(error = t('welcome.turnstile-timeout'))} />
|
on:turnstile-timeout={_ => console.log(error = t('welcome.turnstile-timeout'))} />
|
||||||
{/if}
|
{/if}
|
||||||
{#if isSignup}
|
|
||||||
<MunetRegisterBanner username={username} email={email}/>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
{:else if state === "submitreset"}
|
{:else if state === "submitreset"}
|
||||||
<div class="login-form" transition:slide>
|
<div class="login-form" transition:slide>
|
||||||
@@ -264,7 +260,7 @@
|
|||||||
{#if error}
|
{#if error}
|
||||||
<span class="error">{error}</span>
|
<span class="error">{error}</span>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="login-form" transition:slide>
|
<div class="login-form" transition:slide>
|
||||||
<input type="password" placeholder={t('new-password')} bind:value={password}>
|
<input type="password" placeholder={t('new-password')} bind:value={password}>
|
||||||
<button on:click={changePassword}>
|
<button on:click={changePassword}>
|
||||||
{#if submitting}
|
{#if submitting}
|
||||||
|
|||||||
Reference in New Issue
Block a user