feat(sidepanel): 添加时间戳转换功能并优化默认状态

新增时间戳与日期时间相互转换的功能,包括输入框、选择器和转换按钮。
同时将侧边栏默认状态设为关闭,并完善相关样式和逻辑。
此外,增强复制功能的上下文检查以提升稳定性。
This commit is contained in:
雨霖铃
2025-11-12 22:31:00 +08:00
parent a42f1f2cce
commit 43ee47751b
4 changed files with 122 additions and 13 deletions
+3 -3
View File
@@ -26,7 +26,7 @@
zIndex: '2147483647',
boxShadow: '-4px 0 8px rgba(0,0,0,0.15)',
backgroundColor: 'white',
transform: 'translateX(0)',
transform: 'translateX(100%)', // 默认关闭状态
transition: 'transform 0.3s ease',
});
@@ -65,7 +65,7 @@
document.body.appendChild(toggleBtn);
// 折叠 / 展开逻辑
let visible = true;
let visible = false; // 默认关闭状态
toggleBtn.addEventListener('click', () => {
visible = !visible;
iframe.style.transform = visible ? 'translateX(0)' : 'translateX(100%)';
@@ -95,4 +95,4 @@
return true;
}
});
})();
})();