mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Update docs
This commit is contained in:
parent
e2e6a88f4c
commit
fcaba15eda
@ -31,7 +31,7 @@ export const component: ComponentMetadata = {
|
||||
name: 'doubleClickControl',
|
||||
displayName: '启用双击控制',
|
||||
description: {
|
||||
'zh-CN': '将视频播放器的操作方式更改为: 单击显示 / 隐藏控制栏, 双击播放 / 暂停.',
|
||||
'zh-CN': '将视频播放器的操作方式更改为: 单击显示 / 隐藏控制栏, 双击播放 / 暂停. 请注意不能和 `双击全屏` 一同使用.',
|
||||
},
|
||||
tags: [
|
||||
componentsTags.touch,
|
||||
|
||||
@ -4,7 +4,7 @@ import { hasVideo } from '@/core/spin-query'
|
||||
export const component: ComponentMetadata = {
|
||||
name: 'downloadVideo',
|
||||
displayName: '下载视频',
|
||||
description: '在功能面板中添加下载视频支持.',
|
||||
description: '在功能面板中添加下载视频支持. 请注意不能下载超出账号权限的视频, 例如非大会员下载大会员清晰度视频, 或者大陆地区网络下载港澳台地区番剧, 都是不可以的.',
|
||||
entry: none,
|
||||
reload: none,
|
||||
unload: none,
|
||||
|
||||
@ -27,6 +27,7 @@ const entry: ComponentEntry = async ({ settings: { options } }) => {
|
||||
export const component: ComponentMetadata = {
|
||||
name: 'doubleClickFullscreen',
|
||||
displayName: '双击全屏',
|
||||
description: '为视频播放器启用双击全屏功能, 请注意不能和 `启用双击控制` 一同使用.',
|
||||
entry,
|
||||
tags: [
|
||||
componentsTags.video,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { getDescriptionMarkdown } from '@/components/description'
|
||||
import { PluginMetadata } from '@/plugins/plugin'
|
||||
import { DocSource, DocSourceItem } from '.'
|
||||
import { getId } from '../../webpack/id'
|
||||
@ -27,10 +28,12 @@ export const getPluginsDoc: DocSource = async rootPath => {
|
||||
name,
|
||||
displayName,
|
||||
} = it.plugin
|
||||
const description = getDescriptionMarkdown(it.plugin)
|
||||
return {
|
||||
type: 'plugin',
|
||||
name,
|
||||
displayName,
|
||||
description,
|
||||
fullRelativePath,
|
||||
fullAbsolutePath,
|
||||
} as DocSourceItem
|
||||
|
||||
@ -5,9 +5,15 @@ import { installPlugin, PluginMetadata } from '@/plugins/plugin'
|
||||
import { installStyle, UserStyle } from '@/plugins/style'
|
||||
|
||||
type FeatureType = ComponentMetadata | PluginMetadata | UserStyle
|
||||
const isComponent = (item: FeatureType): item is ComponentMetadata => 'entry' in item
|
||||
const isPlugin = (item: FeatureType): item is PluginMetadata => 'setup' in item
|
||||
const isStyle = (item: FeatureType): item is UserStyle => 'style' in item
|
||||
const isComponent = (item: FeatureType): item is ComponentMetadata => (
|
||||
Boolean((item as ComponentMetadata)?.entry)
|
||||
)
|
||||
const isPlugin = (item: FeatureType): item is PluginMetadata => (
|
||||
Boolean((item as PluginMetadata)?.setup)
|
||||
)
|
||||
const isStyle = (item: FeatureType): item is UserStyle => (
|
||||
Boolean((item as UserStyle)?.style)
|
||||
)
|
||||
|
||||
/** 如果输入的功能链接是 .zip, 则尝试解压. 仅支持单个功能, 不能批量, 只是为了能方便在 GitHub 直接以 .zip 格式分享功能. */
|
||||
export const tryParseZip = async (url: string) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user