forked from AkkomaGang/akkoma-fe
Add the empty chat list placeholder.
Do not use full height when displaying the chat list. Remove an unsued chat action.
This commit is contained in:
parent
45901c8da6
commit
18a1f5d62a
4 changed files with 28 additions and 7 deletions
|
@ -15,7 +15,10 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="timeline">
|
<div
|
||||||
|
v-if="sortedChatList.length > 0"
|
||||||
|
class="timeline"
|
||||||
|
>
|
||||||
<List :items="sortedChatList">
|
<List :items="sortedChatList">
|
||||||
<template
|
<template
|
||||||
slot="item"
|
slot="item"
|
||||||
|
@ -29,6 +32,12 @@
|
||||||
</template>
|
</template>
|
||||||
</List>
|
</List>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
v-else
|
||||||
|
class="emtpy-chat-list-alert"
|
||||||
|
>
|
||||||
|
<span>{{ $t('chats.empty_chat_list_placeholder') }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -39,10 +48,24 @@
|
||||||
@import '../../_variables.scss';
|
@import '../../_variables.scss';
|
||||||
|
|
||||||
.chat-list {
|
.chat-list {
|
||||||
min-height: calc(100vh - 67px);
|
min-height: 25em;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.emtpy-chat-list-alert {
|
||||||
|
padding: 3em;
|
||||||
|
font-size: 1.2em;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
color: $fallback--text;
|
||||||
|
color: var(--faint, $fallback--text);
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -192,7 +192,7 @@ const PostStatusForm = {
|
||||||
this.newStatus.poll.error
|
this.newStatus.poll.error
|
||||||
},
|
},
|
||||||
showPreview () {
|
showPreview () {
|
||||||
return !!this.preview || this.previewLoading
|
return !this.disablePreview && (!!this.preview || this.previewLoading)
|
||||||
},
|
},
|
||||||
emptyStatus () {
|
emptyStatus () {
|
||||||
return this.newStatus.status.trim() === '' && this.newStatus.files.length === 0
|
return this.newStatus.status.trim() === '' && this.newStatus.files.length === 0
|
||||||
|
|
|
@ -794,7 +794,8 @@
|
||||||
"more": "More",
|
"more": "More",
|
||||||
"delete_confirm": "Do you really want to delete this message?",
|
"delete_confirm": "Do you really want to delete this message?",
|
||||||
"error_loading_chat": "Something went wrong when loading the chat.",
|
"error_loading_chat": "Something went wrong when loading the chat.",
|
||||||
"error_sending_message": "Something went wrong when sending the message."
|
"error_sending_message": "Something went wrong when sending the message.",
|
||||||
|
"empty_chat_list_placeholder": "You don't have any chats yet. Start a new chat!"
|
||||||
},
|
},
|
||||||
"file_type": {
|
"file_type": {
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
|
|
|
@ -83,9 +83,6 @@ const chats = {
|
||||||
resetChatNewMessageCount ({ commit }, value) {
|
resetChatNewMessageCount ({ commit }, value) {
|
||||||
commit('resetChatNewMessageCount', value)
|
commit('resetChatNewMessageCount', value)
|
||||||
},
|
},
|
||||||
removeFromCurrentChatStatuses ({ commit }, { id }) {
|
|
||||||
commit('removeFromCurrentChatStatuses', id)
|
|
||||||
},
|
|
||||||
clearCurrentChat ({ rootState, commit, dispatch }, value) {
|
clearCurrentChat ({ rootState, commit, dispatch }, value) {
|
||||||
commit('setCurrentChatId', { chatId: undefined })
|
commit('setCurrentChatId', { chatId: undefined })
|
||||||
commit('setCurrentChatFetcher', { fetcher: undefined })
|
commit('setCurrentChatFetcher', { fetcher: undefined })
|
||||||
|
|
Loading…
Reference in a new issue