更新依赖

pull/1686/head
lyswhut 2023-10-25 14:22:41 +08:00
parent 1ff6a00653
commit 0c6cedf879
7 changed files with 535 additions and 492 deletions

View File

@ -5,7 +5,7 @@ module.exports = {
'chalk',
'del',
'comlink',
'vue',
// 'vue',
'@types/ws',
// 'eslint-config-standard-with-typescript',
'typescript', // https://github.com/microsoft/TypeScript/pull/54567

760
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -115,34 +115,34 @@
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@tsconfig/recommended": "^1.0.3",
"@types/better-sqlite3": "^7.6.5",
"@types/needle": "^3.2.1",
"@types/tunnel": "^0.0.4",
"@types/better-sqlite3": "^7.6.6",
"@types/needle": "^3.2.2",
"@types/tunnel": "^0.0.5",
"@types/ws": "8.5.4",
"@volar/vue-language-plugin-pug": "^1.6.5",
"@vue/language-plugin-pug": "^1.8.19",
"@vue/language-plugin-pug": "^1.8.20",
"babel-loader": "^9.1.3",
"browserslist": "^4.22.1",
"chalk": "^4.1.2",
"changelog-parser": "^3.0.1",
"copy-webpack-plugin": "^11.0.0",
"core-js": "^3.33.0",
"core-js": "^3.33.1",
"cross-env": "^7.0.3",
"css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "^5.0.1",
"del": "^6.1.1",
"electron": "^25.9.1",
"electron-builder": "^24.7.0",
"electron": "^25.9.2",
"electron-builder": "^24.8.0",
"electron-debug": "^3.2.0",
"electron-devtools-installer": "^3.2.0",
"electron-to-chromium": "^1.4.556",
"electron-updater": "^6.1.5",
"eslint": "^8.51.0",
"electron-to-chromium": "^1.4.566",
"electron-updater": "^6.1.6",
"eslint": "^8.52.0",
"eslint-config-standard": "^17.1.0",
"eslint-config-standard-with-typescript": "^39.1.1",
"eslint-formatter-friendly": "github:lyswhut/eslint-friendly-formatter#2170d1320e2fad13615a9dcf229669f0bb473a53",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-vue": "^9.17.0",
"eslint-plugin-vue": "^9.18.0",
"eslint-plugin-vue-pug": "^0.6.0",
"eslint-webpack-plugin": "^4.0.1",
"html-webpack-plugin": "^5.5.3",
@ -166,7 +166,7 @@
"typescript": "^5.3.0-beta",
"vue-eslint-parser": "^9.3.2",
"vue-loader": "^17.3.0",
"vue-template-compiler": "^2.7.14",
"vue-template-compiler": "^2.7.15",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
@ -178,8 +178,8 @@
"better-sqlite3": "^9.0.0",
"bufferutil": "^4.0.8",
"comlink": "~4.3.1",
"crypto-js": "^4.1.1",
"electron-log": "^5.0.0-rc.1",
"crypto-js": "^4.2.0",
"electron-log": "^5.0.0",
"electron-store": "^8.1.0",
"font-list": "^1.5.1",
"iconv-lite": "^0.6.3",
@ -193,7 +193,7 @@
"sortablejs": "^1.15.0",
"tunnel": "^0.0.6",
"utf-8-validate": "^6.0.3",
"vue": "~3.2.47",
"vue": "^3.3.7",
"vue-router": "^4.2.5",
"ws": "^8.14.2"
},

View File

@ -6,5 +6,5 @@
### 其他
- 移除所有内置源由于收到腾讯投诉要求停止提供软件内置的连接到他们平台的在线播放及下载服务所以从即日2023年10月18日起LX本身不再提供上述服务
- 更新 electron 到 v25.9.1
- 更新 electron 到 v25.9.2
- 更新许可协议的排版,使其看起来更加清晰明了,更新数据来源原理说明

View File

@ -1,92 +1,92 @@
<template>
<div :class="$style.songList">
<transition enter-active-class="animated-fast fadeIn" leave-active-class="animated-fast fadeOut">
<div :class="$style.list">
<div class="thead">
<table>
<thead>
<tr v-if="actionButtonsVisible">
<th class="num" style="width: 5%;">#</th>
<th class="nobreak">{{ $t('music_name') }}</th>
<th class="nobreak" style="width: 22%;">{{ $t('music_singer') }}</th>
<th class="nobreak" style="width: 22%;">{{ $t('music_album') }}</th>
<th class="nobreak" style="width: 9%;">{{ $t('music_time') }}</th>
<th class="nobreak" style="width: 16%;">{{ $t('action') }}</th>
</tr>
<tr v-else>
<th class="num" style="width: 5%;">#</th>
<th class="nobreak">{{ $t('music_name') }}</th>
<th class="nobreak" style="width: 24%;">{{ $t('music_singer') }}</th>
<th class="nobreak" style="width: 27%;">{{ $t('music_album') }}</th>
<th class="nobreak" style="width: 10%;">{{ $t('music_time') }}</th>
</tr>
</thead>
</table>
</div>
<div :class="$style.content">
<div v-show="!noItem" ref="dom_listContent" :class="$style.content">
<base-virtualized-list v-if="actionButtonsVisible" ref="listRef" :list="list" key-name="id" :item-height="listItemHeight" container-class="scroll" content-class="list" @contextmenu.capture="handleListRightClick">
<template #default="{ item, index }">
<div
class="list-item" :class="[{ selected: rightClickSelectedIndex == index }, { active: selectedList.includes(item) }]"
@click="handleListItemClick($event, index)" @contextmenu="handleListItemRightClick($event, index)"
>
<div class="list-item-cell no-select num" style="flex: 0 0 5%;" @click.stop>{{ index + 1 }}</div>
<div class="list-item-cell auto name">
<span class="select name" :aria-label="item.name">{{ item.name }}</span>
<span v-if="item.meta._qualitys.flac24bit" class="no-select badge badge-theme-primary">{{ $t('tag__lossless_24bit') }}</span>
<span v-else-if="item.meta._qualitys.ape || item.meta._qualitys.flac || item.meta._qualitys.wav" class="no-select badge badge-theme-primary">{{ $t('tag__lossless') }}</span>
<span v-else-if="item.meta._qualitys['320k']" class="no-select badge badge-theme-secondary">{{ $t('tag__high_quality') }}</span>
<span v-if="sourceTag" class="no-select badge badge-theme-tertiary">{{ item.source }}</span>
</div>
<div class="list-item-cell" style="flex: 0 0 22%;"><span class="select" :aria-label="item.singer">{{ item.singer }}</span></div>
<div class="list-item-cell" style="flex: 0 0 22%;"><span class="select" :aria-label="item.meta.albumName">{{ item.meta.albumName }}</span></div>
<div class="list-item-cell" style="flex: 0 0 9%;"><span class="no-select">{{ item.interval || '--/--' }}</span></div>
<div class="list-item-cell" style="flex: 0 0 16%; padding-left: 0; padding-right: 0;">
<material-list-buttons :index="index" :remove-btn="false" :download-btn="assertApiSupport(item.source)" :play-btn="checkApiSource ? assertApiSupport(item.source) : true" @btn-click="handleListBtnClick" />
</div>
</div>
</template>
<template #footer>
<div :class="$style.pagination">
<material-pagination :count="total" :limit="limit" :page="page" @btn-click="$emit('togglePage', $event)" />
</div>
</template>
</base-virtualized-list>
<base-virtualized-list v-else ref="listRef" :list="list" key-name="id" :item-height="listItemHeight" container-class="scroll" content-class="list" @contextmenu.capture="handleListRightClick">
<template #default="{ item, index }">
<div
class="list-item" :class="[{ selected: rightClickSelectedIndex == index }, { active: selectedList.includes(item) }]"
@click="handleListItemClick($event, index)" @contextmenu="handleListItemRightClick($event, index)"
>
<div class="list-item-cell no-select num" style="flex: 0 0 5%;" @click.stop>{{ index + 1 }}</div>
<div class="list-item-cell auto name">
<span class="select name" :aria-label="item.name">{{ item.name }}</span>
<span v-if="item.meta._qualitys.flac24bit" class="no-select badge badge-theme-primary">{{ $t('tag__lossless_24bit') }}</span>
<span v-else-if="item.meta._qualitys.ape || item.meta._qualitys.flac || item.meta._qualitys.wav" class="no-select badge badge-theme-primary">{{ $t('tag__lossless') }}</span>
<span v-else-if="item.meta._qualitys['320k']" class="no-select badge badge-theme-secondary">{{ $t('tag__high_quality') }}</span>
<span v-if="sourceTag" class="no-select badge badge-theme-tertiary">{{ item.source }}</span>
</div>
<div class="list-item-cell" style="flex: 0 0 24%;"><span class="select" :aria-label="item.singer">{{ item.singer }}</span></div>
<div class="list-item-cell" style="flex: 0 0 27%;"><span class="select" :aria-label="item.meta.albumName">{{ item.meta.albumName }}</span></div>
<div class="list-item-cell" style="flex: 0 0 10%;"><span class="no-select">{{ item.interval || '--/--' }}</span></div>
</div>
</template>
<template #footer>
<div :class="$style.pagination">
<material-pagination :count="total" :limit="limit" :page="page" @btn-click="$emit('togglePage', $event)" />
</div>
</template>
</base-virtualized-list>
</div>
<transition enter-active-class="animated fadeIn" leave-active-class="animated fadeOut">
<div v-show="noItem" :class="$style.noitem">
<p v-text="noItem" />
</div>
</transition>
</div>
<!-- <transition enter-active-class="animated-fast fadeIn" leave-active-class="animated-fast fadeOut"> -->
<div :class="$style.list">
<div class="thead">
<table>
<thead>
<tr v-if="actionButtonsVisible">
<th class="num" style="width: 5%;">#</th>
<th class="nobreak">{{ $t('music_name') }}</th>
<th class="nobreak" style="width: 22%;">{{ $t('music_singer') }}</th>
<th class="nobreak" style="width: 22%;">{{ $t('music_album') }}</th>
<th class="nobreak" style="width: 9%;">{{ $t('music_time') }}</th>
<th class="nobreak" style="width: 16%;">{{ $t('action') }}</th>
</tr>
<tr v-else>
<th class="num" style="width: 5%;">#</th>
<th class="nobreak">{{ $t('music_name') }}</th>
<th class="nobreak" style="width: 24%;">{{ $t('music_singer') }}</th>
<th class="nobreak" style="width: 27%;">{{ $t('music_album') }}</th>
<th class="nobreak" style="width: 10%;">{{ $t('music_time') }}</th>
</tr>
</thead>
</table>
</div>
</transition>
<div :class="$style.content">
<div v-show="!noItem" ref="dom_listContent" :class="$style.content">
<base-virtualized-list v-if="actionButtonsVisible" ref="listRef" :list="list" key-name="id" :item-height="listItemHeight" container-class="scroll" content-class="list" @contextmenu.capture="handleListRightClick">
<template #default="{ item, index }">
<div
class="list-item" :class="[{ selected: rightClickSelectedIndex == index }, { active: selectedList.includes(item) }]"
@click="handleListItemClick($event, index)" @contextmenu="handleListItemRightClick($event, index)"
>
<div class="list-item-cell no-select num" style="flex: 0 0 5%;" @click.stop>{{ index + 1 }}</div>
<div class="list-item-cell auto name">
<span class="select name" :aria-label="item.name">{{ item.name }}</span>
<span v-if="item.meta._qualitys.flac24bit" class="no-select badge badge-theme-primary">{{ $t('tag__lossless_24bit') }}</span>
<span v-else-if="item.meta._qualitys.ape || item.meta._qualitys.flac || item.meta._qualitys.wav" class="no-select badge badge-theme-primary">{{ $t('tag__lossless') }}</span>
<span v-else-if="item.meta._qualitys['320k']" class="no-select badge badge-theme-secondary">{{ $t('tag__high_quality') }}</span>
<span v-if="sourceTag" class="no-select badge badge-theme-tertiary">{{ item.source }}</span>
</div>
<div class="list-item-cell" style="flex: 0 0 22%;"><span class="select" :aria-label="item.singer">{{ item.singer }}</span></div>
<div class="list-item-cell" style="flex: 0 0 22%;"><span class="select" :aria-label="item.meta.albumName">{{ item.meta.albumName }}</span></div>
<div class="list-item-cell" style="flex: 0 0 9%;"><span class="no-select">{{ item.interval || '--/--' }}</span></div>
<div class="list-item-cell" style="flex: 0 0 16%; padding-left: 0; padding-right: 0;">
<material-list-buttons :index="index" :remove-btn="false" :download-btn="assertApiSupport(item.source)" :play-btn="checkApiSource ? assertApiSupport(item.source) : true" @btn-click="handleListBtnClick" />
</div>
</div>
</template>
<template #footer>
<div :class="$style.pagination">
<material-pagination :count="total" :limit="limit" :page="page" @btn-click="$emit('togglePage', $event)" />
</div>
</template>
</base-virtualized-list>
<base-virtualized-list v-else ref="listRef" :list="list" key-name="id" :item-height="listItemHeight" container-class="scroll" content-class="list" @contextmenu.capture="handleListRightClick">
<template #default="{ item, index }">
<div
class="list-item" :class="[{ selected: rightClickSelectedIndex == index }, { active: selectedList.includes(item) }]"
@click="handleListItemClick($event, index)" @contextmenu="handleListItemRightClick($event, index)"
>
<div class="list-item-cell no-select num" style="flex: 0 0 5%;" @click.stop>{{ index + 1 }}</div>
<div class="list-item-cell auto name">
<span class="select name" :aria-label="item.name">{{ item.name }}</span>
<span v-if="item.meta._qualitys.flac24bit" class="no-select badge badge-theme-primary">{{ $t('tag__lossless_24bit') }}</span>
<span v-else-if="item.meta._qualitys.ape || item.meta._qualitys.flac || item.meta._qualitys.wav" class="no-select badge badge-theme-primary">{{ $t('tag__lossless') }}</span>
<span v-else-if="item.meta._qualitys['320k']" class="no-select badge badge-theme-secondary">{{ $t('tag__high_quality') }}</span>
<span v-if="sourceTag" class="no-select badge badge-theme-tertiary">{{ item.source }}</span>
</div>
<div class="list-item-cell" style="flex: 0 0 24%;"><span class="select" :aria-label="item.singer">{{ item.singer }}</span></div>
<div class="list-item-cell" style="flex: 0 0 27%;"><span class="select" :aria-label="item.meta.albumName">{{ item.meta.albumName }}</span></div>
<div class="list-item-cell" style="flex: 0 0 10%;"><span class="no-select">{{ item.interval || '--/--' }}</span></div>
</div>
</template>
<template #footer>
<div :class="$style.pagination">
<material-pagination :count="total" :limit="limit" :page="page" @btn-click="$emit('togglePage', $event)" />
</div>
</template>
</base-virtualized-list>
</div>
<transition enter-active-class="animated fadeIn" leave-active-class="animated fadeOut">
<div v-show="noItem" :class="$style.noitem">
<p v-text="noItem" />
</div>
</transition>
</div>
</div>
<!-- </transition> -->
<!-- <material-flow-btn :show="isShowEditBtn && assertApiSupport(source)" :remove-btn="false" @btn-click="handleFlowBtnClick" /> -->
<!-- <common-download-modal v-model:show="isShowDownload" :music-info="selectedDownloadMusicInfo" teleport="#view" />
<common-download-multiple-modal v-model:show="isShowDownloadMultiple" :list="selectedList" teleport="#view" @confirm="removeAllSelect" /> -->

View File

@ -22,27 +22,33 @@
/>
</template>
<script setup lang="ts">
<script setup>
import { watch, shallowReactive, ref } from '@common/utils/vueTools'
import { getBoardsList, setBoard } from '@renderer/store/leaderboard/action'
import { boards, type Board } from '@renderer/store/leaderboard/state'
import { boards } from '@renderer/store/leaderboard/state'
import useMenu from './useMenu'
import { useRouter, useRoute } from '@common/utils/vueRouter'
const props = defineProps<{
source: LX.OnlineSource
boardId?: string
}>()
const props = defineProps({
source: {
type: String,
required: true,
},
boardId: {
type: [String, undefined],
default: undefined,
},
})
const emit = defineEmits(['show-menu'])
const router = useRouter()
const route = useRoute()
const list = shallowReactive<Board['list']>([])
const list = shallowReactive([])
const rightClickItemIndex = ref(-1)
const handleToggleList = (id: string) => {
const handleToggleList = (id) => {
void router.replace({
path: route.path,
query: {
@ -60,11 +66,11 @@ const {
menuClick,
} = useMenu({ emit, list })
const handleRigthClick = (event: MouseEvent, index: number) => {
const handleRigthClick = (event, index) => {
rightClickItemIndex.value = index
showMenu(event, index)
}
const handleMenuClick = (action?: { action: string }) => {
const handleMenuClick = (action) => {
if (rightClickItemIndex.value < 0) return
let index = rightClickItemIndex.value
rightClickItemIndex.value = -1

View File

@ -20,25 +20,34 @@
</div>
</template>
<script setup lang="ts">
<script setup>
import { watch, shallowReactive, ref, onMounted, onBeforeUnmount, computed, reactive } from '@common/utils/vueTools'
import { setTags, getTags } from '@renderer/store/songList/action'
import { tags, type TagInfoTypeItem } from '@renderer/store/songList/state'
import { tags } from '@renderer/store/songList/state'
import { useRouter, useRoute } from '@common/utils/vueRouter'
import { useI18n } from '@renderer/plugins/i18n'
const props = defineProps<{
source: LX.OnlineSource
tagId: string
sortId?: string
}>()
const props = defineProps({
source: {
type: String,
required: true,
},
tagId: {
type: String,
required: true,
},
sortId: {
type: [String, undefined],
default: undefined,
},
})
const router = useRouter()
const route = useRoute()
const t = useI18n()
const list = shallowReactive<TagInfoTypeItem[]>([])
const handleToggleTag = (id: string) => {
const list = shallowReactive([])
const handleToggleTag = (id) => {
void router.replace({
path: route.path,
query: {
@ -77,18 +86,18 @@ const popupStyle = reactive({
const setTagPopupWidth = () => {
window.setTimeout(() => {
const dom_view = document.getElementById('view')
popupStyle.width = dom_view!.clientWidth * 0.96 + 'px'
popupStyle.maxHeight = dom_view!.clientHeight * 0.65 + 'px'
popupStyle.width = dom_view.clientWidth * 0.96 + 'px'
popupStyle.maxHeight = dom_view.clientHeight * 0.65 + 'px'
}, 50)
}
const dom_btn = ref<HTMLElement | null>(null)
const popupVisible = ref(false)
const handleShow = () => popupVisible.value = !popupVisible.value
const handleHide = (evt?: MouseEvent) => {
const handleHide = (evt) => {
// if (e && e.target.parentNode != this.$refs.dom_popup && this.show) return this.show = false
// console.log(this.$refs)
if (evt && (evt.target == dom_btn.value || dom_btn.value?.contains(evt.target as HTMLElement))) return
if (evt && (evt.target == dom_btn.value || dom_btn.value?.contains(evt.target))) return
setTimeout(() => {
popupVisible.value = false
}, 50)