diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/chat/chat.js | 12 | ||||
| -rw-r--r-- | src/components/chat_panel/chat_panel.vue | 2 | ||||
| -rw-r--r-- | src/components/contrast_ratio/contrast_ratio.vue | 7 | ||||
| -rw-r--r-- | src/components/emoji_picker/emoji_picker.js | 5 | ||||
| -rw-r--r-- | src/components/poll/poll.vue | 1 | ||||
| -rw-r--r-- | src/components/settings_modal/tabs/theme_tab/theme_tab.vue | 30 | ||||
| -rw-r--r-- | src/components/side_drawer/side_drawer.vue | 2 |
7 files changed, 35 insertions, 24 deletions
diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js index 9c4e5b05..803abf69 100644 --- a/src/components/chat/chat.js +++ b/src/components/chat/chat.js @@ -204,9 +204,9 @@ const Chat = { } }, readChat () { - if (!(this.currentChatMessageService && this.currentChatMessageService.lastMessage)) { return } + if (!(this.currentChatMessageService && this.currentChatMessageService.maxId)) { return } if (document.hidden) { return } - const lastReadId = this.currentChatMessageService.lastMessage.id + const lastReadId = this.currentChatMessageService.maxId this.$store.dispatch('readChat', { id: this.currentChat.id, lastReadId }) }, bottomedOut (offset) { @@ -244,7 +244,7 @@ const Chat = { const chatId = chatMessageService.chatId const fetchOlderMessages = !!maxId - const sinceId = fetchLatest && chatMessageService.lastMessage && chatMessageService.lastMessage.id + const sinceId = fetchLatest && chatMessageService.maxId this.backendInteractor.chatMessages({ id: chatId, maxId, sinceId }) .then((messages) => { @@ -303,7 +303,11 @@ const Chat = { return this.backendInteractor.sendChatMessage(params) .then(data => { - this.$store.dispatch('addChatMessages', { chatId: this.currentChat.id, messages: [data] }).then(() => { + this.$store.dispatch('addChatMessages', { + chatId: this.currentChat.id, + messages: [data], + updateMaxId: false + }).then(() => { this.$nextTick(() => { this.handleResize() // When the posting form size changes because of a media attachment, we need an extra resize diff --git a/src/components/chat_panel/chat_panel.vue b/src/components/chat_panel/chat_panel.vue index ca529b5a..570435e7 100644 --- a/src/components/chat_panel/chat_panel.vue +++ b/src/components/chat_panel/chat_panel.vue @@ -63,7 +63,7 @@ @click.stop.prevent="togglePanel" > <div class="title"> - <i class="icon-comment-empty" /> + <i class="icon-megaphone" /> {{ $t('shoutbox.title') }} </div> </div> diff --git a/src/components/contrast_ratio/contrast_ratio.vue b/src/components/contrast_ratio/contrast_ratio.vue index ba92bc17..9dc871b6 100644 --- a/src/components/contrast_ratio/contrast_ratio.vue +++ b/src/components/contrast_ratio/contrast_ratio.vue @@ -39,13 +39,16 @@ export default { props: { large: { - required: false + required: false, + type: Boolean, + default: false }, // TODO: Make theme switcher compute theme initially so that contrast // component won't be called without contrast data contrast: { required: false, - type: Object + type: Object, + default: () => ({}) } }, computed: { diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index 0f397b59..5c09f6ca 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -8,7 +8,10 @@ const LOAD_EMOJI_BY = 60 const LOAD_EMOJI_MARGIN = 64 const filterByKeyword = (list, keyword = '') => { - return list.filter(x => x.displayText.includes(keyword)) + const keywordLowercase = keyword.toLowerCase() + return list.filter(emoji => + emoji.displayText.toLowerCase().includes(keywordLowercase) + ) } const EmojiPicker = { diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue index 1858f3e1..5f54b416 100644 --- a/src/components/poll/poll.vue +++ b/src/components/poll/poll.vue @@ -17,6 +17,7 @@ <span class="result-percentage"> {{ percentageForOption(option.votes_count) }}% </span> + <!-- eslint-disable-next-line vue/no-v-html --> <span v-html="option.title_html" /> </div> <div diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.vue b/src/components/settings_modal/tabs/theme_tab/theme_tab.vue index d57894de..5328c350 100644 --- a/src/components/settings_modal/tabs/theme_tab/theme_tab.vue +++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.vue @@ -278,7 +278,7 @@ /> <ContrastRatio :contrast="previewContrast.alertErrorText" - large="true" + large /> <ColorInput v-model="alertWarningColorLocal" @@ -294,7 +294,7 @@ /> <ContrastRatio :contrast="previewContrast.alertWarningText" - large="true" + large /> <ColorInput v-model="alertNeutralColorLocal" @@ -310,7 +310,7 @@ /> <ContrastRatio :contrast="previewContrast.alertNeutralText" - large="true" + large /> <OpacityInput v-model="alertOpacityLocal" @@ -334,7 +334,7 @@ /> <ContrastRatio :contrast="previewContrast.badgeNotificationText" - large="true" + large /> </div> <div class="color-item"> @@ -359,7 +359,7 @@ /> <ContrastRatio :contrast="previewContrast.panelText" - large="true" + large /> <ColorInput v-model="panelLinkColorLocal" @@ -369,7 +369,7 @@ /> <ContrastRatio :contrast="previewContrast.panelLink" - large="true" + large /> </div> <div class="color-item"> @@ -740,57 +740,57 @@ <ColorInput v-model="chatBgColorLocal" name="chatBgColor" - :fallback="previewTheme.colors.bg || 1" + :fallback="previewTheme.colors.bg" :label="$t('settings.background')" /> <h5>{{ $t('settings.style.advanced_colors.chat.incoming') }}</h5> <ColorInput v-model="chatMessageIncomingBgColorLocal" name="chatMessageIncomingBgColor" - :fallback="previewTheme.colors.bg || 1" + :fallback="previewTheme.colors.bg" :label="$t('settings.background')" /> <ColorInput v-model="chatMessageIncomingTextColorLocal" name="chatMessageIncomingTextColor" - :fallback="previewTheme.colors.text || 1" + :fallback="previewTheme.colors.text" :label="$t('settings.text')" /> <ColorInput v-model="chatMessageIncomingLinkColorLocal" name="chatMessageIncomingLinkColor" - :fallback="previewTheme.colors.link || 1" + :fallback="previewTheme.colors.link" :label="$t('settings.links')" /> <ColorInput v-model="chatMessageIncomingBorderColorLocal" name="chatMessageIncomingBorderLinkColor" - :fallback="previewTheme.colors.fg || 1" + :fallback="previewTheme.colors.fg" :label="$t('settings.style.advanced_colors.chat.border')" /> <h5>{{ $t('settings.style.advanced_colors.chat.outgoing') }}</h5> <ColorInput v-model="chatMessageOutgoingBgColorLocal" name="chatMessageOutgoingBgColor" - :fallback="previewTheme.colors.bg || 1" + :fallback="previewTheme.colors.bg" :label="$t('settings.background')" /> <ColorInput v-model="chatMessageOutgoingTextColorLocal" name="chatMessageOutgoingTextColor" - :fallback="previewTheme.colors.text || 1" + :fallback="previewTheme.colors.text" :label="$t('settings.text')" /> <ColorInput v-model="chatMessageOutgoingLinkColorLocal" name="chatMessageOutgoingLinkColor" - :fallback="previewTheme.colors.link || 1" + :fallback="previewTheme.colors.link" :label="$t('settings.links')" /> <ColorInput v-model="chatMessageOutgoingBorderColorLocal" name="chatMessageOutgoingBorderLinkColor" - :fallback="previewTheme.colors.bg || 1" + :fallback="previewTheme.colors.bg" :label="$t('settings.style.advanced_colors.chat.border')" /> </div> diff --git a/src/components/side_drawer/side_drawer.vue b/src/components/side_drawer/side_drawer.vue index 0587ee02..eda5a68c 100644 --- a/src/components/side_drawer/side_drawer.vue +++ b/src/components/side_drawer/side_drawer.vue @@ -90,7 +90,7 @@ @click="toggleDrawer" > <router-link :to="{ name: 'chat' }"> - <i class="button-icon icon-chat" /> {{ $t("nav.chat") }} + <i class="button-icon icon-megaphone" /> {{ $t("shoutbox.title") }} </router-link> </li> </ul> |
