implement toggle mute

This commit is contained in:
Jonas Heinrich 2020-10-26 16:03:25 +01:00
parent 46b105fe4d
commit 9336aa180c
6 changed files with 20 additions and 0 deletions

View File

@ -29,6 +29,7 @@ return [
'routes' => [
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
['name' => 'page#index', 'url' => '/top', 'verb' => 'GET', 'postfix' => 'top'],
['name' => 'page#index', 'url' => '/recent', 'verb' => 'GET', 'postfix' => 'recent'],
['name' => 'page#index', 'url' => '/new', 'verb' => 'GET', 'postfix' => 'new'],
['name' => 'page#index', 'url' => '/favorites', 'verb' => 'GET', 'postfix' => 'favorites'],
['name' => 'page#index', 'url' => '/categories', 'verb' => 'GET', 'postfix' => 'categories'],

5
src/assets/recent.svg Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.0">
<rect style="color:#000000" fill-opacity="0" height="97.986" width="163.31" y="-32.993" x="-62.897"/>
<path style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;text-decoration-style:solid;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none" d="m8 0c-4.4064 0-8 3.5936-8 8 0 4.406 3.5936 8 8 8 4.406 0 8-3.594 8-8 0-4.4064-3.594-8-8-8zm0 2c3.326 0 6 2.6744 6 6 0 3.326-2.674 6-6 6-3.3256 0-6-2.674-6-6 0-3.3256 2.6744-6 6-6zm-0.4414 0.9316c-0.334 0.0075-0.6014 0.2793-0.6035 0.6133l-0.8516 4.4414v0.0117c-0.1821 0.7569 0.3361 1.002 0.916 1.3536l0.0059 0.0019 2.9976 1.5785c0.653 0.502 1.407-0.476 0.754-0.9789l-1.777-1.9453v-0.0078l-0.8086-4.4492c0.0011-0.3478-0.2851-0.6279-0.6328-0.6192z"/>
</svg>

After

Width:  |  Height:  |  Size: 1001 B

View File

@ -79,6 +79,9 @@ export default {
case 'TOP':
this.loadStations()
break
case 'RECENT':
this.loadStations()
break
case 'NEW':
this.loadStations()
break

View File

@ -5,6 +5,10 @@
:to="{ name: 'TOP' }"
icon="icon-category-dashboard"
:title="t('radio', 'Top')" />
<AppNavigationItem
:to="{ name: 'RECENT' }"
icon="icon-files-recent"
:title="t('radio', 'Recent')" />
<AppNavigationItem
:to="{ name: 'NEW' }"
icon="icon-category-monitoring"

View File

@ -20,6 +20,11 @@ export default new Router({
component: Main,
name: 'TOP',
},
{
path: '/recent',
component: Main,
name: 'RECENT',
},
{
path: '/new',
component: Main,

View File

@ -25,9 +25,11 @@ export default new Vuex.Store({
toggleMute(state) {
if (state.player.isMute) {
state.player.volume = state.player.oldVolume
state.player.isMute = false
} else {
state.player.oldVolume = state.player.volume
state.player.volume = 0
state.player.isMute = true
}
},
togglePlay(state) {