z
This commit is contained in:
parent
796cd23e8d
commit
65c77d1621
1
web/.npmrc
Normal file
1
web/.npmrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
public-hoist-pattern[]=*@nextui-org/*
|
BIN
web/public/assets/bg.png
Normal file
BIN
web/public/assets/bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 MiB |
|
@ -3,7 +3,6 @@ import { useSelector } from 'react-redux';
|
||||||
import { AppActions, RootState } from './store';
|
import { AppActions, RootState } from './store';
|
||||||
import { ToastContainer } from 'react-toastify';
|
import { ToastContainer } from 'react-toastify';
|
||||||
import { Box } from 'lr-components';
|
import { Box } from 'lr-components';
|
||||||
import { NextUIProvider } from '@nextui-org/react';
|
|
||||||
import AppActionHook from './components/AppActionHook';
|
import AppActionHook from './components/AppActionHook';
|
||||||
import { isEnvBrowser } from './utils/misc';
|
import { isEnvBrowser } from './utils/misc';
|
||||||
import { fetchNui } from './utils/fetchNui';
|
import { fetchNui } from './utils/fetchNui';
|
||||||
|
@ -25,39 +24,37 @@ function App() {
|
||||||
}, [setSetting]);
|
}, [setSetting]);
|
||||||
return (
|
return (
|
||||||
<SettingContext.Provider value={{ setting, setSetting, L }}>
|
<SettingContext.Provider value={{ setting, setSetting, L }}>
|
||||||
<NextUIProvider>
|
<Box
|
||||||
|
display='flex'
|
||||||
|
position='absolute'
|
||||||
|
flexWrap='wrap'
|
||||||
|
justifyContent='center'
|
||||||
|
alignItems='center'
|
||||||
|
flexDirection='column'
|
||||||
|
width={'50%'}
|
||||||
|
height={'50%'}
|
||||||
|
rGap={10}
|
||||||
|
>
|
||||||
|
{Object.keys(AppActions).map((action) => {
|
||||||
|
return (
|
||||||
|
<AppActionHook
|
||||||
|
action={action as keyof typeof AppActions}
|
||||||
|
></AppActionHook>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</Box>
|
||||||
|
{show && (
|
||||||
<Box
|
<Box
|
||||||
|
width={'100%'}
|
||||||
|
height={'100%'}
|
||||||
display='flex'
|
display='flex'
|
||||||
position='absolute'
|
|
||||||
flexWrap='wrap'
|
|
||||||
justifyContent='center'
|
justifyContent='center'
|
||||||
alignItems='center'
|
alignItems='center'
|
||||||
flexDirection='column'
|
className='prose'
|
||||||
width={'50%'}
|
pointerEvents='none'
|
||||||
height={'50%'}
|
></Box>
|
||||||
rGap={10}
|
)}
|
||||||
>
|
<ToastContainer pauseOnFocusLoss={false} hideProgressBar={true} />
|
||||||
{Object.keys(AppActions).map((action) => {
|
|
||||||
return (
|
|
||||||
<AppActionHook
|
|
||||||
action={action as keyof typeof AppActions}
|
|
||||||
></AppActionHook>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</Box>
|
|
||||||
{show && (
|
|
||||||
<Box
|
|
||||||
width={'100%'}
|
|
||||||
height={'100%'}
|
|
||||||
display='flex'
|
|
||||||
justifyContent='center'
|
|
||||||
alignItems='center'
|
|
||||||
className='prose'
|
|
||||||
pointerEvents='none'
|
|
||||||
></Box>
|
|
||||||
)}
|
|
||||||
<ToastContainer pauseOnFocusLoss={false} hideProgressBar={true} />
|
|
||||||
</NextUIProvider>
|
|
||||||
</SettingContext.Provider>
|
</SettingContext.Provider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,24 @@ import App from './App';
|
||||||
import './index.css';
|
import './index.css';
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
import { store } from './store';
|
import { store } from './store';
|
||||||
|
import { isEnvBrowser } from './utils/misc';
|
||||||
|
import { NextUIProvider } from '@nextui-org/react';
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
const root = document.getElementById('root');
|
||||||
|
if (isEnvBrowser()) {
|
||||||
|
// https://i.imgur.com/iPTAdYV.png - Night time img
|
||||||
|
root!.style.backgroundImage = 'url("https://i.imgur.com/3pzRj9n.png")';
|
||||||
|
root!.style.backgroundSize = 'cover';
|
||||||
|
root!.style.backgroundRepeat = 'no-repeat';
|
||||||
|
root!.style.backgroundPosition = 'center';
|
||||||
|
}
|
||||||
|
|
||||||
|
ReactDOM.createRoot(root!).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<App />
|
<NextUIProvider>
|
||||||
|
<App />
|
||||||
|
</NextUIProvider>
|
||||||
</Provider>
|
</Provider>
|
||||||
</React.StrictMode>
|
</React.StrictMode>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user