feat(sidepanel): 添加时间戳转换功能并优化默认状态
新增时间戳与日期时间相互转换的功能,包括输入框、选择器和转换按钮。 同时将侧边栏默认状态设为关闭,并完善相关样式和逻辑。 此外,增强复制功能的上下文检查以提升稳定性。
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
<!-- 页面内容容器 -->
|
||||
<div class="content">
|
||||
|
||||
<!-- 时间戳工具页面 -->
|
||||
<div id="page-timestamp" class="page active">
|
||||
<h2>时间戳工具</h2>
|
||||
@@ -32,6 +33,35 @@
|
||||
<button id="start-timestamp-btn" style="display: none">开始</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- 时间戳转日期时间 -->
|
||||
<div>
|
||||
<h2>时间戳转日期时间</h2>
|
||||
<div>
|
||||
<input type="text" id="input-timestamp" placeholder="请输入时间戳" class="input-text" />
|
||||
<select class="select-box">
|
||||
<option value="milliseconds">毫秒(ms)</option>
|
||||
<option value="seconds">秒(s)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<button id="convert-timestamp-btn" class="convert-button">转换</button>
|
||||
</div>
|
||||
<div>
|
||||
<input type="text" id="timestamp-input-result" placeholder="转换结果" class="input-text"></input>
|
||||
<select class="select-box">
|
||||
<option>Asia/Shanghai</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 日期时间转时间戳 -->
|
||||
<div>
|
||||
<h2>日期时间转时间戳</h2>
|
||||
|
||||
<button id="convert-datetime-btn">转换</button>
|
||||
<p id="converted-timestamp"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 其他工具页面 -->
|
||||
|
||||
Reference in New Issue
Block a user