lint fix
parent
ba3b2f613a
commit
6075f413dc
|
@ -65,8 +65,8 @@
|
||||||
"build:renderer-scripts": "cross-env NODE_ENV=production webpack --config build-config/renderer-scripts/webpack.config.prod.js --progress",
|
"build:renderer-scripts": "cross-env NODE_ENV=production webpack --config build-config/renderer-scripts/webpack.config.prod.js --progress",
|
||||||
"build": "npm run clean:electron && npm run build:main && npm run build:renderer && npm run build:renderer-lyric && npm run build:renderer-scripts",
|
"build": "npm run clean:electron && npm run build:main && npm run build:renderer && npm run build:renderer-lyric && npm run build:renderer-scripts",
|
||||||
"lint": "eslint --ext .ts,.js,.vue -f node_modules/eslint-formatter-friendly src",
|
"lint": "eslint --ext .ts,.js,.vue -f node_modules/eslint-formatter-friendly src",
|
||||||
|
"lint:fix": "eslint --ext .ts,.js,.vue -f node_modules/eslint-formatter-friendly --fix src",
|
||||||
"postinstall": "electron-builder install-app-deps",
|
"postinstall": "electron-builder install-app-deps",
|
||||||
"lint:fix": "eslint --ext .js,.vue -f node_modules/eslint-formatter-friendly --fix src",
|
|
||||||
"dp": "cross-env ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTPS_PROXY=http://127.0.0.1:1081 npm run pack",
|
"dp": "cross-env ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTPS_PROXY=http://127.0.0.1:1081 npm run pack",
|
||||||
"up": "cross-env ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTPS_PROXY=http://127.0.0.1:1081 npm i"
|
"up": "cross-env ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTPS_PROXY=http://127.0.0.1:1081 npm i"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {
|
import {
|
||||||
IAudioMetadata as iAudioMetadata,
|
type IAudioMetadata as iAudioMetadata,
|
||||||
} from 'music-metadata'
|
} from 'music-metadata'
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// }
|
// }
|
||||||
|
|
||||||
declare module '*.vue' {
|
declare module '*.vue' {
|
||||||
import { Component } from 'vue'
|
import { type Component } from 'vue'
|
||||||
const component: Component
|
const component: Component
|
||||||
export default component
|
export default component
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ import path from 'path'
|
||||||
import { EventEmitter } from 'events'
|
import { EventEmitter } from 'events'
|
||||||
import { performance } from 'perf_hooks'
|
import { performance } from 'perf_hooks'
|
||||||
import { STATUS } from './util'
|
import { STATUS } from './util'
|
||||||
import http from 'http'
|
import type http from 'http'
|
||||||
import { request, Options as RequestOptions } from './request'
|
import { request, type Options as RequestOptions } from './request'
|
||||||
|
|
||||||
export interface Options {
|
export interface Options {
|
||||||
forceResume: boolean
|
forceResume: boolean
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Downloader, { Options as DownloaderOptions } from './Downloader'
|
import Downloader, { type Options as DownloaderOptions } from './Downloader'
|
||||||
import { getRequestAgent } from './util'
|
import { getRequestAgent } from './util'
|
||||||
import { sizeFormate } from '@common/utils'
|
import { sizeFormate } from '@common/utils'
|
||||||
import http from 'http'
|
import type http from 'http'
|
||||||
|
|
||||||
// these are the default options
|
// these are the default options
|
||||||
// const options = {
|
// const options = {
|
||||||
|
|
|
@ -120,7 +120,7 @@ export const fixNewMusicInfoQuality = (musicInfo: LX.Music.MusicInfo) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const filterMusicList = <T extends LX.Music.MusicInfo>(list: T[]): T[] => {
|
export const filterMusicList = <T extends LX.Music.MusicInfo>(list: T[]): T[] => {
|
||||||
const ids: Set<string> = new Set()
|
const ids = new Set<string>()
|
||||||
return list.filter(s => {
|
return list.filter(s => {
|
||||||
if (!s.id || ids.has(s.id) || !s.name) return false
|
if (!s.id || ids.has(s.id) || !s.name) return false
|
||||||
if (s.singer == null) s.singer = ''
|
if (s.singer == null) s.singer = ''
|
||||||
|
|
|
@ -14,9 +14,9 @@ import {
|
||||||
shallowRef,
|
shallowRef,
|
||||||
unref,
|
unref,
|
||||||
markRaw,
|
markRaw,
|
||||||
ComputedRef,
|
type ComputedRef,
|
||||||
Ref,
|
type Ref,
|
||||||
ShallowRef,
|
type ShallowRef,
|
||||||
defineProps,
|
defineProps,
|
||||||
defineEmits,
|
defineEmits,
|
||||||
defineComponent,
|
defineComponent,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { App, ref } from 'vue'
|
import { type App, ref } from 'vue'
|
||||||
import { messages } from './index'
|
import { messages } from './index'
|
||||||
import type { Messages, Message } from './index'
|
import type { Messages, Message } from './index'
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Event as App, Type as AppType } from './AppEvent'
|
import { Event as App, type Type as AppType } from './AppEvent'
|
||||||
import { Event as List, Type as ListType } from './ListEvent'
|
import { Event as List, type Type as ListType } from './ListEvent'
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
AppType,
|
AppType,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// import { throttle } from '@common/utils/common'
|
// import { throttle } from '@common/utils/common'
|
||||||
import { Server } from 'socket.io'
|
import { type Server } from 'socket.io'
|
||||||
// import { sendSyncActionList } from '@main/modules/winMain'
|
// import { sendSyncActionList } from '@main/modules/winMain'
|
||||||
import { encryptMsg, decryptMsg } from '../server/utils'
|
import { encryptMsg, decryptMsg } from '../server/utils'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import http from 'http'
|
import type http from 'http'
|
||||||
import { SYNC_CODE } from './config'
|
import { SYNC_CODE } from './config'
|
||||||
import {
|
import {
|
||||||
aesEncrypt,
|
aesEncrypt,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import http from 'http'
|
import http from 'http'
|
||||||
import { Server, Socket } from 'socket.io'
|
import { Server, type Socket } from 'socket.io'
|
||||||
import { createHttpTerminator, HttpTerminator } from 'http-terminator'
|
import { createHttpTerminator, type HttpTerminator } from 'http-terminator'
|
||||||
import * as modules from '../modules'
|
import * as modules from '../modules'
|
||||||
import { authCode, authConnect } from './auth'
|
import { authCode, authConnect } from './auth'
|
||||||
import { getAddress, getServerId, generateCode as handleGenerateCode, getClientKeyInfo, setClientKeyInfo } from './utils'
|
import { getAddress, getServerId, generateCode as handleGenerateCode, getClientKeyInfo, setClientKeyInfo } from './utils'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { promises as fsPromises } from 'fs'
|
import { promises as fsPromises } from 'fs'
|
||||||
import { encryptMsg, decryptMsg, getSnapshotFilePath } from './utils'
|
import { encryptMsg, decryptMsg, getSnapshotFilePath } from './utils'
|
||||||
import { throttle } from '@common/utils'
|
import { throttle } from '@common/utils'
|
||||||
import { Server } from 'socket.io'
|
import { type Server } from 'socket.io'
|
||||||
import { sendCloseSelectMode, sendSelectMode } from '@main/modules/winMain'
|
import { sendCloseSelectMode, sendSelectMode } from '@main/modules/winMain'
|
||||||
import { LIST_IDS } from '@common/constants'
|
import { LIST_IDS } from '@common/constants'
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ const setRemotelList = async(socket: LX.Sync.Socket, listData: LX.Sync.ListData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const writeFilePromises: Map<string, Promise<void>> = new Map()
|
const writeFilePromises = new Map<string, Promise<void>>()
|
||||||
const updateSnapshot = async(path: string, data: string) => {
|
const updateSnapshot = async(path: string, data: string) => {
|
||||||
console.log('updateSnapshot', path)
|
console.log('updateSnapshot', path)
|
||||||
let writeFilePromise = writeFilePromises.get(path) ?? Promise.resolve()
|
let writeFilePromise = writeFilePromises.get(path) ?? Promise.resolve()
|
||||||
|
@ -136,7 +136,7 @@ const handleMergeList = (
|
||||||
newList = [...sourceList, ...targetList]
|
newList = [...sourceList, ...targetList]
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
const map: Map<string | number, LX.Music.MusicInfo> = new Map()
|
const map = new Map<string | number, LX.Music.MusicInfo>()
|
||||||
const ids: Array<string | number> = []
|
const ids: Array<string | number> = []
|
||||||
switch (addMusicLocationType) {
|
switch (addMusicLocationType) {
|
||||||
case 'top':
|
case 'top':
|
||||||
|
@ -313,9 +313,9 @@ const mergeListDataFromSnapshot = (
|
||||||
snapshotList: LX.Music.MusicInfo[],
|
snapshotList: LX.Music.MusicInfo[],
|
||||||
addMusicLocationType: LX.AddMusicLocationType,
|
addMusicLocationType: LX.AddMusicLocationType,
|
||||||
): LX.Music.MusicInfo[] => {
|
): LX.Music.MusicInfo[] => {
|
||||||
const removedListIds: Set<string | number> = new Set()
|
const removedListIds = new Set<string | number>()
|
||||||
const sourceListItemIds: Set<string | number> = new Set()
|
const sourceListItemIds = new Set<string | number>()
|
||||||
const targetListItemIds: Set<string | number> = new Set()
|
const targetListItemIds = new Set<string | number>()
|
||||||
for (const m of sourceList) sourceListItemIds.add(m.id)
|
for (const m of sourceList) sourceListItemIds.add(m.id)
|
||||||
for (const m of targetList) targetListItemIds.add(m.id)
|
for (const m of targetList) targetListItemIds.add(m.id)
|
||||||
if (snapshotList) {
|
if (snapshotList) {
|
||||||
|
@ -325,7 +325,7 @@ const mergeListDataFromSnapshot = (
|
||||||
}
|
}
|
||||||
|
|
||||||
let newList
|
let newList
|
||||||
const map: Map<string | number, LX.Music.MusicInfo> = new Map()
|
const map = new Map<string | number, LX.Music.MusicInfo>()
|
||||||
const ids = []
|
const ids = []
|
||||||
switch (addMusicLocationType) {
|
switch (addMusicLocationType) {
|
||||||
case 'top':
|
case 'top':
|
||||||
|
@ -362,9 +362,9 @@ const handleMergeListDataFromSnapshot = async(socket: LX.Sync.Socket, snapshot:
|
||||||
const localUserListData = createUserListDataObj(localListData)
|
const localUserListData = createUserListDataObj(localListData)
|
||||||
const remoteUserListData = createUserListDataObj(remoteListData)
|
const remoteUserListData = createUserListDataObj(remoteListData)
|
||||||
const snapshotUserListData = createUserListDataObj(snapshot)
|
const snapshotUserListData = createUserListDataObj(snapshot)
|
||||||
const removedListIds: Set<string | number> = new Set()
|
const removedListIds = new Set<string | number>()
|
||||||
const localUserListIds: Set<string | number> = new Set()
|
const localUserListIds = new Set<string | number>()
|
||||||
const remoteUserListIds: Set<string | number> = new Set()
|
const remoteUserListIds = new Set<string | number>()
|
||||||
|
|
||||||
for (const l of localListData.userList) localUserListIds.add(l.id)
|
for (const l of localListData.userList) localUserListIds.add(l.id)
|
||||||
for (const l of remoteListData.userList) remoteUserListIds.add(l.id)
|
for (const l of remoteListData.userList) remoteUserListIds.add(l.id)
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { sendShowUpdateAlert, sendStatusChange } from '@main/modules/winMain'
|
||||||
let userApi: LX.UserApi.UserApiInfo
|
let userApi: LX.UserApi.UserApiInfo
|
||||||
let apiStatus: LX.UserApi.UserApiStatus = { status: true }
|
let apiStatus: LX.UserApi.UserApiStatus = { status: true }
|
||||||
const requestQueue = new Map()
|
const requestQueue = new Map()
|
||||||
const timeouts: Map<string, NodeJS.Timeout> = new Map()
|
const timeouts = new Map<string, NodeJS.Timeout>()
|
||||||
interface InitParams {
|
interface InitParams {
|
||||||
params: {
|
params: {
|
||||||
status: boolean
|
status: boolean
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// import fs from 'fs'
|
// import fs from 'fs'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import { WindowSize, windowSizeList } from '@common/config'
|
import { type WindowSize, windowSizeList } from '@common/config'
|
||||||
import { nativeImage } from 'electron'
|
import { nativeImage } from 'electron'
|
||||||
|
|
||||||
export const getWindowSizeInfo = (windowSizeId: number | string): WindowSize => {
|
export const getWindowSizeInfo = (windowSizeId: number | string): WindowSize => {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/* eslint-disable no-var */
|
/* eslint-disable no-var */
|
||||||
// import { Event as WinMainEvent } from '@main/modules/winMain/event'
|
// import { Event as WinMainEvent } from '@main/modules/winMain/event'
|
||||||
// import { Event as WinLyricEvent } from '@main/modules/winLyric/event'
|
// import { Event as WinLyricEvent } from '@main/modules/winLyric/event'
|
||||||
import { AppType, ListType } from '@main/event'
|
import { type AppType, type ListType } from '@main/event'
|
||||||
import { DBSeriveTypes } from '@main/worker/utils'
|
import { type DBSeriveTypes } from '@main/worker/utils'
|
||||||
|
|
||||||
interface Lx {
|
interface Lx {
|
||||||
appSetting: LX.AppSetting
|
appSetting: LX.AppSetting
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { workerDBSeriveTypes } from '@main/worker/dbService'
|
import { type workerDBSeriveTypes } from '@main/worker/dbService'
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
// interface WorkerDBSeriveTypes {
|
// interface WorkerDBSeriveTypes {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import Database from 'better-sqlite3'
|
import type Database from 'better-sqlite3'
|
||||||
|
|
||||||
const migrateV1 = (db: Database.Database) => {
|
const migrateV1 = (db: Database.Database) => {
|
||||||
const sql = `
|
const sql = `
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { I18n } from '@lyric/plugins/i18n'
|
import { type I18n } from '@lyric/plugins/i18n'
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { defaultList } from '@renderer/store/list/state'
|
||||||
import { getListMusics, addListMusics } from '@renderer/store/list/action'
|
import { getListMusics, addListMusics } from '@renderer/store/list/action'
|
||||||
import { addTempPlayList } from '@renderer/store/player/action'
|
import { addTempPlayList } from '@renderer/store/player/action'
|
||||||
import { appSetting } from '@renderer/store/setting'
|
import { appSetting } from '@renderer/store/setting'
|
||||||
import { Ref } from '@common/utils/vueTools'
|
import { type Ref } from '@common/utils/vueTools'
|
||||||
import { playList } from '@renderer/core/player'
|
import { playList } from '@renderer/core/player'
|
||||||
import { LIST_IDS } from '@common/constants'
|
import { LIST_IDS } from '@common/constants'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { ref, computed, ComputedRef } from '@common/utils/vueTools'
|
import { ref, computed, type ComputedRef } from '@common/utils/vueTools'
|
||||||
import { isPlay } from '@renderer/store/player/state'
|
import { isPlay } from '@renderer/store/player/state'
|
||||||
import { appSetting } from '@renderer/store/setting'
|
import { appSetting } from '@renderer/store/setting'
|
||||||
// import { interval, intervalCancel } from '@renderer/utils/ipc'
|
// import { interval, intervalCancel } from '@renderer/utils/ipc'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// import './axios'
|
// import './axios'
|
||||||
import { App } from 'vue'
|
import { type App } from 'vue'
|
||||||
import dialog from './Dialog'
|
import dialog from './Dialog'
|
||||||
import './Tips'
|
import './Tips'
|
||||||
import svgIcon from './SvgIcon'
|
import svgIcon from './SvgIcon'
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { ref, reactive, shallowRef, markRaw, computed, watch } from '@common/uti
|
||||||
import { windowSizeList as configWindowSizeList } from '@common/config'
|
import { windowSizeList as configWindowSizeList } from '@common/config'
|
||||||
import { appSetting } from './setting'
|
import { appSetting } from './setting'
|
||||||
import pkg from '../../../package.json'
|
import pkg from '../../../package.json'
|
||||||
import { ProgressInfo } from 'electron-updater'
|
import { type ProgressInfo } from 'electron-updater'
|
||||||
import music from '@renderer/utils/musicSdk'
|
import music from '@renderer/utils/musicSdk'
|
||||||
process.versions.app = pkg.version
|
process.versions.app = pkg.version
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { deduplicationList, toNewMusicInfo } from '@renderer/utils'
|
import { deduplicationList, toNewMusicInfo } from '@renderer/utils'
|
||||||
import musicSdk from '@renderer/utils/musicSdk'
|
import musicSdk from '@renderer/utils/musicSdk'
|
||||||
import { markRaw, markRawList } from '@common/utils/vueTools'
|
import { markRaw, markRawList } from '@common/utils/vueTools'
|
||||||
import { boards, Board, listDetailInfo, ListDetailInfo } from './state'
|
import { boards, type Board, listDetailInfo, type ListDetailInfo } from './state'
|
||||||
|
|
||||||
const cache = new Map<string, any>()
|
const cache = new Map<string, any>()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// import { reactive, ref, shallowRef } from '@common/utils/vueTools'
|
// import { reactive, ref, shallowRef } from '@common/utils/vueTools'
|
||||||
import {
|
import {
|
||||||
PlayerMusicInfo,
|
type PlayerMusicInfo,
|
||||||
musicInfo,
|
musicInfo,
|
||||||
isPlay,
|
isPlay,
|
||||||
status,
|
status,
|
||||||
|
|
|
@ -3,7 +3,7 @@ import music from '@renderer/utils/musicSdk'
|
||||||
import { deduplicationList, toNewMusicInfo } from '@renderer/utils'
|
import { deduplicationList, toNewMusicInfo } from '@renderer/utils'
|
||||||
import { sortInsert, similar } from '@common/utils/common'
|
import { sortInsert, similar } from '@common/utils/common'
|
||||||
|
|
||||||
import { sources, maxPages, listInfos, ListInfo } from './state'
|
import { sources, maxPages, listInfos, type ListInfo } from './state'
|
||||||
|
|
||||||
interface SearchResult {
|
interface SearchResult {
|
||||||
list: LX.Music.MusicInfo[]
|
list: LX.Music.MusicInfo[]
|
||||||
|
|
|
@ -3,7 +3,7 @@ import music from '@renderer/utils/musicSdk'
|
||||||
|
|
||||||
// import { deduplicationList } from '@common/utils/renderer'
|
// import { deduplicationList } from '@common/utils/renderer'
|
||||||
|
|
||||||
import { ListInfo } from '@renderer/store/songList/state'
|
import { type ListInfo } from '@renderer/store/songList/state'
|
||||||
|
|
||||||
export type { ListInfoItem } from '@renderer/store/songList/state'
|
export type { ListInfoItem } from '@renderer/store/songList/state'
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,20 @@
|
||||||
import { deduplicationList, toNewMusicInfo } from '@renderer/utils'
|
import { deduplicationList, toNewMusicInfo } from '@renderer/utils'
|
||||||
import musicSdk from '@renderer/utils/musicSdk'
|
import musicSdk from '@renderer/utils/musicSdk'
|
||||||
import { markRaw, markRawList } from '@common/utils/vueTools'
|
import { markRaw, markRawList } from '@common/utils/vueTools'
|
||||||
import type { ListDetailInfo, ListInfoItem, ListInfo } from './state'
|
|
||||||
import {
|
import {
|
||||||
tags,
|
tags,
|
||||||
TagInfo,
|
|
||||||
listInfo,
|
listInfo,
|
||||||
listDetailInfo,
|
listDetailInfo,
|
||||||
selectListInfo,
|
selectListInfo,
|
||||||
isVisibleListDetail,
|
isVisibleListDetail,
|
||||||
openSongListInputInfo,
|
openSongListInputInfo,
|
||||||
} from './state'
|
} from './state'
|
||||||
|
import type {
|
||||||
|
ListDetailInfo,
|
||||||
|
ListInfoItem,
|
||||||
|
ListInfo,
|
||||||
|
TagInfo,
|
||||||
|
} from './state'
|
||||||
|
|
||||||
const cache = new Map<string, any>()
|
const cache = new Map<string, any>()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { AppEventTypes, KeyEventTypes } from '@renderer/event'
|
import { type AppEventTypes, type KeyEventTypes } from '@renderer/event'
|
||||||
import { MainTypes, DownloadTypes } from '@renderer/worker/utils'
|
import { type MainTypes, type DownloadTypes } from '@renderer/worker/utils'
|
||||||
import { I18n } from '@renderer/plugins/i18n'
|
import { type I18n } from '@renderer/plugins/i18n'
|
||||||
// interface LX.EnvParams {
|
// interface LX.EnvParams {
|
||||||
// deeplink?: string | null
|
// deeplink?: string | null
|
||||||
// cmdParams: LX.CmdParams
|
// cmdParams: LX.CmdParams
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { I18n } from '@/lang'
|
import { type I18n } from '@/lang'
|
||||||
|
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { workerMainTypes } from '@renderer/worker/main/index'
|
import { type workerMainTypes } from '@renderer/worker/main/index'
|
||||||
import { workerDownloadTypes } from '@renderer/worker/download/index'
|
import { type workerDownloadTypes } from '@renderer/worker/download/index'
|
||||||
|
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
saveViewPrevState as saveViewPrevStateFromData,
|
saveViewPrevState as saveViewPrevStateFromData,
|
||||||
} from '@renderer/utils/ipc'
|
} from '@renderer/utils/ipc'
|
||||||
import { throttle } from '@common/utils'
|
import { throttle } from '@common/utils'
|
||||||
import { DEFAULT_SETTING, LIST_IDS } from '@common/constants'
|
import { type DEFAULT_SETTING, LIST_IDS } from '@common/constants'
|
||||||
import { dateFormat } from './index'
|
import { dateFormat } from './index'
|
||||||
import { setUpdateTime } from '@renderer/store/list/action'
|
import { setUpdateTime } from '@renderer/store/list/action'
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ export const getFontSizeWithScreen = (screenWidth: number = window.innerWidth):
|
||||||
|
|
||||||
|
|
||||||
export const deduplicationList = <T extends LX.Music.MusicInfo>(list: T[]): T[] => {
|
export const deduplicationList = <T extends LX.Music.MusicInfo>(list: T[]): T[] => {
|
||||||
const ids: Set<string> = new Set()
|
const ids = new Set<string>()
|
||||||
return list.filter(s => {
|
return list.filter(s => {
|
||||||
if (ids.has(s.id)) return false
|
if (ids.has(s.id)) return false
|
||||||
ids.add(s.id)
|
ids.add(s.id)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { isMac } from '@common/utils'
|
import { isMac } from '@common/utils'
|
||||||
|
|
||||||
const downKeys: Set<string> = new Set()
|
const downKeys = new Set<string>()
|
||||||
|
|
||||||
export declare type KeyActionType = LX.KeyDownEevent['type']
|
export declare type KeyActionType = LX.KeyDownEevent['type']
|
||||||
export declare type Keys = LX.KeyDownEevent['keys']
|
export declare type Keys = LX.KeyDownEevent['keys']
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { onBeforeUnmount, ref, Ref, useCssModule } from '@common/utils/vueTools'
|
import { onBeforeUnmount, ref, type Ref, useCssModule } from '@common/utils/vueTools'
|
||||||
import { updateUserListPosition } from '@renderer/store/list/action'
|
import { updateUserListPosition } from '@renderer/store/list/action'
|
||||||
import { userLists } from '@renderer/store/list/state'
|
import { userLists } from '@renderer/store/list/state'
|
||||||
import useDarg from '@renderer/utils/compositions/useDrag'
|
import useDarg from '@renderer/utils/compositions/useDrag'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { ref, nextTick, useCssModule, Ref } from '@common/utils/vueTools'
|
import { ref, nextTick, useCssModule, type Ref } from '@common/utils/vueTools'
|
||||||
import { userLists } from '@renderer/store/list/state'
|
import { userLists } from '@renderer/store/list/state'
|
||||||
import { updateUserList, createUserList } from '@renderer/store/list/action'
|
import { updateUserList, createUserList } from '@renderer/store/list/action'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { onMounted, useCssModule, Ref } from '@common/utils/vueTools'
|
import { onMounted, useCssModule, type Ref } from '@common/utils/vueTools'
|
||||||
|
|
||||||
|
|
||||||
export default ({ dom_lists_list }: {
|
export default ({ dom_lists_list }: {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { getListMusics, addListMusics } from '@renderer/store/list/action'
|
||||||
import { addHistoryWord } from '@renderer/store/search/action'
|
import { addHistoryWord } from '@renderer/store/search/action'
|
||||||
// import { useI18n } from '@renderer/plugins/i18n'
|
// import { useI18n } from '@renderer/plugins/i18n'
|
||||||
// import { } from '@renderer/store/search/state'
|
// import { } from '@renderer/store/search/state'
|
||||||
import { search as searchMusic, listInfos, ListInfo } from '@renderer/store/search/music'
|
import { search as searchMusic, listInfos, type ListInfo } from '@renderer/store/search/music'
|
||||||
import { assertApiSupport } from '@renderer/store/utils'
|
import { assertApiSupport } from '@renderer/store/utils'
|
||||||
|
|
||||||
export declare type SearchSource = LX.OnlineSource | 'all'
|
export declare type SearchSource = LX.OnlineSource | 'all'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref } from '@common/utils/vueTools'
|
import { ref } from '@common/utils/vueTools'
|
||||||
import { pickrTools, PickrTools } from '@renderer/utils/pickrTools'
|
import { pickrTools, type PickrTools } from '@renderer/utils/pickrTools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const app_bg_color_ref = ref(null)
|
const app_bg_color_ref = ref(null)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref } from '@common/utils/vueTools'
|
import { ref } from '@common/utils/vueTools'
|
||||||
import { pickrTools, PickrTools } from '@renderer/utils/pickrTools'
|
import { pickrTools, type PickrTools } from '@renderer/utils/pickrTools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const aside_font_color_ref = ref(null)
|
const aside_font_color_ref = ref(null)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref } from '@common/utils/vueTools'
|
import { ref } from '@common/utils/vueTools'
|
||||||
import { pickrTools, PickrTools } from '@renderer/utils/pickrTools'
|
import { pickrTools, type PickrTools } from '@renderer/utils/pickrTools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const badge_primary_color_ref = ref(null)
|
const badge_primary_color_ref = ref(null)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref } from '@common/utils/vueTools'
|
import { ref } from '@common/utils/vueTools'
|
||||||
import { pickrTools, PickrTools } from '@renderer/utils/pickrTools'
|
import { pickrTools, type PickrTools } from '@renderer/utils/pickrTools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const badge_secondary_color_ref = ref(null)
|
const badge_secondary_color_ref = ref(null)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref } from '@common/utils/vueTools'
|
import { ref } from '@common/utils/vueTools'
|
||||||
import { pickrTools, PickrTools } from '@renderer/utils/pickrTools'
|
import { pickrTools, type PickrTools } from '@renderer/utils/pickrTools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const badge_tertiary_color_ref = ref(null)
|
const badge_tertiary_color_ref = ref(null)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref } from '@common/utils/vueTools'
|
import { ref } from '@common/utils/vueTools'
|
||||||
import { pickrTools, PickrTools } from '@renderer/utils/pickrTools'
|
import { pickrTools, type PickrTools } from '@renderer/utils/pickrTools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const close_btn_color_ref = ref(null)
|
const close_btn_color_ref = ref(null)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref } from '@common/utils/vueTools'
|
import { ref } from '@common/utils/vueTools'
|
||||||
import { pickrTools, PickrTools } from '@renderer/utils/pickrTools'
|
import { pickrTools, type PickrTools } from '@renderer/utils/pickrTools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const font_color_ref = ref(null)
|
const font_color_ref = ref(null)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref } from '@common/utils/vueTools'
|
import { ref } from '@common/utils/vueTools'
|
||||||
import { pickrTools, PickrTools } from '@renderer/utils/pickrTools'
|
import { pickrTools, type PickrTools } from '@renderer/utils/pickrTools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const hide_btn_color_ref = ref(null)
|
const hide_btn_color_ref = ref(null)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref } from '@common/utils/vueTools'
|
import { ref } from '@common/utils/vueTools'
|
||||||
import { pickrTools, PickrTools } from '@renderer/utils/pickrTools'
|
import { pickrTools, type PickrTools } from '@renderer/utils/pickrTools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const main_bg_color_ref = ref(null)
|
const main_bg_color_ref = ref(null)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref } from '@common/utils/vueTools'
|
import { ref } from '@common/utils/vueTools'
|
||||||
import { pickrTools, PickrTools } from '@renderer/utils/pickrTools'
|
import { pickrTools, type PickrTools } from '@renderer/utils/pickrTools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const primary_color_ref = ref(null)
|
const primary_color_ref = ref(null)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref } from '@common/utils/vueTools'
|
import { ref } from '@common/utils/vueTools'
|
||||||
import { pickrTools, PickrTools } from '@renderer/utils/pickrTools'
|
import { pickrTools, type PickrTools } from '@renderer/utils/pickrTools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const min_btn_color_ref = ref(null)
|
const min_btn_color_ref = ref(null)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createDownload, DownloaderType, Options as DownloadOptions } from '@common/utils/download'
|
import { createDownload, type DownloaderType, type Options as DownloadOptions } from '@common/utils/download'
|
||||||
// import music from '@renderer/utils/musicSdk'
|
// import music from '@renderer/utils/musicSdk'
|
||||||
import { createDownloadInfo } from './utils'
|
import { createDownloadInfo } from './utils'
|
||||||
// import {
|
// import {
|
||||||
|
|
Loading…
Reference in New Issue