mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-07-18 02:26:15 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 856d3dd513 | |||
| d96aae59d2 |
@@ -138,7 +138,7 @@ const goToNewPost = () => {
|
|||||||
height: 60px;
|
height: 60px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 70px;
|
bottom: 40px;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
@click="reboundToDefault"
|
@click="reboundToDefault"
|
||||||
></i>
|
></i>
|
||||||
<i class="fas fa-expand" title="在页面中打开" @click="expand"></i>
|
<i class="fas fa-expand" title="在页面中打开" @click="expand"></i>
|
||||||
<i class="fas fa-times" title="关闭" @click="close"></i>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -49,10 +48,6 @@ function expand() {
|
|||||||
navigateTo(target)
|
navigateTo(target)
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
|
||||||
floatRoute.value = null
|
|
||||||
}
|
|
||||||
|
|
||||||
function injectBaseTag() {
|
function injectBaseTag() {
|
||||||
if (!iframeRef.value) return
|
if (!iframeRef.value) return
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,17 @@ export default class TimeManager {
|
|||||||
if (Number.isNaN(date.getTime())) return ''
|
if (Number.isNaN(date.getTime())) return ''
|
||||||
|
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
|
const diffMs = now.getTime() - date.getTime()
|
||||||
|
|
||||||
|
if (diffMs >= 0 && diffMs < 60 * 1000) {
|
||||||
|
return '刚刚'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (diffMs >= 0 && diffMs < 60 * 60 * 1000) {
|
||||||
|
const mins = Math.floor(diffMs / 60_000)
|
||||||
|
return `${mins || 1}分钟前`
|
||||||
|
}
|
||||||
|
|
||||||
const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate())
|
const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate())
|
||||||
const startOfDate = new Date(date.getFullYear(), date.getMonth(), date.getDate())
|
const startOfDate = new Date(date.getFullYear(), date.getMonth(), date.getDate())
|
||||||
const diffDays = Math.floor((startOfToday - startOfDate) / 86400000)
|
const diffDays = Math.floor((startOfToday - startOfDate) / 86400000)
|
||||||
|
|||||||
Reference in New Issue
Block a user