diff --git a/bbcode/Editor.vue b/bbcode/Editor.vue index 1807ac4..90074da 100644 --- a/bbcode/Editor.vue +++ b/bbcode/Editor.vue @@ -38,26 +38,25 @@ \ No newline at end of file diff --git a/chat/ChatView.vue b/chat/ChatView.vue index 0b3f014..7e5adad 100644 --- a/chat/ChatView.vue +++ b/chat/ChatView.vue @@ -29,7 +29,8 @@
+ class="list-group-item list-group-item-action item-private" :key="conversation.key" + @click.middle.prevent="conversation.close()">
{{conversation.character.name}} @@ -39,8 +40,8 @@ :class="{'fa-comment-dots': conversation.typingStatus == 'typing', 'fa-comment': conversation.typingStatus == 'paused'}" > - +
@@ -51,7 +52,7 @@
+ @click.middle.prevent="conversation.close()"> {{conversation.name}} this.$refs['privateConversations'], { animation: 50, + fallbackTolerance: 5, onEnd: async(e) => { if(e.oldIndex === e.newIndex) return; return core.conversations.privateConversations[e.oldIndex!].sort(e.newIndex!); @@ -152,6 +154,7 @@ }); Sortable.create(this.$refs['channelConversations'], { animation: 50, + fallbackTolerance: 5, onEnd: async(e) => { if(e.oldIndex === e.newIndex) return; return core.conversations.channelConversations[e.oldIndex!].sort(e.newIndex!); @@ -256,13 +259,8 @@ overrideEl.id = 'overrideFontSize'; document.body.appendChild(overrideEl); const sheet = overrideEl.sheet; - const selectorList = ['#chatView', '.btn', '.form-control']; - for(const selector of selectorList) - sheet.insertRule(`${selector} { font-size: ${fontSize}px; }`, sheet.cssRules.length); - - const lineHeight = 1.428571429; - sheet.insertRule(`.form-control { line-height: ${lineHeight} }`, sheet.cssRules.length); - sheet.insertRule(`select.form-control { line-height: ${lineHeight} }`, sheet.cssRules.length); + sheet.insertRule(`#chatView, .btn, .form-control, .custom-select { font-size: ${fontSize}px; }`, sheet.cssRules.length); + sheet.insertRule(`.form-control, select.form-control { line-height: 1.428571429 }`, sheet.cssRules.length); } logOut(): void { @@ -419,6 +417,7 @@ #sidebar { .body a.btn { padding: 2px 0; + text-align: left; } @media (min-width: breakpoint-min(md)) { .sidebar { diff --git a/chat/ConversationView.vue b/chat/ConversationView.vue index ad26b29..d88572e 100644 --- a/chat/ConversationView.vue +++ b/chat/ConversationView.vue @@ -2,7 +2,7 @@
-
+
-
+
{{l('status.' + conversation.character.status)}}
@@ -129,9 +129,10 @@ import {Component, Hook, Prop, Watch} from '@f-list/vue-ts'; import Vue from 'vue'; import {EditorButton, EditorSelection} from '../bbcode/editor'; + import {BBCodeView} from '../bbcode/view'; import {isShowing as anyDialogsShown} from '../components/Modal.vue'; import {Keys} from '../keys'; - import {BBCodeView, Editor} from './bbcode'; + import {Editor} from './bbcode'; import CommandHelp from './CommandHelp.vue'; import {characterImage, getByteLength, getKey} from './common'; import ConversationSettings from './ConversationSettings.vue'; @@ -148,7 +149,7 @@ @Component({ components: { user: UserView, 'bbcode-editor': Editor, 'manage-channel': ManageChannel, settings: ConversationSettings, - logs: Logs, 'message-view': MessageView, bbcode: BBCodeView, 'command-help': CommandHelp + logs: Logs, 'message-view': MessageView, bbcode: BBCodeView(core.bbCodeParser), 'command-help': CommandHelp } }) export default class ConversationView extends Vue { @@ -281,8 +282,13 @@ if(this.messageView.scrollTop < 20) { if(!this.scrolledUp) { const firstMessage = this.messageView.firstElementChild; - if(this.conversation.loadMore() && firstMessage !== null) - this.$nextTick(() => setTimeout(() => this.messageView.scrollTop = (firstMessage).offsetTop, 0)); + if(this.conversation.loadMore() && firstMessage !== null) { + this.messageView.style.overflow = 'hidden'; + this.$nextTick(() => { + this.messageView.scrollTop = (firstMessage).offsetTop; + this.messageView.style.overflow = 'auto'; + }); + } } this.scrolledUp = true; } else this.scrolledUp = false; diff --git a/chat/Logs.vue b/chat/Logs.vue index 55a70cc..8b47028 100644 --- a/chat/Logs.vue +++ b/chat/Logs.vue @@ -85,7 +85,7 @@ components: {modal: Modal, 'message-view': MessageView, 'filterable-select': FilterableSelect} }) export default class Logs extends CustomDialog { - @Prop() + @Prop readonly conversation?: Conversation; conversations: LogInterface.Conversation[] = []; selectedConversation: LogInterface.Conversation | undefined; diff --git a/chat/ReportDialog.vue b/chat/ReportDialog.vue index adf3fd4..fdfe675 100644 --- a/chat/ReportDialog.vue +++ b/chat/ReportDialog.vue @@ -16,9 +16,10 @@ \ No newline at end of file diff --git a/components/FilterableSelect.vue b/components/FilterableSelect.vue index a86fcc1..054e571 100644 --- a/components/FilterableSelect.vue +++ b/components/FilterableSelect.vue @@ -1,11 +1,10 @@