Skip to content

Commit

Permalink
Moving the icons and add a manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
An Phan committed Jan 5, 2016
1 parent 098e59d commit 614e626
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 4 deletions.
7 changes: 7 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Koel",
"start_url": "/",
"display": "standalone",
"orientation": "portrait",
"icons": []
}
Binary file not shown.
File renamed without changes.
Binary file added resources/assets/img/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 23 additions & 3 deletions resources/assets/js/components/shared/add-to-playlist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<div class="add-to-playlist" v-show="showing">
<p>Add {{ songs.length }} song{{ songs.length > 1 ? 's' : '' }} into</p>
<ul>
<li @click="addSongsToFavorite">Favorites</li>
<li v-for="playlist in playlistState.playlists" @click="addSongsToExisting(playlist)">{{ playlist.name }}</li>
<li v-if="this._settings.canLike" @click="addSongsToFavorite">Favorites</li>
<template v-for="playlist in playlistState.playlists">
<li v-hide="isPlaylistHidden(playlist)" @click="addSongsToExisting(playlist)">{{ playlist.name }}</li>
</template>
</ul>
<p>or create a new playlist</p>
<form class="form-save form-simple" @submit.prevent="createNewFromSongs">
Expand All @@ -18,16 +20,23 @@
</template>

<script>
import _ from 'lodash';
import playlistStore from '../../stores/playlist';
import favoriteStore from '../../stores/favorite';
export default {
props: ['songs', 'showing'],
props: ['songs', 'showing', 'settings'],
data() {
return {
newPlaylistName: '',
playlistState: playlistStore.state,
_settings: _.assign({
canQueue: true,
canLike: true,
hiddenPlaylists: []
}, this.settings),
}
},
Expand All @@ -40,6 +49,17 @@
},
methods: {
/**
* Determine if a playlist should be hidden from the menu.
*
* @param {Object} playlist
*
* @return {Boolean}
*/
isPlaylistHidden(playlist) {
return _.contains(this._settings.hiddenPlaylists, playlist);
},
/**
* Add the selected songs into Favorite.
*/
Expand Down
7 changes: 6 additions & 1 deletion resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
<meta charset="utf-8">
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="apple-touch-icon" href="/public/img/apple-touch-icon-precomposed.png">
<meta name="mobile-web-app-capable" content="yes">

<link rel="manifest" href="manifest.json" />
<link rel="icon" type="image/x-icon" href="public/img/favicon.ico" />
<link rel="icon" href="public/img/icon.png">
<link rel="apple-touch-icon" href="public/img/icon.png">

<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100&subset=latin,latin-ext,vietnamese,greek-ext,greek,cyrillic,cyrillic-ext" rel="stylesheet">

Expand Down

0 comments on commit 614e626

Please sign in to comment.