feat: Add OnboardingImport and OnboardingComplete pages + polish Onboarding experience
This commit is contained in:
parent
c983fc5967
commit
08f432c3e6
13 changed files with 234 additions and 39 deletions
|
|
@ -56,6 +56,8 @@ macro_rules! collect_commands {
|
|||
set_settings,
|
||||
// Metadata
|
||||
get_minecraft_versions,
|
||||
// Launcher Packages (Instances)
|
||||
import_launcher_instances,
|
||||
// Provider Packages
|
||||
get_provider_package,
|
||||
get_provider_packages,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,27 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use onelauncher::cluster::content::package;
|
||||
use onelauncher::data::{Loader, ManagedPackage, ManagedUser, ManagedVersion, PackageType};
|
||||
use onelauncher::package::content::Providers;
|
||||
use onelauncher::package::import::{default_launcher_path, ImportType};
|
||||
use onelauncher::store::{Author, ClusterPath, Package, PackagePath, ProviderSearchResults};
|
||||
use uuid::Uuid;
|
||||
|
||||
#[specta::specta]
|
||||
#[tauri::command]
|
||||
pub async fn import_launcher_instances(launcher: ImportType, path: Option<PathBuf>) -> Result<(), String> {
|
||||
onelauncher::api::package::import::import_instances(
|
||||
launcher,
|
||||
path.unwrap_or(
|
||||
default_launcher_path(launcher)
|
||||
.ok_or(
|
||||
"couldn't get a default path for this launcher"
|
||||
)?
|
||||
)
|
||||
).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[specta::specta]
|
||||
#[tauri::command]
|
||||
pub async fn get_provider_package(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { PROGRAM_INFO } from '@onelauncher/client/bindings';
|
||||
import type { ParentProps } from 'solid-js';
|
||||
import { onMount, type ParentProps } from 'solid-js';
|
||||
import { MultiProvider } from './ui/components/MultiProvider';
|
||||
import { AccountControllerProvider } from './ui/components/overlay/account/AddAccountModal';
|
||||
import { ClusterModalControllerProvider } from './ui/components/overlay/cluster/ClusterCreationModal';
|
||||
|
|
@ -10,8 +10,10 @@ import { BrowserProvider } from './ui/hooks/useBrowser';
|
|||
import { SettingsProvider } from './ui/hooks/useSettings';
|
||||
|
||||
function RootLayout(props: ParentProps) {
|
||||
if (PROGRAM_INFO.dev_build !== true)
|
||||
document.addEventListener('contextmenu', e => e.preventDefault());
|
||||
onMount(() => {
|
||||
if (PROGRAM_INFO.dev_build !== true)
|
||||
document.addEventListener('contextmenu', e => e.preventDefault());
|
||||
});
|
||||
|
||||
return (
|
||||
<GlobalContexts>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
<svg width="252" height="277" viewBox="0 0 252 277" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_3343_6980)">
|
||||
<path d="M67.788 0H209.21C211.07 0 212.854 0.738831 214.169 2.05396C215.484 3.36909 216.223 5.15279 216.223 7.01266V97.0084C216.223 98.8683 215.484 100.652 214.169 101.967C212.854 103.282 211.07 104.021 209.21 104.021H67.788C65.9282 104.021 64.1445 103.282 62.8294 101.967C61.5142 100.652 60.7754 98.8683 60.7754 97.0084V7.01266C60.7754 5.15279 61.5142 3.36909 62.8294 2.05396C64.1445 0.738831 65.9282 0 67.788 0Z" fill="#BADDF6"/>
|
||||
<path d="M25.7119 24.5444H167.134C168.994 24.5444 170.777 25.2833 172.093 26.5984C173.408 27.9135 174.146 29.6972 174.146 31.5571V121.553C174.146 123.413 173.408 125.196 172.093 126.512C170.777 127.827 168.994 128.566 167.134 128.566H25.7119C23.852 128.566 22.0683 127.827 20.7532 126.512C19.4381 125.196 18.6992 123.413 18.6992 121.553V31.5571C18.6992 29.6972 19.4381 27.9135 20.7532 26.5984C22.0683 25.2833 23.852 24.5444 25.7119 24.5444Z" fill="url(#paint0_linear_3343_6980)"/>
|
||||
<path d="M23.3745 262.974C17.175 262.974 11.2294 260.512 6.84561 256.128C2.46185 251.745 -0.000976562 245.799 -0.000976562 239.599V139.084C-0.000976562 132.885 2.46185 126.938 6.84561 122.555C11.2294 118.171 17.175 115.709 23.3745 115.709H111.383C126.171 115.637 126.227 101.007 126.227 101.007V100.515C126.227 96.7948 127.704 93.2274 130.335 90.5971C132.965 87.9668 136.532 86.4893 140.252 86.4893H219.729C223.449 86.4893 227.016 87.9668 229.646 90.5971C232.277 93.2274 233.754 96.7948 233.754 100.515V239.599C233.754 245.799 231.291 251.745 226.908 256.128C222.524 260.512 216.578 262.974 210.379 262.974H23.3745Z" fill="url(#paint1_linear_3343_6980)"/>
|
||||
<path opacity="0.81" d="M33.8933 142.59H92.3322C94.502 142.59 96.583 143.452 98.1173 144.987C99.6516 146.521 100.514 148.602 100.514 150.772V156.616C100.514 158.785 99.6516 160.866 98.1173 162.401C96.583 163.935 94.502 164.797 92.3322 164.797H33.8933C31.7235 164.797 29.6425 163.935 28.1082 162.401C26.5739 160.866 25.7119 158.785 25.7119 156.616V150.772C25.7119 148.602 26.5739 146.521 28.1082 144.987C29.6425 143.452 31.7235 142.59 33.8933 142.59Z" fill="url(#paint2_linear_3343_6980)"/>
|
||||
<path d="M225.573 155.447H155.446C141.246 155.447 129.733 166.959 129.733 181.16V251.287C129.733 265.488 141.246 277 155.446 277H225.573C239.774 277 251.286 265.488 251.286 251.287V181.16C251.286 166.959 239.774 155.447 225.573 155.447Z" fill="url(#paint3_linear_3343_6980)"/>
|
||||
<path d="M225.573 156.032H155.446C141.568 156.032 130.317 167.282 130.317 181.16V251.287C130.317 265.165 141.568 276.416 155.446 276.416H225.573C239.451 276.416 250.701 265.165 250.701 251.287V181.16C250.701 167.282 239.451 156.032 225.573 156.032Z" stroke="white" stroke-opacity="0.5"/>
|
||||
<path opacity="0.75" d="M186.124 241.362L171.808 223.505C171.164 222.693 170.764 221.714 170.655 220.683C170.546 219.652 170.732 218.611 171.192 217.682C171.651 216.753 172.365 215.974 173.25 215.435C174.135 214.895 175.155 214.618 176.192 214.636H184.232V192.508C184.232 191.578 184.601 190.686 185.259 190.029C185.916 189.371 186.808 189.001 187.738 189.001H193.98C194.91 189.001 195.802 189.371 196.46 190.029C197.117 190.686 197.486 191.578 197.486 192.508V214.629H204.827C205.863 214.611 206.884 214.888 207.769 215.427C208.655 215.966 209.368 216.746 209.828 217.675C210.287 218.605 210.473 219.645 210.363 220.676C210.254 221.707 209.855 222.685 209.211 223.497L194.894 241.356C194.365 242.008 193.696 242.535 192.937 242.896C192.178 243.258 191.348 243.445 190.507 243.445C189.667 243.445 188.836 243.258 188.077 242.896C187.318 242.535 186.65 242.008 186.12 241.356L186.124 241.362Z" fill="#2B4BFF"/>
|
||||
<path opacity="0.83" d="M40.3217 39.7383H83.5664C85.5812 39.7383 87.5136 40.5387 88.9383 41.9634C90.363 43.3881 91.1634 45.3205 91.1634 47.3353C91.1634 49.3502 90.363 51.2825 88.9383 52.7073C87.5136 54.132 85.5812 54.9324 83.5664 54.9324H40.3217C38.3068 54.9324 36.3745 54.132 34.9497 52.7073C33.525 51.2825 32.7246 49.3502 32.7246 47.3353C32.7246 45.3205 33.525 43.3881 34.9497 41.9634C36.3745 40.5387 38.3068 39.7383 40.3217 39.7383Z" fill="url(#paint4_linear_3343_6980)"/>
|
||||
<path opacity="0.5" d="M35.6466 67.7891H85.9039C86.6789 67.7891 87.4221 68.0969 87.9701 68.6449C88.518 69.1928 88.8259 69.9361 88.8259 70.711C88.8259 71.486 88.518 72.2292 87.9701 72.7771C87.4221 73.3251 86.6789 73.6329 85.9039 73.6329H35.6466C34.8716 73.6329 34.1284 73.3251 33.5804 72.7771C33.0325 72.2292 32.7246 71.486 32.7246 70.711C32.7246 69.9361 33.0325 69.1928 33.5804 68.6449C34.1284 68.0969 34.8716 67.7891 35.6466 67.7891Z" fill="#11171C"/>
|
||||
<path opacity="0.5" d="M35.6466 79.4771H71.8786C72.6536 79.4771 73.3968 79.7849 73.9447 80.3329C74.4927 80.8808 74.8006 81.624 74.8006 82.399C74.8006 83.1739 74.4927 83.9171 73.9447 84.4651C73.3968 85.0131 72.6536 85.3209 71.8786 85.3209H35.6466C34.8716 85.3209 34.1284 85.0131 33.5804 84.4651C33.0325 83.9171 32.7246 83.1739 32.7246 82.399C32.7246 81.624 33.0325 80.8808 33.5804 80.3329C34.1284 79.7849 34.8716 79.4771 35.6466 79.4771Z" fill="#11171C"/>
|
||||
<path opacity="0.5" d="M99.9288 67.7891H111.617C112.391 67.7891 113.135 68.0969 113.683 68.6449C114.231 69.1928 114.538 69.9361 114.538 70.711C114.538 71.486 114.231 72.2292 113.683 72.7771C113.135 73.3251 112.391 73.6329 111.617 73.6329H99.9288C99.1538 73.6329 98.4106 73.3251 97.8627 72.7771C97.3147 72.2292 97.0068 71.486 97.0068 70.711C97.0068 69.9361 97.3147 69.1928 97.8627 68.6449C98.4106 68.0969 99.1538 67.7891 99.9288 67.7891Z" fill="#11171C"/>
|
||||
<path opacity="0.5" d="M35.6466 91.1646H43.828C44.6029 91.1646 45.3461 91.4724 45.8941 92.0204C46.4421 92.5683 46.7499 93.3115 46.7499 94.0865C46.7499 94.8614 46.4421 95.6046 45.8941 96.1526C45.3461 96.7006 44.6029 97.0084 43.828 97.0084H35.6466C34.8716 97.0084 34.1284 96.7006 33.5804 96.1526C33.0325 95.6046 32.7246 94.8614 32.7246 94.0865C32.7246 93.3115 33.0325 92.5683 33.5804 92.0204C34.1284 91.4724 34.8716 91.1646 35.6466 91.1646Z" fill="#11171C"/>
|
||||
</g>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_3343_6980" x1="79.6345" y1="25.8967" x2="94.7541" y2="122.592" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E4F3FE"/>
|
||||
<stop offset="1" stop-color="#D1E5F3"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_3343_6980" x1="6" y1="125.5" x2="103.202" y2="251.784" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#747DFF"/>
|
||||
<stop offset="1" stop-color="#2B4BFF"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_3343_6980" x1="51.8925" y1="142.08" x2="54.2642" y2="166.92" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#E1F2FF"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint3_linear_3343_6980" x1="172.277" y1="152.652" x2="212.268" y2="277" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#EAF6FF"/>
|
||||
<stop offset="1" stop-color="#C6E1F5"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint4_linear_3343_6980" x1="34.1856" y1="40.8323" x2="40.9981" y2="67.1476" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A191FF"/>
|
||||
<stop offset="1" stop-color="#516CFF"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clip0_3343_6980">
|
||||
<rect width="251.286" height="277" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7 KiB |
|
|
@ -1,3 +1,5 @@
|
|||
import { useNavigate } from '@solidjs/router';
|
||||
import useSettings from '~ui/hooks/useSettings';
|
||||
import { OverlayScrollbarsComponent } from 'overlayscrollbars-solid';
|
||||
import type { ParentProps } from 'solid-js';
|
||||
import AnimatedRoutes from '../components/AnimatedRoutes';
|
||||
|
|
@ -5,6 +7,12 @@ import ErrorBoundary from '../components/ErrorBoundary';
|
|||
import Navbar from '../components/Navbar';
|
||||
|
||||
function App(props: ParentProps) {
|
||||
const { settings } = useSettings();
|
||||
const navigate = useNavigate();
|
||||
|
||||
if (settings().onboarding_completed !== true)
|
||||
navigate('/onboarding');
|
||||
|
||||
return (
|
||||
<>
|
||||
<div class="flex flex-col px-8">
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@ import { Route, useLocation, useNavigate } from '@solidjs/router';
|
|||
import { ChevronLeftIcon, ChevronRightIcon } from '@untitled-theme/icons-solid';
|
||||
import AnimatedRoutes from '~ui/components/AnimatedRoutes';
|
||||
import Button from '~ui/components/base/Button';
|
||||
import PolyfrostFull from '~ui/components/logos/PolyfrostFull';
|
||||
import { type JSX, type ParentProps } from 'solid-js';
|
||||
import type { JSX, ParentProps } from 'solid-js';
|
||||
import OnboardingComplete from './OnboardingComplete';
|
||||
import OnboardingImport from './OnboardingImport';
|
||||
import OnboardingLanguage from './OnboardingLanguage';
|
||||
import OnboardingWelcome from './OnboardingWelcome';
|
||||
|
||||
|
|
@ -11,6 +12,8 @@ const basePath = '/onboarding';
|
|||
const OnboardingSteps = [
|
||||
['/', OnboardingWelcome],
|
||||
['/language', OnboardingLanguage],
|
||||
['/import', OnboardingImport],
|
||||
['/complete', OnboardingComplete],
|
||||
] as const;
|
||||
|
||||
function Onboarding(props: ParentProps) {
|
||||
|
|
@ -32,33 +35,42 @@ function Onboarding(props: ParentProps) {
|
|||
navigate(basePath + OnboardingSteps[step() - 1]![0]);
|
||||
};
|
||||
|
||||
const percentage = () => (step() / (OnboardingSteps.length - 1)) * 100;
|
||||
|
||||
return (
|
||||
<div class="h-full w-full flex flex-col p-8">
|
||||
<div class="">
|
||||
<PolyfrostFull />
|
||||
<div class="h-full max-h-full w-full flex flex-col items-center justify-center">
|
||||
<div class="h-0.5 w-full">
|
||||
<div
|
||||
class="h-full rounded-lg bg-brand transition-all"
|
||||
style={{
|
||||
width: `${percentage()}%`,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 p-16">
|
||||
<AnimatedRoutes>
|
||||
{props.children}
|
||||
</AnimatedRoutes>
|
||||
</div>
|
||||
<div class="h-full max-w-280 w-full flex flex-col gap-y-4 p-8">
|
||||
<div class="h-full w-full">
|
||||
<AnimatedRoutes>
|
||||
{props.children}
|
||||
</AnimatedRoutes>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex flex-row items-end justify-end">
|
||||
<div class="w-1/3 flex flex-row items-stretch gap-x-8 [&>*]:w-full">
|
||||
<Button
|
||||
buttonStyle="secondary"
|
||||
children="Previous"
|
||||
disabled={!canGoBack()}
|
||||
iconLeft={<ChevronLeftIcon />}
|
||||
onClick={previous}
|
||||
/>
|
||||
<div class="z-1 w-full flex flex-1 flex-row items-end justify-end">
|
||||
<div class="w-1/3 flex flex-row items-stretch gap-x-8 [&>*]:w-full">
|
||||
<Button
|
||||
buttonStyle="secondary"
|
||||
children="Previous"
|
||||
disabled={!canGoBack()}
|
||||
iconLeft={<ChevronLeftIcon />}
|
||||
onClick={previous}
|
||||
/>
|
||||
|
||||
<Button
|
||||
children={canGoForward() ? 'Next' : 'Finish'}
|
||||
iconRight={<ChevronRightIcon />}
|
||||
onClick={next}
|
||||
/>
|
||||
<Button
|
||||
children={canGoForward() ? 'Next' : 'Finish'}
|
||||
iconRight={<ChevronRightIcon />}
|
||||
onClick={next}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -85,13 +97,13 @@ export function OnboardingStep(props: OnboardingStepProps) {
|
|||
{props.illustration}
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-y-2">
|
||||
<div class="flex flex-col gap-y-2">
|
||||
<div class="flex flex-col justify-center gap-y-4">
|
||||
<div class="w-full flex flex-col gap-y-2">
|
||||
<h1 class="text-2xl">{props.title}</h1>
|
||||
<p class="text-lg text-fg-secondary line-height-normal">{props.paragraph}</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-1 flex-col gap-y-2">
|
||||
<div class="max-h-96 w-full flex flex-1 flex-col gap-y-2">
|
||||
{props.children}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
13
apps/frontend/src/ui/pages/onboarding/OnboardingComplete.tsx
Normal file
13
apps/frontend/src/ui/pages/onboarding/OnboardingComplete.tsx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
function OnboardingComplete() {
|
||||
return (
|
||||
<div class="grid grid-cols-2 h-full w-full flex flex-col items-center justify-center gap-x-16">
|
||||
<h1 class="text-6xl">
|
||||
You're all set
|
||||
</h1>
|
||||
|
||||
<h3>OneLauncher is ready to be used.</h3>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default OnboardingComplete;
|
||||
33
apps/frontend/src/ui/pages/onboarding/OnboardingImport.tsx
Normal file
33
apps/frontend/src/ui/pages/onboarding/OnboardingImport.tsx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import Illustration from '~assets/illustrations/onboarding/import_from_others.svg?component-solid';
|
||||
import Image from '~assets/logos/vanilla.png';
|
||||
import { LAUNCHER_IMPORT_TYPES } from '~utils';
|
||||
import { OverlayScrollbarsComponent } from 'overlayscrollbars-solid';
|
||||
import { For } from 'solid-js';
|
||||
import { OnboardingStep } from './Onboarding';
|
||||
|
||||
function OnboardingImport() {
|
||||
return (
|
||||
<OnboardingStep
|
||||
illustration={<Illustration />}
|
||||
paragraph="Import your profiles from other launchers."
|
||||
title="Import"
|
||||
>
|
||||
<div class="h-full w-full flex flex-col gap-y-3">
|
||||
<OverlayScrollbarsComponent>
|
||||
<div class="grid grid-cols-3">
|
||||
<For each={LAUNCHER_IMPORT_TYPES}>
|
||||
{type => (
|
||||
<div class="flex flex-col items-center justify-center gap-y-4 rounded-md p-4 active:bg-gray-10 hover:bg-gray-05">
|
||||
<img alt={type} class="h-16" src={Image} />
|
||||
<span class="text-lg font-medium">{type}</span>
|
||||
</div>
|
||||
)}
|
||||
</For>
|
||||
</div>
|
||||
</OverlayScrollbarsComponent>
|
||||
</div>
|
||||
</OnboardingStep>
|
||||
);
|
||||
}
|
||||
|
||||
export default OnboardingImport;
|
||||
|
|
@ -1,14 +1,72 @@
|
|||
import { TRANSLATION_WEBSITE } from '@onelauncher/client';
|
||||
import Illustration from '~assets/illustrations/onboarding/language.svg?component-solid';
|
||||
import Link from '~ui/components/base/Link';
|
||||
import { OverlayScrollbarsComponent } from 'overlayscrollbars-solid';
|
||||
import { For } from 'solid-js';
|
||||
import { OnboardingStep } from './Onboarding';
|
||||
|
||||
function OnboardingLanguage() {
|
||||
const languages: [string, number][] = [
|
||||
['English', 100],
|
||||
['German', 21],
|
||||
['Spanish', 12],
|
||||
['Polish', 0],
|
||||
['Russian', 0],
|
||||
['German', 21],
|
||||
['Spanish', 12],
|
||||
['Polish', 0],
|
||||
['Russian', 0],
|
||||
['German', 21],
|
||||
['Spanish', 12],
|
||||
['Polish', 0],
|
||||
['Russian', 0],
|
||||
['German', 21],
|
||||
['Spanish', 12],
|
||||
['Polish', 0],
|
||||
['Russian', 0],
|
||||
['German', 21],
|
||||
['Spanish', 12],
|
||||
['Polish', 0],
|
||||
['Russian', 0],
|
||||
];
|
||||
|
||||
const selected = () => languages[0];
|
||||
|
||||
return (
|
||||
<OnboardingStep
|
||||
illustration={<Illustration />}
|
||||
paragraph="Choose your preferred language."
|
||||
title="Language"
|
||||
>
|
||||
<h1>lol</h1>
|
||||
<div class="h-full w-full flex flex-col gap-y-3">
|
||||
<div class="flex flex-col gap-y-2 rounded-lg bg-page-elevated">
|
||||
<OverlayScrollbarsComponent class="max-h-84 overflow-hidden">
|
||||
<div class="flex flex-col gap-y-1 p-2">
|
||||
<For each={languages.sort((a, b) => b[1] - a[1])}>
|
||||
{language => (
|
||||
<div
|
||||
class="flex flex-row items-center rounded-lg px-6 py-5"
|
||||
classList={{
|
||||
'bg-brand': language === selected(),
|
||||
'hover:bg-gray-05 active:bg-gray-10': language !== selected(),
|
||||
}}
|
||||
>
|
||||
<div class="flex-1 text-lg font-medium">{language[0]}</div>
|
||||
<div class="flex-1 text-right text-xs">
|
||||
{language[1]}
|
||||
%
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</For>
|
||||
</div>
|
||||
</OverlayScrollbarsComponent>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex flex-1 flex-row justify-end">
|
||||
<Link class="text-xs" href={TRANSLATION_WEBSITE}>Help translate OneLauncher</Link>
|
||||
</div>
|
||||
</div>
|
||||
</OnboardingStep>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
import { OnboardingStep } from './Onboarding';
|
||||
|
||||
function OnboardingWelcome() {
|
||||
return (
|
||||
<OnboardingStep
|
||||
illustration={<span>todo :(</span>}
|
||||
paragraph="OneLauncher is a powerful and easy-to-use launcher for your applications."
|
||||
title="Welcome to OneLauncher!"
|
||||
/>
|
||||
<div class="grid grid-cols-2 h-full w-full flex flex-col items-center justify-center gap-x-16">
|
||||
<h1 class="text-6xl">
|
||||
Welcome to
|
||||
{' '}
|
||||
<span class="underline underline-8 underline-brand">OneLauncher</span>
|
||||
</h1>
|
||||
|
||||
<h3>A powerful yet easy to use launcher for Minecraft.</h3>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { DurationFormat } from '@formatjs/intl-durationformat';
|
||||
import { open } from '@tauri-apps/plugin-shell';
|
||||
import type { Cluster, License, Loader, PackageType, Providers, VersionType } from '@onelauncher/client/bindings';
|
||||
import type { Cluster, ImportType, License, Loader, PackageType, Providers, VersionType } from '@onelauncher/client/bindings';
|
||||
|
||||
export function supportsMods(loader?: Cluster | Loader): boolean {
|
||||
if (loader === undefined)
|
||||
|
|
@ -153,3 +153,4 @@ export function getPackageUrl(provider: Providers, id: string, package_type: Pac
|
|||
export const LOADERS: Loader[] = ['vanilla', 'fabric', 'forge', 'neoforge', 'quilt'] as const;
|
||||
export const PROVIDERS: Providers[] = ['Modrinth'] as const;
|
||||
export const PACKAGE_TYPES: PackageType[] = ['mod', 'resourcepack', 'datapack', 'shaderpack'] as const;
|
||||
export const LAUNCHER_IMPORT_TYPES: ImportType[] = ['PrismLauncher', 'Curseforge', 'Modrinth', 'ATLauncher', 'GDLauncher', 'FTBLauncher', 'MultiMC', 'TLauncher', 'Technic'] as const;
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
export const WEBSITE = 'https://polyfrost.org/';
|
||||
export const TRANSLATION_WEBSITE = 'https://polyfrost.org/';
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ pub struct Settings {
|
|||
/// Enable/disable advanced rendering and window decorations.
|
||||
#[serde(default)]
|
||||
pub rendering: bool,
|
||||
/// Completed onboarding.
|
||||
#[serde(default)]
|
||||
pub onboarding_completed: bool,
|
||||
}
|
||||
|
||||
impl Settings {
|
||||
|
|
@ -125,6 +128,7 @@ impl Settings {
|
|||
config_dir: Directories::init_settings_dir(),
|
||||
hide_on_launch: false,
|
||||
rendering: true,
|
||||
onboarding_completed: false,
|
||||
};
|
||||
|
||||
if recovered_corruption {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue