starting to implement search page
This commit is contained in:
parent
bc3dfd23cb
commit
a6fc70ac1b
@ -34,6 +34,7 @@ return [
|
|||||||
['name' => 'page#index', 'url' => '/new', 'verb' => 'GET', 'postfix' => 'new'],
|
['name' => 'page#index', 'url' => '/new', 'verb' => 'GET', 'postfix' => 'new'],
|
||||||
['name' => 'page#index', 'url' => '/favorites', 'verb' => 'GET', 'postfix' => 'favorites'],
|
['name' => 'page#index', 'url' => '/favorites', 'verb' => 'GET', 'postfix' => 'favorites'],
|
||||||
['name' => 'page#index', 'url' => '/categories', 'verb' => 'GET', 'postfix' => 'categories'],
|
['name' => 'page#index', 'url' => '/categories', 'verb' => 'GET', 'postfix' => 'categories'],
|
||||||
|
['name' => 'page#index', 'url' => '/search', 'verb' => 'GET', 'postfix' => 'search'],
|
||||||
// Settings
|
// Settings
|
||||||
['name' => 'settings#set_menu_state', 'url' => '/settings/menuState', 'verb' => 'POST'],
|
['name' => 'settings#set_menu_state', 'url' => '/settings/menuState', 'verb' => 'POST'],
|
||||||
['name' => 'settings#get_menu_state', 'url' => '/settings/menuState', 'verb' => 'GET'],
|
['name' => 'settings#get_menu_state', 'url' => '/settings/menuState', 'verb' => 'GET'],
|
||||||
|
@ -80,7 +80,7 @@ class SettingsController extends ApiController {
|
|||||||
public function setMenuState($menuState = ""): JSONResponse {
|
public function setMenuState($menuState = ""): JSONResponse {
|
||||||
$legalArguments = ['TOP', 'RECENT', 'NEW', 'FAVORITES', 'CATEGORIES'];
|
$legalArguments = ['TOP', 'RECENT', 'NEW', 'FAVORITES', 'CATEGORIES'];
|
||||||
if (!in_array($menuState, $legalArguments)) {
|
if (!in_array($menuState, $legalArguments)) {
|
||||||
return new JSONResponse(['status' => 'error'], Http::STATUS_BAD_REQUEST);
|
$menuState = 'TOP';
|
||||||
}
|
}
|
||||||
return $this->setSetting(
|
return $this->setSetting(
|
||||||
'menuState',
|
'menuState',
|
||||||
|
@ -21,6 +21,10 @@
|
|||||||
:to="{ name: 'CATEGORIES' }"
|
:to="{ name: 'CATEGORIES' }"
|
||||||
icon="icon-files-dark"
|
icon="icon-files-dark"
|
||||||
:title="t('radio', 'Categories')" />
|
:title="t('radio', 'Categories')" />
|
||||||
|
<AppNavigationItem
|
||||||
|
:to="{ name: 'SEARCH' }"
|
||||||
|
icon="icon-search"
|
||||||
|
:title="t('radio', 'Search')" />
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<Player
|
<Player
|
||||||
|
@ -38,6 +38,11 @@ const router = new Router({
|
|||||||
component: Main,
|
component: Main,
|
||||||
name: 'CATEGORIES',
|
name: 'CATEGORIES',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/search',
|
||||||
|
component: Main,
|
||||||
|
name: 'SEARCH',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user