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