设置安全链接跳转时间小于等于0时关闭自动跳转

提升站点图标与站点名称的下边距
This commit is contained in:
j m 2025-03-13 22:27:00 +08:00
parent 5f4f9b45a3
commit f544a5c515
4 changed files with 23 additions and 19 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
node_modules/ node_modules/
dist/ dist/
package-lock.json package-lock.json
templates/assets/js/dshare.min.js.LICENSE.txt

View File

@ -1475,7 +1475,7 @@ spec:
value: 5 value: 5
validation: required validation: required
placeholder: '请输入安全链接页面自动跳转时间(秒)' placeholder: '请输入安全链接页面自动跳转时间(秒)'
help: '输入安全链接页面自动跳转时间(秒)默认5秒。' help: '输入安全链接页面自动跳转时间(秒)默认5秒小于等于0时关闭自动跳转。'
- $formkit: code - $formkit: code
name: security_link_jump_desc name: security_link_jump_desc
if: $get(enable_security_link).value if: $get(enable_security_link).value

View File

@ -203,7 +203,6 @@
border-radius: 50%; border-radius: 50%;
margin-bottom: 15px; margin-bottom: 15px;
display: block; display: block;
margin: 0 auto;
border: 3px solid rgba(255, 255, 255, 0.3); border: 3px solid rgba(255, 255, 255, 0.3);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease; transition: transform 0.3s ease;
@ -369,18 +368,22 @@
</div> </div>
<script> <script>
window.onload = function() { window.onload = function() {
document.querySelector('.progress').style.width = '100%'; let countdown = [[${theme.config.security_link_config.security_link_auto_jump_time}]]
let countdown = [[${theme.config.security_link_config.security_link_auto_jump_time}]]; if (countdown > 0) {
const countdownElement = document.getElementById('countdown'); document.querySelector('.progress').style.width = '100%'
const countdownElement = document.getElementById('countdown')
const timer = setInterval(function () { const timer = setInterval(function () {
countdown--; countdown--
countdownElement.textContent = countdown; countdownElement.textContent = countdown
if (countdown <= 0) { if (countdown <= 0) {
clearInterval(timer); clearInterval(timer)
window.location.href = '[[${url}]]'; window.location.href = '[[${url}]]'
}
}, 1000)
} else {
document.querySelector('.progress-bar').style.display = 'none';
document.querySelector('.countdown-text').style.display = 'none';
} }
}, 1000);
} }
</script> </script>
</body> </body>

View File

@ -30,7 +30,7 @@ spec:
settingName: theme-dream2-plus-setting settingName: theme-dream2-plus-setting
configMapName: theme-dream2-plus-configMap configMapName: theme-dream2-plus-configMap
# 版本号 # 版本号
version: 1.4.1 version: 1.4.2.beta1
# 最低支持的 Halo 版本 # 最低支持的 Halo 版本
require: ">=2.20.0" require: ">=2.20.0"
# 许可 # 许可