mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-07-17 01:56:09 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c2264e509 |
@@ -138,7 +138,7 @@ const goToNewPost = () => {
|
|||||||
height: 60px;
|
height: 60px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 40px;
|
bottom: 70px;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
@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>
|
||||||
@@ -48,6 +49,10 @@ function expand() {
|
|||||||
navigateTo(target)
|
navigateTo(target)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
floatRoute.value = null
|
||||||
|
}
|
||||||
|
|
||||||
function injectBaseTag() {
|
function injectBaseTag() {
|
||||||
if (!iframeRef.value) return
|
if (!iframeRef.value) return
|
||||||
|
|
||||||
|
|||||||
@@ -4,17 +4,6 @@ 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