mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
35 lines
913 B
TypeScript
35 lines
913 B
TypeScript
import { ComponentMetadata } from '@/components/types'
|
|
import { matchUrlPattern } from '@/core/utils'
|
|
import { columnUrls, feedsUrls } from '@/core/utils/urls'
|
|
import { setupFeedImageExporter } from './feed'
|
|
|
|
export const component: ComponentMetadata = {
|
|
name: 'imageExporter',
|
|
displayName: '图片批量导出',
|
|
tags: [
|
|
componentsTags.feeds,
|
|
componentsTags.utils,
|
|
],
|
|
entry: async context => {
|
|
await setupFeedImageExporter(context)
|
|
},
|
|
widget: {
|
|
condition: () => columnUrls.some(url => matchUrlPattern(url)),
|
|
component: () => import('./Widget.vue').then(m => m.default),
|
|
},
|
|
urlInclude: [
|
|
...feedsUrls,
|
|
...columnUrls,
|
|
],
|
|
options: {
|
|
columnFormat: {
|
|
defaultValue: '[title][ - n]',
|
|
displayName: '专栏图片命名格式',
|
|
},
|
|
feedFormat: {
|
|
defaultValue: '[user][ - id][ - n]',
|
|
displayName: '动态图片命名格式',
|
|
},
|
|
},
|
|
}
|