从webpack迁移到vite
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/* eslint-env node */
|
||||
const { base, typescript, vue } = require('../../.eslintrc.base.cjs')
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
...base,
|
||||
overrides: [
|
||||
vue,
|
||||
{
|
||||
...typescript,
|
||||
parserOptions: {
|
||||
project: './tsconfig.json',
|
||||
},
|
||||
},
|
||||
],
|
||||
ignorePatterns: [
|
||||
'vendors',
|
||||
],
|
||||
}
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['update:model-value', 'change'],
|
||||
emits: ['update:modelValue', 'change'],
|
||||
data() {
|
||||
return {
|
||||
checked: false,
|
||||
@@ -80,7 +80,7 @@ export default {
|
||||
modelValue = checked
|
||||
} else modelValue = checked ? this.value : ''
|
||||
}
|
||||
this.$emit('update:model-value', modelValue)
|
||||
this.$emit('update:modelValue', modelValue)
|
||||
this.$emit('change', modelValue)
|
||||
},
|
||||
setValue(value) {
|
||||
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
// default: true,
|
||||
// },
|
||||
},
|
||||
emits: ['update:model-value', 'submit', 'change'],
|
||||
emits: ['update:modelValue', 'submit', 'change'],
|
||||
methods: {
|
||||
handleInput(event) {
|
||||
let value = event.target.value
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
value = value.trim()
|
||||
event.target.value = value
|
||||
}
|
||||
this.$emit('update:model-value', value)
|
||||
this.$emit('update:modelValue', value)
|
||||
},
|
||||
focus() {
|
||||
this.$refs.dom_input.focus()
|
||||
@@ -78,7 +78,7 @@ export default {
|
||||
// if (dom_input.selectionStart == dom_input.selectionEnd) {
|
||||
const value = text.substring(0, dom_input.selectionStart) + str + text.substring(dom_input.selectionEnd, text.length)
|
||||
event.target.value = value
|
||||
this.$emit('update:model-value', value)
|
||||
this.$emit('update:modelValue', value)
|
||||
// } else {
|
||||
// clipboardWriteText(text.substring(dom_input.selectionStart, dom_input.selectionEnd))
|
||||
// }
|
||||
|
||||
@@ -48,13 +48,13 @@ export default {
|
||||
default: 'name',
|
||||
},
|
||||
},
|
||||
emits: ['update:model-value', 'menu-click'],
|
||||
emits: ['update:modelValue', 'menu-click'],
|
||||
setup(props, { emit }) {
|
||||
const visible = computed(() => props.modelValue)
|
||||
const location = computed(() => props.xy)
|
||||
|
||||
const onHide = () => {
|
||||
emit('update:model-value', false)
|
||||
emit('update:modelValue', false)
|
||||
menuClick(null)
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ export default {
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
emits: ['update:model-value', 'change'],
|
||||
emits: ['update:modelValue', 'change'],
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
@@ -84,7 +84,7 @@ export default {
|
||||
handleClick(item) {
|
||||
// console.log(this.modelValue)
|
||||
if (item === this.modelValue) return
|
||||
this.$emit('update:model-value', this.itemKey ? item[this.itemKey] : item)
|
||||
this.$emit('update:modelValue', this.itemKey ? item[this.itemKey] : item)
|
||||
this.$emit('change', item)
|
||||
},
|
||||
handleShow() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div :class="[$style.sliderContent, { [$style.disabled]: disabled }, className]">
|
||||
<div :class="[$style.slider ]">
|
||||
<div :class="[$style.slider]">
|
||||
<div ref="dom_sliderBar" :class="$style.sliderBar" :style="{ transform: `scaleX(${(value - min) / (max - min) || 0})` }" />
|
||||
</div>
|
||||
<div :class="$style.sliderMask" @mousedown="handleSliderMsDown" />
|
||||
@@ -86,7 +86,7 @@ export default {
|
||||
<style lang="less" module>
|
||||
@import '@renderer/assets/styles/layout.less';
|
||||
|
||||
.slider-content {
|
||||
.sliderContent {
|
||||
flex: none;
|
||||
position: relative;
|
||||
width: 100px;
|
||||
@@ -125,7 +125,7 @@ export default {
|
||||
// opacity: .5;
|
||||
// }
|
||||
|
||||
.slider-bar {
|
||||
.sliderBar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<ul :class="[$style.list, $style[align]]" role="tablist">
|
||||
<li
|
||||
v-for="item in list" :key="item[itemKey]" :class="[$style.listItem, {[$style.active]: modelValue == item[itemKey]}]" tabindex="-1"
|
||||
role="tab" :aria-label="item[itemLabel]" ignore-tip :aria-selected="modelValue == item[itemKey]"
|
||||
@click="handleToggle(item[itemKey])"
|
||||
v-for="item in list"
|
||||
:key="item[itemKey]" :class="[$style.listItem, {[$style.active]: modelValue == item[itemKey]}]" tabindex="-1" role="tab"
|
||||
:aria-label="item[itemLabel]" ignore-tip :aria-selected="modelValue == item[itemKey]" @click="handleToggle(item[itemKey])"
|
||||
>
|
||||
<span :class="$style.label">{{ item[itemLabel] }}</span>
|
||||
</li>
|
||||
@@ -37,11 +37,11 @@ export default {
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
emits: ['update:model-value', 'change'],
|
||||
emits: ['update:modelValue', 'change'],
|
||||
setup(props, { emit }) {
|
||||
const handleToggle = id => {
|
||||
if (id == props.modelValue) return
|
||||
emit('update:model-value', id)
|
||||
emit('update:modelValue', id)
|
||||
emit('change', id)
|
||||
}
|
||||
|
||||
|
||||
@@ -54,19 +54,19 @@
|
||||
|
||||
// // div.list-item(@click="handleListItemClick($event, index)" @contextmenu="handleListItemRightClick($event, index)"
|
||||
// // :class="[{ selected: rightClickSelectedIndex == index }, { active: selectedList.includes(item) }]")
|
||||
// // div.list-item-cell.nobreak.center(:style="{ width: rowWidth.r1 }" style="padding-left: 3px; padding-right: 3px;" :class="$style.noSelect" @click.stop) {{index + 1}}
|
||||
// // div.list-item-cell.nobreak.center(:style="{ width: rowWidth.r1 }" style="padding-left: 3px; padding-right: 3px;" :class="$style.noSelect" @click.stop) {{ index + 1 }}
|
||||
// // div.list-item-cell.auto(:style="{ width: rowWidth.r2 }" :aria-label="item.name + (item.meta._qualitys.flac32bit ? ` - ${$t('tag__lossless_24bit')}` : (item.meta._qualitys.ape || item.meta._qualitys.flac || item.meta._qualitys.wav) ? ` - ${$t('tag__lossless')}` : item.meta._qualitys['320k'] ? ` - ${$t('tag__high_quality')}` : '') + (sourceTag ? ` - ${item.source}` : '')")
|
||||
// // span.select {{item.name}}
|
||||
// // span.badge.badge-theme-primary(:class="[$style.labelQuality, $style.noSelect]" v-if="item.meta._qualitys.flac32bit") {{$t('tag__lossless_24bit')}}
|
||||
// // span.badge.badge-theme-primary(:class="[$style.labelQuality, $style.noSelect]" v-else-if="item.meta._qualitys.ape || item.meta._qualitys.flac || item.meta._qualitys.wav") {{$t('tag__lossless')}}
|
||||
// // span.badge.badge-theme-secondary(:class="[$style.labelQuality, $style.noSelect]" v-else-if="item.meta._qualitys['320k']") {{$t('tag__high_quality')}}
|
||||
// // span.badge.badge-theme-tertiary(:class="[$style.labelQuality, $style.noSelect]" v-if="sourceTag") {{item.source}}
|
||||
// // span.select {{ item.name }}
|
||||
// // span.badge.badge-theme-primary(:class="[$style.labelQuality, $style.noSelect]" v-if="item.meta._qualitys.flac32bit") {{ $t('tag__lossless_24bit') }}
|
||||
// // span.badge.badge-theme-primary(:class="[$style.labelQuality, $style.noSelect]" v-else-if="item.meta._qualitys.ape || item.meta._qualitys.flac || item.meta._qualitys.wav") {{ $t('tag__lossless') }}
|
||||
// // span.badge.badge-theme-secondary(:class="[$style.labelQuality, $style.noSelect]" v-else-if="item.meta._qualitys['320k']") {{ $t('tag__high_quality') }}
|
||||
// // span.badge.badge-theme-tertiary(:class="[$style.labelQuality, $style.noSelect]" v-if="sourceTag") {{ item.source }}
|
||||
// // div.list-item-cell(:style="{ width: rowWidth.r3 }" :aria-label="item.singer")
|
||||
// // span.select {{item.singer}}
|
||||
// // span.select {{ item.singer }}
|
||||
// // div.list-item-cell(:style="{ width: rowWidth.r4 }" :aria-label="item.albumName")
|
||||
// // span.select {{item.meta.albumName}}
|
||||
// // span.select {{ item.meta.albumName }}
|
||||
// // div.list-item-cell(:style="{ width: rowWidth.r5 }")
|
||||
// // span(:class="[$style.time, $style.noSelect]") {{item.meta.interval || '--/--'}}
|
||||
// // span(:class="[$style.time, $style.noSelect]") {{ item.meta.interval || '--/--' }}
|
||||
// // div.list-item-cell(:style="{ width: rowWidth.r6 }" style="padding-left: 0; padding-right: 0;")
|
||||
// // material-list-buttons(:index="index" :class="$style.btns"
|
||||
// // :remove-btn="false" @btn-click="handleListBtnClick"
|
||||
|
||||
@@ -22,7 +22,7 @@ import { watch, ref, onBeforeUnmount } from '@common/utils/vueTools'
|
||||
import { defaultList, loveList, userLists } from '@renderer/store/list/state'
|
||||
import { addListMusics, moveListMusics, createUserList, getMusicExistListIds } from '@renderer/store/list/action'
|
||||
import useKeyDown from '@renderer/utils/compositions/useKeyDown'
|
||||
import { useI18n } from '@/lang'
|
||||
import { useI18n } from '@root/lang'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -207,7 +207,7 @@ export default {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.btn-content {
|
||||
.btnContent {
|
||||
flex: auto;
|
||||
max-height: 100%;
|
||||
padding-right: 15px;
|
||||
|
||||
@@ -21,7 +21,7 @@ import { computed } from '@common/utils/vueTools'
|
||||
import { defaultList, loveList, userLists } from '@renderer/store/list/state'
|
||||
import { addListMusics, moveListMusics, createUserList } from '@renderer/store/list/action'
|
||||
import useKeyDown from '@renderer/utils/compositions/useKeyDown'
|
||||
import { useI18n } from '@/lang'
|
||||
import { useI18n } from '@root/lang'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.btn-content {
|
||||
.btnContent {
|
||||
flex: auto;
|
||||
max-height: 100%;
|
||||
padding-right: 15px;
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
position: relative;
|
||||
border-radius: 40px;
|
||||
}
|
||||
.progress-mask {
|
||||
.progressMask {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
@@ -112,7 +112,7 @@ export default {
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
.progress-bar {
|
||||
.progressBar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
@@ -120,22 +120,22 @@ export default {
|
||||
height: 100%;
|
||||
transform-origin: 0;
|
||||
}
|
||||
.progress-bar1 {
|
||||
.progressBar1 {
|
||||
background-color: var(--color-primary-light-100-alpha-600);
|
||||
}
|
||||
|
||||
.progress-bar2 {
|
||||
.progressBar2 {
|
||||
background-color: var(--color-primary-light-100-alpha-400);
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.progress-bar3 {
|
||||
.progressBar3 {
|
||||
background-color: var(--color-primary-light-100-alpha-200);
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.bar-transition {
|
||||
.barTransition {
|
||||
transition-property: transform;
|
||||
transition-timing-function: ease-out;
|
||||
transition-duration: 0.2s;
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
<template>
|
||||
<base-btn min :class="[$style.newPreset, {[$style.editing]: isEditing}]" :aria-label="$t('player__sound_effect_biquad_filter_save_btn')" @click="handleEditing($event)">
|
||||
<svg-icon name="plus" />
|
||||
<base-input ref="input" :class="$style.newPresetInput" :value="newPresetName" :placeholder="$t('player__sound_effect_biquad_filter_save_input')" @keyup.enter="handleSave($event)" @blur="handleSave($event)" />
|
||||
</base-btn>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, nextTick } from '@common/utils/vueTools'
|
||||
import { appSetting } from '@renderer/store/setting'
|
||||
import { saveUserPitchShifterPreset } from '@renderer/store/soundEffect'
|
||||
|
||||
const isEditing = ref(false)
|
||||
const input = ref(false)
|
||||
const newPresetName = ref('')
|
||||
|
||||
const handleEditing = () => {
|
||||
if (isEditing.value) return
|
||||
// if (!this.newPresetName) this.newPresetName = this.listName
|
||||
isEditing.value = true
|
||||
nextTick(() => {
|
||||
input.value.$el.focus()
|
||||
})
|
||||
}
|
||||
|
||||
const handleSave = (event) => {
|
||||
let name = event.target.value.trim()
|
||||
newPresetName.value = event.target.value = ''
|
||||
isEditing.value = false
|
||||
if (!name) return
|
||||
if (name.length > 20) name = name.substring(0, 20)
|
||||
saveUserPitchShifterPreset({
|
||||
id: Date.now().toString(),
|
||||
name,
|
||||
playbackRate: appSetting['player.soundEffect.pitchShifter.playbackRate'],
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" module>
|
||||
@import '@renderer/assets/styles/layout.less';
|
||||
|
||||
.newPreset {
|
||||
position: relative;
|
||||
border: 1px dashed var(--color-primary-font-hover);
|
||||
// background-color: var(--color-main-background);
|
||||
color: var(--color-primary-font-hover);
|
||||
opacity: .7;
|
||||
height: 22px;
|
||||
|
||||
&.editing {
|
||||
opacity: 1;
|
||||
width: 90px;
|
||||
|
||||
svg {
|
||||
display: none;
|
||||
}
|
||||
.newPresetInput {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
:global {
|
||||
.svg-icon {
|
||||
vertical-align: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.newPresetInput {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// line-height: 16px;
|
||||
background: none !important;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
font-family: inherit;
|
||||
box-sizing: border-box;
|
||||
padding: 0 3px;
|
||||
border-radius: 0;
|
||||
display: none;
|
||||
&::placeholder {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -38,7 +38,7 @@
|
||||
import { ref, onMounted, computed } from '@common/utils/vueTools'
|
||||
import { appSetting, updateSetting } from '@renderer/store/setting'
|
||||
import { convolutions } from '@renderer/plugins/player'
|
||||
import AddConvolutionPresetBtn from './AddConvolutionPresetBtn'
|
||||
import AddConvolutionPresetBtn from './AddConvolutionPresetBtn.vue'
|
||||
import { getUserConvolutionPresetList, removeUserConvolutionPreset } from '@renderer/store/soundEffect'
|
||||
|
||||
const updateConvolution = val => {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
import { onMounted, ref } from '@common/utils/vueTools'
|
||||
import { freqs, freqsPreset } from '@renderer/plugins/player'
|
||||
import { appSetting, updateSetting } from '@renderer/store/setting'
|
||||
import AddEQPresetBtn from './AddEQPresetBtn'
|
||||
import AddEQPresetBtn from './AddEQPresetBtn.vue'
|
||||
import { getUserEQPresetList, removeUserEQPreset } from '@renderer/store/soundEffect'
|
||||
|
||||
const labels = freqs.map(num => num < 1000 ? num : `${num / 1000}k`)
|
||||
|
||||
@@ -29,9 +29,9 @@ import { ref } from '@common/utils/vueTools'
|
||||
// import { saveVolumeIsMute } from '@renderer/store/setting'
|
||||
// import { volume, isMute } from '@renderer/store/player/volume'
|
||||
// import fs from 'node:fs'
|
||||
import BiquadFilter from './BiquadFilter'
|
||||
import AudioPanner from './AudioPanner'
|
||||
import AudioConvolution from './AudioConvolution'
|
||||
import BiquadFilter from './BiquadFilter.vue'
|
||||
import AudioPanner from './AudioPanner.vue'
|
||||
import AudioConvolution from './AudioConvolution.vue'
|
||||
import PitchShifter from './PitchShifter.vue'
|
||||
|
||||
defineProps({
|
||||
|
||||
@@ -1,25 +1,22 @@
|
||||
import upperFirst from 'lodash/upperFirst'
|
||||
import camelCase from 'lodash/camelCase'
|
||||
|
||||
const requireComponent = require.context('./', true, /\.vue$/)
|
||||
|
||||
const requireComponent = import.meta.glob(['./**/*.vue', '!./**/components/**/*.vue'], { eager: true })
|
||||
const vueFileRxp = /\.vue$/
|
||||
const vueIndexFileRxp = /\/index\.vue$/
|
||||
|
||||
|
||||
export default app => {
|
||||
requireComponent.keys().forEach(fileName => {
|
||||
const filePath = fileName.replace(/^\.\//, '')
|
||||
Object.entries(requireComponent).forEach(([path, module]) => {
|
||||
path = path.replace(/^\.\//, '')
|
||||
let fileName = vueIndexFileRxp.test(path)
|
||||
? path.replace(vueIndexFileRxp, '')
|
||||
: path.replace(vueFileRxp, '')
|
||||
|
||||
if (!filePath.split('/').every((path, index, arr) => {
|
||||
const char = path.charAt(0)
|
||||
return vueFileRxp.test(path) || char.toUpperCase() !== char || arr[index + 1] == 'index.vue'
|
||||
})) return
|
||||
let componentName = upperFirst(camelCase(fileName))
|
||||
|
||||
const componentConfig = requireComponent(fileName)
|
||||
// console.log(componentName)
|
||||
|
||||
let componentName = upperFirst(camelCase(filePath.replace(/\.\w+$/, '')))
|
||||
|
||||
if (componentName.endsWith('Index')) componentName = componentName.replace(/Index$/, '')
|
||||
|
||||
app.component(componentName, componentConfig.default || componentConfig)
|
||||
app.component(componentName, module.default)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
import { isFullscreen } from '@renderer/store'
|
||||
import { appSetting } from '@renderer/store/setting'
|
||||
|
||||
import ControlBtns from './ControlBtns'
|
||||
import NavBar from './NavBar'
|
||||
import ControlBtns from './ControlBtns.vue'
|
||||
import NavBar from './NavBar.vue'
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
import { computed } from '@common/utils/vueTools'
|
||||
import { useRouter } from '@common/utils/vueRouter'
|
||||
import { clipboardWriteText } from '@common/utils/electron'
|
||||
import ControlBtns from './ControlBtns'
|
||||
import ControlBtns from './ControlBtns.vue'
|
||||
// import PlayProgress from './PlayProgress'
|
||||
import usePlayProgress from '@renderer/utils/compositions/usePlayProgress'
|
||||
// import { lyric } from '@renderer/core/share/lyric'
|
||||
@@ -284,7 +284,7 @@ export default {
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.play-btn {
|
||||
.playBtn {
|
||||
flex: none;
|
||||
height: 52%;
|
||||
// margin-top: -2px;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
import { computed } from '@common/utils/vueTools'
|
||||
import { useRouter } from '@common/utils/vueRouter'
|
||||
import { clipboardWriteText } from '@common/utils/electron'
|
||||
import ControlBtns from './ControlBtns'
|
||||
import ControlBtns from './ControlBtns.vue'
|
||||
// import PlayProgress from './PlayProgress'
|
||||
import usePlayProgress from '@renderer/utils/compositions/usePlayProgress'
|
||||
// import { lyric } from '@renderer/core/share/lyric'
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
import { computed } from '@common/utils/vueTools'
|
||||
import { useRouter } from '@common/utils/vueRouter'
|
||||
import { clipboardWriteText } from '@common/utils/electron'
|
||||
import ControlBtns from './ControlBtns'
|
||||
import PlayProgress from './PlayProgress'
|
||||
import ControlBtns from './ControlBtns.vue'
|
||||
import PlayProgress from './PlayProgress.vue'
|
||||
import usePlayProgress from '@renderer/utils/compositions/usePlayProgress'
|
||||
// import { lyric } from '@renderer/core/share/lyric'
|
||||
import {
|
||||
@@ -314,7 +314,7 @@ export default {
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.play-btn {
|
||||
.playBtn {
|
||||
flex: none;
|
||||
height: 52%;
|
||||
// margin-top: -2px;
|
||||
|
||||
@@ -56,7 +56,7 @@ import {
|
||||
} from '@renderer/store/player/action'
|
||||
import { onMounted, onBeforeUnmount, computed, reactive, ref, nextTick, watch } from '@common/utils/vueTools'
|
||||
import useLyric from '@renderer/utils/compositions/useLyric'
|
||||
import LyricMenu from './components/LyricMenu'
|
||||
import LyricMenu from './components/LyricMenu.vue'
|
||||
import { appSetting } from '@renderer/store/setting'
|
||||
import { setLyricOffset } from '@renderer/core/lyric'
|
||||
|
||||
@@ -263,7 +263,7 @@ export default {
|
||||
// font-size: 1.2em;
|
||||
// }
|
||||
}
|
||||
.lrc-active-zoom {
|
||||
.lrcActiveZoom {
|
||||
:global {
|
||||
.line-content {
|
||||
&.active {
|
||||
@@ -343,12 +343,12 @@ export default {
|
||||
.lyricSelectlineExtended {
|
||||
font-size: 14px;
|
||||
}
|
||||
.lrc-active {
|
||||
.lrcActive {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.lyric-space {
|
||||
.lyricSpace {
|
||||
height: 70%;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import { playNext, playPrev, togglePlay } from '@renderer/core/player'
|
||||
import { status, isPlay } from '@renderer/store/player/state'
|
||||
import usePlayProgress from '@renderer/utils/compositions/usePlayProgress'
|
||||
|
||||
import ControlBtns from './components/ControlBtns'
|
||||
import ControlBtns from './components/ControlBtns.vue'
|
||||
|
||||
const {
|
||||
nowPlayTimeStr,
|
||||
@@ -71,13 +71,13 @@ const {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress-container {
|
||||
.progressContainer {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
padding: 3px 0;
|
||||
}
|
||||
|
||||
.progress-content {
|
||||
.progressContent {
|
||||
position: relative;
|
||||
height: 16px;
|
||||
padding: 5px 0;
|
||||
@@ -87,12 +87,12 @@ const {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.bar-transition {
|
||||
.barTransition {
|
||||
transition-property: transform;
|
||||
transition-timing-function: ease-out;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
.time-label {
|
||||
.timeLabel {
|
||||
width: 100%;
|
||||
height: 18px;
|
||||
display: flex;
|
||||
@@ -104,7 +104,7 @@ const {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.play-control {
|
||||
.playControl {
|
||||
flex: none;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
@@ -113,7 +113,7 @@ const {
|
||||
padding: 0 25px;
|
||||
color: var(--color-button-font);
|
||||
}
|
||||
.play-btn {
|
||||
.playBtn {
|
||||
height: 40%;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
@@ -125,7 +125,7 @@ const {
|
||||
opacity: 1;
|
||||
cursor: pointer;
|
||||
|
||||
+.play-btn {
|
||||
+.playBtn {
|
||||
margin-left: 10px;
|
||||
}
|
||||
svg {
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<teleport to="#root">
|
||||
<div ref="dom_menu" :class="$style.container" :style="menuStyles" :aria-hidden="!modelValue">
|
||||
<!-- <div :class="$style.group">
|
||||
<div :class="$style.title">{{$t('lyric_menu__align')}}</div>
|
||||
<div :class="$style.title">{{ $t('lyric_menu__align') }}</div>
|
||||
<div :class="$style.subGroup">
|
||||
<div :class="[$style.btn, { [$style.active]: appSetting['playDetail.style.align'] == 'left' }]" role="button" @click="setFontAlign('left')" ignore-tip :aria-label="$t('lyric_menu__align_left')">{{$t('lyric_menu__align_left')}}</div>
|
||||
<div :class="[$style.btn, { [$style.active]: appSetting['playDetail.style.align'] == 'center' }]" role="button" @click="setFontAlign('center')" ignore-tip :aria-label="$t('lyric_menu__align_center')">{{$t('lyric_menu__align_center')}}</div>
|
||||
<div :class="[$style.btn, { [$style.active]: appSetting['playDetail.style.align'] == 'left' }]" role="button" @click="setFontAlign('left')" ignore-tip :aria-label="$t('lyric_menu__align_left')">{{ $t('lyric_menu__align_left') }}</div>
|
||||
<div :class="[$style.btn, { [$style.active]: appSetting['playDetail.style.align'] == 'center' }]" role="button" @click="setFontAlign('center')" ignore-tip :aria-label="$t('lyric_menu__align_center')">{{ $t('lyric_menu__align_center') }}</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div :class="$style.group">
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
emits: ['updateLyric', 'update:model-value'],
|
||||
emits: ['updateLyric', 'update:modelValue'],
|
||||
setup(props, { emit }) {
|
||||
// const appSetting = useRefGetter('appSetting')
|
||||
// const playDetailSetting = useRefGetter('playDetailSetting')
|
||||
@@ -98,7 +98,7 @@ export default {
|
||||
const location = computed(() => props.xy)
|
||||
|
||||
const onHide = () => {
|
||||
emit('update:model-value', false)
|
||||
emit('update:modelValue', false)
|
||||
}
|
||||
|
||||
const setFontAlign = val => {
|
||||
|
||||
@@ -11,11 +11,11 @@ div(:class="$style.container")
|
||||
div.select(:class="$style.name") {{ item.userName }}
|
||||
div(:class="$style.metaInfo")
|
||||
time(v-if="item.timeStr" :class="$style.label") {{ timeFormat(item.timeStr) }}
|
||||
div(v-if="item.location" :class="$style.label") {{$t('comment__location', { location: item.location })}}
|
||||
div(v-if="item.location" :class="$style.label") {{ $t('comment__location', { location: item.location }) }}
|
||||
div(v-if="item.likedCount != null" :class="$style.likes")
|
||||
svg(:class="$style.likesIcon" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" space="preserve")
|
||||
use(xlink:href="#icon-thumbs-up")
|
||||
| {{item.likedCount}}
|
||||
| {{ item.likedCount }}
|
||||
p.select(:class="$style.comment_text") {{ item.text }}
|
||||
div(v-if="item.images?.length" :class="$style.comment_images")
|
||||
img(v-for="(url, index) in item.images" :key="index" :src="url" loading="lazy" decoding="async")
|
||||
|
||||
@@ -33,14 +33,14 @@ div.comment(ref="dom_container" :class="$style.comment")
|
||||
div(:class="$style.pagination")
|
||||
material-pagination(:count="newComment.total" :btn-length="5" :limit="newComment.limit" :page="newComment.page" @btn-click="handleToggleCommentPage")
|
||||
div(v-else :class="$style.unavailable")
|
||||
p {{$t('comment__unavailable')}}
|
||||
p {{ $t('comment__unavailable') }}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { appSetting } from '@renderer/store/setting'
|
||||
import { toOldMusicInfo } from '@renderer/utils'
|
||||
import music from '@renderer/utils/musicSdk'
|
||||
import CommentFloor from './CommentFloor'
|
||||
import CommentFloor from './CommentFloor.vue'
|
||||
|
||||
export default {
|
||||
name: 'MusicComment',
|
||||
|
||||
@@ -44,7 +44,7 @@ transition(enter-active-class="animated slideInRight" leave-active-class="animat
|
||||
div.description(:class="$style.description")
|
||||
p {{ $t('player__music_name') }}{{ musicInfo.name }}
|
||||
p {{ $t('player__music_singer') }}{{ musicInfo.singer }}
|
||||
p(v-if="musicInfo.album") {{ $t('player__music_album') }}{{musicInfo.album}}
|
||||
p(v-if="musicInfo.album") {{ $t('player__music_album') }}{{ musicInfo.album }}
|
||||
|
||||
transition(enter-active-class="animated fadeIn" leave-active-class="animated fadeOut")
|
||||
LyricPlayer(v-if="visibled")
|
||||
@@ -70,9 +70,9 @@ import {
|
||||
setShowPlayComment,
|
||||
setShowPlayLrcSelectContentLrc,
|
||||
} from '@renderer/store/player/action'
|
||||
import LyricPlayer from './LyricPlayer'
|
||||
import PlayBar from './PlayBar'
|
||||
import MusicComment from './components/MusicComment'
|
||||
import LyricPlayer from './LyricPlayer.vue'
|
||||
import PlayBar from './PlayBar.vue'
|
||||
import MusicComment from './components/MusicComment/index.vue'
|
||||
import { registerAutoHideMounse, unregisterAutoHideMounse } from './autoHideMounse'
|
||||
import { appSetting } from '@renderer/store/setting'
|
||||
import { closeWindow, maxWindow, minWindow, setFullScreen } from '@renderer/utils/ipc'
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<script setup>
|
||||
import { isFullscreen } from '@renderer/store'
|
||||
import { appSetting } from '@renderer/store/setting'
|
||||
import ControlBtns from './ControlBtns'
|
||||
import SearchInput from './SearchInput'
|
||||
import ControlBtns from './ControlBtns.vue'
|
||||
import SearchInput from './SearchInput.vue'
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ export default {
|
||||
|
||||
<style lang="less" module>
|
||||
@import '@renderer/assets/styles/layout.less';
|
||||
.song-list {
|
||||
.songList {
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
:placeholder="placeholder"
|
||||
@focus="handleFocus"
|
||||
@blur="handleBlur"
|
||||
@input="$emit('update:model-value', text)"
|
||||
@input="$emit('update:modelValue', text)"
|
||||
@change="sendEvent('change')"
|
||||
@keyup.enter="handleSearch"
|
||||
@keydown.arrow-down.arrow-up.prevent
|
||||
@@ -82,7 +82,7 @@ export default {
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['update:model-value', 'event'],
|
||||
emits: ['update:modelValue', 'event'],
|
||||
data() {
|
||||
return {
|
||||
isShow: false,
|
||||
@@ -182,11 +182,11 @@ export default {
|
||||
str = str.replace(/\s+/g, ' ')
|
||||
let dom_input = this.$refs.dom_input
|
||||
this.text = this.text.substring(0, dom_input.selectionStart) + str + this.text.substring(dom_input.selectionEnd, this.text.length)
|
||||
this.$emit('update:model-value', this.text)
|
||||
this.$emit('update:modelValue', this.text)
|
||||
},
|
||||
handleClearList() {
|
||||
this.text = ''
|
||||
this.$emit('update:model-value', this.text)
|
||||
this.$emit('update:modelValue', this.text)
|
||||
this.sendEvent('submit')
|
||||
},
|
||||
},
|
||||
|
||||
@@ -3,12 +3,13 @@ import { getDuration, getPlaybackRate, getCurrentTime } from '@renderer/plugins/
|
||||
import { isPlay, musicInfo, playMusicInfo } from '@renderer/store/player/state'
|
||||
import { playProgress } from '@renderer/store/player/playProgress'
|
||||
import { pause, play, playNext, playPrev, stop } from '@renderer/core/player'
|
||||
import silenceAudio from '@renderer/assets/medias/Silence02s.mp3'
|
||||
|
||||
export default () => {
|
||||
// 创建一个空白音频以保持对 Media Session 的注册
|
||||
const emptyAudio = new Audio()
|
||||
emptyAudio.autoplay = false
|
||||
emptyAudio.src = require('@renderer/assets/medias/Silence02s.mp3')
|
||||
emptyAudio.src = silenceAudio
|
||||
emptyAudio.controls = false
|
||||
emptyAudio.preload = 'auto'
|
||||
emptyAudio.onplaying = () => {
|
||||
|
||||
@@ -16,40 +16,41 @@ import {
|
||||
import { appSetting } from '@renderer/store/setting'
|
||||
|
||||
const cache = new Map<string, AudioBuffer>()
|
||||
const loadBuffer = async(name: string) => new Promise<AudioBuffer>((resolve, reject) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const path = require('@renderer/assets/medias/filters/' + name) as string
|
||||
if (cache.has(path)) {
|
||||
resolve(cache.get(path) as AudioBuffer)
|
||||
return
|
||||
}
|
||||
// Load buffer asynchronously
|
||||
let request = new XMLHttpRequest()
|
||||
request.open('GET', path, true)
|
||||
request.responseType = 'arraybuffer'
|
||||
const loadBuffer = async(name: string) => {
|
||||
const path = (await import(`../../../assets/medias/filters/${name.replace('.wav', '')}.wav`)).default as string
|
||||
return new Promise<AudioBuffer>((resolve, reject) => {
|
||||
if (cache.has(path)) {
|
||||
resolve(cache.get(path) as AudioBuffer)
|
||||
return
|
||||
}
|
||||
// Load buffer asynchronously
|
||||
let request = new XMLHttpRequest()
|
||||
request.open('GET', path, true)
|
||||
request.responseType = 'arraybuffer'
|
||||
|
||||
request.onload = function() {
|
||||
// Asynchronously decode the audio file data in request.response
|
||||
void getAudioContext().decodeAudioData(request.response, (buffer) => {
|
||||
if (!buffer) {
|
||||
reject(new Error('error decoding file data: ' + path))
|
||||
return
|
||||
}
|
||||
cache.set(path, buffer)
|
||||
resolve(buffer)
|
||||
},
|
||||
function(error) {
|
||||
reject(error)
|
||||
console.error('decodeAudioData error', error)
|
||||
})
|
||||
}
|
||||
request.onload = function() {
|
||||
// Asynchronously decode the audio file data in request.response
|
||||
void getAudioContext().decodeAudioData(request.response, (buffer) => {
|
||||
if (!buffer) {
|
||||
reject(new Error('error decoding file data: ' + path))
|
||||
return
|
||||
}
|
||||
cache.set(path, buffer)
|
||||
resolve(buffer)
|
||||
},
|
||||
function(error) {
|
||||
reject(error)
|
||||
console.error('decodeAudioData error', error)
|
||||
})
|
||||
}
|
||||
|
||||
request.onerror = function() {
|
||||
reject(new Error('XHR error'))
|
||||
}
|
||||
request.onerror = function() {
|
||||
reject(new Error('XHR error'))
|
||||
}
|
||||
|
||||
request.send()
|
||||
})
|
||||
request.send()
|
||||
})
|
||||
}
|
||||
|
||||
export default () => {
|
||||
// console.log(appSetting['player.soundEffect.panner.enable'])
|
||||
|
||||
@@ -2,14 +2,14 @@ import { watch } from '@common/utils/vueTools'
|
||||
import { isFullscreen, proxy, sync, windowSizeList } from '@renderer/store'
|
||||
import { appSetting } from '@renderer/store/setting'
|
||||
import { sendSyncAction, setTaskBarProgress, setWindowSize } from '@renderer/utils/ipc'
|
||||
import { setLanguage } from '@/lang'
|
||||
import { setLanguage } from '@root/lang'
|
||||
import { setUserApi } from '../apiSource'
|
||||
// import { applyTheme, getThemes } from '@renderer/store/utils'
|
||||
|
||||
|
||||
export default () => {
|
||||
watch(() => appSetting['common.windowSizeId'], (index) => {
|
||||
let info = index == null ? windowSizeList[2] : windowSizeList[index]
|
||||
const info = index == null ? windowSizeList[2] : windowSizeList[index]
|
||||
setWindowSize(info.width, info.height)
|
||||
})
|
||||
watch(() => appSetting['common.fontSize'], (fontSize) => {
|
||||
|
||||
@@ -31,5 +31,6 @@
|
||||
}
|
||||
if (/theme=(.+)(#|$)/.test(window.location.search)) applyThemeColor(RegExp.$1)
|
||||
</script>
|
||||
<script type="module" src="/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import '@common/error'
|
||||
import 'virtual:svg-icons-register'
|
||||
import { createApp } from 'vue'
|
||||
|
||||
import './core/globalData'
|
||||
@@ -18,8 +19,8 @@ import router from './router'
|
||||
|
||||
|
||||
import { getSetting, updateSetting } from './utils/ipc'
|
||||
import { langList } from '@/lang'
|
||||
import type { I18n } from '@/lang/i18n'
|
||||
import { langList } from '@root/lang'
|
||||
import type { I18n } from '@root/lang/i18n'
|
||||
|
||||
import { initSetting } from './store/setting'
|
||||
// import { bubbleCursor } from './utils/cursor-effects/bubbleCursor'
|
||||
@@ -43,7 +44,7 @@ void getSetting().then(setting => {
|
||||
// Set language automatically
|
||||
if (!setting['common.langId'] || !window.i18n.availableLocales.includes(setting['common.langId'])) {
|
||||
let langId: I18n['locale'] | null = null
|
||||
let locale = window.navigator.language.toLocaleLowerCase() as I18n['locale']
|
||||
const locale = window.navigator.language.toLocaleLowerCase() as I18n['locale']
|
||||
if (window.i18n.availableLocales.includes(locale)) {
|
||||
langId = locale
|
||||
} else {
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Modal from '@renderer/components/material/Modal'
|
||||
import Btn from '@renderer/components/base/Btn'
|
||||
import Modal from '@renderer/components/material/Modal.vue'
|
||||
import Btn from '@renderer/components/base/Btn.vue'
|
||||
import { useI18n } from '@renderer/plugins/i18n'
|
||||
import { computed } from '@common/utils/vueTools'
|
||||
export default {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Dialog from './Dialog'
|
||||
import Dialog from './Dialog.vue'
|
||||
import { createApp } from 'vue'
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import SvgIcon from './SvgIcon'
|
||||
import SvgIcon from './SvgIcon.vue'
|
||||
|
||||
const req = require.context('@renderer/assets/svgs', false, /\.svg$/)
|
||||
const requireAll = requireContext => requireContext.keys().map(requireContext)
|
||||
requireAll(req)
|
||||
// const req = require.context('@renderer/assets/svgs', false, /\.svg$/)
|
||||
// const requireAll = requireContext => requireContext.keys().map(requireContext)
|
||||
// requireAll(req)
|
||||
|
||||
export default app => {
|
||||
app.component('svg-icon', SvgIcon)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { I18n } from '@/lang'
|
||||
import { createI18n, i18nPlugin, useI18n } from '@/lang'
|
||||
import type { I18n } from '@root/lang'
|
||||
import { createI18n, i18nPlugin, useI18n } from '@root/lang'
|
||||
|
||||
window.i18n = createI18n()
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import PhaseVocoder from './pitch-shifter/phase-vocoder.js?worker&url'
|
||||
|
||||
let audio: HTMLAudioElement | null = null
|
||||
let audioContext: AudioContext
|
||||
let mediaSource: MediaElementAudioSourceNode
|
||||
@@ -276,11 +278,7 @@ const loadPitchShifterNode = () => {
|
||||
pitchShifterNodeLoadStatus = 'loading'
|
||||
initAdvancedAudioFeatures()
|
||||
// source -> analyser -> biquadFilter -> audioWorklet(pitch shifter) -> [(convolver & convolverSource)->convolverDynamicsCompressor] -> panner -> gain
|
||||
void audioContext.audioWorklet.addModule(new URL(
|
||||
/* webpackChunkName: 'pitch_shifter.audioWorklet' */
|
||||
'./pitch-shifter/phase-vocoder.js',
|
||||
import.meta.url,
|
||||
)).then(() => {
|
||||
void audioContext.audioWorklet.addModule(PhaseVocoder).then(() => {
|
||||
console.log('pitch shifter audio worklet loaded')
|
||||
// https://github.com/olvb/phaze/issues/26#issuecomment-1574629971
|
||||
pitchShifterNode = new AudioWorkletNode(audioContext, 'phase-vocoder-processor', { outputChannelCount: [2] })
|
||||
|
||||
+15
-7
@@ -2,6 +2,14 @@
|
||||
// import Vue from 'vue'
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
|
||||
import SearchView from './views/Search/index.vue'
|
||||
import SongListView from './views/songList/List/index.vue'
|
||||
import SongListDetailView from './views/songList/Detail/index.vue'
|
||||
import LeaderboardView from './views/Leaderboard/index.vue'
|
||||
import ListView from './views/List/index.vue'
|
||||
import DownloadView from './views/Download/index.vue'
|
||||
import SettingView from './views/Setting/index.vue'
|
||||
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
@@ -9,7 +17,7 @@ const router = createRouter({
|
||||
{
|
||||
path: '/search',
|
||||
name: 'Search',
|
||||
component: require('./views/Search/index.vue').default,
|
||||
component: SearchView,
|
||||
meta: {
|
||||
name: 'Search',
|
||||
},
|
||||
@@ -17,7 +25,7 @@ const router = createRouter({
|
||||
{
|
||||
path: '/songList/list',
|
||||
name: 'SongList',
|
||||
component: require('./views/songList/List/index.vue').default,
|
||||
component: SongListView,
|
||||
meta: {
|
||||
name: 'SongList',
|
||||
},
|
||||
@@ -25,7 +33,7 @@ const router = createRouter({
|
||||
{
|
||||
path: '/songList/detail',
|
||||
name: 'SongListDetail',
|
||||
component: require('./views/songList/Detail/index.vue').default,
|
||||
component: SongListDetailView,
|
||||
meta: {
|
||||
name: 'SongList',
|
||||
},
|
||||
@@ -33,7 +41,7 @@ const router = createRouter({
|
||||
{
|
||||
path: '/leaderboard',
|
||||
name: 'Leaderboard',
|
||||
component: require('./views/Leaderboard/index.vue').default,
|
||||
component: LeaderboardView,
|
||||
meta: {
|
||||
name: 'Leaderboard',
|
||||
},
|
||||
@@ -41,7 +49,7 @@ const router = createRouter({
|
||||
{
|
||||
path: '/list',
|
||||
name: 'List',
|
||||
component: require('./views/List/index.vue').default,
|
||||
component: ListView,
|
||||
meta: {
|
||||
name: 'List',
|
||||
},
|
||||
@@ -49,7 +57,7 @@ const router = createRouter({
|
||||
{
|
||||
path: '/download',
|
||||
name: 'Download',
|
||||
component: require('./views/Download/index.vue').default,
|
||||
component: DownloadView,
|
||||
meta: {
|
||||
name: 'Download',
|
||||
},
|
||||
@@ -57,7 +65,7 @@ const router = createRouter({
|
||||
{
|
||||
path: '/setting',
|
||||
name: 'Setting',
|
||||
component: require('./views/Setting/index.vue').default,
|
||||
component: SettingView,
|
||||
meta: {
|
||||
name: 'Setting',
|
||||
},
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { ref, reactive, shallowRef, markRaw, computed, watch } from '@common/utils/vueTools'
|
||||
import { windowSizeList as configWindowSizeList } from '@common/config'
|
||||
import { appSetting } from './setting'
|
||||
import pkg from '../../../package.json'
|
||||
import { version } from '../../../package.json'
|
||||
import { type ProgressInfo } from 'electron-updater'
|
||||
import music from '@renderer/utils/musicSdk'
|
||||
process.versions.app = pkg.version
|
||||
process.versions.app = version
|
||||
|
||||
export const apiSource = ref<string | null>(null)
|
||||
export const proxy: {
|
||||
@@ -115,7 +115,7 @@ export const versionInfo = window.lxData.versionInfo = reactive<{
|
||||
status: LX.UpdateStatus
|
||||
downloadProgress: ProgressInfo | null
|
||||
}>({
|
||||
version: pkg.version,
|
||||
version,
|
||||
newVersion: null,
|
||||
showModal: false,
|
||||
reCheck: false,
|
||||
|
||||
@@ -2,22 +2,25 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"isolatedModules": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "nodenext",
|
||||
"resolveJsonModule": true,
|
||||
"paths": { /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
"@common/*": ["common/*"],
|
||||
"@renderer/*": ["renderer/*"],
|
||||
// "@lyric/*": ["renderer-lyric/*"],
|
||||
"@static/*": ["static/*"],
|
||||
"@/*": ["./*"],
|
||||
"@root/*": ["./*"],
|
||||
},
|
||||
"typeRoots": [ /* Specify multiple folders that act like './node_modules/@types'. */
|
||||
"renderer/types"
|
||||
"./types"
|
||||
],
|
||||
},
|
||||
// "vueCompilerOptions": {
|
||||
// "plugins": [
|
||||
// "@volar/vue-language-plugin-pug"
|
||||
// ]
|
||||
// }
|
||||
"vueCompilerOptions": {
|
||||
"plugins": [
|
||||
"@vue/language-plugin-pug"
|
||||
]
|
||||
}
|
||||
// "include": [
|
||||
// "./**/*.ts",
|
||||
// // "./**/*.js",
|
||||
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
/// <reference types="vite/client" />
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { type I18n } from '@/lang'
|
||||
import { type I18n } from '@root/lang'
|
||||
|
||||
declare module 'vue' {
|
||||
interface ComponentCustomProperties {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Support qualitys: 128k 320k flac wav
|
||||
|
||||
module.exports = [
|
||||
export default [
|
||||
{
|
||||
id: 'test',
|
||||
name: '测试接口',
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
import apiSourceInfo from './api-source-info'
|
||||
import { apiSource, userApi } from '@renderer/store'
|
||||
import api_temp_kw from './kw/api-temp'
|
||||
// import api_test_bd from './bd/api-test'
|
||||
import api_test_tx from './tx/api-test'
|
||||
import api_test_kg from './kg/api-test'
|
||||
import api_test_kw from './kw/api-test'
|
||||
import api_test_mg from './mg/api-test'
|
||||
import api_test_wy from './wy/api-test'
|
||||
|
||||
const allApi = {
|
||||
temp_kw: api_temp_kw,
|
||||
// test_bd: api_test_bd,
|
||||
test_tx: api_test_tx,
|
||||
test_kg: api_test_kg,
|
||||
test_kw: api_test_kw,
|
||||
test_mg: api_test_mg,
|
||||
test_wy: api_test_wy,
|
||||
}
|
||||
|
||||
const apiList = {}
|
||||
const supportQuality = {}
|
||||
@@ -7,7 +24,7 @@ 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}`] = require(`./${source}/api-${api.id}`).default
|
||||
apiList[`${api.id}_api_${source}`] = allApi[`${api.id}_${source}`]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { httpFetch } from '../../request'
|
||||
import { decodeName, formatPlayTime, sizeFormate, dateFormat, formatPlayCount } from '../../index'
|
||||
import infSign from './vendors/infSign.min'
|
||||
import infSign from '@renderer/utils/musicSdk/kg/vendors/infSign.min'
|
||||
import { signatureParams } from './util'
|
||||
|
||||
const handleSignature = (id, page, limit) => new Promise((resolve, reject) => {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
import { httpGet } from './request'
|
||||
import { author, name } from '../../../package.json'
|
||||
import { name, author } from '../../../package.json'
|
||||
|
||||
// TODO add Notice
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ export default {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.no-item {
|
||||
.noItem {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
@@ -105,8 +105,8 @@
|
||||
<script>
|
||||
import { clipboardWriteText } from '@common/utils/electron'
|
||||
import { assertApiSupport } from '@renderer/store/utils'
|
||||
import SearchList from './components/SearchList'
|
||||
import MusicSortModal from './components/MusicSortModal'
|
||||
import SearchList from './components/SearchList.vue'
|
||||
import MusicSortModal from './components/MusicSortModal.vue'
|
||||
import useListInfo from './useListInfo'
|
||||
import useList from './useList'
|
||||
import useMenu from './useMenu'
|
||||
@@ -396,7 +396,7 @@ export default {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.no-item {
|
||||
.noItem {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
@@ -43,7 +43,7 @@ import { isFullscreen } from '@renderer/store'
|
||||
import { appSetting } from '@renderer/store/setting'
|
||||
import { getFontSizeWithScreen } from '@renderer/utils'
|
||||
import { LIST_IDS } from '@common/constants'
|
||||
import { useI18n } from '@/lang'
|
||||
import { useI18n } from '@root/lang'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.no-item {
|
||||
.noItem {
|
||||
position: relative;
|
||||
height: 200px;
|
||||
display: flex;
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
import { ref, computed } from '@common/utils/vueTools'
|
||||
// import { dialog } from '@renderer/plugins/Dialog'
|
||||
import { getListMusics, updateListMusicsPosition } from '@renderer/store/list/action'
|
||||
import { useI18n } from '@/lang'
|
||||
import { useI18n } from '@root/lang'
|
||||
import { LIST_IDS } from '@common/constants'
|
||||
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ export default {
|
||||
color: var(--color-font);
|
||||
}
|
||||
|
||||
.no-item {
|
||||
.noItem {
|
||||
position: relative;
|
||||
height: 200px;
|
||||
display: flex;
|
||||
|
||||
@@ -82,9 +82,9 @@
|
||||
import { openUrl } from '@common/utils/electron'
|
||||
|
||||
import musicSdk from '@renderer/utils/musicSdk'
|
||||
import DuplicateMusicModal from './components/DuplicateMusicModal'
|
||||
import ListSortModal from './components/ListSortModal'
|
||||
import ListUpdateModal from './components/ListUpdateModal'
|
||||
import DuplicateMusicModal from './components/DuplicateMusicModal.vue'
|
||||
import ListSortModal from './components/ListSortModal.vue'
|
||||
import ListUpdateModal from './components/ListUpdateModal.vue'
|
||||
|
||||
import { defaultList, loveList, userLists, fetchingListStatus } from '@renderer/store/list/state'
|
||||
import { removeUserList } from '@renderer/store/list/action'
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<script>
|
||||
import { getListPrevSelectId } from '@renderer/utils/data'
|
||||
|
||||
import MyList from './MyList'
|
||||
import MusicList from './MusicList'
|
||||
import MyList from './MyList/index.vue'
|
||||
import MusicList from './MusicList/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'List',
|
||||
|
||||
@@ -90,26 +90,26 @@ const handleSearch = (text) => {
|
||||
flex-flow: column nowrap;
|
||||
// justify-content: center;
|
||||
}
|
||||
.noitem-list-container {
|
||||
.noitemListContainer {
|
||||
padding: 3% 15px 15px;
|
||||
// margin-top: -20px;
|
||||
min-height: 300px;
|
||||
max-height: 94.7%;
|
||||
}
|
||||
.noitem-list {
|
||||
+.noitem-list {
|
||||
.noitemList {
|
||||
+.noitemList {
|
||||
margin-top: 15px;
|
||||
}
|
||||
}
|
||||
.noitem-hot-search-list {
|
||||
.noitemHotSearchList {
|
||||
min-height: 106px;
|
||||
}
|
||||
.noitem-list-title {
|
||||
.noitemListTitle {
|
||||
color: var(--color-font);
|
||||
padding: 5px 5px 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.noitem-list-item {
|
||||
.noitemListItem {
|
||||
display: inline-block;
|
||||
margin: 3px 5px;
|
||||
background-color: var(--color-button-background);
|
||||
@@ -128,7 +128,7 @@ const handleSearch = (text) => {
|
||||
background-color: var(--color-button-background-active);
|
||||
}
|
||||
}
|
||||
.history-clear-btn {
|
||||
.historyClearBtn {
|
||||
padding: 0 5px;
|
||||
margin-left: 5px;
|
||||
color: var(--color-font-label);
|
||||
|
||||
@@ -9,10 +9,10 @@ material-modal(:show="modelValue" teleport="#view" @close="handleCloseModal" @af
|
||||
div(:class="$style.row")
|
||||
base-checkbox(id="play_timeout_end" :model-value="appSetting['player.waitPlayEndStop']" :label="$t('play_timeout_end')" @update:model-value="updateSetting({'player.waitPlayEndStop': $event})")
|
||||
div(:class="[$style.row, $style.tip, { [$style.show]: !!timeLabel }]")
|
||||
p {{$t('play_timeout_tip', { time: timeLabel })}}
|
||||
p {{ $t('play_timeout_tip', { time: timeLabel }) }}
|
||||
div(:class="$style.footer")
|
||||
base-btn(:class="$style.footerBtn" @click="handleCancel") {{ $t(timeLabel ? 'play_timeout_stop' : 'play_timeout_close') }}
|
||||
base-btn(:class="$style.footerBtn" @click="handleConfirm") {{$t(timeLabel ? 'play_timeout_update' : 'play_timeout_confirm')}}
|
||||
base-btn(:class="$style.footerBtn" @click="handleConfirm") {{ $t(timeLabel ? 'play_timeout_update' : 'play_timeout_confirm') }}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -31,13 +31,13 @@ export default {
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['update:model-value'],
|
||||
emits: ['update:modelValue'],
|
||||
setup(props, { emit }) {
|
||||
const { timeLabel } = useTimeout()
|
||||
const time = ref(appSetting['player.waitPlayEndStopTime'])
|
||||
|
||||
const handleCloseModal = () => {
|
||||
emit('update:model-value', false)
|
||||
emit('update:modelValue', false)
|
||||
}
|
||||
const handleCancel = () => {
|
||||
if (timeLabel.value) {
|
||||
|
||||
@@ -6,17 +6,17 @@ dd
|
||||
base-btn.btn.gap-left(min @click="handleImportPlayList") {{ $t('setting__backup_part_import_list') }}
|
||||
base-btn.btn.gap-left(min @click="handleExportPlayList") {{ $t('setting__backup_part_export_list') }}
|
||||
base-btn.btn.gap-left(min @click="handleImportSetting") {{ $t('setting__backup_part_import_setting') }}
|
||||
base-btn.btn.gap-left(min @click="handleExportSetting") {{$t('setting__backup_part_export_setting')}}
|
||||
base-btn.btn.gap-left(min @click="handleExportSetting") {{ $t('setting__backup_part_export_setting') }}
|
||||
dd
|
||||
h3#backup_all {{ $t('setting__backup_all') }}
|
||||
div
|
||||
base-btn.btn.gap-left(min @click="handleImportAllData") {{ $t('setting__backup_all_import') }}
|
||||
base-btn.btn.gap-left(min @click="handleExportAllData") {{$t('setting__backup_all_export')}}
|
||||
base-btn.btn.gap-left(min @click="handleExportAllData") {{ $t('setting__backup_all_export') }}
|
||||
dd
|
||||
h3#backup_other {{ $t('setting__backup_other') }}
|
||||
div
|
||||
base-btn.btn.gap-left(min @click="handleExportPlayListToText") {{ $t('setting__backup_other_export_list_text') }}
|
||||
base-btn.btn.gap-left(min @click="handleExportPlayListToCsv") {{$t('setting__backup_other_export_list_csv')}}
|
||||
base-btn.btn.gap-left(min @click="handleExportPlayListToCsv") {{ $t('setting__backup_other_export_list_csv') }}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -385,7 +385,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" module>
|
||||
.save-path {
|
||||
.savePath {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -20,7 +20,7 @@ dd
|
||||
div(:class="$style.bg")
|
||||
div(:class="$style.bgContent")
|
||||
svg-icon(:class="$style.icon" name="plus")
|
||||
span(:class="$style.label") {{$t('theme_add')}}
|
||||
span(:class="$style.label") {{ $t('theme_add') }}
|
||||
|
||||
dd
|
||||
div
|
||||
@@ -33,7 +33,7 @@ dd
|
||||
.gap-top
|
||||
base-checkbox(id="setting_to_tray" :model-value="appSetting['tray.enable']" :label="$t('setting__basic_to_tray')" @update:model-value="updateSetting({'tray.enable': $event})")
|
||||
.p.gap-top
|
||||
base-btn.btn(min @click="isShowPlayTimeoutModal = true") {{$t('setting__play_timeout')}} {{ timeLabel ? ` (${timeLabel})` : '' }}
|
||||
base-btn.btn(min @click="isShowPlayTimeoutModal = true") {{ $t('setting__play_timeout')}} {{ timeLabel ? ` (${timeLabel})` : '' }}
|
||||
|
||||
dd
|
||||
h3#basic_source {{ $t('setting__basic_source') }}
|
||||
@@ -43,7 +43,7 @@ dd
|
||||
:id="`setting_api_source_${item.id}`" name="setting_api_source"
|
||||
need :model-value="appSetting['common.apiSource']" :disabled="item.disabled" :value="item.id" :label="item.label" @update:model-value="updateSetting({'common.apiSource': $event})")
|
||||
.p.gap-top
|
||||
base-btn.btn(min @click="isShowUserApiModal = true") {{$t('setting__basic_source_user_api_btn')}}
|
||||
base-btn.btn(min @click="isShowUserApiModal = true") {{ $t('setting__basic_source_user_api_btn') }}
|
||||
|
||||
dd
|
||||
h3#basic_window_size {{ $t('setting__basic_window_size') }}
|
||||
@@ -55,7 +55,7 @@ dd
|
||||
dd
|
||||
h3#basic_font_size {{ $t('setting__basic_font_size') }}
|
||||
div
|
||||
//- base-selection.gap-teft(:list="fontSizeList" :modelValue="appSetting['common.fontSize']" @update:model-value="updateSetting({'common.fontSize': $event})")
|
||||
//- base-selection.gap-teft(:list="fontSizeList" :model-value="appSetting['common.fontSize']" @update:model-value="updateSetting({'common.fontSize': $event})")
|
||||
base-checkbox.gap-left(
|
||||
v-for="item in fontSizeList" :id="`setting_basic_font_size_${item.id}`" :key="item.id"
|
||||
name="setting_basic_font_size" need :model-value="appSetting['common.fontSize']" :value="item.id"
|
||||
@@ -107,16 +107,16 @@ user-api-modal(v-model="isShowUserApiModal")
|
||||
<script>
|
||||
import { computed, ref, watch, reactive, shallowReactive } from '@common/utils/vueTools'
|
||||
import { windowSizeList, userApi, isFullscreen, themeId } from '@renderer/store'
|
||||
import { langList, useI18n } from '@/lang'
|
||||
import { langList, useI18n } from '@root/lang'
|
||||
import { getSystemFonts } from '@renderer/utils/ipc'
|
||||
import apiSourceInfo from '@renderer/utils/musicSdk/api-source-info'
|
||||
import { useTimeout } from '@renderer/core/player/timeoutStop'
|
||||
import { dialog } from '@renderer/plugins/Dialog'
|
||||
|
||||
import ThemeSelectorModal from './ThemeSelectorModal'
|
||||
import ThemeEditModal from './ThemeEditModal'
|
||||
import PlayTimeoutModal from './PlayTimeoutModal'
|
||||
import UserApiModal from './UserApiModal'
|
||||
import ThemeSelectorModal from './ThemeSelectorModal.vue'
|
||||
import ThemeEditModal from './ThemeEditModal/index.vue'
|
||||
import PlayTimeoutModal from './PlayTimeoutModal.vue'
|
||||
import UserApiModal from './UserApiModal.vue'
|
||||
import { appSetting, updateSetting } from '@renderer/store/setting'
|
||||
import { getThemes, applyTheme, findTheme, buildBgUrl } from '@renderer/store/utils'
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ dd
|
||||
.gap-top
|
||||
base-checkbox(id="setting_desktop_lyric_zoom" :model-value="appSetting['desktopLyric.style.isZoomActiveLrc']" :label="$t('desktop_lyric__lrc_active_zoom_on')" @update:model-value="updateSetting({ 'desktopLyric.style.isZoomActiveLrc': $event })")
|
||||
//- .gap-top
|
||||
base-checkbox(id="setting_desktop_lyric_fontWeight" :modelValue="appSetting['desktopLyric.style.fontWeight']" @update:model-value="updateSetting({ 'desktopLyric.style.fontWeight': $event })" :label="$t('setting__desktop_lyric_font_weight')")
|
||||
base-checkbox(id="setting_desktop_lyric_fontWeight" :model-value="appSetting['desktopLyric.style.fontWeight']" @update:model-value="updateSetting({ 'desktopLyric.style.fontWeight': $event })" :label="$t('setting__desktop_lyric_font_weight')")
|
||||
|
||||
dd
|
||||
h3#setting__desktop_lyric_font_weight {{ $t('setting__desktop_lyric_font_weight') }}
|
||||
@@ -60,7 +60,7 @@ dd
|
||||
div
|
||||
.p
|
||||
base-btn.btn(min @click="changeLineGap(-1)") {{ $t('setting__desktop_lyric_line_gap_dec') }}
|
||||
base-btn.btn(min @click="changeLineGap(1)") {{$t('setting__desktop_lyric_line_gap_add')}}
|
||||
base-btn.btn(min @click="changeLineGap(1)") {{ $t('setting__desktop_lyric_line_gap_add') }}
|
||||
dd
|
||||
h3#desktop_lyric_color {{ $t('setting__desktop_lyric_color') }}
|
||||
div
|
||||
@@ -76,7 +76,7 @@ dd
|
||||
div(ref="lyric_shadow_color_ref" :class="$style.color")
|
||||
div(:class="$style.label") {{ $t('setting__desktop_lyric_shadow_color') }}
|
||||
.p.gap-top
|
||||
base-btn.btn(min @click="resetColor") {{$t('setting__desktop_lyric_color_reset')}}
|
||||
base-btn.btn(min @click="resetColor") {{ $t('setting__desktop_lyric_color_reset') }}
|
||||
dd
|
||||
h3#desktop_lyric_font {{ $t('setting__desktop_lyric_font') }}
|
||||
div
|
||||
@@ -86,7 +86,7 @@ dd
|
||||
h3#desktop_lyric_reset {{ $t('setting__desktop_lyric_reset') }}
|
||||
div
|
||||
.p.gap-top
|
||||
base-btn.btn(min @click="resetWindowSetting") {{$t('setting__desktop_lyric_reset_window')}}
|
||||
base-btn.btn(min @click="resetWindowSetting") {{ $t('setting__desktop_lyric_reset_window') }}
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ dd(:aria-label="$t('setting__download_path_title')")
|
||||
| {{ $t('setting__download_path_label') }}
|
||||
span.auto-hidden.hover(:class="$style.savePath" :aria-label="$t('setting__download_path_open_label')" @click="openDirInExplorer(appSetting['download.savePath'])") {{ appSetting['download.savePath'] }}
|
||||
.p
|
||||
base-btn.btn(min @click="handleChangeSavePath") {{$t('setting__download_path_change_btn')}}
|
||||
base-btn.btn(min @click="handleChangeSavePath") {{ $t('setting__download_path_change_btn') }}
|
||||
dd
|
||||
h3#download_use_other_source
|
||||
| {{ $t('setting__download_use_other_source') }}
|
||||
@@ -105,7 +105,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" module>
|
||||
.save-path {
|
||||
font-size: 12px;
|
||||
}
|
||||
// .savePath {
|
||||
// font-size: 12px;
|
||||
// }
|
||||
</style>
|
||||
|
||||
@@ -15,7 +15,7 @@ dd
|
||||
| {{ $t('setting__other_resource_cache_label') }}
|
||||
span.auto-hidden {{ cacheSize }}
|
||||
.p
|
||||
base-btn.btn(min :disabled="isDisabledResourceCacheClear" @click="clearResourceCache") {{$t('setting__other_resource_cache_clear_btn')}}
|
||||
base-btn.btn(min :disabled="isDisabledResourceCacheClear" @click="clearResourceCache") {{ $t('setting__other_resource_cache_clear_btn') }}
|
||||
|
||||
dd
|
||||
h3#other_other_source {{ $t('setting__other_other_cache') }}
|
||||
@@ -32,7 +32,7 @@ dd
|
||||
.p
|
||||
base-btn.btn(min :disabled="isDisabledOtherSourceCacheClear" @click="handleClearOtherSourceCache") {{ $t('setting__other_other_source_clear_btn') }}
|
||||
base-btn.btn(min :disabled="isDisabledMusicUrlCacheClear" @click="handleClearMusicUrlCache") {{ $t('setting__other_music_url_clear_btn') }}
|
||||
base-btn.btn(min :disabled="isDisabledLyricRawCacheClear" @click="handleClearLyricRawCache") {{$t('setting__other_lyric_raw_clear_btn')}}
|
||||
base-btn.btn(min :disabled="isDisabledLyricRawCacheClear" @click="handleClearLyricRawCache") {{ $t('setting__other_lyric_raw_clear_btn') }}
|
||||
|
||||
dd
|
||||
h3#other_lyric_edited {{ $t('setting__other_lyric_edited_cache') }}
|
||||
@@ -41,13 +41,13 @@ dd
|
||||
| {{ $t('setting__other_lyric_edited_label') }}
|
||||
span.auto-hidden {{ lyricEditedCount }}
|
||||
.p
|
||||
base-btn.btn(min :disabled="isDisabledLyricEditedCacheClear" @click="handleClearLyricEditedCache") {{$t('setting__other_lyric_edited_clear_btn')}}
|
||||
base-btn.btn(min :disabled="isDisabledLyricEditedCacheClear" @click="handleClearLyricEditedCache") {{ $t('setting__other_lyric_edited_clear_btn') }}
|
||||
|
||||
dd
|
||||
h3#other_lyric_edited {{ $t('setting__other_listdata') }}
|
||||
div
|
||||
.p
|
||||
base-btn.btn(min @click="handleClearListData") {{$t('setting__other_listdata_clear_btn')}}
|
||||
base-btn.btn(min @click="handleClearListData") {{ $t('setting__other_listdata_clear_btn') }}
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
@@ -120,10 +120,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" module>
|
||||
.save-path {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.portInput[disabled], .hostInput[disabled] {
|
||||
opacity: .8 !important;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ dd
|
||||
.p(v-else-if="versionInfo.status != 'downloading'")
|
||||
span {{ $t('setting__update_new_version') }}
|
||||
.p
|
||||
base-btn.btn.gap-left(min @click="showUpdateModal") {{$t('setting__update_open_version_modal_btn')}}
|
||||
.p.small(v-else-if="versionInfo.status =='checking'") {{$t('setting__update_checking')}}
|
||||
base-btn.btn.gap-left(min @click="showUpdateModal") {{ $t('setting__update_open_version_modal_btn') }}
|
||||
.p.small(v-else-if="versionInfo.status =='checking'") {{ $t('setting__update_checking') }}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -157,7 +157,7 @@ export default {
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
emits: ['update:model-value', 'submit'],
|
||||
emits: ['update:modelValue', 'submit'],
|
||||
setup(props, { emit }) {
|
||||
const themeName = ref('')
|
||||
const isDark = ref(false)
|
||||
@@ -417,7 +417,7 @@ export default {
|
||||
}
|
||||
const handleCancel = () => {
|
||||
handlePreview(false)
|
||||
emit('update:model-value', false)
|
||||
emit('update:modelValue', false)
|
||||
}
|
||||
// 保存
|
||||
const handleSubmit = async() => {
|
||||
@@ -440,7 +440,7 @@ export default {
|
||||
handlePreview(false)
|
||||
await saveTheme(theme)
|
||||
emit('submit')
|
||||
emit('update:model-value', false)
|
||||
emit('update:modelValue', false)
|
||||
}
|
||||
// 删除
|
||||
const handleRemove = async() => {
|
||||
@@ -475,7 +475,7 @@ export default {
|
||||
if (index > -1) themeInfo.userThemes.splice(index, 1)
|
||||
handlePreview(false)
|
||||
emit('submit')
|
||||
emit('update:model-value', false)
|
||||
emit('update:modelValue', false)
|
||||
}
|
||||
// 另存为
|
||||
const handleSaveNew = async() => {
|
||||
@@ -498,7 +498,7 @@ export default {
|
||||
handlePreview(false)
|
||||
await saveTheme(theme)
|
||||
emit('submit')
|
||||
emit('update:model-value', false)
|
||||
emit('update:modelValue', false)
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<material-modal :show="modelValue" bg-close="bg-close" teleport="#view" @close="$emit('update:model-value', false)">
|
||||
<material-modal :show="modelValue" bg-close="bg-close" teleport="#view" @close="$emit('update:modelValue', false)">
|
||||
<main :class="$style.main">
|
||||
<h2>{{ $t('theme_selector_modal__title') }}</h2>
|
||||
<div class="scroll" :class="$style.content">
|
||||
@@ -50,7 +50,7 @@ export default {
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['update:model-value'],
|
||||
emits: ['update:modelValue'],
|
||||
setup(props) {
|
||||
const themeInfo = reactive({
|
||||
themeLights: [],
|
||||
|
||||
@@ -21,7 +21,7 @@ material-modal(:show="modelValue" bg-close teleport="#view" @close="handleClose"
|
||||
p {{ $t('user_api__note') }}
|
||||
div(:class="$style.footer")
|
||||
base-btn(:class="$style.footerBtn" @click="handleImport") {{ $t('user_api__btn_import') }}
|
||||
//- base-btn(:class="$style.footerBtn" @click="handleExport") {{$t('user_api__btn_export')}}
|
||||
//- base-btn(:class="$style.footerBtn" @click="handleExport") {{ $t('user_api__btn_export') }}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['update:model-value'],
|
||||
emits: ['update:modelValue'],
|
||||
setup() {
|
||||
return {
|
||||
userApi,
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
userApi.list = await removeUserApi([api.id])
|
||||
},
|
||||
handleClose() {
|
||||
this.$emit('update:model-value', false)
|
||||
this.$emit('update:modelValue', false)
|
||||
},
|
||||
handleOpenUrl(url) {
|
||||
openUrl(url)
|
||||
|
||||
@@ -52,21 +52,21 @@ import { ref, computed, nextTick } from '@common/utils/vueTools'
|
||||
import { useI18n } from '@renderer/plugins/i18n'
|
||||
import { useRoute } from '@common/utils/vueRouter'
|
||||
|
||||
import SettingBasic from './components/SettingBasic'
|
||||
import SettingPlay from './components/SettingPlay'
|
||||
import SettingPlayDetail from './components/SettingPlayDetail'
|
||||
import SettingDesktopLyric from './components/SettingDesktopLyric'
|
||||
import SettingSearch from './components/SettingSearch'
|
||||
import SettingList from './components/SettingList'
|
||||
import SettingDownload from './components/SettingDownload'
|
||||
import SettingSync from './components/SettingSync'
|
||||
import SettingHotKey from './components/SettingHotKey'
|
||||
import SettingNetwork from './components/SettingNetwork'
|
||||
import SettingOdc from './components/SettingOdc'
|
||||
import SettingBackup from './components/SettingBackup'
|
||||
import SettingOther from './components/SettingOther'
|
||||
import SettingUpdate from './components/SettingUpdate'
|
||||
import SettingAbout from './components/SettingAbout'
|
||||
import SettingBasic from './components/SettingBasic.vue'
|
||||
import SettingPlay from './components/SettingPlay.vue'
|
||||
import SettingPlayDetail from './components/SettingPlayDetail.vue'
|
||||
import SettingDesktopLyric from './components/SettingDesktopLyric.vue'
|
||||
import SettingSearch from './components/SettingSearch.vue'
|
||||
import SettingList from './components/SettingList.vue'
|
||||
import SettingDownload from './components/SettingDownload.vue'
|
||||
import SettingSync from './components/SettingSync.vue'
|
||||
import SettingHotKey from './components/SettingHotKey.vue'
|
||||
import SettingNetwork from './components/SettingNetwork.vue'
|
||||
import SettingOdc from './components/SettingOdc.vue'
|
||||
import SettingBackup from './components/SettingBackup.vue'
|
||||
import SettingOther from './components/SettingOther.vue'
|
||||
import SettingUpdate from './components/SettingUpdate.vue'
|
||||
import SettingAbout from './components/SettingAbout.vue'
|
||||
|
||||
export default {
|
||||
name: 'Setting',
|
||||
|
||||
@@ -172,13 +172,13 @@ export default {
|
||||
flex-flow: column nowrap;
|
||||
}
|
||||
|
||||
.song-list-header {
|
||||
.songListHeader {
|
||||
flex: none;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
height: 80px;
|
||||
}
|
||||
.song-list-header-left {
|
||||
.songListHeaderLeft {
|
||||
flex: none;
|
||||
margin-left: 15px;
|
||||
height: 100%;
|
||||
@@ -191,7 +191,7 @@ export default {
|
||||
opacity: .9;
|
||||
box-shadow: 0 0 2px 0 rgba(0,0,0,.2);
|
||||
}
|
||||
.play-num {
|
||||
.playNum {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
@@ -204,7 +204,7 @@ export default {
|
||||
.mixin-ellipsis-1;
|
||||
}
|
||||
|
||||
.song-list-header-middle {
|
||||
.songListHeaderMiddle {
|
||||
flex: auto;
|
||||
padding: 2px 7px;
|
||||
h3 {
|
||||
@@ -220,13 +220,13 @@ export default {
|
||||
color: var(--color-font-label);
|
||||
}
|
||||
}
|
||||
.song-list-header-right {
|
||||
.songListHeaderRight {
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 15px;
|
||||
|
||||
.header-right-btn {
|
||||
.headerRightBtn {
|
||||
border-radius: 0;
|
||||
&:first-child {
|
||||
border-top-left-radius: 4px;
|
||||
|
||||
@@ -49,7 +49,7 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:model-value'])
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
@@ -54,7 +54,7 @@ watch(() => props.source, async(source) => {
|
||||
<style lang="less" module>
|
||||
@import '@renderer/assets/styles/layout.less';
|
||||
|
||||
.tag-list {
|
||||
.tagList {
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ onBeforeUnmount(() => {
|
||||
<style lang="less" module>
|
||||
@import '@renderer/assets/styles/layout.less';
|
||||
|
||||
.tag-list {
|
||||
.tagList {
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
|
||||
|
||||
@@ -3,11 +3,9 @@ import * as Comlink from 'comlink'
|
||||
export type MainTypes = Comlink.Remote<LX.WorkerMainTypes>
|
||||
|
||||
export const createMainWorker = () => {
|
||||
const worker: Worker = new Worker(new URL(
|
||||
/* webpackChunkName: 'renderer.main.worker' */
|
||||
'../main',
|
||||
import.meta.url,
|
||||
))
|
||||
const worker: Worker = new Worker(new URL('../main', import.meta.url), {
|
||||
type: 'module',
|
||||
})
|
||||
return Comlink.wrap<LX.WorkerMainTypes>(worker)
|
||||
}
|
||||
|
||||
@@ -22,11 +20,14 @@ export const createMainWorker = () => {
|
||||
|
||||
export type DownloadTypes = Comlink.Remote<LX.WorkerDownloadTypes>
|
||||
export const createDownloadWorker = () => {
|
||||
const worker: Worker = new Worker(new URL(
|
||||
/* webpackChunkName: 'renderer.download.worker' */
|
||||
'../download',
|
||||
import.meta.url,
|
||||
))
|
||||
const worker: Worker = new Worker(new URL('../download', import.meta.url), {
|
||||
type: 'module',
|
||||
})
|
||||
// const worker: Worker = new Worker(new URL(
|
||||
// /* webpackChunkName: 'renderer.download.worker' */
|
||||
// '../download',
|
||||
// import.meta.url,
|
||||
// ))
|
||||
return Comlink.wrap<LX.WorkerDownloadTypes>(worker)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user