refactor: repartition server-side and client-side code

This commit is contained in:
LIlGG
2025-10-11 18:26:07 +08:00
parent 7acc4949fb
commit e9b573a276
309 changed files with 631 additions and 962 deletions

View File

@@ -17,17 +17,17 @@ import { DndProvider } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
import { ClientOnly } from 'remix-utils/client-only';
import { Toaster } from 'sonner';
import { getUser } from './lib/.server/auth';
import { getUserUsageStats } from './lib/.server/chatUsage';
import { getUser } from '~/.server/service/auth';
import { getUserUsageStats } from '~/.server/service/chat-usage';
import {
get1PanelConnectionSettings,
getNetlifyConnectionSettings,
getVercelConnectionSettings,
} from './lib/.server/connectionSettings';
import { logStore } from './lib/stores/logs';
import { themeStore } from './lib/stores/theme';
} from '~/.server/service/connection-settings';
import { logStore } from '~/stores/logs';
import { themeStore } from '~/stores/theme';
import { stripIndents } from '~/utils/strip-indent';
import globalStyles from './styles/index.scss?url';
import { stripIndents } from './utils/strip-indent';
import 'virtual:uno.css';
import type { ComponentType } from 'react';
@@ -236,7 +236,7 @@ const LazyAuthErrorToast = () => {
const [AuthErrorToast, setAuthErrorToast] = useState<ComponentType | null>(null);
useEffect(() => {
import('./components/AuthErrorToast.client').then((module) => {
import('~/.client/components/AuthErrorToast.client').then((module) => {
setAuthErrorToast(() => module.AuthErrorToast);
});
}, []);