mirror of https://github.com/YunYouJun/valaxy
fix(addon-meting): options.props, close #306
This commit is contained in:
parent
489cba4b1f
commit
7e750961d1
|
@ -117,6 +117,11 @@ export default defineValaxyConfig<ThemeConfig>({
|
|||
addonLightGallery(),
|
||||
addonMeting({
|
||||
global: true,
|
||||
props: {
|
||||
id: '2049540645',
|
||||
server: 'netease',
|
||||
type: 'song',
|
||||
},
|
||||
}),
|
||||
// addonTwikoo({
|
||||
// envId: 'https://twikoo.vercel.app',
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
"valaxy-theme-press": "link:../packages/valaxy-theme-press"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/simple-icons": "^1.1.84",
|
||||
"@iconify-json/simple-icons": "^1.1.85",
|
||||
"nodemon": "^3.0.2",
|
||||
"vite": "^5.0.10",
|
||||
"vitepress": "1.0.0-rc.32",
|
||||
"vue": "^3.3.12"
|
||||
"vue": "^3.3.13"
|
||||
}
|
||||
}
|
||||
|
|
10
package.json
10
package.json
|
@ -54,12 +54,12 @@
|
|||
"@antfu/eslint-config": "2.4.6",
|
||||
"@iconify-json/logos": "^1.1.41",
|
||||
"@iconify-json/vscode-icons": "^1.1.32",
|
||||
"@microsoft/api-extractor": "^7.38.5",
|
||||
"@microsoft/api-extractor": "^7.39.0",
|
||||
"@types/debug": "^4.1.12",
|
||||
"@types/markdown-it-attrs": "^4.1.3",
|
||||
"@types/markdown-it-container": "^2.0.9",
|
||||
"@types/markdown-it-emoji": "^2.0.4",
|
||||
"@types/node": "^20.10.4",
|
||||
"@types/node": "^20.10.5",
|
||||
"@types/prompts": "^2.4.9",
|
||||
"@types/resolve": "^1.20.6",
|
||||
"@types/semver": "^7.5.6",
|
||||
|
@ -76,7 +76,7 @@
|
|||
"stylelint-config-recommended-vue": "^1.5.0",
|
||||
"stylelint-config-standard-scss": "^12.0.0",
|
||||
"tsup": "^8.0.1",
|
||||
"tsx": "^4.6.2",
|
||||
"tsx": "^4.7.0",
|
||||
"typescript": "^5.3.3",
|
||||
"unbuild": "^2.0.0",
|
||||
"valaxy": "workspace:*",
|
||||
|
@ -88,8 +88,8 @@
|
|||
"valaxy-addon-waline": "workspace:*",
|
||||
"valaxy-theme-press": "workspace:*",
|
||||
"valaxy-theme-yun": "workspace:*",
|
||||
"vitest": "^1.0.4",
|
||||
"vue-tsc": "1.8.25",
|
||||
"vitest": "^1.1.0",
|
||||
"vue-tsc": "1.8.26",
|
||||
"zx": "^7.2.3"
|
||||
},
|
||||
"pnpm": {
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
|
||||
Global music player based on [APlayer](https://github.com/DIYgod/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS).
|
||||
|
||||
- [ ] Release
|
||||
- [ ] Components `MetingJS`
|
||||
- [ ] `addonMeting`
|
||||
|
||||
```ts
|
||||
import { defineConfig } from 'valaxy'
|
||||
import { addonMeting } from 'valaxy-addon-meting'
|
||||
|
@ -14,9 +10,12 @@ export default defineConfig({
|
|||
addons: [
|
||||
addonMeting({
|
||||
global: true,
|
||||
/** @see https://github.com/metowolf/MetingJS */
|
||||
props: {
|
||||
/** @see https://github.com/metowolf/MetingJS */
|
||||
}
|
||||
id: '2049540645',
|
||||
server: 'netease',
|
||||
type: 'song',
|
||||
},
|
||||
})
|
||||
]
|
||||
})
|
||||
|
|
|
@ -6,18 +6,18 @@ export interface MetingOptions {
|
|||
/**
|
||||
* @see https://github.com/metowolf/MetingJS#option
|
||||
*/
|
||||
options?: {
|
||||
props?: {
|
||||
id?: string
|
||||
server?: string
|
||||
type?: string
|
||||
auto?: string
|
||||
server?: 'netease' | 'tencent' | 'kugou' | 'xiami' | 'baidu'
|
||||
type?: 'song' | 'album' | 'artist' | 'playlist' | 'search'
|
||||
auto?: 'netease' | 'tencent' | 'xiami'
|
||||
fixed?: boolean
|
||||
mini?: boolean
|
||||
autoplay?: boolean
|
||||
theme?: string
|
||||
loop?: string
|
||||
loop?: 'all' | 'one' | 'none'
|
||||
order?: string
|
||||
preload?: string
|
||||
preload?: 'auto' | 'metadata' | 'none'
|
||||
volume?: number
|
||||
work?: string
|
||||
mutex?: boolean
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
"global": true,
|
||||
"version": "0.0.3",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"url": "https://github.com/YunYouJun/valaxy/tree/main/packages/valaxy-addon-meting",
|
||||
"type": "git"
|
||||
},
|
||||
"keywords": [
|
||||
"valaxy",
|
||||
"addon",
|
||||
|
|
|
@ -15,7 +15,7 @@ const isThisYear = computed(() => {
|
|||
return year === themeConfig.value.footer.since
|
||||
})
|
||||
|
||||
const poweredHtml = computed(() => t('footer.powered', [`<a href="${pkg.repository}" target="_blank" rel="noopener">Valaxy</a> v${pkg.version}`]))
|
||||
const poweredHtml = computed(() => t('footer.powered', [`<a href="${pkg.repository.url || pkg.repository}" target="_blank" rel="noopener">Valaxy</a> v${pkg.version}`]))
|
||||
const footerIcon = computed(() => themeConfig.value.footer.icon || {
|
||||
url: pkg.repository,
|
||||
name: 'i-ri-cloud-line',
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"dependencies": {
|
||||
"@explosions/fireworks": "^0.0.2",
|
||||
"@iconify-json/ant-design": "^1.1.13",
|
||||
"@iconify-json/simple-icons": "^1.1.84",
|
||||
"@iconify-json/simple-icons": "^1.1.85",
|
||||
"animejs": "^3.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -34,7 +34,7 @@ export async function parseAddons(addons: ValaxyAddons, userRoot = process.cwd()
|
|||
spinner.succeed()
|
||||
const resolvedAddons = Object.values(resolvers).filter(item => item.enable)
|
||||
resolvedAddons.forEach((addon, i) => {
|
||||
logger.log(` ${i === resolvedAddons.length - 1 ? '└─' : '├─'} ${yellow(addon.name)}${addon.global ? cyan(' (global)') : ''} ${dim(addon.pkg.homepage || addon.pkg.repository)}`)
|
||||
logger.log(` ${i === resolvedAddons.length - 1 ? '└─' : '├─'} ${yellow(addon.name)}${addon.global ? cyan(' (global)') : ''} ${dim(addon.pkg.homepage || addon.pkg.repository?.url || addon.pkg.repository)}`)
|
||||
})
|
||||
return resolvedAddons
|
||||
}
|
||||
|
|
|
@ -60,9 +60,9 @@
|
|||
"dependencies": {
|
||||
"@antfu/utils": "^0.7.7",
|
||||
"@ctrl/tinycolor": "^4.0.2",
|
||||
"@iconify-json/carbon": "^1.1.26",
|
||||
"@iconify-json/ri": "^1.1.17",
|
||||
"@intlify/unplugin-vue-i18n": "^1.6.0",
|
||||
"@iconify-json/carbon": "^1.1.27",
|
||||
"@iconify-json/ri": "^1.1.18",
|
||||
"@intlify/unplugin-vue-i18n": "^2.0.0",
|
||||
"@types/body-scroll-lock": "^3.1.2",
|
||||
"@unhead/addons": "^1.8.9",
|
||||
"@unhead/schema-org": "^1.8.9",
|
||||
|
@ -99,7 +99,7 @@
|
|||
"markdown-it-task-lists": "^2.1.1",
|
||||
"medium-zoom": "^1.1.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"open": "9.1.0",
|
||||
"open": "10.0.1",
|
||||
"ora": "^7.0.1",
|
||||
"pascalcase": "^2.0.0",
|
||||
"pinia": "^2.1.7",
|
||||
|
@ -116,7 +116,7 @@
|
|||
"vite-plugin-vue-layouts": "^0.10.0",
|
||||
"vite-ssg": "0.23.5",
|
||||
"vite-ssg-sitemap": "0.6.1",
|
||||
"vue": "^3.3.12",
|
||||
"vue": "^3.3.13",
|
||||
"vue-i18n": "^9.8.0",
|
||||
"vue-router": "^4.2.5",
|
||||
"yargs": "^17.7.2"
|
||||
|
|
557
pnpm-lock.yaml
557
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue