Merge branch 'NebulaServices:rewrite' into rewrite
This commit is contained in:
commit
5fdd61587e
10 changed files with 112 additions and 39 deletions
|
|
@ -20,7 +20,7 @@
|
|||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="margin: 0;">
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/index.tsx"></script>
|
||||
</body>
|
||||
|
|
|
|||
26
src/LoadSuspense.tsx
Normal file
26
src/LoadSuspense.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import './Suspense.css'
|
||||
|
||||
export function LoadSuspense() {
|
||||
return (
|
||||
<div class="suspenseContainer">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.2"
|
||||
viewBox="0 0 400 400"
|
||||
width="400"
|
||||
height="400"
|
||||
fill="#5e17eb"
|
||||
class="animate-pulse-brighter"
|
||||
>
|
||||
<g id="svgg">
|
||||
<path
|
||||
id="path0"
|
||||
fill-rule="evenodd"
|
||||
class="s0"
|
||||
d="m213.6 84c1 0.3 3.4 0.7 5.1 1 1.8 0.2 4.1 0.7 5.2 1 13.2 4.1 20.3 6.8 24.5 9.1 0.6 0.3 2.3 1.2 3.8 2 2.8 1.4 13.1 8 14.4 9.2 0.5 0.3 2.3 1.9 4.2 3.5 6.7 5.5 15.5 14.9 19.2 20.4 1 1.4 2 2.7 2.2 2.8 0.3 0.1 0.5 0.5 0.5 0.8 0 0.3 1.2 2.2 2.5 4.3 2.3 3.4 7.8 14.3 9.8 19.3 0.8 2.1 0.9 2.2 10 4.9 5.6 1.6 11.1 3.4 11.7 3.8 0.3 0.2 2.4 1.1 4.7 1.9 11.1 4.1 23 12.5 27.3 19.4 5.5 8.7 3.6 20.5-4.5 28.5-3.1 3-7.5 6.4-8.4 6.4-0.3 0-0.7 0.2-0.8 0.5-1.1 2.3-23.3 11.2-35.9 14.3-3.2 0.9-3.5 1.2-5.7 6.8-7.5 19-25.5 40.6-42.3 51.1-1.6 1-3.1 2-3.3 2.2-0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 6.2 10.7 35.6 33.5 43.3 33.5 0.2 0 1.3 0.4 2.5 0.9 2.5 1.2 10.6 3.4 15.3 4.2 9.5 1.8 11.6 2.1 17.4 2.1 6.6 0 16.4-1.3 22.9-3 2.2-0.5 5.2-1.3 6.8-1.7 1.6-0.3 3.2-0.9 3.5-1.2 0.4-0.3 1.1-0.6 1.6-0.6 2.3 0 22-10.6 24-12.9 0.2-0.2 2.2-1.9 4.5-3.7 5.7-4.5 11.8-11 17.1-18.4 1.6-2.3 3.2-4.5 3.6-4.9 0.4-0.4 0.7-1 0.7-1.2 0-0.2 0.8-1.9 1.9-3.6 1.1-1.7 1.9-3.2 1.9-3.4 0-0.2-3.8 0.4-11 1.6-31.7 5.4-85.1 6.7-126.9 3.1-9.6-0.8-23.1-2.3-27.8-3.2-2.2-0.4-5.3-0.9-6.9-1.2z"
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
23
src/Suspense.css
Normal file
23
src/Suspense.css
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
.suspenseContainer {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #191724;
|
||||
}
|
||||
|
||||
@keyframes pulse-brighter {
|
||||
0%,
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.animate-pulse-brighter {
|
||||
animation: pulse-brighter 2s infinite;
|
||||
height: 11rem;
|
||||
}
|
||||
|
|
@ -1,26 +1,15 @@
|
|||
import { render } from "preact";
|
||||
import { LocationProvider, Router, Route } from "preact-iso";
|
||||
import { Home } from "./pages/Home";
|
||||
import { NotFound } from "./pages/_404.jsx";
|
||||
import { DiscordPage } from "./pages/discord.jsx";
|
||||
import { ProxyFrame } from "./pages/ProxyFrame.js";
|
||||
import { Settings } from "./pages/Settings/index.js";
|
||||
import { Suspense, lazy } from "preact/compat";
|
||||
import { LoadSuspense } from "./LoadSuspense";
|
||||
const Routes = lazy(() => import("./routes"));
|
||||
|
||||
import "./style.css";
|
||||
import "./themes/main.css";
|
||||
import "./i18n";
|
||||
|
||||
export function App() {
|
||||
export default function App() {
|
||||
return (
|
||||
<LocationProvider>
|
||||
<Router>
|
||||
<Route path="/" component={Home} />
|
||||
<Route path="/discord" component={DiscordPage} />
|
||||
<Route path="/go/:url" component={ProxyFrame} />
|
||||
<Route path="/settings" component={Settings} />
|
||||
<Route default component={NotFound} />
|
||||
</Router>
|
||||
</LocationProvider>
|
||||
<Suspense fallback={<LoadSuspense />}>
|
||||
<div>
|
||||
<Routes />
|
||||
</div>
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,5 +54,6 @@
|
|||
"settings": "Nebula - Settings",
|
||||
"discord": "Nebula - Discord",
|
||||
"404": "Nebula - 404"
|
||||
}
|
||||
},
|
||||
"comingsoon": "Coming soon!"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,5 +54,6 @@
|
|||
"settings": "Nebula - Ajustes",
|
||||
"discord": "Nebula - Discord",
|
||||
"404": "Nebula - 404"
|
||||
}
|
||||
},
|
||||
"comingsoon": "¡Próximamente!"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,5 +54,6 @@
|
|||
"settings": "ネブラ - セッティング",
|
||||
"discord": "ネブラ - Discord",
|
||||
"404": "ネブラ - 404"
|
||||
}
|
||||
},
|
||||
"comingsoon": "近日公開"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
import { motion } from "framer-motion";
|
||||
import { tabContentVariant, settingsPageVariant } from "./Variants";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
const Customization = ({ id, active }) => (
|
||||
function Customization({ id, active }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<motion.div
|
||||
role="tabpanel"
|
||||
id={id}
|
||||
|
|
@ -10,11 +13,15 @@ const Customization = ({ id, active }) => (
|
|||
animate={active ? "active" : "inactive"}
|
||||
initial="inactive"
|
||||
>
|
||||
<motion.div variants={settingsPageVariant} className="content-card text-center w-full flex flex-col justify-center items-center">
|
||||
<motion.div
|
||||
variants={settingsPageVariant}
|
||||
className="content-card flex w-full flex-col items-center justify-center text-center"
|
||||
>
|
||||
<img src="/comingsoonsnake.png" class="h-72 w-72"></img>
|
||||
<h1 class="font-roboto text-3xl">Coming soon!</h1>
|
||||
<h1 class="font-roboto text-3xl">{t("comingsoon")}</h1>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Customization;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const Proxy = ({ id, active }) => {
|
|||
{ id: "automatic", label: t("settings.proxy.automatic") },
|
||||
{ id: "ultraviolet", label: "Ultraviolet" },
|
||||
{ id: "rammerhead", label: "Rammerhead" },
|
||||
{ id: "dynamic", label: "Dynamic " + t("settings.proxy.buggyWarning") }
|
||||
{ id: "dynamic", label: "Dynamic" }
|
||||
];
|
||||
|
||||
const proxyModes = [
|
||||
|
|
|
|||
25
src/routes.tsx
Normal file
25
src/routes.tsx
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { LocationProvider, Router, Route } from "preact-iso";
|
||||
import { Home } from "./pages/Home";
|
||||
import { NotFound } from "./pages/_404.jsx";
|
||||
import { DiscordPage } from "./pages/discord.jsx";
|
||||
import { ProxyFrame } from "./pages/ProxyFrame.js";
|
||||
import { Settings } from "./pages/Settings/index.js";
|
||||
|
||||
import "./style.css";
|
||||
import "./themes/main.css";
|
||||
import "./i18n";
|
||||
|
||||
export default function Routes() {
|
||||
return (
|
||||
<LocationProvider>
|
||||
<Router>
|
||||
<Route path="/" component={Home} />
|
||||
<Route path="/discord" component={DiscordPage} />
|
||||
<Route path="/go/:url" component={ProxyFrame} />
|
||||
<Route path="/settings" component={Settings} />
|
||||
<Route default component={NotFound} />
|
||||
</Router>
|
||||
</LocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Add table
Reference in a new issue