text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: src/renderer-lyric/components/core/ControlBar.vue
<template lang="pug">
div(:class="$style.container")
transition(enter-active-class="animated-fast fadeIn" leave-active-class="animated fadeOut")
div(:class="$style.btns" v-show="!isShowThemeList")
button(:class="$style.btn" @click="handleClose" :ti... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer-lyric/components/core/ControlBar.vue", "license": "apache-2.0", "size": 9574} |
### File: src/renderer-lyric/components/core/Icons.vue
<template lang="pug">
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' style="display: none;")
defs
g#icon-close(fill='currentColor')
// 0 0 24 24
path(d='M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer-lyric/components/core/Icons.vue", "license": "apache-2.0", "size": 5274} |
### File: src/renderer-lyric/components/core/Lyric.vue
<template lang="pug">
div(:class="[$style.lyric, { [$style.draging]: lyricEvent.isMsDown }, { [$style.lrcActiveZoom]: lrcConfig.style.isZoomActiveLrc } ]" :style="lrcStyles" @wheel="handleWheel" @mousedown="handleLyricMouseDown" ref="dom_lyric")
div(:class="$styl... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer-lyric/components/core/Lyric.vue", "license": "apache-2.0", "size": 13640} |
### File: src/renderer-lyric/components/index.js
import Vue from 'vue'
import upperFirst from 'lodash/upperFirst'
import camelCase from 'lodash/camelCase'
const requireComponent = require.context('./', true, /\.vue$/)
requireComponent.keys().forEach(fileName => {
const componentConfig = requireComponent(fileName)
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer-lyric/components/index.js", "license": "apache-2.0", "size": 449} |
### File: src/renderer-lyric/index.pug
html(lang="cn")
head
meta(charset="UTF-8")
meta(name="viewport" content="width=device-width, initial-scale=1.0")
meta(http-equiv="X-UA-Compatible" content="ie=edge")
title 桌面歌词-洛雪音乐助手
body
#root
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Pug", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer-lyric/index.pug", "license": "apache-2.0", "size": 241} |
### File: src/renderer-lyric/main.js
import Vue from 'vue'
import i18n from './plugins/i18n'
import './components'
import App from './App'
import '../common/error'
Vue.config.productionTip = false
new Vue({
i18n,
el: '#root',
render: h => h(App),
})
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer-lyric/main.js", "license": "apache-2.0", "size": 225} |
### File: src/renderer-lyric/plugins/i18n.js
/**
* Vue i18n
*
* @library
*
* http://kazupon.github.io/vue-i18n/en/
*/
// Lib imports
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import messages from '../../renderer/lang'
Vue.use(VueI18n)
const i18n = window.i18n = new VueI18n({
locale: 'zh-cn',
fal... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer-lyric/plugins/i18n.js", "license": "apache-2.0", "size": 333} |
### File: src/renderer/App.vue
<template lang="pug">
#container(v-if="isProd && !isDT && !isLinux" :class="theme" @mouseenter="enableIgnoreMouseEvents" @mouseleave="dieableIgnoreMouseEvents")
core-aside#left
#right
core-toolbar#toolbar
core-view#view
core-player#player
core-icons
material-version-mo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/App.vue", "license": "apache-2.0", "size": 21797} |
### File: src/renderer/assets/styles/colors.less
@red-50: #ffebee;
@red-100: #ffcdd2;
@red-200: #ef9a9a;
@red-300: #e57373;
@red-400: #ef5350;
@red-500: #f44336;
@red-600: #e53935;
@red-700: #d32f2f;
@red-800: #c62828;
@red-900: #b71c1c;
@red-A100: #ff8a80;
@red-A200: #ff5252;
@red-A400: #ff1744;
@red-A700: #d50000;
@r... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Less", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/assets/styles/colors.less", "license": "apache-2.0", "size": 6544} |
### File: src/renderer/assets/styles/index.less
@import './reset.less';
@import './animate.less';
*, *::after, *::before {
-webkit-user-drag: none;
}
html {
font-size: 16px;
}
.nobreak {
white-space: nowrap;
}
.auto-hidden {
.mixin-ellipsis-1;
}
.center {
text-align: center;
}
.break {
word-break: break... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Less", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/assets/styles/index.less", "license": "apache-2.0", "size": 5085} |
### File: src/renderer/assets/styles/layout.less
@import './variables.less';
/*自动隐藏文字*/
.mixin-ellipsis-1() {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.mixin-ellipsis() {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
word-break: break-all;
wh... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Less", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/assets/styles/layout.less", "license": "apache-2.0", "size": 599} |
### File: src/renderer/assets/styles/reset.less
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, for... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Less", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/assets/styles/reset.less", "license": "apache-2.0", "size": 988} |
### File: src/renderer/assets/styles/variables.less
@import './colors.less';
@themes: green, yellow, blue, red, pink, purple, orange, grey, ming, blue2, black, mid_autumn, naruto, happy_new_year;
// Colors
// @color-theme: #03a678;
@color-theme: #4daf7c;
@color-theme-bgimg: none;
@color-theme-bgposition: center;
@co... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Less", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/assets/styles/variables.less", "license": "apache-2.0", "size": 59574} |
### File: src/renderer/components/core/Aside.vue
<template lang="pug">
div(:class="$style.aside")
div(:class="$style.controlBtn" v-if="setting.controlBtnPosition == 'left'")
button(type="button" :class="$style.close" :tips="$t('core.toolbar.close')" @click="close")
svg(:class="$style.controlBtniIcon" versio... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/core/Aside.vue", "license": "apache-2.0", "size": 8718} |
### File: src/renderer/components/core/Player.vue
<template lang="pug">
div(:class="$style.player")
div(:class="$style.left" @contextmenu="handleToMusicLocation" @click="showPlayerDetail" :tips="$t('core.player.pic_tip')")
img(v-if="musicInfo.img" :src="musicInfo.img" @error="imgError")
svg(v-else version='1.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/core/Player.vue", "license": "apache-2.0", "size": 44165} |
### File: src/renderer/components/core/PlayerDetail.vue
<template lang="pug">
div(:class="[$style.container, setting.controlBtnPosition == 'left' ? $style.controlBtnLeft : $style.controlBtnRight]" @contextmenu="handleContextMenu")
//- div(:class="$style.bg" :style="bgStyle")
//- div(:class="$style.bg2")
d... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/core/PlayerDetail.vue", "license": "apache-2.0", "size": 25042} |
### File: src/renderer/components/core/Toolbar.vue
<template lang="pug">
div(:class="[$style.toolbar, setting.controlBtnPosition == 'left' ? $style.controlBtnLeft : $style.controlBtnRight]")
//- img(v-if="icon")
//- h1 {{title}}
material-search-input(:class="$style.input"
@event="handleEvent" :list=... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/core/Toolbar.vue", "license": "apache-2.0", "size": 5908} |
### File: src/renderer/components/core/View.vue
<template lang="pug">
div(:class="$style.view")
transition(enter-active-class="animated-fast fadeIn"
leave-active-class="animated-fast fadeOut")
router-view
//- core-title-bar
//- router-view
</template>
<style lang="less" module>
@import '../../assets/s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/core/View.vue", "license": "apache-2.0", "size": 448} |
### File: src/renderer/components/index.js
import Vue from 'vue'
import upperFirst from 'lodash/upperFirst'
import camelCase from 'lodash/camelCase'
const requireComponent = require.context('./', true, /\.vue$/)
requireComponent.keys().forEach(fileName => {
const componentConfig = requireComponent(fileName)
cons... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/index.js", "license": "apache-2.0", "size": 449} |
### File: src/renderer/components/material/Btn.vue
<template lang="pug">
button(:class="[$style.btn, min ? $style.min : null, outline ? $style.outline : null]" :disabled="disabled" @click="$emit('click', $event)")
slot
</template>
<script>
export default {
props: {
min: {
type: Boolean,
},
ou... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/Btn.vue", "license": "apache-2.0", "size": 1417} |
### File: src/renderer/components/material/Checkbox.vue
<template lang="pug">
div(:class="$style.checkbox")
input(:type="need ? 'radio' : 'checkbox'" :class="$style.input" :id="id" :disabled="disabled" :value="value" :name="name" @change="change" v-model="bool")
label(:for="id" :class="$style.content")
div(v-if... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/Checkbox.vue", "license": "apache-2.0", "size": 4831} |
### File: src/renderer/components/material/CommentFloor.vue
<template lang="pug">
div(:class="$style.container")
ul
li(v-for="(item, index) in comments" :key="item.id" :class="$style.listItem")
div(:class="$style.content")
div(:class="$style.left")
img( :class="$style.avatar" :... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/CommentFloor.vue", "license": "apache-2.0", "size": 3378} |
### File: src/renderer/components/material/DownloadModal.vue
<template lang="pug">
material-modal(:show="show" :bg-close="bgClose" @close="handleClose")
main(:class="$style.main")
h2
| {{ info.name }}
br
| {{ info.singer }}
material-btn(:class="$style.btn" v-if="checkSource(type.type)" :tips... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/DownloadModal.vue", "license": "apache-2.0", "size": 2133} |
### File: src/renderer/components/material/DownloadMultipleModal.vue
<template lang="pug">
material-modal(:show="show" :bg-close="bgClose" @close="handleClose")
main(:class="$style.main")
h2
| {{$t('material.download_multiple_modal.tip', { len: list.length })}}
br
| {{$t('material.download_multi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/DownloadMultipleModal.vue", "license": "apache-2.0", "size": 1750} |
### File: src/renderer/components/material/Input.vue
<template lang="pug">
input(:class="$style.input" ref="dom_input" :type="type" :placeholder="placeholder" :value="value" :disabled="disabled"
@focus="$emit('focus', $event)" @blur="$emit('blur', $event)" @input="handleInput" @change="$emit('change', $event.targ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/Input.vue", "license": "apache-2.0", "size": 1907} |
### File: src/renderer/components/material/ListAddModal.vue
<template lang="pug">
material-modal(:show="show" :bg-close="bgClose" @close="handleClose")
main(:class="$style.main")
h2
| {{$t('material.list_add_modal.' + (isMove ? 'title_first_move' : 'title_first_add'))}}
span(:class="$style.name"... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/ListAddModal.vue", "license": "apache-2.0", "size": 4987} |
### File: src/renderer/components/material/ListAddMultipleModal.vue
<template lang="pug">
material-modal(:show="show" :bg-close="bgClose" @close="handleClose")
main(:class="$style.main")
h2 {{$t('material.list_add_multiple_modal.' + (isMove ? 'title_move' : 'title_add'), { num: musicList.length })}}
div.scrol... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/ListAddMultipleModal.vue", "license": "apache-2.0", "size": 4729} |
### File: src/renderer/components/material/ListButtons.vue
<template lang="pug">
div(:class="$style.btns")
button(type="button" v-if="playBtn" @contextmenu.capture.stop :tips="$t('material.list_buttons.play')" @click.stop="handleClick('play')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://ww... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/ListButtons.vue", "license": "apache-2.0", "size": 4870} |
### File: src/renderer/components/material/ListSortModal.vue
<template lang="pug">
material-modal(:show="show" @close="handleClose")
main(:class="$style.main")
h2 {{selectedNum > 0 ? $t('material.list_sort_modal.title_multiple', { num: selectedNum }) : $t('material.list_sort_modal.title', { name: musicInfo ? musi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/ListSortModal.vue", "license": "apache-2.0", "size": 2425} |
### File: src/renderer/components/material/Menu.vue
<template lang="pug">
ul(:class="$style.list" :style="listStyles" ref="dom_list")
li(v-for="item in menus" @click="handleClick(item)" v-if="!item.hide && (item.action == 'download' ? setting.download.enable : true)" :disabled="item.disabled") {{item[itemName]}}
</te... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/Menu.vue", "license": "apache-2.0", "size": 4759} |
### File: src/renderer/components/material/Modal.vue
<template lang="pug">
transition(enter-active-class="animated fadeIn"
leave-active-class="animated fadeOut")
div(:class="$style.modal" v-show="show" @click="bgClose && close()")
transition(:enter-active-class="inClass"
:leave-active-class="outClass"... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/Modal.vue", "license": "apache-2.0", "size": 4760} |
### File: src/renderer/components/material/MusicComment.vue
<template lang="pug">
div(:class="$style.comment")
div(:class="$style.commentHeader")
h3 {{$t('core.player.comment_title', { name: title })}}
div(:class="$style.commentHeaderBtns")
div(:class="$style.commentHeaderBtn" @click="handleShowComment"... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/MusicComment.vue", "license": "apache-2.0", "size": 8439} |
### File: src/renderer/components/material/PactModal.vue
<template lang="pug">
material-modal(:show="!setting.isAgreePact || globalObj.isShowPact" @close="handleClose(false)" :bgClose="setting.isAgreePact" :close-btn="setting.isAgreePact")
main(:class="$style.main")
h2 许可协议
div.select.scroll(:class="$style.co... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/PactModal.vue", "license": "apache-2.0", "size": 6066} |
### File: src/renderer/components/material/Pagination.vue
<template lang="pug">
div(:class="$style.pagination" v-if="allPage > 1")
ul
li(v-if="page===1" :class="$style.disabled")
span
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/Pagination.vue", "license": "apache-2.0", "size": 6608} |
### File: src/renderer/components/material/SearchInput.vue
<template lang="pug">
div(:class="$style.container")
div(:class="[$style.search, focus ? $style.active : '', big ? $style.big : '', small ? $style.small : '']")
div(:class="$style.form")
input(:placeholder="placeholder" v-model.trim="text" ref="dom_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/SearchInput.vue", "license": "apache-2.0", "size": 7612} |
### File: src/renderer/components/material/SearchList.vue
<template lang="pug">
div(:class="$style.container" ref="dom_container" v-show="isShow")
transition(enter-active-class="animated-fast zoomIn" leave-active-class="animated zoomOut" @after-leave="handleAnimated")
div(:class="$style.search" v-show="visible")
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/SearchList.vue", "license": "apache-2.0", "size": 11427} |
### File: src/renderer/components/material/Select.vue
<template lang="pug">
div(:class="[$style.select, show ? $style.active : '']")
div(:class="$style.label" ref="dom_btn" @click="handleShow") {{value ? itemName ? list.find(l => l.id == value).name : value : ''}}
ul(:class="$style.list")
li(v-for="item... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/Select.vue", "license": "apache-2.0", "size": 3783} |
### File: src/renderer/components/material/Selection.vue
<template lang="pug">
div.content(:class="[$style.select, show ? $style.active : '']")
div.label-content(:class="$style.label" ref="dom_btn" @click="handleShow")
span.label {{label}}
div.icon(:class="$style.icon")
svg(version='1.1' xmlns... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/Selection.vue", "license": "apache-2.0", "size": 5421} |
### File: src/renderer/components/material/SongList.vue
<template lang="pug">
div(:class="$style.songList")
transition(enter-active-class="animated-fast fadeIn" leave-active-class="animated-fast fadeOut")
div(:class="$style.list")
div(:class="$style.thead")
table
thead
tr
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/SongList.vue", "license": "apache-2.0", "size": 15062} |
### File: src/renderer/components/material/Tab.vue
<template lang="pug">
div.scroll(:class="$style.tab")
//- div(:class="$style.content")
ul
li.ignore-to-rem(v-for="item in list" :key="itemKey ? item[itemKey] : item" :class="value === (itemKey ? item[itemKey] : item) ? $style.active : ''")
button(type="bu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/Tab.vue", "license": "apache-2.0", "size": 6378} |
### File: src/renderer/components/material/TagList.vue
<template lang="pug">
div(:class="[$style.tagList, show ? $style.active : '']")
div(:class="$style.label" ref="dom_btn" @click="handleShow")
span {{value.name}}
div(:class="$style.icon")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg'... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/TagList.vue", "license": "apache-2.0", "size": 5632} |
### File: src/renderer/components/material/UserApiModal.vue
<template lang="pug">
material-modal(:show="visible" bg-close @close="handleClose")
main(:class="$style.main")
h2 {{$t('material.user_api_modal.title')}}
ul.scroll(v-if="apiList.length" :class="$style.content")
li(:class="[$style.listItem, sett... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/UserApiModal.vue", "license": "apache-2.0", "size": 5828} |
### File: src/renderer/components/material/VersionModal.vue
<template lang="pug">
material-modal(:show="version.showModal" @close="handleClose" v-if="version.newVersion")
main(:class="$style.main" v-if="version.isDownloaded")
h2 🚀程序更新🚀
div.scroll.select(:class="$style.info")
div(:class="$style.curren... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/components/material/VersionModal.vue", "license": "apache-2.0", "size": 9484} |
### File: src/renderer/event/index.js
import Vue from 'vue'
import keyBind from '../utils/keyBind'
import { rendererOn, rendererSend, NAMES, rendererInvoke } from '../../common/ipc'
import { base as baseName } from './names'
import { common as hotKeyNamesCommon } from '../../common/hotKey'
const eventHub = window.even... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/event/index.js", "license": "apache-2.0", "size": 2959} |
### File: src/renderer/event/names.js
const names = {
base: {
key_down: 'key_down',
bindKey: 'bindKey',
unbindKey: 'unbindKey',
focus: 'focus',
min: 'min',
max: 'max',
close: 'close',
set_config: 'set_config',
set_hot_key_config: 'set_hot_key_config',
},
}
for (const item of Obj... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/event/names.js", "license": "apache-2.0", "size": 444} |
### File: src/renderer/index.pug
html(lang="cn")
head
meta(charset="UTF-8")
meta(name="viewport" content="width=device-width, initial-scale=1.0")
meta(http-equiv="X-UA-Compatible" content="ie=edge")
title 洛雪音乐助手
body
#root
//- if htmlWebpackPlugin.options.isProd
//- script.
//- ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Pug", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/index.pug", "license": "apache-2.0", "size": 607} |
### File: src/renderer/lang/index.js
// http://kazupon.github.io/vue-i18n/en/messages.html
const requireLang = require.context(
'@renderer/lang',
true,
/\.json$/,
)
const messages = {}
for (const file of requireLang.keys()) {
switch (file) {
case './index.js':
case './languages.json':
case './Rea... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/lang/index.js", "license": "apache-2.0", "size": 560} |
### File: src/renderer/main.js
import Vue from 'vue'
import { sync } from 'vuex-router-sync'
import './event'
// Components
import './components'
// Plugins
import './plugins'
import i18n from './plugins/i18n'
import App from './App'
import router from './route'
import store from './store'
import '../common/error'... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/main.js", "license": "apache-2.0", "size": 1486} |
### File: src/renderer/plugins/Tips/Tips.js
import Tips from './Tips.vue'
import Vue from 'vue'
const TipsConstructor = Vue.extend(Tips)
const addAutoCloseTimer = (instance, time) => {
if (!time) return
if (instance.autoCloseTimer) clearTimeout(instance.autoCloseTimer)
instance.autoCloseTimer = setTimeout(() =>... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/plugins/Tips/Tips.js", "license": "apache-2.0", "size": 1247} |
### File: src/renderer/plugins/Tips/Tips.vue
<template>
<transition name="tips-fade" @after-leave="afterLeave">
<div v-show="visible" :style="{ left: position.left + 'px' , top: position.top + 'px', transform: transform }" ref="dom_tips" :class="$style.tips">{{message}}</div>
</transition>
</template>
<script>... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vue", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/plugins/Tips/Tips.vue", "license": "apache-2.0", "size": 2439} |
### File: src/renderer/plugins/Tips/index.js
import tips from './Tips'
import { debounce } from '../../utils'
let instance
let prevTips
const getTips = el =>
el
? el.getAttribute('tips')
? el.getAttribute('tips')
: el.parentNode === document.documentElement
? null
: getTips(el.parent... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/plugins/Tips/index.js", "license": "apache-2.0", "size": 1251} |
### File: src/renderer/plugins/i18n.js
/**
* Vue i18n
*
* @library
*
* http://kazupon.github.io/vue-i18n/en/
*/
// Lib imports
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import messages from '@renderer/lang'
Vue.use(VueI18n)
const i18n = window.i18n = new VueI18n({
locale: 'zh-cn',
fallbackLocale... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/plugins/i18n.js", "license": "apache-2.0", "size": 328} |
### File: src/renderer/plugins/index.js
// import './axios'
import './Tips'
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/plugins/index.js", "license": "apache-2.0", "size": 36} |
### File: src/renderer/route/index.js
import Vue from 'vue'
import Router from 'vue-router'
import paths from './paths'
function route(path, view, name, meta, props) {
return {
name: name || view,
path,
meta,
props,
component: (resovle) => import(`../views/${view}.vue`).then(resovle),
}
}
Vu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/route/index.js", "license": "apache-2.0", "size": 1493} |
### File: src/renderer/route/paths.js
export default [
// {
// path: '/',
// // redirect: '/app',
// // props: true,
// component: () => import('../views/Dashboard.vue'),
// name: 'Dashboard',
// alias: '/dashboard'
// }
{
path: '/search',
name: 'search',
view: 'Search',
},
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/route/paths.js", "license": "apache-2.0", "size": 677} |
### File: src/renderer/store/actions.js
// import api from 'api/connom'
import { httpGet } from '../utils/request'
import { author, name } from '../../../package.json'
export default {
getVersionInfo(state, retryNum = 0) {
return new Promise((resolve, reject) => {
httpGet(`https://raw.githubusercontent.com... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/actions.js", "license": "apache-2.0", "size": 1660} |
### File: src/renderer/store/getters.js
import music from '../utils/music'
export default {
theme(state) {
let theme = state.themes.find(theme => theme.id == state.setting.themeId)
return (theme && theme.class) || ''
},
themes(state) {
return {
active: state.setting.themeId,
list: state.t... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/getters.js", "license": "apache-2.0", "size": 1338} |
### File: src/renderer/store/index.js
import Vue from 'vue'
import Vuex from 'vuex'
// import { createPersistedState, createSharedMutations } from 'vuex-electron'
import defaultState from './state'
import mutations from './mutations'
import modules from './modules'
import getters from './getters'
import actions from '... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/index.js", "license": "apache-2.0", "size": 1045} |
### File: src/renderer/store/modules/download.js
import download from '../../utils/download'
import fs from 'fs'
import path from 'path'
import music from '../../utils/music'
import { getMusicType } from '../../utils/music/utils'
import {
setMeta,
saveLrc,
getLyric as getLyricFromStorage,
setLyric,
getMusicUr... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/modules/download.js", "license": "apache-2.0", "size": 22204} |
### File: src/renderer/store/modules/hotSearch.js
import music from '../../utils/music'
const sources = []
const sourceList = {}
for (const source of music.sources) {
const hotSearch = music[source.id].hotSearch
if (!hotSearch) continue
sources.push(source)
sourceList[source.id] = []
}
sources.push({
id: 'al... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/modules/hotSearch.js", "license": "apache-2.0", "size": 2194} |
### File: src/renderer/store/modules/index.js
// https://vuex.vuejs.org/en/modules.html
const requireModule = require.context('./', true, /\.js$/)
const modules = {}
requireModule.keys().forEach(fileName => {
if (fileName === './index.js') return
const path = fileName.replace(/(\.\/|\.js)/g, '')
if (/\//.test(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/modules/index.js", "license": "apache-2.0", "size": 626} |
### File: src/renderer/store/modules/leaderboard.js
import music from '../../utils/music'
const sourceList = {}
const sources = []
for (const source of music.sources) {
const leaderboard = music[source.id].leaderboard
if (!leaderboard || !leaderboard.getBoards) continue
sourceList[source.id] = []
sources.push(s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/modules/leaderboard.js", "license": "apache-2.0", "size": 2182} |
### File: src/renderer/store/modules/list.js
import musicSdk from '../../utils/music'
import { clearLyric, clearMusicUrl } from '../../utils'
let allList = {}
window.allList = allList
const allListInit = (defaultList, loveList, userList) => {
allList[defaultList.id] = defaultList
allList[loveList.id] = loveList
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/modules/list.js", "license": "apache-2.0", "size": 6711} |
### File: src/renderer/store/modules/player.js
import path from 'path'
import music from '../../utils/music'
import {
getRandom,
checkPath,
getLyric as getStoreLyric,
setLyric,
setMusicUrl,
getMusicUrl,
} from '../../utils'
// state
const state = {
listInfo: {
list: [],
id: null,
},
playIndex... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/modules/player.js", "license": "apache-2.0", "size": 13485} |
### File: src/renderer/store/modules/search.js
import music from '../../utils/music'
const sources = []
const sourceList = {}
const sourceMaxPage = {}
for (const source of music.sources) {
const musicSearch = music[source.id].musicSearch
if (!musicSearch) continue
sources.push(source)
sourceList[source.id] = {... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/modules/search.js", "license": "apache-2.0", "size": 5347} |
### File: src/renderer/store/modules/songList.js
import music from '../../utils/music'
const sortList = {}
const sources = []
const cache = new Map()
for (const source of music.sources) {
const songList = music[source.id].songList
if (!songList) continue
sortList[source.id] = songList.sortList
sources.push(sour... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/modules/songList.js", "license": "apache-2.0", "size": 5166} |
### File: src/renderer/store/mutations.js
export default {
setTheme(state, val) {
state.setting.themeId = val
},
setSearchSource(state, { searchSource, tempSearchSource }) {
if (searchSource != null) state.setting.search.searchSource = searchSource
if (tempSearchSource != null) state.setting.search.te... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/mutations.js", "license": "apache-2.0", "size": 2517} |
### File: src/renderer/store/state.js
// const isDev = process.env.NODE_ENV === 'development'
import { windowSizeList } from '../../common/config'
import { version } from '../../../package.json'
process.versions.app = version
export default {
themes: [
{
id: 0,
name: '绿意盎然',
class: 'green',
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/store/state.js", "license": "apache-2.0", "size": 1626} |
### File: src/renderer/utils/download/Downloader.js
import fs from 'fs'
import path from 'path'
import request from 'request'
import { EventEmitter } from 'events'
import { performance } from 'perf_hooks'
import { STATUS } from './util'
const defaultChunkInfo = {
path: null,
startByte: 0,
endByte: '',
}
const ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/download/Downloader.js", "license": "apache-2.0", "size": 9600} |
### File: src/renderer/utils/download/index.js
import Downloader from './Downloader'
// import { pauseResumeTimer } from './util'
import { sizeFormate, getProxyInfo } from '../index'
import { debugDownload } from '../env'
// these are the default options
// const options = {
// method: 'GET', // Request Method Verb
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/download/index.js", "license": "apache-2.0", "size": 2286} |
### File: src/renderer/utils/download/util.js
exports.STATUS = {
idle: 'IDLE',
init: 'INIT',
running: 'RUNNING',
paused: 'PAUSED',
stopped: 'STOPPED',
completed: 'COMPLETED',
error: 'ERROR',
failed: 'FAILED',
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/download/util.js", "license": "apache-2.0", "size": 182} |
### File: src/renderer/utils/env.js
const isDev = process.env.NODE_ENV === 'development'
export const debug = isDev && true
export const debugRequest = isDev && false
export const debugDownload = isDev && false
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/env.js", "license": "apache-2.0", "size": 176} |
### File: src/renderer/utils/index.js
import fs from 'fs'
import path from 'path'
import { shell, clipboard } from 'electron'
import crypto from 'crypto'
import { rendererSend, rendererInvoke, NAMES } from '../../common/ipc'
/**
* 获取两个数之间的随机整数,大于等于min,小于max
* @param {*} min
* @param {*} max
*/
export const getRand... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/index.js", "license": "apache-2.0", "size": 11887} |
### File: src/renderer/utils/keyBind.js
import { isMac } from '../../common/utils'
const downKeys = new Set()
const handleEvent = (type, event, keys) => {
if (isMac) {
let index = keys.indexOf('meta')
if (index > -1) keys.splice(index, 1, 'mod')
} else {
let index = keys.indexOf('ctrl')
if (index ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/keyBind.js", "license": "apache-2.0", "size": 2747} |
### File: src/renderer/utils/lyric-font-player/font-player.js
const { getNow, TimeoutTools } = require('./utils')
// const fontFormateRxp = /(?=<\d+,\d+>).*?/g
const fontSplitRxp = /(?=<\d+,\d+>).*?/g
const timeRxp = /<(\d+),(\d+)>/
// Create animation
const createAnimation = (dom, duration) => new window.Animation(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/lyric-font-player/font-player.js", "license": "apache-2.0", "size": 8940} |
### File: src/renderer/utils/lyric-font-player/index.js
const LinePlayer = require('./line-player')
const FontPlayer = require('./font-player')
const fontTimeExp = /<(\d+),(\d+)>/g
module.exports = class Lyric {
constructor({
lyric = '',
translationLyric = '',
offset = 150,
lineClassName = '',
f... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/lyric-font-player/index.js", "license": "apache-2.0", "size": 5210} |
### File: src/renderer/utils/lyric-font-player/line-player.js
const { getNow, TimeoutTools } = require('./utils')
const timeExp = /^\[([\d:.]*)\]{1}/g
const tagRegMap = {
title: 'ti',
artist: 'ar',
album: 'al',
offset: 'offset',
by: 'by',
}
const timeoutTools = new TimeoutTools()
module.exports = class Lin... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/lyric-font-player/line-player.js", "license": "apache-2.0", "size": 5186} |
### File: src/renderer/utils/lyric-font-player/utils.js
const getNow = exports.getNow = typeof performance == 'object' && window.performance.now ? window.performance.now.bind(window.performance) : Date.now.bind(Date)
exports.TimeoutTools = class TimeoutTools {
constructor() {
this.invokeTime = 0
this.animat... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/lyric-font-player/utils.js", "license": "apache-2.0", "size": 1274} |
### File: src/renderer/utils/message.js
export const requestMsg = {
fail: '请求异常😮,可以多试几次,若还是不行就换一首吧。。。',
unachievable: '哦No😱...接口无法访问了!',
timeout: '请求超时',
// unachievable: '哦No😱...接口无法访问了!已帮你切换到临时接口,重试下看能不能播放吧~',
notConnectNetwork: '无法连接到服务器',
cancelRequest: '取消http请求',
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/message.js", "license": "apache-2.0", "size": 413} |
### File: src/renderer/utils/music/api-source-info.js
// Support qualitys: 128k 320k flac wav
module.exports = [
{
id: 'test',
name: '测试接口',
disabled: false,
supportQualitys: {
kw: ['128k'],
kg: ['128k'],
tx: ['128k'],
wy: ['128k'],
mg: ['128k'],
// bd: ['128k'],
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/api-source-info.js", "license": "apache-2.0", "size": 409} |
### File: src/renderer/utils/music/api-source.js
import apiSourceInfo from './api-source-info'
const apiList = {}
const supportQuality = {}
for (const api of apiSourceInfo) {
supportQuality[api.id] = api.supportQualitys
for (const source of Object.keys(api.supportQualitys)) {
apiList[`${api.id}_api_${source}`... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/api-source.js", "license": "apache-2.0", "size": 652} |
### File: src/renderer/utils/music/bd/api-test.js
import { httpFetch } from '../../request'
import { requestMsg } from '../../message'
import { headers, timeout } from '../options'
const api_test = {
getMusicUrl(songInfo, type) {
const requestObj = httpFetch(`http://ts.tempmusic.tk/url/bd/${songInfo.songmid}/${t... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/bd/api-test.js", "license": "apache-2.0", "size": 598} |
### File: src/renderer/utils/music/bd/hotSearch.js
import { httpFetch } from '../../request'
export default {
_requestObj: null,
async getList(retryNum = 0) {
if (this._requestObj) this._requestObj.cancelHttp()
if (retryNum > 2) return Promise.reject(new Error('try max num'))
const _requestObj = httpF... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/bd/hotSearch.js", "license": "apache-2.0", "size": 851} |
### File: src/renderer/utils/music/bd/index.js
import leaderboard from './leaderboard'
import { apis } from '../api-source'
import musicInfo from './musicInfo'
import songList from './songList'
import { httpFetch } from '../../request'
import musicSearch from './musicSearch'
import hotSearch from './hotSearch'
const b... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/bd/index.js", "license": "apache-2.0", "size": 1194} |
### File: src/renderer/utils/music/bd/leaderboard.js
import { httpFetch } from '../../request'
// import { formatPlayTime } from '../../index'
// import jshtmlencode from 'js-htmlencode'
const boardList = [
// { id: 'bd__601', name: '歌单榜', bangid: '601' },
{ id: 'bd__2', name: '热歌榜', bangid: '2' },
{ id: 'bd__20... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/bd/leaderboard.js", "license": "apache-2.0", "size": 4139} |
### File: src/renderer/utils/music/bd/musicInfo.js
import { httpFetch } from '../../request'
export default {
cache: {},
getMusicInfo(songmid) {
if (this.cache[songmid]) {
return { promise: Promise.resolve(this.cache[songmid]) }
}
const requestObj = httpFetch(`https://musicapi.qianqian.com/v1/res... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/bd/musicInfo.js", "license": "apache-2.0", "size": 766} |
### File: src/renderer/utils/music/bd/musicSearch.js
// import '../../polyfill/array.find'
// import jshtmlencode from 'js-htmlencode'
import { httpFetch } from '../../request'
import { formatPlayTime } from '../../index'
// import { debug } from '../../utils/env'
// import { formatSinger } from './util'
let searchReq... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/bd/musicSearch.js", "license": "apache-2.0", "size": 2720} |
### File: src/renderer/utils/music/bd/songList.js
import { httpFetch } from '../../request'
import { formatPlayTime, toMD5 } from '../../index'
import CryptoJS from 'crypto-js'
export default {
_requestObj_tags: null,
_requestObj_list: null,
_requestObj_listRecommend: null,
_requestObj_listDetail: null,
limi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/bd/songList.js", "license": "apache-2.0", "size": 7580} |
### File: src/renderer/utils/music/index.js
import kw from './kw'
import kg from './kg'
import tx from './tx'
import wy from './wy'
import mg from './mg'
import bd from './bd'
import xm from './xm'
import { supportQuality } from './api-source'
const sources = {
sources: [
{
name: '酷我音乐',
id: 'kw',
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/index.js", "license": "apache-2.0", "size": 4531} |
### File: src/renderer/utils/music/kg/api-test.js
import { httpFetch } from '../../request'
import { requestMsg } from '../../message'
import { headers, timeout } from '../options'
const api_test = {
getMusicUrl(songInfo, type) {
const requestObj = httpFetch(`http://ts.tempmusic.tk/url/kg/${songInfo._types[type]... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/kg/api-test.js", "license": "apache-2.0", "size": 1376} |
### File: src/renderer/utils/music/kg/comment.js
import { httpFetch } from '../../request'
import { decodeName, dateFormat2 } from '../../'
export default {
_requestObj: null,
_requestObj2: null,
async getComment({ hash }, page = 1, limit = 20) {
if (this._requestObj) this._requestObj.cancelHttp()
const... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/kg/comment.js", "license": "apache-2.0", "size": 3391} |
### File: src/renderer/utils/music/kg/hotSearch.js
import { httpFetch } from '../../request'
import { decodeName } from '../..'
export default {
_requestObj: null,
async getList(retryNum = 0) {
if (this._requestObj) this._requestObj.cancelHttp()
if (retryNum > 2) return Promise.reject(new Error('try max nu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/kg/hotSearch.js", "license": "apache-2.0", "size": 1196} |
### File: src/renderer/utils/music/kg/index.js
import leaderboard from './leaderboard'
import { apis } from '../api-source'
import songList from './songList'
import musicSearch from './musicSearch'
import pic from './pic'
import lyric from './lyric'
import hotSearch from './hotSearch'
import comment from './comment'
c... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/kg/index.js", "license": "apache-2.0", "size": 866} |
### File: src/renderer/utils/music/kg/lyric.js
import { httpFetch } from '../../request'
import { decodeLyric } from './util'
import { decodeName } from '../..'
const headExp = /^.*\[id:\$\w+\]\n/
const parseLyric = str => {
str = str.replace(/\r/g, '')
if (headExp.test(str)) str = str.replace(headExp, '')
let ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/kg/lyric.js", "license": "apache-2.0", "size": 4827} |
### File: src/renderer/utils/music/kg/musicSearch.js
// import '../../polyfill/array.find'
// import jshtmlencode from 'js-htmlencode'
import { httpFetch } from '../../request'
import { decodeName, formatPlayTime, sizeFormate } from '../../index'
// import { debug } from '../../utils/env'
// import { formatSinger } fro... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/kg/musicSearch.js", "license": "apache-2.0", "size": 3248} |
### File: src/renderer/utils/music/kg/pic.js
import { httpFetch } from '../../request'
export default {
getPic(songInfo) {
const requestObj = httpFetch(
'http://media.store.kugou.com/v1/get_res_privilege',
{
method: 'POST',
headers: {
'KG-RC': 1,
'KG-THash': 'expan... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/kg/pic.js", "license": "apache-2.0", "size": 1516} |
### File: src/renderer/utils/music/kg/songList.js
import { httpFetch } from '../../request'
import { decodeName, formatPlayTime, sizeFormate } from '../../index'
import { toMD5 } from '../utils'
export default {
_requestObj_tags: null,
_requestObj_listInfo: null,
_requestObj_list: null,
_requestObj_listRecomme... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/kg/songList.js", "license": "apache-2.0", "size": 21413} |
### File: src/renderer/utils/music/kg/util.js
import { inflate } from 'zlib'
// https://github.com/lyswhut/lx-music-desktop/issues/296#issuecomment-683285784
const enc_key = Buffer.from([0x40, 0x47, 0x61, 0x77, 0x5e, 0x32, 0x74, 0x47, 0x51, 0x36, 0x31, 0x2d, 0xce, 0xd2, 0x6e, 0x69], 'binary')
export const decodeLyric ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/kg/util.js", "license": "apache-2.0", "size": 692} |
### File: src/renderer/utils/music/kw/api-temp.js
import { httpFetch } from '../../request'
import { headers, timeout } from '../options'
const api_temp = {
getMusicUrl(songInfo, type) {
const requestObj = httpFetch(`http://tm.tempmusic.tk/url/kw/${songInfo.songmid}/${type}`, {
method: 'get',
headers... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/kw/api-temp.js", "license": "apache-2.0", "size": 548} |
### File: src/renderer/utils/music/kw/api-test.js
import { httpFetch } from '../../request'
import { requestMsg } from '../../message'
import { headers, timeout } from '../options'
const api_test = {
// getMusicUrl(songInfo, type) {
// const requestObj = httpFetch(`http://45.32.53.128:3002/m/kw/u/${songInfo.song... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "vincent_personal_admin/lx-music", "path": "src/renderer/utils/music/kw/api-test.js", "license": "apache-2.0", "size": 1029} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.