Massive jslint fix

This commit is contained in:
An Phan 2016-03-14 01:00:32 +08:00
parent 63f7fb7b72
commit 01480432a8
46 changed files with 190 additions and 205 deletions

View file

@ -38,9 +38,9 @@
</script>
<style lang="sass" scoped>
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "resources/assets/sass/partials/_shared.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
@import "../../../sass/partials/_shared.scss";
/**
* I like to move it move it
@ -75,7 +75,7 @@
&.error {
border-color: #8e4947;
animation: shake .5s;
animation: shake .5s;
}
&::before {
@ -86,7 +86,7 @@
height: 172px;
}
@media only screen
@media only screen
and (max-device-width : 414px) {
border: 0;
background: transparent;

View file

@ -70,8 +70,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#albumInfo {
img.cover {

View file

@ -60,8 +60,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#artistInfo {
img.cool-guys-posing {

View file

@ -24,8 +24,8 @@
import _ from 'lodash';
import lyrics from './lyrics.vue';
import artistInfo from './artist-info.vue'
import albumInfo from './album-info.vue'
import artistInfo from './artist-info.vue';
import albumInfo from './album-info.vue';
import preferenceStore from '../../../stores/preference';
import songStore from '../../../stores/song';
@ -82,8 +82,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#extra {
flex: 0 0 $extraPanelWidth;

View file

@ -19,6 +19,6 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
</style>

View file

@ -17,8 +17,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
#mainWrapper {
display: flex;

View file

@ -105,8 +105,8 @@
</script>
<style lang="sass" scoped>
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#albumWrapper {
button.play-shuffle {

View file

@ -64,8 +64,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#albumsWrapper {
.albums {

View file

@ -99,8 +99,8 @@
</script>
<style lang="sass" scoped>
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#artistWrapper {
button.play-shuffle {

View file

@ -64,8 +64,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#artistsWrapper {
.artists {

View file

@ -83,8 +83,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#favoritesWrapper {
button.play-shuffle, button.del {

View file

@ -168,8 +168,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#homeWrapper {
.top-sections {

View file

@ -57,7 +57,7 @@
* @return {Boolean}
*/
'song:played': function (song) {
this.albumCover = song.album.cover === albumStore.stub.cover ? null : song.album.cover;
this.albumCover = song.album.cover === albumStore.stub.cover ? null : song.album.cover;
return true;
}
@ -66,8 +66,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#mainContent {
flex: 1;

View file

@ -112,8 +112,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#playlistWrapper {
button.play-shuffle, button.del {

View file

@ -3,7 +3,7 @@
<h1 class="heading">
<span>Profile &amp; Preferences</span>
</h1>
<div class="main-scroll-wrap">
<form @submit.prevent="update">
<div class="form-row">
@ -70,7 +70,7 @@
Connecting Koel and your Last.fm account enables exciting features scrobbling is one of them.
</p>
<p v-if="state.current.preferences.lastfm_session_key">
For the sake of democracy, you have the option to disconnect from Last.fm too.
For the sake of democracy, you have the option to disconnect from Last.fm too.
Doing so will reload Koel, though.
</p>
@ -80,19 +80,19 @@
{{ state.current.preferences.lastfm_session_key ? 'Reconnect' : 'Connect' }}
</button>
<button
v-if="state.current.preferences.lastfm_session_key"
@click.prevent="disconnectFromLastfm"
<button
v-if="state.current.preferences.lastfm_session_key"
@click.prevent="disconnectFromLastfm"
class="disconnect"
>
Disconnect
</button>
</div>
</div>
</div>
<div v-else>
<p>This installation of Koel has no Last.fm integration.
<span v-if="state.current.is_admin">Visit
<span v-if="state.current.is_admin">Visit
<a href="https://github.com/phanan/koel/wiki" target="_blank">Koels Wiki</a>
for a quick how-to. Really, you should do it.
</span>
@ -106,7 +106,7 @@
<script>
import $ from 'jquery';
import userStore from '../../../stores/user';
import preferenceStore from '../../../stores/preference';
import sharedStore from '../../../stores/shared';
@ -146,7 +146,7 @@
// "Save!" aaaaaaaand it's gone!
this.showStatus = true;
setTimeout(() => this.showStatus = false, 3000)
setTimeout(() => this.showStatus = false, 3000);
});
},
@ -159,7 +159,7 @@
},
/**
* Save the current user's preference.
* Save the current user's preference.
* Right now it's only "Song notification."
*/
savePreference() {
@ -173,8 +173,8 @@
*/
connectToLastfm() {
window.open(
`/api/lastfm/connect?jwt-token=${ls.get('jwt-token')}`,
'_blank',
`/api/lastfm/connect?jwt-token=${ls.get('jwt-token')}`,
'_blank',
'toolbar=no,titlebar=no,location=no,width=1024,height=640'
);
},
@ -191,19 +191,19 @@
// But one of my users is my new born kid!
// - Then? Kids will fuck things up anyway.
http.delete('lastfm/disconnect', {}, () => window.location.reload());
}
},
},
};
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#profileWrapper {
input {
&[type="text"], &[type="email"], &[type="password"] {
width: 192px;
width: 192px;
}
&.error {

View file

@ -59,10 +59,8 @@
</template>
<script>
import _ from 'lodash';
import isMobile from 'ismobilejs';
import playlistStore from '../../../stores/playlist';
import queueStore from '../../../stores/queue';
import songStore from '../../../stores/song';
import playback from '../../../services/playback';
@ -128,8 +126,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#queueWrapper {
.none {

View file

@ -59,8 +59,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#settingsWrapper {
input[type="text"] {

View file

@ -71,7 +71,7 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
</style>

View file

@ -2,11 +2,11 @@
<section id="usersWrapper">
<h1 class="heading">
<span>Users
<i class="fa fa-angle-down toggler"
v-show="isPhone && !showingControls"
<i class="fa fa-angle-down toggler"
v-show="isPhone && !showingControls"
@click="showingControls = true"></i>
<i class="fa fa-angle-up toggler"
v-show="isPhone && showingControls"
<i class="fa fa-angle-up toggler"
v-show="isPhone && showingControls"
@click.prevent="showingControls = false"></i>
</span>
@ -59,10 +59,10 @@
<div class="users">
<article v-for="user in state.users" class="user-item" :class="{ editing: editedUser === user }">
<img :src="user.avatar" width="128" height="128" alt="">
<div class="right">
<div class="info">
<h1>{{ user.name }}
<h1>{{ user.name }}
<i v-if="user.id === state.current.id" class="you fa fa-check-circle"></i>
</h1>
@ -73,8 +73,8 @@
<button class="edit" @click="edit(user)" v-show="deletedUser !== user">
{{ user.id === state.current.id ? 'Update Profile' : 'Edit' }}
</button>
<button v-if="user.id !== state.current.id && deletedUser !== user"
class="delete"
<button v-if="user.id !== state.current.id && deletedUser !== user"
class="delete"
@click="confirmDelete(user)">Delete
</button>
<span v-show="deletedUser === user">
@ -94,7 +94,7 @@
<script>
import _ from 'lodash';
import isMobile from 'ismobilejs';
import userStore from '../../../stores/user';
export default {
@ -136,7 +136,7 @@
/**
* Cancel editing, or simply close the form after updating.
* @param {Boolean=true} rollback If true, editing was cancelled.
* @param {Boolean=true} rollback If true, editing was cancelled.
* The original state of the edited user must be restored.
* If false, editing was successfully committed.
*/
@ -165,9 +165,9 @@
* Update the edited user.
*/
update() {
userStore.update(this.editedUser,
this.editedUser.name,
this.editedUser.email,
userStore.update(this.editedUser,
this.editedUser.name,
this.editedUser.email,
this.editedUser.password, () => {
this.cancelEdit(false);
// TODO: Scroll to the user?
@ -209,9 +209,9 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
@keyframes barberpole {
from { background-position: 0 0; }
to { background-position: 60px 30px; }
@ -231,13 +231,13 @@
&.editing {
background-size: 30px 30px;
background-image: linear-gradient(
-45deg,
rgba(black, 0.3) 25%,
transparent 25%,
transparent 50%,
rgba(black, 0.3) 50%,
rgba(black, 0.3) 75%,
transparent 75%,
-45deg,
rgba(black, 0.3) 25%,
transparent 25%,
transparent 50%,
rgba(black, 0.3) 50%,
rgba(black, 0.3) 75%,
transparent 75%,
transparent
);
@ -299,7 +299,7 @@
background: $colorGreen !important;
&:hover {
background: darken($colorGreen, 10%) !important;
background: darken($colorGreen, 10%) !important;
}
}
@ -362,8 +362,8 @@
}
}
@media only screen
and (min-device-width : 668px)
@media only screen
and (min-device-width : 668px)
and (max-device-width : 768px) {
.users {
flex-direction: column;

View file

@ -152,8 +152,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#sidebar {
flex: 0 0 256px;

View file

@ -7,11 +7,11 @@
:class="{ active: active }"
>{{ playlist.name }}</a>
<input type="text"
<input type="text"
@keyup.esc="cancelEdit"
@keyup.enter="update"
@blur="update"
v-model="playlist.name"
v-model="playlist.name"
v-koel-focus="editing"
required
>
@ -24,7 +24,7 @@
import songStore from '../../../stores/song';
import playlistStore from '../../../stores/playlist';
import favoriteStore from '../../../stores/favorite';
export default {
props: ['playlist', 'type'],
@ -39,7 +39,7 @@
computed: {
/**
* Determine if the current menu item is the "Favorites" one.
*
*
* @return {Boolean}
*/
isFavorites() {
@ -75,7 +75,7 @@
* Update the playlist's name.
*/
update() {
if (this.isFavorites || !this.editing) {
if (this.isFavorites || !this.editing) {
return;
}
@ -99,8 +99,8 @@
},
/**
* Remove the droppable state when a dragleave event occurs on the playlist's DOM element.
*
* Remove the droppable state when a dragleave event occurs on the playlist's DOM element.
*
* @param {Object} e The dragleave event.
*/
removeDroppableState(e) {
@ -110,7 +110,7 @@
/**
* Add a "droppable" class and set the drop effect when an item is dragged over the playlist's
* DOM element.
*
*
* @param {Object} e The dragover event.
*/
allowDrop(e) {
@ -122,7 +122,7 @@
/**
* Handle songs dropped to our favorite or playlist menu item.
*
*
* @param {Object} e The event
*
* @return {Boolean}
@ -155,7 +155,7 @@
if (view === 'favorites') {
this.active = this.isFavorites;
} else if (view === 'playlist') {
this.active = this.playlist === playlist;
this.active = this.playlist === playlist;
} else {
this.active = false;
}
@ -165,8 +165,8 @@
</script>
<style lang="sass" scoped>
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
.playlist {
user-select: none;

View file

@ -1,15 +1,15 @@
<template>
<section id="playlists">
<h1>Playlists
<i class="fa fa-plus-circle control create"
:class="{ creating: creating }"
<h1>Playlists
<i class="fa fa-plus-circle control create"
:class="{ creating: creating }"
@click="creating = !creating"></i>
</h1>
<form v-show="creating" @submit.prevent="store" class="create">
<input type="text"
<input type="text"
@keyup.esc.prevent="creating = false"
v-model="newName"
v-model="newName"
v-koel-focus="creating"
placeholder="↵ to save"
required
@ -17,12 +17,12 @@
</form>
<ul class="menu">
<playlist-item
type="favorites"
<playlist-item
type="favorites"
:playlist="{ name: 'Favorites', songs: favoriteState.songs }"></playlist-item>
<playlist-item
v-for="playlist in playlistState.playlists"
type="playlist"
<playlist-item
v-for="playlist in playlistState.playlists"
type="playlist"
:playlist="playlist"></playlist-item>
</ul>
</section>
@ -33,7 +33,7 @@
import favoriteStore from '../../../stores/favorite';
import playlistItem from './playlist-item.vue';
export default {
props: ['currentView'],
@ -62,8 +62,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";
#playlists {
.control.create {

View file

@ -64,7 +64,6 @@
<script>
import _ from 'lodash';
import $ from 'jquery';
import utils from '../../services/utils';
import artistStore from '../../stores/artist';
@ -235,8 +234,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
#editSongsOverlay {
z-index: 9999;

View file

@ -87,8 +87,8 @@
</script>
<style lang="sass" scoped>
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
.add-to-playlist {
@include context-menu();

View file

@ -72,8 +72,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
@include artist-album-card();
</style>

View file

@ -62,8 +62,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
@include artist-album-card();
</style>

View file

@ -73,8 +73,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
#overlay {
position: fixed;

View file

@ -68,7 +68,7 @@
* Select the current component (apply a CSS class on its DOM).
*/
select() {
this.selected = true;
this.selected = true;
},
/**
@ -82,8 +82,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
.song-item {
border-bottom: 1px solid $color2ndBgr;

View file

@ -136,7 +136,7 @@
favoriteStore.unlike(songs);
break;
case 'playlist':
playlistStore.removeSongs(this.playlist, songs)
playlistStore.removeSongs(this.playlist, songs);
break;
default:
break;
@ -193,7 +193,7 @@
this.$nextTick(() => {
this.$root.loadMainView('queue');
if (e.ctrlKey || e.metaKey || songs.length == 1) {
if (e.ctrlKey || e.metaKey || songs.length === 1) {
playback.play(songs[0]);
}
});
@ -246,7 +246,6 @@
this.selectedSongs = songStore.byIds(ids);
},
/**
* -----------------------------------------------------------
* The next four methods are to deal with selection.
@ -306,7 +305,7 @@
var rows = $(this.$els.wrapper).find('tbody tr');
for (var i = indexes[0]; i <= indexes[1]; ++i) {
this.getComponentBySongId($(rows[i-1]).data('song-id')).select();
this.getComponentBySongId($(rows[i - 1]).data('song-id')).select();
}
},
@ -385,8 +384,6 @@
return false;
}
var $row = this.removeDroppableState(e);
queueStore.move(songs, songStore.byId(songId));
return false;
@ -437,8 +434,8 @@
return;
}
if ($wrapper[0].getBoundingClientRect().top + $wrapper[0].getBoundingClientRect().height
< $row[0].getBoundingClientRect().top) {
if ($wrapper[0].getBoundingClientRect().top + $wrapper[0].getBoundingClientRect().height <
$row[0].getBoundingClientRect().top) {
$wrapper.scrollTop($wrapper.scrollTop() + $row.position().top);
}
}
@ -480,8 +477,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
.song-list-wrap {
position: relative;

View file

@ -148,8 +148,8 @@
</script>
<style lang="sass" scoped>
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
.menu {
@include context-menu();

View file

@ -22,7 +22,6 @@
</template>
<script>
import _ from 'lodash';
import $ from 'jquery';
import VueClickaway from 'vue-clickaway';
@ -100,7 +99,6 @@
// Hide the typeahead results and reset the value if ESC is pressed.
if (e.keyCode === 27) {
this.showingResult = false;
//this.value = this.defaultValue;
return;
}
@ -144,8 +142,8 @@
</script>
<style lang="sass" scoped>
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
.result {
position: absolute;

View file

@ -91,7 +91,7 @@
if (i === 0) {
filter.type = 'lowshelf';
} else if (i === 9) {
filter.type = 'highshelf'
filter.type = 'highshelf';
} else {
filter.type = 'peaking';
}
@ -142,7 +142,7 @@
if ($(el).parents('.band').is('.preamp')) {
this.changePreampGain(value);
} else {
this.changeFilterGain(this.bands[i-1].filter, value);
this.changeFilterGain(this.bands[i - 1].filter, value);
}
},
@ -164,7 +164,7 @@
*/
changePreampGain(dbValue) {
this.preampGainValue = dbValue;
this.preampGainNode.gain.value = Math.pow(10, dbValue/20);
this.preampGainNode.gain.value = Math.pow(10, dbValue / 20);
},
/**
@ -181,7 +181,7 @@
* Load a preset when the user select it from the dropdown.
*/
loadPreset() {
if (Number.parseInt(this.selectedPresetIndex) === -1) {
if (Number.parseInt(this.selectedPresetIndex, 10) === -1) {
return;
}
@ -192,8 +192,8 @@
if ($(input).parents('.band').is('.preamp')) {
this.changePreampGain(preset.preamp);
} else {
this.changeFilterGain(this.bands[i-1].filter, preset.gains[i-1]);
input.value = preset.gains[i-1];
this.changeFilterGain(this.bands[i - 1].filter, preset.gains[i - 1]);
input.value = preset.gains[i - 1];
}
});
@ -224,8 +224,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
#equalizer {
position: absolute;

View file

@ -265,8 +265,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
@mixin hasSoftGradientOnTop($startColor) {
position: relative;

View file

@ -46,8 +46,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
#mainHeader {
height: $headerHeight;

View file

@ -1,9 +1,9 @@
<template>
<div class="side search" id="searchForm" :class="{ showing: showing }">
<input type="search"
:class="{ dirty: q }"
placeholder="Search"
v-model="q"
:class="{ dirty: q }"
placeholder="Search"
v-model="q"
debounce="500"
v-koel-focus="showing">
</div>
@ -47,8 +47,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
#searchForm {
@include vertical-center();
@ -61,7 +61,7 @@
margin-top: 0;
}
@media only screen and (max-device-width : 667px) {
z-index: -1;

View file

@ -35,8 +35,8 @@
</script>
<style lang="sass">
@import "resources/assets/sass/partials/_vars.scss";
@import "resources/assets/sass/partials/_mixins.scss";
@import "../../../sass/partials/_vars.scss";
@import "../../../sass/partials/_mixins.scss";
#userBadge {
@include vertical-center();
@ -75,5 +75,5 @@
@include vertical-center();
}
}
}
}
</style>

View file

@ -1,6 +1,5 @@
import $ from 'jquery';
import playback from '../services/playback';
import queueStore from '../stores/queue';
import playlistStore from '../stores/playlist';
import favoriteStore from '../stores/favorite';

View file

@ -4,11 +4,9 @@ import $ from 'jquery';
import queueStore from '../stores/queue';
import songStore from '../stores/song';
import artistStore from '../stores/artist';
import albumStore from '../stores/album';
import preferenceStore from '../stores/preference';
import ls from '../services/ls';
import http from '../services/http';
import config from '../config';
import plyr from 'plyr';
export default {
app: null,

View file

@ -6,21 +6,21 @@ export default {
* If H is 0, it will be ommited.
*/
secondsToHis(d) {
d = parseInt(d);
d = parseInt(d, 10);
var s = d%60;
var s = d % 60;
if (s < 10) {
s = '0' + s;
}
var i = Math.floor((d/60)%60);
var i = Math.floor((d / 60) % 60);
if (i < 10) {
i = '0' + i;
}
var h = Math.floor(d/3600);
var h = Math.floor(d / 3600);
if (h < 10) {
h = '0' + h;
@ -78,6 +78,6 @@ export default {
* @return {string}
*/
br2nl(str) {
return str.replace(/<br\s*[\/]?>/gi, "\n");
return str.replace(/<br\s*[\/]?>/gi, '\n');
}
};

View file

@ -31,7 +31,7 @@ export default {
setupArtist(artist) {
this.getImage(artist);
Vue.set(artist, 'playCount', 0);
Vue.set(artist, 'songCount', _.reduce(artist.albums, (count, album) => count + album.songs.length, 0));
Vue.set(artist, 'songCount', _.reduce(artist.albums, (count, album) => count + album.songs.length, 0));
Vue.set(artist, 'info', null);
return artist;
@ -64,7 +64,7 @@ export default {
album.artist = artist;
});
artist.playCount = _.reduce(artist.albums, (count, album) => count + album.playCount, 0);
artist.playCount = _.reduce(artist.albums, (count, album) => count + album.playCount, 0);
},
/**
@ -75,7 +75,7 @@ export default {
*/
removeAlbumsFromArtist(artist, albums) {
artist.albums = _.difference(artist.albums, [].concat(albums));
artist.playCount = _.reduce(artist.albums, (count, album) => count + album.playCount, 0);
artist.playCount = _.reduce(artist.albums, (count, album) => count + album.playCount, 0);
},
/**
@ -131,7 +131,7 @@ export default {
artist.albums.every(album => {
// If there's a "real" cover, use it.
if (album.image != config.unknownCover) {
if (album.image !== config.unknownCover) {
artist.image = album.cover;
// I want to break free.

View file

@ -85,7 +85,7 @@ export default {
/**
* Save the current equalizer config.
*
*
* @param {Number} preamp The preamp value (dB)
* @param {Array.<Number>} gains The band's gain value (dB)
*/

View file

@ -1,7 +1,6 @@
import _ from 'lodash';
import http from '../services/http';
import utils from '../services/utils';
export default {
state: {

View file

@ -20,7 +20,7 @@ export default {
/**
* Init the store.
*
*
* @param {Object} user The user whose preferences we are managing.
*/
init(user = null) {

View file

@ -1,20 +1,18 @@
import _ from 'lodash';
import songStub from '../stubs/song';
export default {
state: {
songs: [],
current: null,
},
init() {
// We don't have anything to do here yet.
// How about another song then?
//
//
// LITTLE WING
// -- by Jimi Fucking Hendrix
//
//
// Well she's walking
// Through the clouds
// With a circus mind
@ -22,7 +20,7 @@ export default {
// Butterflies and zebras and moonbeams and fairytales
// That's all she ever thinks about
// Riding with the wind
//
//
// When I'm sad
// She comes to me
// With a thousand smiles
@ -35,7 +33,7 @@ export default {
/**
* Get all queued songs.
*
*
* @return {Array.<Object>}
*/
all() {
@ -44,7 +42,7 @@ export default {
/**
* Get the first song in the queue.
*
*
* @return {?Object}
*/
first() {
@ -53,8 +51,8 @@ export default {
/**
* Get the last song in the queue.
*
* @return {?Object}
*
* @return {?Object}
*/
last() {
return _.last(this.state.songs);
@ -62,9 +60,9 @@ export default {
/**
* Determine if the queue contains a song.
*
*
* @param {Object} song
*
*
* @return {Boolean}
*/
contains(song) {
@ -72,7 +70,7 @@ export default {
},
/**
* Add a list of songs to the end of the current queue,
* Add a list of songs to the end of the current queue,
* or replace the current queue as a whole if `replace` is true.
*
* @param {Object|Array.<Object>} songs The song, or an array of songs
@ -86,7 +84,7 @@ export default {
this.state.songs = songs;
} else {
if (toTop) {
this.state.songs = _.union(songs, this.state.songs);
this.state.songs = _.union(songs, this.state.songs);
} else {
this.state.songs = _.union(this.state.songs, songs);
}
@ -95,7 +93,7 @@ export default {
/**
* Queue song(s) to after the current song.
*
*
* @param {Array.<Object>|Object} songs
*/
queueAfterCurrent(songs) {
@ -111,7 +109,7 @@ export default {
/**
* Unqueue a song, or several songs at once.
*
*
* @param {Object|String|Array.<Object>} songs The song(s) to unqueue
*/
unqueue(songs) {
@ -120,7 +118,7 @@ export default {
/**
* Move some songs to after a target.
*
*
* @param {Array.<Object>} songs Songs to move
* @param {Object} target The target song object
*/
@ -149,9 +147,9 @@ export default {
/**
* Get index of a song in the queue.
*
*
* @param {Object} song
*
*
* @return {?Integer}
*/
indexOf(song) {
@ -160,7 +158,7 @@ export default {
/**
* Get the next song in queue.
*
*
* @return {?Object}
*/
getNextSong() {
@ -175,7 +173,7 @@ export default {
/**
* Get the previous song in queue.
*
*
* @return {?Object}
*/
getPrevSong() {
@ -199,8 +197,8 @@ export default {
if (song) {
this.state.current = song;
}
return this.state.current;
return this.state.current;
},
/**

View file

@ -3,11 +3,11 @@ import stub from '../stubs/settings';
export default {
stub,
state: {
settings: [],
settings: [],
},
init(settings) {
this.state.settings = settings;
},

View file

@ -5,7 +5,6 @@ import NProgress from 'nprogress';
import http from '../services/http';
import stub from '../stubs/user';
import sharedStore from './shared';
export default {
stub,