mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
refactor: 移除调试日志和未使用的样式
移除控制栏按钮状态切换的调试日志输出 删除未使用的右键菜单和全屏模式相关样式
This commit is contained in:
parent
2617458df3
commit
bf43fa1407
@ -42,6 +42,7 @@ const toastDurationOption = {
|
||||
}
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
author: { name: 'weedy233', link: 'https://github.com/weedy233' },
|
||||
name: 'videoScaling',
|
||||
displayName: '视频缩放',
|
||||
description: desc,
|
||||
@ -174,11 +175,9 @@ export const component = defineComponentMetadata({
|
||||
icon: 'mdi-magnify',
|
||||
order: 100,
|
||||
action: async () => {
|
||||
console.log('视频缩放按钮被点击!')
|
||||
try {
|
||||
// 获取当前的缩放比例
|
||||
const currentScale = scaleState.get()
|
||||
console.log(`当前缩放比例: ${currentScale}`)
|
||||
|
||||
// 创建不包含"自定义"的预设比例数组
|
||||
const presetScales = SCALE_PRESETS.filter(preset => preset !== '自定义')
|
||||
@ -194,7 +193,6 @@ export const component = defineComponentMetadata({
|
||||
|
||||
// 如果找不到完全匹配的缩放比例,从当前最接近的比例开始
|
||||
if (currentIndex === -1) {
|
||||
console.log('未找到完全匹配的预设比例,从100%开始')
|
||||
currentIndex = presetScales.indexOf('100%')
|
||||
}
|
||||
|
||||
@ -203,10 +201,6 @@ export const component = defineComponentMetadata({
|
||||
const nextPreset = presetScales[nextIndex]
|
||||
const nextScale = SCALE_MAPPING[nextPreset]
|
||||
|
||||
console.log(
|
||||
`将缩放比例从 ${currentScale} (${presetScales[currentIndex]}) 调整为 ${nextScale} (${nextPreset})`,
|
||||
)
|
||||
|
||||
// 更新设置中的缩放预设
|
||||
settings.options.scalePreset = nextPreset
|
||||
|
||||
@ -218,10 +212,8 @@ export const component = defineComponentMetadata({
|
||||
},
|
||||
})
|
||||
controlBarButtonAdded = true
|
||||
console.log('视频缩放控制栏按钮已添加')
|
||||
} else if (!showButton && controlBarButtonAdded) {
|
||||
controlBarButtonAdded = false
|
||||
console.log('视频缩放控制栏按钮已移除')
|
||||
}
|
||||
} catch (error) {
|
||||
handleError('切换视频缩放控制栏按钮显示状态', error)
|
||||
|
||||
@ -16,22 +16,4 @@
|
||||
video[class^="bpx-player-video-element"],
|
||||
.bilibili-player-video .bpx-player-video-element {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
/* 控制栏按钮样式优化 */
|
||||
.bilibili-player-video-control-bottom-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 右键菜单样式补充 */
|
||||
.bilibili-player-context-menu-item {
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
/* 确保在全屏模式下缩放功能正常 */
|
||||
.bilibili-player-video:-webkit-full-screen video,
|
||||
.bilibili-player-video:fullscreen video {
|
||||
position: relative;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user