feat(ui): add floating menu for video selection

Implement floating button that toggles a menu with video options
Add styling for floating elements and handle click interactions
Update video switching logic to prevent unintended transitions
This commit is contained in:
2025-07-16 23:22:53 +08:00
parent d51262ff03
commit 9563730a6f
3 changed files with 133 additions and 0 deletions
+72
View File
@@ -152,6 +152,78 @@ html, body {
text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}
/* --- 悬浮按钮和菜单 --- */
#floating-button {
position: fixed;
bottom: 120px; /* 调整位置,使其在麦克风按钮上方 */
right: 30px;
width: 60px;
height: 60px;
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
transition: transform 0.2s ease, box-shadow 0.2s ease;
z-index: 10;
}
#floating-button:hover {
transform: scale(1.1);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
#floating-button i {
font-size: 24px;
color: white;
}
#menu-container {
position: fixed;
bottom: 200px; /* 调整位置,使其在悬浮按钮上方 */
right: 30px;
width: 150px;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-radius: 10px;
padding: 10px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
z-index: 9;
transition: opacity 0.3s ease, transform 0.3s ease;
transform-origin: bottom right;
}
#menu-container.hidden {
opacity: 0;
transform: scale(0.95);
pointer-events: none;
}
.menu-item {
display: block;
width: 100%;
padding: 12px;
background: none;
border: none;
color: white;
font-size: 1rem;
text-align: left;
cursor: pointer;
border-radius: 5px;
transition: background-color 0.2s ease;
}
.menu-item:hover {
background-color: rgba(255, 255, 255, 0.1);
}
/* --- 底部内容 --- */
.bottom-bar {
width: 100%;