chatmessage improvements
This commit is contained in:
parent
37b2137ab9
commit
7069894c53
4 changed files with 28 additions and 8 deletions
|
|
@ -106,6 +106,20 @@ const ChatMessage = {
|
||||||
messageChainId: this.chatItem.messageChainId,
|
messageChainId: this.chatItem.messageChainId,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
visibilityIcon(visibility) {
|
||||||
|
switch (visibility) {
|
||||||
|
case 'private':
|
||||||
|
return 'lock'
|
||||||
|
case 'unlisted':
|
||||||
|
return 'lock-open'
|
||||||
|
case 'direct':
|
||||||
|
return 'envelope'
|
||||||
|
case 'local':
|
||||||
|
return 'igloo'
|
||||||
|
default:
|
||||||
|
return 'globe'
|
||||||
|
}
|
||||||
|
},
|
||||||
async deleteMessage() {
|
async deleteMessage() {
|
||||||
const confirmed = window.confirm(this.$t('chats.delete_confirm'))
|
const confirmed = window.confirm(this.$t('chats.delete_confirm'))
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@
|
||||||
|
|
||||||
.chat-message {
|
.chat-message {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-bottom: 0.5em;
|
|
||||||
|
|
||||||
.status-body:hover {
|
.status-body:hover {
|
||||||
--_still-image-img-visibility: visible;
|
--_still-image-img-visibility: visible;
|
||||||
|
|
@ -124,10 +123,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.-pending {
|
|
||||||
color: red !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-message-inner.with-media {
|
.chat-message-inner.with-media {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
|
@ -143,8 +138,8 @@
|
||||||
|
|
||||||
.chat-message-date-separator {
|
.chat-message-date-separator {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 1.4em 0;
|
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
|
line-height: 2;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
color: var(--textFaint);
|
color: var(--textFaint);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,17 @@
|
||||||
<span
|
<span
|
||||||
class="created-at"
|
class="created-at"
|
||||||
>
|
>
|
||||||
|
<span
|
||||||
|
v-if="message.visibility"
|
||||||
|
class="visibility-icon"
|
||||||
|
:title="visibilityLocalized"
|
||||||
|
>
|
||||||
|
<FAIcon
|
||||||
|
fixed-width
|
||||||
|
class="fa-scale-110"
|
||||||
|
:icon="visibilityIcon(message.visibility)"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="message.pending"
|
v-if="message.pending"
|
||||||
class="loading-spinner"
|
class="loading-spinner"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
.ChatMessageList {
|
.ChatMessageList {
|
||||||
padding: 0 0.8em;
|
padding: 0.5em;
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
gap: 0.5em;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue