2023-07-23 12:23:18 +00:00
|
|
|
import { MantineProvider } from '@mantine/core';
|
2025-05-20 19:23:36 -07:00
|
|
|
import { useEffect } from 'react';
|
|
|
|
|
|
2025-06-24 00:04:36 -07:00
|
|
|
import './styles/global.css';
|
2025-05-20 19:23:36 -07:00
|
|
|
|
2023-07-23 12:23:18 +00:00
|
|
|
import { Shell } from '/@/remote/components/shell';
|
2025-05-20 19:23:36 -07:00
|
|
|
import { useIsDark, useReconnect } from '/@/remote/store';
|
2023-07-23 12:23:18 +00:00
|
|
|
|
|
|
|
|
export const App = () => {
|
|
|
|
|
const isDark = useIsDark();
|
|
|
|
|
const reconnect = useReconnect();
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
reconnect();
|
|
|
|
|
}, [reconnect]);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<MantineProvider
|
2025-06-24 00:04:36 -07:00
|
|
|
defaultColorScheme={isDark ? 'dark' : 'light'}
|
2023-07-23 12:23:18 +00:00
|
|
|
theme={{
|
|
|
|
|
components: {
|
|
|
|
|
AppShell: {
|
|
|
|
|
styles: {
|
|
|
|
|
body: {
|
|
|
|
|
height: '100vh',
|
|
|
|
|
overflow: 'scroll',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Modal: {
|
|
|
|
|
styles: {
|
|
|
|
|
body: {
|
2025-06-24 00:04:36 -07:00
|
|
|
background: 'var(--theme-modal-bg)',
|
2023-07-23 12:23:18 +00:00
|
|
|
height: '100vh',
|
|
|
|
|
},
|
|
|
|
|
close: { marginRight: '0.5rem' },
|
|
|
|
|
content: { borderRadius: '5px' },
|
|
|
|
|
header: {
|
2025-06-24 00:04:36 -07:00
|
|
|
background: 'var(--theme-modal-header-bg)',
|
2023-07-23 12:23:18 +00:00
|
|
|
paddingBottom: '1rem',
|
|
|
|
|
},
|
|
|
|
|
title: { fontSize: 'medium', fontWeight: 500 },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
defaultRadius: 'xs',
|
|
|
|
|
focusRing: 'auto',
|
2025-06-24 00:04:36 -07:00
|
|
|
fontFamily: 'var(--theme-content-font-family)',
|
2023-07-23 12:23:18 +00:00
|
|
|
fontSizes: {
|
|
|
|
|
lg: '1.1rem',
|
|
|
|
|
md: '1rem',
|
|
|
|
|
sm: '0.9rem',
|
|
|
|
|
xl: '1.5rem',
|
|
|
|
|
xs: '0.8rem',
|
|
|
|
|
},
|
|
|
|
|
headings: {
|
2025-06-24 00:04:36 -07:00
|
|
|
fontFamily: 'var(--theme-content-font-family)',
|
|
|
|
|
fontWeight: '700',
|
2023-07-23 12:23:18 +00:00
|
|
|
},
|
|
|
|
|
other: {},
|
|
|
|
|
spacing: {
|
|
|
|
|
lg: '2rem',
|
|
|
|
|
md: '1rem',
|
|
|
|
|
sm: '0.5rem',
|
|
|
|
|
xl: '4rem',
|
|
|
|
|
xs: '0rem',
|
|
|
|
|
},
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Shell />
|
|
|
|
|
</MantineProvider>
|
|
|
|
|
);
|
|
|
|
|
};
|