mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 11:24:17 +00:00
Merge branch 'dev' of github.com:jumpserver/lina into dev
This commit is contained in:
@@ -26,10 +26,10 @@
|
||||
>
|
||||
<div class="msg-item-head">
|
||||
<span class="msg-item-head-type">
|
||||
<i :class="msg.has_read ? 'fa-envelope-open-o' : 'fa-envelope'" class="fa msg-icon" />
|
||||
<i :class="msg['has_read'] ? 'fa-envelope-open-o' : 'fa-envelope'" class="fa msg-icon" />
|
||||
{{ msg.subject }}
|
||||
</span>
|
||||
<span v-if="hoverMsgId !== msg.id || msg.has_read" class="msg-item-head-time">
|
||||
<span v-if="hoverMsgId !== msg.id || msg['has_read']" class="msg-item-head-time">
|
||||
{{ formatDate(msg.date_created) }}
|
||||
</span>
|
||||
<div v-else class="msg-item-read-btn" @click.stop="markAsRead(msg)">
|
||||
@@ -225,7 +225,7 @@ export default {
|
||||
|
||||
.msg-item-head-type {
|
||||
float: left;
|
||||
width: 240px;
|
||||
width: 220px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: middle;
|
||||
|
||||
@@ -239,6 +239,21 @@ export function getUpdateObjURL(url, objId) {
|
||||
return urlObj.href
|
||||
}
|
||||
|
||||
export function truncateCenter(s, l) {
|
||||
if (s.length <= l) {
|
||||
return s
|
||||
}
|
||||
const centerIndex = Math.ceil(l / 2)
|
||||
return s.slice(0, centerIndex - 2) + '...' + s.slice(centerIndex + 1, l)
|
||||
}
|
||||
|
||||
export function truncateEnd(s, l) {
|
||||
if (s.length <= l) {
|
||||
return s
|
||||
}
|
||||
return s.slice(0, l - 3) + '...'
|
||||
}
|
||||
|
||||
export const assignIfNot = _.partialRight(_.assignInWith, customizer)
|
||||
|
||||
const scheme = document.location.protocol
|
||||
|
||||
Reference in New Issue
Block a user