mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-23 15:20:33 +03:00
Rename List view mode to Table
This commit is contained in:
parent
882519738f
commit
d9f268266c
ui/src
@ -1,6 +1,6 @@
|
||||
export const ALBUM_MODE_GRID = 'ALBUM_GRID_MODE'
|
||||
export const ALBUM_MODE_LIST = 'ALBUM_LIST_MODE'
|
||||
export const ALBUM_MODE_TABLE = 'ALBUM_TABLE_MODE'
|
||||
|
||||
export const albumViewGrid = () => ({ type: ALBUM_MODE_GRID })
|
||||
|
||||
export const albumViewList = () => ({ type: ALBUM_MODE_LIST })
|
||||
export const albumViewTable = () => ({ type: ALBUM_MODE_TABLE })
|
||||
|
@ -15,7 +15,7 @@ import FavoriteIcon from '@material-ui/icons/Favorite'
|
||||
import { withWidth } from '@material-ui/core'
|
||||
import { List, QuickFilter, Title, useAlbumsPerPage } from '../common'
|
||||
import AlbumListActions from './AlbumListActions'
|
||||
import AlbumListView from './AlbumListView'
|
||||
import AlbumTableView from './AlbumTableView'
|
||||
import AlbumGridView from './AlbumGridView'
|
||||
import { AddToPlaylistDialog } from '../dialogs'
|
||||
import albumLists, { defaultAlbumList } from './albumLists'
|
||||
@ -112,7 +112,7 @@ const AlbumList = (props) => {
|
||||
{albumView.grid ? (
|
||||
<AlbumGridView albumListType={albumListType} {...props} />
|
||||
) : (
|
||||
<AlbumListView {...props} />
|
||||
<AlbumTableView {...props} />
|
||||
)}
|
||||
</List>
|
||||
<AddToPlaylistDialog />
|
||||
|
@ -14,7 +14,7 @@ import {
|
||||
import ViewHeadlineIcon from '@material-ui/icons/ViewHeadline'
|
||||
import ViewModuleIcon from '@material-ui/icons/ViewModule'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { albumViewGrid, albumViewList } from '../actions'
|
||||
import { albumViewGrid, albumViewTable } from '../actions'
|
||||
import ToggleFieldsMenu from '../common/ToggleFieldsMenu'
|
||||
|
||||
const useStyles = makeStyles({
|
||||
@ -57,7 +57,7 @@ const AlbumViewToggler = React.forwardRef(
|
||||
className={classes.rightButton}
|
||||
label={translate('ra.toggleFieldsMenu.table')}
|
||||
color={albumView.grid ? 'secondary' : 'primary'}
|
||||
onClick={() => dispatch(albumViewList())}
|
||||
onClick={() => dispatch(albumViewTable())}
|
||||
>
|
||||
<ViewHeadlineIcon fontSize="inherit" />
|
||||
</Button>
|
||||
|
@ -100,7 +100,7 @@ const AlbumDetails = (props) => {
|
||||
)
|
||||
}
|
||||
|
||||
const AlbumListView = ({
|
||||
const AlbumTableView = ({
|
||||
hasShow,
|
||||
hasEdit,
|
||||
hasList,
|
||||
@ -198,4 +198,4 @@ const AlbumListView = ({
|
||||
)
|
||||
}
|
||||
|
||||
export default AlbumListView
|
||||
export default AlbumTableView
|
@ -1,4 +1,4 @@
|
||||
import { ALBUM_MODE_GRID, ALBUM_MODE_LIST } from '../actions'
|
||||
import { ALBUM_MODE_GRID, ALBUM_MODE_TABLE } from '../actions'
|
||||
|
||||
export const albumViewReducer = (
|
||||
previousState = {
|
||||
@ -9,7 +9,7 @@ export const albumViewReducer = (
|
||||
const { type } = payload
|
||||
switch (type) {
|
||||
case ALBUM_MODE_GRID:
|
||||
case ALBUM_MODE_LIST:
|
||||
case ALBUM_MODE_TABLE:
|
||||
return { ...previousState, grid: type === ALBUM_MODE_GRID }
|
||||
default:
|
||||
return previousState
|
||||
|
Loading…
x
Reference in New Issue
Block a user