mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-16 20:12:22 +03:00
refactor: extract themes to their own folder
This commit is contained in:
parent
1e0a79ebb7
commit
500207f7b8
@ -4,7 +4,8 @@ import dataProvider from './dataProvider'
|
||||
import authProvider from './authProvider'
|
||||
import polyglotI18nProvider from 'ra-i18n-polyglot'
|
||||
import messages from './i18n'
|
||||
import { DarkTheme, Layout, Login } from './layout'
|
||||
import { Layout, Login } from './layout'
|
||||
import { DarkTheme } from './themes'
|
||||
import transcoding from './transcoding'
|
||||
import player from './player'
|
||||
import user from './user'
|
||||
|
@ -14,7 +14,7 @@ import LockIcon from '@material-ui/icons/Lock'
|
||||
|
||||
import { Notification, useLogin, useNotify, useTranslate } from 'react-admin'
|
||||
|
||||
import { LightTheme } from './Themes'
|
||||
import { LightTheme } from '../themes'
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
main: {
|
||||
|
@ -1,39 +0,0 @@
|
||||
import blue from '@material-ui/core/colors/blue'
|
||||
|
||||
export const DarkTheme = {
|
||||
palette: {
|
||||
primary: {
|
||||
main: '#90caf9'
|
||||
},
|
||||
secondary: blue,
|
||||
type: 'dark'
|
||||
},
|
||||
overrides: {
|
||||
MuiFormGroup: {
|
||||
root: {
|
||||
color: 'white'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const LightTheme = {
|
||||
palette: {
|
||||
secondary: {
|
||||
light: '#5f5fc4',
|
||||
main: '#283593',
|
||||
dark: '#001064',
|
||||
contrastText: '#fff'
|
||||
}
|
||||
},
|
||||
overrides: {
|
||||
MuiFilledInput: {
|
||||
root: {
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.04)',
|
||||
'&$disabled': {
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.04)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
import Login from './Login'
|
||||
import Layout from './Layout'
|
||||
import { DarkTheme, LightTheme } from './Themes'
|
||||
|
||||
export { Layout, Login, DarkTheme, LightTheme }
|
||||
export { Layout, Login }
|
||||
|
18
ui/src/themes/dark.js
Normal file
18
ui/src/themes/dark.js
Normal file
@ -0,0 +1,18 @@
|
||||
import blue from '@material-ui/core/colors/blue'
|
||||
|
||||
export default {
|
||||
palette: {
|
||||
primary: {
|
||||
main: '#90caf9'
|
||||
},
|
||||
secondary: blue,
|
||||
type: 'dark'
|
||||
},
|
||||
overrides: {
|
||||
MuiFormGroup: {
|
||||
root: {
|
||||
color: 'white'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
4
ui/src/themes/index.js
Normal file
4
ui/src/themes/index.js
Normal file
@ -0,0 +1,4 @@
|
||||
import LightTheme from './light'
|
||||
import DarkTheme from './dark'
|
||||
|
||||
export { LightTheme, DarkTheme }
|
20
ui/src/themes/light.js
Normal file
20
ui/src/themes/light.js
Normal file
@ -0,0 +1,20 @@
|
||||
export default {
|
||||
palette: {
|
||||
secondary: {
|
||||
light: '#5f5fc4',
|
||||
main: '#283593',
|
||||
dark: '#001064',
|
||||
contrastText: '#fff'
|
||||
}
|
||||
},
|
||||
overrides: {
|
||||
MuiFilledInput: {
|
||||
root: {
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.04)',
|
||||
'&$disabled': {
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.04)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user