mirror of
https://github.com/paricafe/misskey.git
synced 2025-01-18 16:08:41 -06:00
enhance: switch timestamp
This commit is contained in:
parent
212b623df1
commit
c328883e0f
1 changed files with 14 additions and 4 deletions
|
@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<div v-if="mock">
|
<div v-if="mock">
|
||||||
<MkTime :time="note.createdAt" colored/>
|
<MkTime :time="note.createdAt" colored/>
|
||||||
</div>
|
</div>
|
||||||
<MkA v-else @click="toggleDetail()">
|
<MkA v-else :to="notePage(note)" @mouseenter="setDetail(true)" @mouseleave="setDetail(false)" :style="{ textDecoration: 'none', userSelect: 'none' }">
|
||||||
<MkTime
|
<MkTime
|
||||||
:time="isDetail ? note.createdAt : note.createdAt"
|
:time="isDetail ? note.createdAt : note.createdAt"
|
||||||
:mode="isDetail ? 'detail' : undefined"
|
:mode="isDetail ? 'detail' : undefined"
|
||||||
|
@ -54,8 +54,8 @@ import { userPage } from '@/filters/user.js';
|
||||||
import { defaultStore } from '@/store.js';
|
import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
const isDetail = ref(false);
|
const isDetail = ref(false);
|
||||||
const toggleDetail = () => {
|
const setDetail = (value) => {
|
||||||
isDetail.value = !isDetail.value;
|
isDetail.value = value;
|
||||||
};
|
};
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
@ -100,7 +100,8 @@ const mock = inject<boolean>('mock', false);
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
text-decoration: underline;
|
text-decoration: none;
|
||||||
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,6 +132,7 @@ const mock = inject<boolean>('mock', false);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.badgeRoles {
|
.badgeRoles {
|
||||||
|
@ -145,4 +147,12 @@ const mock = inject<boolean>('mock', false);
|
||||||
margin-left: 0.2em;
|
margin-left: 0.2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-underline {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-select {
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue