mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-09-25 01:20:55 +00:00
1.6.1 (#189)
This commit is contained in:
@@ -79,6 +79,10 @@ const CreditsView = memo(function CreditsView() {
|
||||
"Tymszn21",
|
||||
"DaPogLord",
|
||||
"turniphead",
|
||||
"ArthurDotPNG",
|
||||
"CounterrAct",
|
||||
"luckyduuckxd",
|
||||
"PixelatedCheese1",
|
||||
].sort(() => Math.random() - 0.5),
|
||||
[],
|
||||
);
|
||||
@@ -96,6 +100,8 @@ const CreditsView = memo(function CreditsView() {
|
||||
role: "Founder & Maintainer",
|
||||
members: [
|
||||
{ name: "KayJann", url: "https://github.com/KayJannOnGit" },
|
||||
{ name: "Architect", url: "#" },
|
||||
{ name: "neoapps", url: "https://github.com/neoapps-dev" },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -119,6 +125,7 @@ const CreditsView = memo(function CreditsView() {
|
||||
},
|
||||
{ name: "Leon", url: "https://github.com/hornyalcoholic" },
|
||||
{ name: "Criador_Mods", url: "https://github.com/CriadorMods" },
|
||||
{ name: "j-carv", url: "https://github.com/j-carv" },
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -277,6 +284,7 @@ const CreditsView = memo(function CreditsView() {
|
||||
{ name: "alreadywarned", url: "#" },
|
||||
{ name: "andrewjcf", url: "#" },
|
||||
{ name: "dille", url: "#" },
|
||||
{ name: "neoapps", url: "#" },
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -334,7 +342,7 @@ const CreditsView = memo(function CreditsView() {
|
||||
<motion.div
|
||||
initial={{ y: "50%" }}
|
||||
animate={{ y: "-200%" }}
|
||||
transition={{ duration: 45, ease: "linear" }}
|
||||
transition={{ duration: 60, ease: "linear" }}
|
||||
className="flex flex-col items-center justify-center space-y-8 py-20"
|
||||
>
|
||||
<div className="mb-8">
|
||||
|
||||
+19
-10
@@ -1,14 +1,23 @@
|
||||
import { useMemo } from 'react';
|
||||
import { useState, useEffect } from "react";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
//neo: "why the fuck are you doing it in rust instead of UserAgent", well, Linux was being detected as Android SOMEHOW I DONT FUCKING KNOW HOW OH MY GOD
|
||||
const DEFAULT = {
|
||||
isLinux: false,
|
||||
isMac: false,
|
||||
isWindows: false,
|
||||
isAndroid: false,
|
||||
};
|
||||
export function usePlatform() {
|
||||
const platform = useMemo(() => {
|
||||
if (typeof window === 'undefined') return { isLinux: false, isMac: false, isWindows: false, isAndroid: false };
|
||||
const ua = window.navigator.userAgent.toLowerCase();
|
||||
const plat = window.navigator.platform.toLowerCase();
|
||||
const isAndroid = ua.includes('android');
|
||||
const isLinux = !isAndroid && (plat.includes('linux') || ua.includes('linux'));
|
||||
const isMac = !isAndroid && (plat.includes('mac') || ua.includes('mac'));
|
||||
const isWindows = !isAndroid && (plat.includes('win') || ua.includes('win'));
|
||||
return { isLinux, isMac, isWindows, isAndroid };
|
||||
const [platform, setPlatform] = useState(DEFAULT);
|
||||
useEffect(() => {
|
||||
invoke<{
|
||||
isLinux: boolean;
|
||||
isMac: boolean;
|
||||
isWindows: boolean;
|
||||
isAndroid: boolean;
|
||||
}>("get_platform")
|
||||
.then(setPlatform)
|
||||
.catch(() => setPlatform(DEFAULT));
|
||||
}, []);
|
||||
|
||||
return platform;
|
||||
|
||||
Reference in New Issue
Block a user