Skip to content

Commit

Permalink
feat(market): support client setting market.gravatar
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Jan 29, 2024
1 parent bc0d11f commit 8ad80b9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/market/client/components/market.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<market-list
v-model="words"
:data="data"
:gravatar="store.market.gravatar"
:gravatar="config.market.gravatar || store.market.gravatar"
@update:page="scrollToTop">
<template #header="{ hasFilter, all, packages }">
<market-search v-model="words"></market-search>
Expand Down
1 change: 0 additions & 1 deletion plugins/market/client/components/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export function analyzeVersions(name: string, getVersion: (name: string) => stri
const result: ResultType = !resolved
? item.peerDependenciesMeta?.[name]?.optional ? 'primary' : 'danger'
: satisfies(resolved, request, { includePrerelease: true }) ? 'success' : 'danger'
if (result === 'danger') console.log(name, request, resolved)
return { request, resolved, result } as PeerInfo
})
let result: 'success' | 'warning' | 'danger' = 'success'
Expand Down
2 changes: 2 additions & 0 deletions plugins/market/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ interface MarketConfig {
bulkMode?: boolean
removeConfig?: boolean
override?: Dict<string>
gravatar?: string
}

receive('market/patch', (data) => {
Expand Down Expand Up @@ -87,6 +88,7 @@ export default (ctx: Context) => {
Schema.const(false).description('从不'),
]).description('移除插件时是否移除其已经存在的配置。'),
override: Schema.dict(String).hidden(),
gravatar: Schema.string().description('Gravatar 头像地址。'),
}),
}),
})
Expand Down

0 comments on commit 8ad80b9

Please sign in to comment.