Merge pull request #16 from zsjy/dev

Dev
This commit is contained in:
mjking 2024-05-16 16:40:12 +08:00 committed by GitHub
commit 5d7ee6921d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 12 additions and 9 deletions

View File

@ -344,10 +344,9 @@ const commonContext = {
$elem.html(loveTime) $elem.html(loveTime)
return return
} }
const now = new Date()
const grt = new Date(loveTime) const grt = new Date(loveTime)
setInterval(function () { setInterval(function () {
now.setTime(now.getTime() + 1000) let now= Date.now()
let difference = parseInt((now - grt) / 1000) let difference = parseInt((now - grt) / 1000)
let seconds = difference % 60 let seconds = difference % 60
difference = parseInt(difference / 60) difference = parseInt(difference / 60)
@ -378,7 +377,7 @@ const commonContext = {
} else { } else {
$elem.html(`${days}${hours}${minutes}${seconds}`) $elem.html(`${days}${hours}${minutes}${seconds}`)
} }
}, 1000) }, 300)
}, },
/* 激活建站倒计时功能 */ /* 激活建站倒计时功能 */
websiteTime() { websiteTime() {
@ -411,7 +410,7 @@ const commonContext = {
} }
let days = parseInt(difference / 24) let days = parseInt(difference / 24)
websiteDate.innerHTML = `建站<span class="stand">${days}</span>天<span class="stand">${hours}</span>时<span class="stand">${minutes}</span>分<span class="stand">${seconds}</span>秒` websiteDate.innerHTML = `建站<span class="stand">${days}</span>天<span class="stand">${hours}</span>时<span class="stand">${minutes}</span>分<span class="stand">${seconds}</span>秒`
}, 500) }, 300)
}, },
/* 显示web版权 */ /* 显示web版权 */
webCopyright() { webCopyright() {
@ -559,7 +558,7 @@ const commonContext = {
if (DreamConfig.gray_mode === true) { if (DreamConfig.gray_mode === true) {
$('html').addClass('gray-mode') $('html').addClass('gray-mode')
} else if (DreamConfig.gray_mode === 'custom') { } else if (DreamConfig.gray_mode === 'custom') {
var now = new Date().getTime() var now = Date.now()
var startTime = new Date(DreamConfig.gray_mode_start_time).getTime() var startTime = new Date(DreamConfig.gray_mode_start_time).getTime()
var endTime = new Date(DreamConfig.gray_mode_end_time).getTime() var endTime = new Date(DreamConfig.gray_mode_end_time).getTime()
if (now >= startTime && now <= endTime) { if (now >= startTime && now <= endTime) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,11 @@
<mew-video th:if="${momentItem.type.name == 'VIDEO'}" th:src="${momentItem.url}"></mew-video> <mew-video th:if="${momentItem.type.name == 'VIDEO'}" th:src="${momentItem.url}"></mew-video>
</th:block> </th:block>
<th:block th:if="${!#lists.isEmpty(moment.spec.content.medium)}" th:each="momentItem : ${moment.spec.content.medium}"> <th:block th:if="${!#lists.isEmpty(moment.spec.content.medium)}" th:each="momentItem : ${moment.spec.content.medium}">
<mew-music th:if="${momentItem.type.name == 'AUDIO'}" th:url="${momentItem.url}" th:with="list = ${#strings.listSplit(momentItem.url,'/')}, size = ${#lists.size(list)}" th:name="${size >= 0 ? list[size - 1] : momentItem.url}"></mew-music> <mew-music th:if="${momentItem.type.name == 'AUDIO'}" th:url="${momentItem.url}"
th:with="list = ${#strings.listSplit(momentItem.url,'/')}, size = ${#lists.size(list)}"
th:name="${size >= 0 ? list[size - 1] : momentItem.url}"
th:cover="${#theme.assets('/img/music.webp')}"
></mew-music>
</th:block> </th:block>
</div> </div>
</div> </div>

View File

@ -1 +1 @@
1.2.1 1.2.1.2