This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
|||||||
mergeMantineTheme,
|
mergeMantineTheme,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { Notifications } from '@mantine/notifications';
|
import { Notifications } from '@mantine/notifications';
|
||||||
|
import { Loading, MainLayout } from 'components';
|
||||||
import { useCommonHooks, useQueryAPI } from 'hooks';
|
import { useCommonHooks, useQueryAPI } from 'hooks';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import {
|
import {
|
||||||
@@ -15,7 +16,6 @@ import {
|
|||||||
Route,
|
Route,
|
||||||
RouterProvider,
|
RouterProvider,
|
||||||
} from 'react-router-dom';
|
} from 'react-router-dom';
|
||||||
import { Loading, MainLayout } from './components';
|
|
||||||
import '@mantine/core/styles.css';
|
import '@mantine/core/styles.css';
|
||||||
import '@mantine/dates/styles.css';
|
import '@mantine/dates/styles.css';
|
||||||
import '@mantine/notifications/styles.css';
|
import '@mantine/notifications/styles.css';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export function MainLayout() {
|
|||||||
'--image-background':
|
'--image-background':
|
||||||
theme.backgroundImage.toLocaleLowerCase() === 'none'
|
theme.backgroundImage.toLocaleLowerCase() === 'none'
|
||||||
? undefined
|
? undefined
|
||||||
: `linear-gradient(${theme.backgroundColor}33, ${theme.backgroundColor}33), url(../../api/backgroundImages/${theme.backgroundImage})`,
|
: `linear-gradient(${theme.backgroundColor}33, ${theme.backgroundColor}33), url(../../trigger/api/backgroundImages/${theme.backgroundImage})`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Outlet />
|
<Outlet />
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ export function BackgroundModal({
|
|||||||
style={{
|
style={{
|
||||||
aspectRatio: '16/9',
|
aspectRatio: '16/9',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
backgroundImage: `url(../../api/backgroundImages/thumbs/${background})`,
|
backgroundImage: `url(../../trigger/api/backgroundImages/thumbs/${background})`,
|
||||||
backgroundSize: 'cover',
|
backgroundSize: 'cover',
|
||||||
backgroundPosition: 'center',
|
backgroundPosition: 'center',
|
||||||
backgroundRepeat: 'no-repeat',
|
backgroundRepeat: 'no-repeat',
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export function BackgroundLightbox({
|
|||||||
<Image
|
<Image
|
||||||
style={{ cursor: 'zoom-out' }}
|
style={{ cursor: 'zoom-out' }}
|
||||||
onClick={close}
|
onClick={close}
|
||||||
src={`../../api/backgroundImages/${background}`}
|
src={`../../trigger/api/backgroundImages/${background}`}
|
||||||
/>
|
/>
|
||||||
</Modal.Body>
|
</Modal.Body>
|
||||||
</Modal.Content>
|
</Modal.Content>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export function DeleteBackground({
|
|||||||
style={{
|
style={{
|
||||||
aspectRatio: '16/9',
|
aspectRatio: '16/9',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
backgroundImage: `url(../../api/backgroundImages/thumbs/${fileName})`,
|
backgroundImage: `url(../../trigger/api/backgroundImages/thumbs/${fileName})`,
|
||||||
backgroundSize: 'cover',
|
backgroundSize: 'cover',
|
||||||
backgroundPosition: 'center',
|
backgroundPosition: 'center',
|
||||||
backgroundRepeat: 'no-repeat',
|
backgroundRepeat: 'no-repeat',
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export function EditBackground({
|
|||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Image src={`../../api/backgroundImages/thumbs/${fileName}`} />
|
<Image src={`../../trigger/api/backgroundImages/thumbs/${fileName}`} />
|
||||||
</Stack>
|
</Stack>
|
||||||
<Group>
|
<Group>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export function ThemeSelect({
|
|||||||
backgroundImage:
|
backgroundImage:
|
||||||
theme?.backgroundImage.toLocaleLowerCase() === 'none'
|
theme?.backgroundImage.toLocaleLowerCase() === 'none'
|
||||||
? undefined
|
? undefined
|
||||||
: `linear-gradient(${theme?.backgroundColor}33, ${theme?.backgroundColor}33), url(../../api/backgroundImages/thumbs/${theme?.backgroundImage})`,
|
: `linear-gradient(${theme?.backgroundColor}33, ${theme?.backgroundColor}33), url(../../trigger/api/backgroundImages/thumbs/${theme?.backgroundImage})`,
|
||||||
backgroundSize:
|
backgroundSize:
|
||||||
theme?.backgroundImage.toLocaleLowerCase() === 'none' ? undefined : 'cover',
|
theme?.backgroundImage.toLocaleLowerCase() === 'none' ? undefined : 'cover',
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
@@ -89,7 +89,7 @@ export function ThemeSelect({
|
|||||||
backgroundImage:
|
backgroundImage:
|
||||||
theme?.backgroundImage.toLocaleLowerCase() === 'none'
|
theme?.backgroundImage.toLocaleLowerCase() === 'none'
|
||||||
? undefined
|
? undefined
|
||||||
: `linear-gradient(${theme?.backgroundColor}33, ${theme?.backgroundColor}33), url(../../api/backgroundImages/thumbs/${theme?.backgroundImage})`,
|
: `linear-gradient(${theme?.backgroundColor}33, ${theme?.backgroundColor}33), url(../../trigger/api/backgroundImages/thumbs/${theme?.backgroundImage})`,
|
||||||
backgroundSize:
|
backgroundSize:
|
||||||
theme?.backgroundImage.toLocaleLowerCase() === 'none'
|
theme?.backgroundImage.toLocaleLowerCase() === 'none'
|
||||||
? undefined
|
? undefined
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export function ThemeCard({
|
|||||||
backgroundImage:
|
backgroundImage:
|
||||||
cardTheme?.backgroundImage.toLocaleLowerCase() === 'none'
|
cardTheme?.backgroundImage.toLocaleLowerCase() === 'none'
|
||||||
? undefined
|
? undefined
|
||||||
: `linear-gradient(${cardTheme?.backgroundColor}33, ${cardTheme?.backgroundColor}33), url(../../api/backgroundImages/thumbs/${cardTheme?.backgroundImage})`,
|
: `linear-gradient(${cardTheme?.backgroundColor}33, ${cardTheme?.backgroundColor}33), url(../../trigger/api/backgroundImages/thumbs/${cardTheme?.backgroundImage})`,
|
||||||
backgroundSize:
|
backgroundSize:
|
||||||
cardTheme?.backgroundImage.toLocaleLowerCase() === 'none'
|
cardTheme?.backgroundImage.toLocaleLowerCase() === 'none'
|
||||||
? undefined
|
? undefined
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export function ThemeMiniCard({ miniTheme }: { miniTheme: Theme | undefined }) {
|
|||||||
backgroundImage:
|
backgroundImage:
|
||||||
miniTheme?.backgroundImage.toLocaleLowerCase() === 'none'
|
miniTheme?.backgroundImage.toLocaleLowerCase() === 'none'
|
||||||
? undefined
|
? undefined
|
||||||
: `linear-gradient(${miniTheme?.backgroundColor}33, ${miniTheme?.backgroundColor}33), url(../../api/backgroundImages/thumbs/${miniTheme?.backgroundImage})`,
|
: `linear-gradient(${miniTheme?.backgroundColor}33, ${miniTheme?.backgroundColor}33), url(../../trigger/api/backgroundImages/thumbs/${miniTheme?.backgroundImage})`,
|
||||||
backgroundSize:
|
backgroundSize:
|
||||||
miniTheme?.backgroundImage.toLocaleLowerCase() === 'none' ? undefined : 'cover',
|
miniTheme?.backgroundImage.toLocaleLowerCase() === 'none' ? undefined : 'cover',
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ export default function BackgroundItem({
|
|||||||
background:
|
background:
|
||||||
item !== 'none' && item !== 'None'
|
item !== 'none' && item !== 'None'
|
||||||
? index === hovered
|
? index === hovered
|
||||||
? `linear-gradient(${designerTheme.backgroundColor}88, ${designerTheme.backgroundColor}88), no-repeat center url(../../api/backgroundImages/thumbs/${item})`
|
? `linear-gradient(${designerTheme.backgroundColor}88, ${designerTheme.backgroundColor}88), no-repeat center url(../../trigger/api/backgroundImages/thumbs/${item})`
|
||||||
: `no-repeat center url(../../api/backgroundImages/thumbs/${item})`
|
: `no-repeat center url(../../trigger/api/backgroundImages/thumbs/${item})`
|
||||||
: 'repeating-linear-gradient(45deg, #33333366, #33333366 10px, #88888866 10px, #88888866 20px)',
|
: 'repeating-linear-gradient(45deg, #33333366, #33333366 10px, #88888866 10px, #88888866 20px)',
|
||||||
backgroundSize: item === 'none' ? undefined : 'cover',
|
backgroundSize: item === 'none' ? undefined : 'cover',
|
||||||
backgroundColor: item === 'none' ? '#00000088' : undefined,
|
backgroundColor: item === 'none' ? '#00000088' : undefined,
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ export default function ThemeChanges({
|
|||||||
defaultTheme[key as keyof Theme] as string
|
defaultTheme[key as keyof Theme] as string
|
||||||
).toLocaleLowerCase() === 'none'
|
).toLocaleLowerCase() === 'none'
|
||||||
? 'https://placehold.co/540x360?text=None'
|
? 'https://placehold.co/540x360?text=None'
|
||||||
: `../../api/backgroundImages/thumbs/${defaultTheme[key as keyof Theme] as string}`
|
: `../../trigger/api/backgroundImages/thumbs/${defaultTheme[key as keyof Theme] as string}`
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Text>→</Text>
|
<Text>→</Text>
|
||||||
@@ -182,7 +182,7 @@ export default function ThemeChanges({
|
|||||||
designerTheme[key as keyof Theme] as string
|
designerTheme[key as keyof Theme] as string
|
||||||
).toLocaleLowerCase() === 'none'
|
).toLocaleLowerCase() === 'none'
|
||||||
? 'https://placehold.co/540x360?text=None'
|
? 'https://placehold.co/540x360?text=None'
|
||||||
: `../../api/backgroundImages/thumbs/${designerTheme[key as keyof Theme] as string}`
|
: `../../trigger/api/backgroundImages/thumbs/${designerTheme[key as keyof Theme] as string}`
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export function ThemeModalContent({ selectedTheme }: { selectedTheme: Theme }) {
|
|||||||
backgroundImage:
|
backgroundImage:
|
||||||
selectedTheme?.backgroundImage.toLocaleLowerCase() === 'none'
|
selectedTheme?.backgroundImage.toLocaleLowerCase() === 'none'
|
||||||
? undefined
|
? undefined
|
||||||
: `linear-gradient(${selectedTheme?.backgroundColor}33, ${selectedTheme?.backgroundColor}33), url(../../api/backgroundImages/thumbs/${selectedTheme?.backgroundImage})`,
|
: `linear-gradient(${selectedTheme?.backgroundColor}33, ${selectedTheme?.backgroundColor}33), url(../../trigger/api/backgroundImages/thumbs/${selectedTheme?.backgroundImage})`,
|
||||||
backgroundSize:
|
backgroundSize:
|
||||||
selectedTheme?.backgroundImage.toLocaleLowerCase() === 'none'
|
selectedTheme?.backgroundImage.toLocaleLowerCase() === 'none'
|
||||||
? undefined
|
? undefined
|
||||||
|
|||||||
@@ -2,16 +2,18 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2020",
|
"target": "ES2020",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"module": "nodenext",
|
"module": "ESNext",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
|
"baseUrl": "./src",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"allowJs": false,
|
"allowJs": false,
|
||||||
|
"esModuleInterop": false,
|
||||||
"lib": ["ESNext", "DOM"],
|
"lib": ["ESNext", "DOM"],
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"types": ["vite/client", "vitest"],
|
"types": ["vite/client", "vitest"],
|
||||||
|
|
||||||
/* Bundler mode */
|
/* Bundler mode */
|
||||||
"moduleResolution": "nodenext",
|
"moduleResolution": "node",
|
||||||
"allowImportingTsExtensions": true,
|
"allowImportingTsExtensions": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
port: 3000,
|
port: 3000,
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
api: {
|
||||||
target: `${env.VITE_DOMAIN_DEV}/${env.VITE_BASE_URL}`,
|
target: `${env.VITE_DOMAIN_DEV}/${env.VITE_BASE_URL}`,
|
||||||
changeOrigin: false,
|
changeOrigin: false,
|
||||||
secure: false,
|
secure: false,
|
||||||
@@ -68,7 +68,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
proxy: {
|
proxy: {
|
||||||
api: {
|
api: {
|
||||||
target: `${env.VITE_DOMAIN_DEV}`,
|
target: `${env.VITE_DOMAIN_DEV}/${env.VITE_BASE_URL}`,
|
||||||
changeOrigin: false,
|
changeOrigin: false,
|
||||||
secure: false,
|
secure: false,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user