mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 22:10:15 -05:00
[web] Use named route for search pages
Switching to named routes in order to reduce future maintenance.
This commit is contained in:
@@ -50,7 +50,7 @@ export default createStore({
|
||||
list: []
|
||||
},
|
||||
|
||||
search_path: '/search/library',
|
||||
search_source: 'library',
|
||||
recent_searches: [],
|
||||
|
||||
composer_tracks_sort: 1,
|
||||
@@ -222,8 +222,8 @@ export default createStore({
|
||||
state.notifications.list.splice(index, 1)
|
||||
}
|
||||
},
|
||||
[types.SEARCH_PATH](state, searchPath) {
|
||||
state.search_path = searchPath
|
||||
[types.SEARCH_SOURCE](state, searchSource) {
|
||||
state.search_source = searchSource
|
||||
},
|
||||
[types.ADD_RECENT_SEARCH](state, query) {
|
||||
const index = state.recent_searches.findIndex((elem) => elem === query)
|
||||
|
||||
@@ -18,7 +18,7 @@ export const SPOTIFY_FEATURED_PLAYLISTS = 'SPOTIFY_FEATURED_PLAYLISTS'
|
||||
export const ADD_NOTIFICATION = 'ADD_NOTIFICATION'
|
||||
export const DELETE_NOTIFICATION = 'DELETE_NOTIFICATION'
|
||||
|
||||
export const SEARCH_PATH = 'SEARCH_PATH'
|
||||
export const SEARCH_SOURCE = 'SEARCH_SOURCE'
|
||||
export const ADD_RECENT_SEARCH = 'ADD_RECENT_SEARCH'
|
||||
|
||||
export const COMPOSER_TRACKS_SORT = 'COMPOSER_TRACKS_SORT'
|
||||
|
||||
Reference in New Issue
Block a user