Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/oneclient/frontend/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useCommand } from '@onelauncher/common';
import { Button, Popup } from '@onelauncher/common/components';
import { Link, useNavigate } from '@tanstack/react-router';
import { Window } from '@tauri-apps/api/window';
import { MinusIcon, Settings01Icon, Settings02Icon, SquareIcon, XCloseIcon } from '@untitled-theme/icons-react';
import { MinusIcon, Settings02Icon, SquareIcon, XCloseIcon } from '@untitled-theme/icons-react';
import { twMerge } from 'tailwind-merge';
import { AccountAvatar } from './AccountAvatar';
import { AccountPopup } from './overlay/AccountPopup';
Expand Down
1 change: 0 additions & 1 deletion apps/oneclient/frontend/src/components/SettingSwitch.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { useSettings } from '@/hooks/useSettings';
import { Switch } from '@onelauncher/common/components';

type BooleanSetting = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { MinecraftCredentials } from '@/bindings.gen';
import { bindings } from '@/main';
import { useCommand, useCommandMut } from '@onelauncher/common';
import { useCommand } from '@onelauncher/common';
import { Button } from '@onelauncher/common/components';
import { Link } from '@tanstack/react-router';
import { Pencil01Icon, PlusIcon, Settings01Icon, Trash01Icon } from '@untitled-theme/icons-react';
Expand Down Expand Up @@ -43,7 +43,7 @@ export function AccountPopup() {
<AccountEntry
loggedIn
onClick={() => { }}
onDelete={() => deleteUser(defaultUser.data)}
onDelete={() => deleteUser(defaultUser.data as MinecraftCredentials)}
user={defaultUser.data}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/oneclient/frontend/src/hooks/useSettings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ClusterModel, ProfileUpdate, SettingProfileModel, Settings } from '@/bindings.gen';
import type { ClusterModel, ProfileUpdate, Settings } from '@/bindings.gen';
import { bindings } from '@/main';
import { useCommandSuspense } from '@onelauncher/common';
import { useEffect, useMemo, useState } from 'react';
Expand All @@ -19,7 +19,7 @@

const createSetting = useMemo(() => <TKey extends keyof Settings>(key: TKey): [Settings[TKey], Setter<TKey>] => {
return [setting(key), value => setSetting(key, value)];
}, [setting]);

Check warning on line 22 in apps/oneclient/frontend/src/hooks/useSettings.ts

View workflow job for this annotation

GitHub Actions / ES Checks

React Hook useMemo has a missing dependency: 'setSetting'. Either include it or remove the dependency array

return { setting, setSetting, createSetting };
}
Expand Down Expand Up @@ -62,7 +62,7 @@
throw new Error('No settings profile name');
await bindings.core.updateClusterProfile(name, { ...emptyUpdate, ...update });
profileSrc.refetch();
}, [profileName, cluster.name, cluster.id]);

Check warning on line 65 in apps/oneclient/frontend/src/hooks/useSettings.ts

View workflow job for this annotation

GitHub Actions / ES Checks

React Hook useMemo has a missing dependency: 'profileSrc'. Either include it or remove the dependency array
// const updateProfile = useMemo(() => (update: Partial<ProfileUpdate>) => setProfile({ ...profile.data, ...update }), [setProfile, profile.data]);
return { profile, setProfile, updateProfile };
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { SheetPage } from '@/components';
import SettingsRow from '@/components/SettingsRow';
import { useClusterProfile } from '@/hooks/useSettings';
import { bindings } from '@/main';
import { Switch, TextField } from '@onelauncher/common/components';
import { createFileRoute } from '@tanstack/react-router';
import { Database01Icon, FilePlus02Icon, FileX02Icon, LayoutTopIcon, Maximize01Icon, ParagraphWrapIcon, XIcon } from '@untitled-theme/icons-react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
import SettingsRow from '@/components/SettingsRow';
import SettingsSwitch from '@/components/SettingSwitch';
import { useSettings } from '@/hooks/useSettings';
import { bindings } from '@/main';
import { THEMES } from '@/utils/theming';
import { Switch } from '@onelauncher/common/components';
import { createFileRoute } from '@tanstack/react-router';
import { Monitor01Icon, PackageIcon, Speedometer04Icon } from '@untitled-theme/icons-react';
import Sidebar from './route';
Expand Down
2 changes: 1 addition & 1 deletion apps/oneclient/frontend/src/routes/app/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SettingsSwitch from '@/components/SettingSwitch';
import { useSettings } from '@/hooks/useSettings';
import { bindings } from '@/main';
// import useSettings from '@/hooks/useSettings';
import { Button, Switch } from '@onelauncher/common/components';
import { Button } from '@onelauncher/common/components';
import { createFileRoute } from '@tanstack/react-router';
import { dataDir, join } from '@tauri-apps/api/path';
import { FolderIcon, Link03Icon, LinkExternal01Icon } from '@untitled-theme/icons-react';
Expand Down
2 changes: 1 addition & 1 deletion apps/oneclient/frontend/src/routes/app/settings/route.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { JSX } from 'react';
import { createFileRoute, Outlet, useNavigate, useRouterState } from '@tanstack/react-router';
import { Brush01Icon, CodeSnippet02Icon, MessageTextSquare01Icon, RefreshCcw02Icon, Rocket02Icon, Sliders04Icon, Users01Icon } from '@untitled-theme/icons-react';
import { Brush01Icon, CodeSnippet02Icon, MessageTextSquare01Icon, RefreshCcw02Icon, Rocket02Icon, Sliders04Icon } from '@untitled-theme/icons-react';
import { useEffect } from 'react';

export const Route = createFileRoute('/app/settings')({
Expand Down
2 changes: 0 additions & 2 deletions apps/oneclient/frontend/src/routes/onboarding/route.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import type { PropsWithChildren } from 'react';
import Logo from '@/assets/logos/Logo.svg';
import LauncherLogo from '@/assets/logos/oneclient.svg?react';
import { LoaderSuspense, NavbarButton } from '@/components';
import { GameBackground } from '@/components/GameBackground';
import { Stepper } from '@/components/Stepper';
import { bindings } from '@/main';
import useAppShellStore from '@/stores/appShellStore';
import { useCommandSuspense } from '@onelauncher/common';
import { Button } from '@onelauncher/common/components';
import { createFileRoute, Link, Outlet } from '@tanstack/react-router';
Expand Down
2 changes: 1 addition & 1 deletion apps/oneclient/frontend/src/utils/browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { PackageCategories, PackageModCategory, PackageType, Provider } from '@/bindings.gen';
import type { PackageCategories } from '@/bindings.gen';

export const BROWSER_VIEWS: Array<string> = ['grid', 'list'] as const;

Expand Down
Loading