Background fixes

This commit is contained in:
Sean Edmunds
2024-12-04 15:13:45 -06:00
parent 2fbd2af22f
commit f94d45953e
7 changed files with 11 additions and 9 deletions

2
.env
View File

@@ -1,3 +1,3 @@
VITE_DOMAIN_DEV='http://localhost:5000' VITE_DOMAIN_DEV='http://localhost:5000'
VITE_DOMAIN_PROD='https://sean.bet' VITE_DOMAIN_PROD='http://localhost:5000'
VITE_BASE_URL='trigger' VITE_BASE_URL='trigger'

2
.gitignore vendored
View File

@@ -22,3 +22,5 @@ dist-ssr
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
.env

View File

@@ -47,8 +47,8 @@ function App() {
const router = createBrowserRouter( const router = createBrowserRouter(
createRoutesFromElements( createRoutesFromElements(
<Route> <Route>
<Route path='/trigger' element={<Homepage theme={theme} />} /> <Route path={`/${import.meta.env.VITE_BASE_URL}`} element={<Homepage theme={theme} />} />
<Route path='/trigger/settings' element={<Settings theme={theme} />} /> <Route path={`/${import.meta.env.VITE_BASE_URL}/settings`} element={<Settings theme={theme} />} />
</Route>, </Route>,
), ),
); );
@@ -71,7 +71,7 @@ function App() {
width: '100%', width: '100%',
height: '100%', height: '100%',
position: 'fixed', position: 'fixed',
backgroundImage: `linear-gradient(${theme.backgroundColor}33, ${theme.backgroundColor}33), url(../backgrounds/${theme.backgroundImage})`, backgroundImage: `linear-gradient(${theme.backgroundColor}33, ${theme.backgroundColor}33), url(backgrounds/${theme.backgroundImage})`,
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundRepeat: 'no-repeat', backgroundRepeat: 'no-repeat',
backgroundPosition: 'center', backgroundPosition: 'center',

View File

@@ -33,7 +33,7 @@ function SettingsButton({
method: 'GET', method: 'GET',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
}; };
fetch('/trigger/api/wakeDakota', requestOptions); fetch(`/${import.meta.env.VITE_BASE_URL}/api/wakeDakota`, requestOptions);
} }
return ( return (
<Menu withinPortal={false} withArrow shadow='md' position='top'> <Menu withinPortal={false} withArrow shadow='md' position='top'>
@@ -46,7 +46,7 @@ function SettingsButton({
<NavLink <NavLink
label='Settings' label='Settings'
component='a' component='a'
href='/trigger/settings' href={`/${import.meta.env.VITE_BASE_URL}/settings`}
className={navLink.defaultNavLink} className={navLink.defaultNavLink}
classNames={navLink} classNames={navLink}
/> />

View File

@@ -18,7 +18,7 @@ function Settings({ theme }: any) {
className={actionIconClasses.backButton} className={actionIconClasses.backButton}
classNames={actionIconClasses} classNames={actionIconClasses}
component='a' component='a'
href='/trigger' href={`/${import.meta.env.VITE_BASE_URL}`}
> >
<FiArrowLeftCircle /> <FiArrowLeftCircle />
</ActionIcon> </ActionIcon>

View File

@@ -73,7 +73,7 @@ export default function ThemeModalContent({ selectedTheme }: any) {
<Stack <Stack
style={{ style={{
width: '100%', width: '100%',
background: `linear-gradient(${selectedTheme.backgroundColor}33, ${selectedTheme.backgroundColor}33), no-repeat center url(../backgrounds/${selectedTheme.backgroundImage})`, background: `linear-gradient(${selectedTheme.backgroundColor}33, ${selectedTheme.backgroundColor}33), no-repeat center url(backgrounds/${selectedTheme.backgroundImage})`,
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundColor: selectedTheme.backgroundColor, backgroundColor: selectedTheme.backgroundColor,
borderRadius: '10px', borderRadius: '10px',

View File

@@ -334,7 +334,7 @@ function ThemesSettings({ theme }: any) {
w={'100%'} w={'100%'}
h={'75px'} h={'75px'}
style={{ style={{
background: `linear-gradient(${theme.backgroundColor}33, ${theme.backgroundColor}33), no-repeat center url(../backgrounds/${theme.backgroundImage})`, background: `linear-gradient(${theme.backgroundColor}33, ${theme.backgroundColor}33), no-repeat center url(backgrounds/${theme.backgroundImage})`,
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundColor: theme.backgroundColor, backgroundColor: theme.backgroundColor,
border: `solid ${theme.borderColor}`, border: `solid ${theme.borderColor}`,