lint
This commit is contained in:
parent
665849615c
commit
ef8a407643
7 changed files with 35 additions and 18 deletions
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-if="isMessage"
|
v-if="isMessage"
|
||||||
|
:id="`chatmessage-${message.id}`"
|
||||||
class="chat-message-wrapper"
|
class="chat-message-wrapper"
|
||||||
:class="[classnames, { 'hovered-message-chain': hoveredMessageChain }]"
|
:class="[classnames, { 'hovered-message-chain': hoveredMessageChain }]"
|
||||||
:id="`chatmessage-${message.id}`"
|
|
||||||
@mouseover="onHover(true)"
|
@mouseover="onHover(true)"
|
||||||
@mouseleave="onHover(false)"
|
@mouseleave="onHover(false)"
|
||||||
>
|
>
|
||||||
|
|
@ -40,7 +40,10 @@
|
||||||
</template>
|
</template>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
</StatusPopover>
|
</StatusPopover>
|
||||||
<span v-else class="reply-label">
|
<span
|
||||||
|
v-else
|
||||||
|
class="reply-label"
|
||||||
|
>
|
||||||
{{ $t('status.broken_reply') }}
|
{{ $t('status.broken_reply') }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -83,7 +86,10 @@
|
||||||
:user="author"
|
:user="author"
|
||||||
/>
|
/>
|
||||||
</UserPopover>
|
</UserPopover>
|
||||||
<div v-else class="avatar-spacer" />
|
<div
|
||||||
|
v-else
|
||||||
|
class="avatar-spacer"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="chat-message-inner">
|
<div class="chat-message-inner">
|
||||||
<div class="message-bubble-wrapper">
|
<div class="message-bubble-wrapper">
|
||||||
|
|
@ -98,7 +104,6 @@
|
||||||
@mouseenter="hovered = true"
|
@mouseenter="hovered = true"
|
||||||
@mouseleave="hovered = false"
|
@mouseleave="hovered = false"
|
||||||
>
|
>
|
||||||
|
|
||||||
<StatusActionButtons
|
<StatusActionButtons
|
||||||
v-if="isStatus"
|
v-if="isStatus"
|
||||||
class="chat-message-toolbar"
|
class="chat-message-toolbar"
|
||||||
|
|
@ -112,9 +117,9 @@
|
||||||
@toggle-replying="$emit('replyRequested', message)"
|
@toggle-replying="$emit('replyRequested', message)"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
|
v-else
|
||||||
class="chat-message-toolbar"
|
class="chat-message-toolbar"
|
||||||
:class="{ '-visible': hovered || menuOpened }"
|
:class="{ '-visible': hovered || menuOpened }"
|
||||||
v-else
|
|
||||||
>
|
>
|
||||||
<Popover
|
<Popover
|
||||||
trigger="click"
|
trigger="click"
|
||||||
|
|
@ -221,7 +226,10 @@
|
||||||
v-if="isStatus && repliedTo"
|
v-if="isStatus && repliedTo"
|
||||||
class="reply-indicator"
|
class="reply-indicator"
|
||||||
>
|
>
|
||||||
<FAIcon class="icon" icon="reply" />
|
<FAIcon
|
||||||
|
class="icon"
|
||||||
|
icon="reply"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="end-spacer" />
|
<div class="end-spacer" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -232,7 +240,10 @@
|
||||||
v-else
|
v-else
|
||||||
class="chat-message-date-separator"
|
class="chat-message-date-separator"
|
||||||
>
|
>
|
||||||
<ChatMessageDate :date="chatItem.date" :show-time="chatItem.isTime" />
|
<ChatMessageDate
|
||||||
|
:date="chatItem.date"
|
||||||
|
:show-time="chatItem.isTime"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
:previous-item="getPreviousItem(index)"
|
:previous-item="getPreviousItem(index)"
|
||||||
:hovered-message-chain="chatItem.messageChainId === hoveredMessageChainId"
|
:hovered-message-chain="chatItem.messageChainId === hoveredMessageChainId"
|
||||||
:focused="chatItem.id === focusedId"
|
:focused="chatItem.id === focusedId"
|
||||||
:repliedTo="chatItem.id === repliedId"
|
:replied-to="chatItem.id === repliedId"
|
||||||
@hover="onMessageHover"
|
@hover="onMessageHover"
|
||||||
@delete="onMessageDelete"
|
@delete="onMessageDelete"
|
||||||
@reply-requested="onReplyRequested"
|
@reply-requested="onReplyRequested"
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
v-if="messages[0]?.summary_raw_html"
|
v-if="messages[0]?.summary_raw_html"
|
||||||
:html="messages[0].summary_raw_html"
|
:html="messages[0].summary_raw_html"
|
||||||
:emoji="messages[0].emojis"
|
:emoji="messages[0].emojis"
|
||||||
/>
|
/>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ $t('timeline.conversation') }}
|
{{ $t('timeline.conversation') }}
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
v-if="conversation[0]?.summary_raw_html"
|
v-if="conversation[0]?.summary_raw_html"
|
||||||
:html="conversation[0].summary_raw_html"
|
:html="conversation[0].summary_raw_html"
|
||||||
:emoji="conversation[0].emojis"
|
:emoji="conversation[0].emojis"
|
||||||
/>
|
/>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ $t('timeline.conversation') }}
|
{{ $t('timeline.conversation') }}
|
||||||
</template>
|
</template>
|
||||||
</h1>
|
</h1>
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
|
v-if="initialized"
|
||||||
ref="form"
|
ref="form"
|
||||||
class="post-status-form"
|
class="post-status-form"
|
||||||
v-if="initialized"
|
|
||||||
>
|
>
|
||||||
<form
|
<form
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
|
@ -176,12 +176,12 @@
|
||||||
<input
|
<input
|
||||||
v-if="mentionsLine"
|
v-if="mentionsLine"
|
||||||
:value="mentionsLineReadOnly ? mentionsString : newStatus.mentionsLine"
|
:value="mentionsLineReadOnly ? mentionsString : newStatus.mentionsLine"
|
||||||
@change="onMentionsLineUpdate"
|
|
||||||
type="text"
|
type="text"
|
||||||
:placeholder="$t('post_status.mentions_line')"
|
:placeholder="$t('post_status.mentions_line')"
|
||||||
:disabled="mentionsLineReadOnly || (posting && !optimisticPosting)"
|
:disabled="mentionsLineReadOnly || (posting && !optimisticPosting)"
|
||||||
size="1"
|
size="1"
|
||||||
class="input mentions-input form-post-mentions unstyled"
|
class="input mentions-input form-post-mentions unstyled"
|
||||||
|
@change="onMentionsLineUpdate"
|
||||||
>
|
>
|
||||||
<EmojiInput
|
<EmojiInput
|
||||||
ref="emoji-input"
|
ref="emoji-input"
|
||||||
|
|
@ -271,14 +271,14 @@
|
||||||
<PollForm
|
<PollForm
|
||||||
v-if="pollsAvailable"
|
v-if="pollsAvailable"
|
||||||
ref="pollForm"
|
ref="pollForm"
|
||||||
:visible="pollFormVisible"
|
|
||||||
v-model="newStatus.poll"
|
v-model="newStatus.poll"
|
||||||
|
:visible="pollFormVisible"
|
||||||
/>
|
/>
|
||||||
<QuoteForm
|
<QuoteForm
|
||||||
v-if="quotingAvailable"
|
v-if="quotingAvailable"
|
||||||
|
:id="newStatus.quote?.id"
|
||||||
ref="quoteForm"
|
ref="quoteForm"
|
||||||
:visible="quoteFormVisible"
|
:visible="quoteFormVisible"
|
||||||
:id="newStatus.quote?.id"
|
|
||||||
:url="newStatus.quote?.url"
|
:url="newStatus.quote?.url"
|
||||||
@update:url="url => newStatus.quote.url = url"
|
@update:url="url => newStatus.quote.url = url"
|
||||||
@update:id="id => newStatus.quote.id = id"
|
@update:id="id => newStatus.quote.id = id"
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@
|
||||||
:get-component="getComponent"
|
:get-component="getComponent"
|
||||||
:close="() => { /* no-op */ }"
|
:close="() => { /* no-op */ }"
|
||||||
:do-action="doAction"
|
:do-action="doAction"
|
||||||
@emoji-picker-shown="onEmojiPickerShown"
|
|
||||||
:default-button-style="useDefaultButtons"
|
:default-button-style="useDefaultButtons"
|
||||||
:hide-label="hideLabels"
|
:hide-label="hideLabels"
|
||||||
|
@emoji-picker-shown="onEmojiPickerShown"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
v-if="showPin && currentUser"
|
v-if="showPin && currentUser"
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,10 @@ describe('RichContent', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
wrapper.html().replaceAll('\n', '').replaceAll(/<!--.*?-->/g, ''),
|
wrapper
|
||||||
|
.html()
|
||||||
|
.replaceAll('\n', '')
|
||||||
|
.replaceAll(/<!--.*?-->/g, ''),
|
||||||
).to.eql(compwrap(expected))
|
).to.eql(compwrap(expected))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -433,7 +436,10 @@ describe('RichContent', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
wrapper.html().replaceAll('\n', '').replaceAll(/<!--.*?-->/g, ''),
|
wrapper
|
||||||
|
.html()
|
||||||
|
.replaceAll('\n', '')
|
||||||
|
.replaceAll(/<!--.*?-->/g, ''),
|
||||||
).to.eql(compwrap(expected))
|
).to.eql(compwrap(expected))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue