Run ESLint autofix after requiring new line on closing brackets

This commit is contained in:
Jérémie Astori 2019-02-25 00:38:13 -05:00
parent b99495334e
commit 0812ffc2e7
No known key found for this signature in database
GPG key ID: B9A4F245CD67BDE8
30 changed files with 309 additions and 168 deletions

View file

@ -1,60 +1,72 @@
<template> <template>
<div <div
id="viewport" id="viewport"
role="tablist"> role="tablist"
>
<aside id="sidebar"> <aside id="sidebar">
<div class="scrollable-area"> <div class="scrollable-area">
<div class="logo-container"> <div class="logo-container">
<img <img
:src="`img/logo-${isPublic() ? 'horizontal-' : ''}transparent-bg.svg`" :src="`img/logo-${isPublic() ? 'horizontal-' : ''}transparent-bg.svg`"
class="logo" class="logo"
alt="The Lounge"> alt="The Lounge"
>
<img <img
:src="`img/logo-${isPublic() ? 'horizontal-' : ''}transparent-bg-inverted.svg`" :src="`img/logo-${isPublic() ? 'horizontal-' : ''}transparent-bg-inverted.svg`"
class="logo-inverted" class="logo-inverted"
alt="The Lounge"> alt="The Lounge"
>
</div> </div>
<NetworkList <NetworkList
:networks="networks" :networks="networks"
:active-channel="activeChannel" /> :active-channel="activeChannel"
/>
</div> </div>
<footer id="footer"> <footer id="footer">
<span <span
class="tooltipped tooltipped-n tooltipped-no-touch" class="tooltipped tooltipped-n tooltipped-no-touch"
aria-label="Sign in"><button aria-label="Sign in"
class="icon sign-in" ><button
data-target="#sign-in" class="icon sign-in"
aria-label="Sign in" data-target="#sign-in"
role="tab" aria-label="Sign in"
aria-controls="sign-in" role="tab"
aria-selected="false" /></span> aria-controls="sign-in"
aria-selected="false"
/></span>
<span <span
class="tooltipped tooltipped-n tooltipped-no-touch" class="tooltipped tooltipped-n tooltipped-no-touch"
aria-label="Connect to network"><button aria-label="Connect to network"
class="icon connect" ><button
data-target="#connect" class="icon connect"
aria-label="Connect to network" data-target="#connect"
role="tab" aria-label="Connect to network"
aria-controls="connect" role="tab"
aria-selected="false" /></span> aria-controls="connect"
aria-selected="false"
/></span>
<span <span
class="tooltipped tooltipped-n tooltipped-no-touch" class="tooltipped tooltipped-n tooltipped-no-touch"
aria-label="Settings"><button aria-label="Settings"
class="icon settings" ><button
data-target="#settings" class="icon settings"
aria-label="Settings" data-target="#settings"
role="tab" aria-label="Settings"
aria-controls="settings" role="tab"
aria-selected="false" /></span> aria-controls="settings"
aria-selected="false"
/></span>
<span <span
class="tooltipped tooltipped-n tooltipped-no-touch" class="tooltipped tooltipped-n tooltipped-no-touch"
aria-label="Help"><button aria-label="Help"
class="icon help" ><button
data-target="#help" class="icon help"
aria-label="Help" data-target="#help"
role="tab" aria-label="Help"
aria-controls="help" role="tab"
aria-selected="false" /></span> aria-controls="help"
aria-selected="false"
/></span>
</footer> </footer>
</aside> </aside>
<div id="sidebar-overlay" /> <div id="sidebar-overlay" />
@ -62,31 +74,37 @@
<Chat <Chat
v-if="activeChannel" v-if="activeChannel"
:network="activeChannel.network" :network="activeChannel.network"
:channel="activeChannel.channel" /> :channel="activeChannel.channel"
/>
<div <div
id="sign-in" id="sign-in"
class="window" class="window"
role="tabpanel" role="tabpanel"
aria-label="Sign-in" /> aria-label="Sign-in"
/>
<div <div
id="connect" id="connect"
class="window" class="window"
role="tabpanel" role="tabpanel"
aria-label="Connect" /> aria-label="Connect"
/>
<div <div
id="settings" id="settings"
class="window" class="window"
role="tabpanel" role="tabpanel"
aria-label="Settings" /> aria-label="Settings"
/>
<div <div
id="help" id="help"
class="window" class="window"
role="tabpanel" role="tabpanel"
aria-label="Help" /> aria-label="Help"
/>
<div <div
id="changelog" id="changelog"
class="window" class="window"
aria-label="Changelog" /> aria-label="Changelog"
/>
</article> </article>
</div> </div>
</template> </template>

View file

@ -2,28 +2,34 @@
<ChannelWrapper <ChannelWrapper
:network="network" :network="network"
:channel="channel" :channel="channel"
:active-channel="activeChannel"> :active-channel="activeChannel"
>
<span class="name">{{ channel.name }}</span> <span class="name">{{ channel.name }}</span>
<span <span
v-if="channel.unread" v-if="channel.unread"
:class="{ highlight: channel.highlight }" :class="{ highlight: channel.highlight }"
class="badge">{{ channel.unread | roundBadgeNumber }}</span> class="badge"
>{{ channel.unread | roundBadgeNumber }}</span>
<template v-if="channel.type === 'channel'"> <template v-if="channel.type === 'channel'">
<span <span
class="close-tooltip tooltipped tooltipped-w" class="close-tooltip tooltipped tooltipped-w"
aria-label="Leave"> aria-label="Leave"
>
<button <button
class="close" class="close"
aria-label="Leave" /> aria-label="Leave"
/>
</span> </span>
</template> </template>
<template v-else> <template v-else>
<span <span
class="close-tooltip tooltipped tooltipped-w" class="close-tooltip tooltipped tooltipped-w"
aria-label="Close"> aria-label="Close"
>
<button <button
class="close" class="close"
aria-label="Close" /> aria-label="Close"
/>
</span> </span>
</template> </template>
</ChannelWrapper> </ChannelWrapper>

View file

@ -14,11 +14,13 @@
:aria-controls="'#chan-' + channel.id" :aria-controls="'#chan-' + channel.id"
:aria-selected="activeChannel && channel === activeChannel.channel" :aria-selected="activeChannel && channel === activeChannel.channel"
class="chan" class="chan"
role="tab"> role="tab"
>
<slot <slot
:network="network" :network="network"
:channel="channel" :channel="channel"
:activeChannel="activeChannel" /> :activeChannel="activeChannel"
/>
</div> </div>
</template> </template>

View file

@ -1,7 +1,8 @@
<template> <template>
<div <div
id="chat-container" id="chat-container"
class="window"> class="window"
>
<div <div
id="chat" id="chat"
:data-id="channel.id" :data-id="channel.id"
@ -9,78 +10,94 @@
'hide-motd': !this.$root.settings.motd, 'hide-motd': !this.$root.settings.motd,
'colored-nicks': this.$root.settings.coloredNicks, 'colored-nicks': this.$root.settings.coloredNicks,
'show-seconds': this.$root.settings.showSeconds, 'show-seconds': this.$root.settings.showSeconds,
}"> }"
>
<div <div
:id="'chan-' + channel.id" :id="'chan-' + channel.id"
:class="[channel.type, 'chan', 'active']" :class="[channel.type, 'chan', 'active']"
:data-id="channel.id" :data-id="channel.id"
:data-type="channel.type" :data-type="channel.type"
:aria-label="channel.name" :aria-label="channel.name"
role="tabpanel"> role="tabpanel"
>
<div class="header"> <div class="header">
<button <button
class="lt" class="lt"
aria-label="Toggle channel list" /> aria-label="Toggle channel list"
/>
<span class="title">{{ channel.name }}</span> <span class="title">{{ channel.name }}</span>
<span <span
:title="channel.topic" :title="channel.topic"
class="topic"><ParsedMessage class="topic"
v-if="channel.topic" ><ParsedMessage
:network="network" v-if="channel.topic"
:text="channel.topic" /></span> :network="network"
:text="channel.topic"
/></span>
<button <button
class="menu" class="menu"
aria-label="Open the context menu" /> aria-label="Open the context menu"
/>
<span <span
v-if="channel.type === 'channel'" v-if="channel.type === 'channel'"
class="rt-tooltip tooltipped tooltipped-w" class="rt-tooltip tooltipped tooltipped-w"
aria-label="Toggle user list"> aria-label="Toggle user list"
>
<button <button
class="rt" class="rt"
aria-label="Toggle user list" /> aria-label="Toggle user list"
/>
</span> </span>
</div> </div>
<div <div
v-if="channel.type === 'special'" v-if="channel.type === 'special'"
class="chat-content"> class="chat-content"
>
<div class="chat"> <div class="chat">
<div class="messages"> <div class="messages">
<div class="msg"> <div class="msg">
<Component <Component
:is="specialComponent" :is="specialComponent"
:network="network" :network="network"
:channel="channel" /> :channel="channel"
/>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div <div
v-else v-else
class="chat-content"> class="chat-content"
>
<div <div
:class="['scroll-down tooltipped tooltipped-w', {'scroll-down-shown': !channel.scrolledToBottom}]" :class="['scroll-down tooltipped tooltipped-w', {'scroll-down-shown': !channel.scrolledToBottom}]"
aria-label="Jump to recent messages" aria-label="Jump to recent messages"
@click="$refs.messageList.jumpToBottom()"> @click="$refs.messageList.jumpToBottom()"
>
<div class="scroll-down-arrow" /> <div class="scroll-down-arrow" />
</div> </div>
<MessageList <MessageList
ref="messageList" ref="messageList"
:network="network" :network="network"
:channel="channel" /> :channel="channel"
/>
<ChatUserList <ChatUserList
v-if="channel.type === 'channel'" v-if="channel.type === 'channel'"
:channel="channel" /> :channel="channel"
/>
</div> </div>
</div> </div>
</div> </div>
<div <div
v-if="this.$root.currentUserVisibleError" v-if="this.$root.currentUserVisibleError"
id="user-visible-error" id="user-visible-error"
@click="hideUserVisibleError">{{ this.$root.currentUserVisibleError }}</div> @click="hideUserVisibleError"
>{{ this.$root.currentUserVisibleError }}</div>
<span id="upload-progressbar" /> <span id="upload-progressbar" />
<ChatInput <ChatInput
:network="network" :network="network"
:channel="channel" /> :channel="channel"
/>
</div> </div>
</template> </template>

View file

@ -3,7 +3,8 @@
id="form" id="form"
method="post" method="post"
action="" action=""
@submit.prevent="onSubmit"> @submit.prevent="onSubmit"
>
<span id="nick">{{ network.nick }}</span> <span id="nick">{{ network.nick }}</span>
<textarea <textarea
id="input" id="input"
@ -13,33 +14,39 @@
:aria-label="getInputPlaceholder(channel)" :aria-label="getInputPlaceholder(channel)"
class="mousetrap" class="mousetrap"
@input="setPendingMessage" @input="setPendingMessage"
@keypress.enter.exact.prevent="onSubmit" /> @keypress.enter.exact.prevent="onSubmit"
/>
<span <span
v-if="this.$root.isFileUploadEnabled" v-if="this.$root.isFileUploadEnabled"
id="upload-tooltip" id="upload-tooltip"
class="tooltipped tooltipped-w tooltipped-no-touch" class="tooltipped tooltipped-w tooltipped-no-touch"
aria-label="Upload file" aria-label="Upload file"
@click="openFileUpload"> @click="openFileUpload"
>
<input <input
id="upload-input" id="upload-input"
ref="uploadInput" ref="uploadInput"
type="file" type="file"
multiple> multiple
>
<button <button
id="upload" id="upload"
type="button" type="button"
aria-label="Upload file" aria-label="Upload file"
:disabled="!this.$root.isConnected" /> :disabled="!this.$root.isConnected"
/>
</span> </span>
<span <span
id="submit-tooltip" id="submit-tooltip"
class="tooltipped tooltipped-w tooltipped-no-touch" class="tooltipped tooltipped-w tooltipped-no-touch"
aria-label="Send message"> aria-label="Send message"
>
<button <button
id="submit" id="submit"
type="submit" type="submit"
aria-label="Send message" aria-label="Send message"
:disabled="!this.$root.isConnected" /> :disabled="!this.$root.isConnected"
/>
</span> </span>
</form> </form>
</template> </template>

View file

@ -2,7 +2,8 @@
<aside <aside
ref="userlist" ref="userlist"
class="userlist" class="userlist"
@mouseleave="removeHoverUser"> @mouseleave="removeHoverUser"
>
<div class="count"> <div class="count">
<input <input
ref="input" ref="input"
@ -17,20 +18,23 @@
@keydown.down="navigateUserList($event, 1)" @keydown.down="navigateUserList($event, 1)"
@keydown.page-up="navigateUserList($event, -10)" @keydown.page-up="navigateUserList($event, -10)"
@keydown.page-down="navigateUserList($event, 10)" @keydown.page-down="navigateUserList($event, 10)"
@keydown.enter="selectUser"> @keydown.enter="selectUser"
>
</div> </div>
<div class="names"> <div class="names">
<div <div
v-for="(users, mode) in groupedUsers" v-for="(users, mode) in groupedUsers"
:key="mode" :key="mode"
:class="['user-mode', getModeClass(mode)]"> :class="['user-mode', getModeClass(mode)]"
>
<template v-if="userSearchInput.length > 0"> <template v-if="userSearchInput.length > 0">
<UsernameFiltered <UsernameFiltered
v-for="user in users" v-for="user in users"
:key="user.original.nick" :key="user.original.nick"
:on-hover="hoverUser" :on-hover="hoverUser"
:active="user.original === activeUser" :active="user.original === activeUser"
:user="user" /> :user="user"
/>
</template> </template>
<template v-else> <template v-else>
<Username <Username
@ -38,7 +42,8 @@
:key="user.nick" :key="user.nick"
:on-hover="hoverUser" :on-hover="hoverUser"
:active="user === activeUser" :active="user === activeUser"
:user="user" /> :user="user"
/>
</template> </template>
</div> </div>
</div> </div>

View file

@ -1,11 +1,13 @@
<template> <template>
<div <div
:aria-label="localeDate" :aria-label="localeDate"
class="date-marker-container tooltipped tooltipped-s"> class="date-marker-container tooltipped tooltipped-s"
>
<div class="date-marker"> <div class="date-marker">
<span <span
:data-label="friendlyDate()" :data-label="friendlyDate()"
class="date-marker-text" /> class="date-marker-text"
/>
</div> </div>
</div> </div>
</template> </template>

View file

@ -6,7 +6,8 @@
action="" action=""
autocomplete="off" autocomplete="off"
@keydown.esc.prevent="$emit('toggleJoinChannel')" @keydown.esc.prevent="$emit('toggleJoinChannel')"
@submit.prevent="onSubmit"> @submit.prevent="onSubmit"
>
<input <input
v-model="inputChannel" v-model="inputChannel"
v-focus v-focus
@ -17,7 +18,8 @@
pattern="[^\s]+" pattern="[^\s]+"
maxlength="200" maxlength="200"
title="The channel name may not contain spaces" title="The channel name may not contain spaces"
required> required
>
<input <input
v-model="inputPassword" v-model="inputPassword"
type="password" type="password"
@ -27,10 +29,12 @@
pattern="[^\s]+" pattern="[^\s]+"
maxlength="200" maxlength="200"
title="The channel password may not contain spaces" title="The channel password may not contain spaces"
autocomplete="new-password"> autocomplete="new-password"
>
<button <button
type="submit" type="submit"
class="btn btn-small">Join</button> class="btn btn-small"
>Join</button>
</form> </form>
</template> </template>

View file

@ -3,17 +3,20 @@
v-if="link.shown" v-if="link.shown"
v-show="link.canDisplay" v-show="link.canDisplay"
ref="container" ref="container"
class="preview"> class="preview"
>
<div <div
ref="content" ref="content"
:class="['toggle-content', 'toggle-type-' + link.type, { opened: isContentShown }]"> :class="['toggle-content', 'toggle-type-' + link.type, { opened: isContentShown }]"
>
<template v-if="link.type === 'link'"> <template v-if="link.type === 'link'">
<a <a
v-if="link.thumb" v-if="link.thumb"
:href="link.link" :href="link.link"
class="toggle-thumbnail" class="toggle-thumbnail"
target="_blank" target="_blank"
rel="noopener"> rel="noopener"
>
<img <img
:src="link.thumb" :src="link.thumb"
decoding="async" decoding="async"
@ -21,7 +24,8 @@
class="thumb" class="thumb"
@error="onThumbnailError" @error="onThumbnailError"
@abort="onThumbnailError" @abort="onThumbnailError"
@load="onPreviewReady"> @load="onPreviewReady"
>
</a> </a>
<div class="toggle-text"> <div class="toggle-text">
<div class="head"> <div class="head">
@ -30,7 +34,8 @@
:href="link.link" :href="link.link"
:title="link.head" :title="link.head"
target="_blank" target="_blank"
rel="noopener">{{ link.head }}</a> rel="noopener"
>{{ link.head }}</a>
</div> </div>
<button <button
@ -38,7 +43,8 @@
:aria-expanded="isContentShown" :aria-expanded="isContentShown"
:aria-label="moreButtonLabel" :aria-label="moreButtonLabel"
class="more" class="more"
@click="onMoreClick"><span class="more-caret" /></button> @click="onMoreClick"
><span class="more-caret" /></button>
</div> </div>
<div class="body overflowable"> <div class="body overflowable">
@ -46,7 +52,8 @@
:href="link.link" :href="link.link"
:title="link.body" :title="link.body"
target="_blank" target="_blank"
rel="noopener">{{ link.body }}</a> rel="noopener"
>{{ link.body }}</a>
</div> </div>
</div> </div>
</template> </template>
@ -55,32 +62,38 @@
:href="link.link" :href="link.link"
class="toggle-thumbnail" class="toggle-thumbnail"
target="_blank" target="_blank"
rel="noopener"> rel="noopener"
>
<img <img
:src="link.thumb" :src="link.thumb"
decoding="async" decoding="async"
alt="" alt=""
@load="onPreviewReady"> @load="onPreviewReady"
>
</a> </a>
</template> </template>
<template v-else-if="link.type === 'video'"> <template v-else-if="link.type === 'video'">
<video <video
preload="metadata" preload="metadata"
controls controls
@canplay="onPreviewReady"> @canplay="onPreviewReady"
>
<source <source
:src="link.media" :src="link.media"
:type="link.mediaType"> :type="link.mediaType"
>
</video> </video>
</template> </template>
<template v-else-if="link.type === 'audio'"> <template v-else-if="link.type === 'audio'">
<audio <audio
controls controls
preload="metadata" preload="metadata"
@canplay="onPreviewReady"> @canplay="onPreviewReady"
>
<source <source
:src="link.media" :src="link.media"
:type="link.mediaType"> :type="link.mediaType"
>
</audio> </audio>
</template> </template>
<template v-else-if="link.type === 'error'"> <template v-else-if="link.type === 'error'">
@ -90,7 +103,8 @@
<a <a
:href="link.link" :href="link.link"
target="_blank" target="_blank"
rel="noopener">Click here</a> rel="noopener"
>Click here</a>
to open it in a new window. to open it in a new window.
</em> </em>
<template v-else-if="link.error === 'message'"> <template v-else-if="link.error === 'message'">
@ -100,7 +114,8 @@
<a <a
:href="link.link" :href="link.link"
target="_blank" target="_blank"
rel="noopener">Click here</a> rel="noopener"
>Click here</a>
to open it in a new window. to open it in a new window.
</em> </em>
<br> <br>
@ -111,7 +126,8 @@
:aria-expanded="isContentShown" :aria-expanded="isContentShown"
:aria-label="moreButtonLabel" :aria-label="moreButtonLabel"
class="more" class="more"
@click="onMoreClick"><span class="more-caret" /></button> @click="onMoreClick"
><span class="more-caret" /></button>
</template> </template>
</template> </template>
</div> </div>

View file

@ -2,7 +2,8 @@
<button <button
v-if="link.type !== 'loading'" v-if="link.type !== 'loading'"
:class="['toggle-button', 'toggle-preview', { opened: link.shown }]" :class="['toggle-button', 'toggle-preview', { opened: link.shown }]"
@click="onClick" /> @click="onClick"
/>
</template> </template>
<script> <script>

View file

@ -2,16 +2,19 @@
<div <div
:id="'msg-' + message.id" :id="'msg-' + message.id"
:class="['msg', message.type, {self: message.self, highlight: message.highlight}]" :class="['msg', message.type, {self: message.self, highlight: message.highlight}]"
:data-from="message.from && message.from.nick"> :data-from="message.from && message.from.nick"
>
<span <span
:aria-label="message.time | localetime" :aria-label="message.time | localetime"
class="time tooltipped tooltipped-e">{{ messageTime }} </span> class="time tooltipped tooltipped-e"
>{{ messageTime }} </span>
<template v-if="message.type === 'unhandled'"> <template v-if="message.type === 'unhandled'">
<span class="from">[{{ message.command }}]</span> <span class="from">[{{ message.command }}]</span>
<span class="content"> <span class="content">
<span <span
v-for="(param, id) in message.params" v-for="(param, id) in message.params"
:key="id">{{ param }} </span> :key="id"
>{{ param }} </span>
</span> </span>
</template> </template>
<template v-else-if="isAction()"> <template v-else-if="isAction()">
@ -19,25 +22,29 @@
<Component <Component
:is="messageComponent" :is="messageComponent"
:network="network" :network="network"
:message="message" /> :message="message"
/>
</template> </template>
<template v-else-if="message.type === 'action'"> <template v-else-if="message.type === 'action'">
<span class="from"><span class="only-copy">* </span></span> <span class="from"><span class="only-copy">* </span></span>
<span class="content"> <span class="content">
<Username :user="message.from" />&#32;<ParsedMessage <Username :user="message.from" />&#32;<ParsedMessage
:network="network" :network="network"
:message="message" /> :message="message"
/>
<LinkPreview <LinkPreview
v-for="preview in message.previews" v-for="preview in message.previews"
:key="preview.link" :key="preview.link"
:keep-scroll-position="keepScrollPosition" :keep-scroll-position="keepScrollPosition"
:link="preview" /> :link="preview"
/>
</span> </span>
</template> </template>
<template v-else> <template v-else>
<span <span
v-if="message.type === 'message'" v-if="message.type === 'message'"
class="from"> class="from"
>
<template v-if="message.from && message.from.nick"> <template v-if="message.from && message.from.nick">
<span class="only-copy">&lt;</span> <span class="only-copy">&lt;</span>
<Username :user="message.from" /> <Username :user="message.from" />
@ -46,7 +53,8 @@
</span> </span>
<span <span
v-else v-else
class="from"> class="from"
>
<template v-if="message.from && message.from.nick"> <template v-if="message.from && message.from.nick">
<span class="only-copy">-</span> <span class="only-copy">-</span>
<Username :user="message.from" /> <Username :user="message.from" />
@ -56,12 +64,14 @@
<span class="content"> <span class="content">
<ParsedMessage <ParsedMessage
:network="network" :network="network"
:message="message" /> :message="message"
/>
<LinkPreview <LinkPreview
v-for="preview in message.previews" v-for="preview in message.previews"
:key="preview.link" :key="preview.link"
:keep-scroll-position="keepScrollPosition" :keep-scroll-position="keepScrollPosition"
:link="preview" /> :link="preview"
/>
</span> </span>
</template> </template>
</div> </div>

View file

@ -5,15 +5,18 @@
<span class="from" /> <span class="from" />
<span <span
class="content" class="content"
@click="onCollapseClick">{{ condensedText }}<button @click="onCollapseClick"
class="toggle-button" >{{ condensedText }}<button
aria-label="Toggle status messages" /></span> class="toggle-button"
aria-label="Toggle status messages"
/></span>
</div> </div>
<Message <Message
v-for="message in messages" v-for="message in messages"
:key="message.id" :key="message.id"
:network="network" :network="network"
:message="message" /> :message="message"
/>
</div> </div>
</template> </template>

View file

@ -2,13 +2,15 @@
<div <div
ref="chat" ref="chat"
class="chat" class="chat"
tabindex="-1"> tabindex="-1"
>
<div :class="['show-more', { show: channel.moreHistoryAvailable }]"> <div :class="['show-more', { show: channel.moreHistoryAvailable }]">
<button <button
ref="loadMoreButton" ref="loadMoreButton"
:disabled="channel.historyLoading || !$root.isConnected" :disabled="channel.historyLoading || !$root.isConnected"
class="btn" class="btn"
@click="onShowMoreClick"> @click="onShowMoreClick"
>
<span v-if="channel.historyLoading">Loading</span> <span v-if="channel.historyLoading">Loading</span>
<span v-else>Show older messages</span> <span v-else>Show older messages</span>
</button> </button>
@ -18,16 +20,19 @@
role="log" role="log"
aria-live="polite" aria-live="polite"
aria-relevant="additions" aria-relevant="additions"
@copy="onCopy"> @copy="onCopy"
>
<template v-for="(message, id) in condensedMessages"> <template v-for="(message, id) in condensedMessages">
<DateMarker <DateMarker
v-if="shouldDisplayDateMarker(message, id)" v-if="shouldDisplayDateMarker(message, id)"
:key="message.id + '-date'" :key="message.id + '-date'"
:message="message" /> :message="message"
/>
<div <div
v-if="shouldDisplayUnreadMarker(message.id)" v-if="shouldDisplayUnreadMarker(message.id)"
:key="message.id + '-unread'" :key="message.id + '-unread'"
class="unread-marker"> class="unread-marker"
>
<span class="unread-marker-text" /> <span class="unread-marker-text" />
</div> </div>
@ -36,14 +41,16 @@
:key="message.id" :key="message.id"
:network="network" :network="network"
:keep-scroll-position="keepScrollPosition" :keep-scroll-position="keepScrollPosition"
:messages="message.messages" /> :messages="message.messages"
/>
<Message <Message
v-else v-else
:key="message.id" :key="message.id"
:network="network" :network="network"
:message="message" :message="message"
:keep-scroll-position="keepScrollPosition" :keep-scroll-position="keepScrollPosition"
@linkPreviewToggle="onLinkPreviewToggle" /> @linkPreviewToggle="onLinkPreviewToggle"
/>
</template> </template>
</div> </div>
</div> </div>

View file

@ -3,13 +3,15 @@
<ParsedMessage <ParsedMessage
v-if="message.self" v-if="message.self"
:network="network" :network="network"
:message="message" /> :message="message"
/>
<template v-else> <template v-else>
<Username :user="message.from" /> <Username :user="message.from" />
is away is away
<i class="away-message">(<ParsedMessage <i class="away-message">(<ParsedMessage
:network="network" :network="network"
:message="message" />)</i> :message="message"
/>)</i>
</template> </template>
</span> </span>
</template> </template>

View file

@ -3,7 +3,8 @@
<ParsedMessage <ParsedMessage
v-if="message.self" v-if="message.self"
:network="network" :network="network"
:message="message" /> :message="message"
/>
<template v-else> <template v-else>
<Username :user="message.from" /> <Username :user="message.from" />
is back is back

View file

@ -5,10 +5,12 @@
<span v-if="message.invitedYou">you</span> <span v-if="message.invitedYou">you</span>
<Username <Username
v-else v-else
:user="message.target" /> :user="message.target"
/>
to <ParsedMessage to <ParsedMessage
:network="network" :network="network"
:text="message.channel" /> :text="message.channel"
/>
</span> </span>
</template> </template>

View file

@ -5,9 +5,11 @@
<Username :user="message.target" /> <Username :user="message.target" />
<i <i
v-if="message.text" v-if="message.text"
class="part-reason"> (<ParsedMessage class="part-reason"
:network="network" > (<ParsedMessage
:message="message" />)</i> :network="network"
:message="message"
/>)</i>
</span> </span>
</template> </template>

View file

@ -2,7 +2,8 @@
<span class="content"> <span class="content">
<span class="text"><ParsedMessage <span class="text"><ParsedMessage
:network="network" :network="network"
:text="cleanText" /></span> :text="cleanText"
/></span>
</span> </span>
</template> </template>

View file

@ -3,9 +3,11 @@
<Username :user="message.from" /> <Username :user="message.from" />
<i class="hostmask"> ({{ message.hostmask }})</i> has left the channel <i <i class="hostmask"> ({{ message.hostmask }})</i> has left the channel <i
v-if="message.text" v-if="message.text"
class="part-reason">(<ParsedMessage class="part-reason"
:network="network" >(<ParsedMessage
:message="message" />)</i> :network="network"
:message="message"
/>)</i>
</span> </span>
</template> </template>

View file

@ -3,9 +3,11 @@
<Username :user="message.from" /> <Username :user="message.from" />
<i class="hostmask"> ({{ message.hostmask }})</i> has quit <i <i class="hostmask"> ({{ message.hostmask }})</i> has quit <i
v-if="message.text" v-if="message.text"
class="quit-reason">(<ParsedMessage class="quit-reason"
:network="network" >(<ParsedMessage
:message="message" />)</i> :network="network"
:message="message"
/>)</i>
</span> </span>
</template> </template>

View file

@ -4,9 +4,11 @@
<template v-else>The topic is: </template> <template v-else>The topic is: </template>
<span <span
v-if="message.text" v-if="message.text"
class="new-topic"><ParsedMessage class="new-topic"
:network="network" ><ParsedMessage
:message="message" /></span> :network="network"
:message="message"
/></span>
</span> </span>
</template> </template>

View file

@ -20,7 +20,8 @@
<a <a
:href="'https://ipinfo.io/' + message.whois.actual_ip" :href="'https://ipinfo.io/' + message.whois.actual_ip"
target="_blank" target="_blank"
rel="noopener">{{ message.whois.actual_ip }}</a> rel="noopener"
>{{ message.whois.actual_ip }}</a>
<i v-if="message.whois.actual_hostname != message.whois.actual_ip"> ({{ message.whois.actual_hostname }})</i> <i v-if="message.whois.actual_hostname != message.whois.actual_ip"> ({{ message.whois.actual_hostname }})</i>
</dd> </dd>
</template> </template>
@ -29,7 +30,8 @@
<dt>Real name:</dt> <dt>Real name:</dt>
<dd><ParsedMessage <dd><ParsedMessage
:network="network" :network="network"
:text="message.whois.real_name" /></dd> :text="message.whois.real_name"
/></dd>
</template> </template>
<template v-if="message.whois.registered_nick"> <template v-if="message.whois.registered_nick">
@ -41,7 +43,8 @@
<dt>Channels:</dt> <dt>Channels:</dt>
<dd><ParsedMessage <dd><ParsedMessage
:network="network" :network="network"
:text="message.whois.channels" /></dd> :text="message.whois.channels"
/></dd>
</template> </template>
<template v-if="message.whois.modes"> <template v-if="message.whois.modes">
@ -75,7 +78,8 @@
<dt>Away:</dt> <dt>Away:</dt>
<dd><ParsedMessage <dd><ParsedMessage
:network="network" :network="network"
:text="message.whois.away" /></dd> :text="message.whois.away"
/></dd>
</template> </template>
<template v-if="message.whois.secure"> <template v-if="message.whois.secure">

View file

@ -1,7 +1,8 @@
<template> <template>
<div <div
v-if="networks.length === 0" v-if="networks.length === 0"
class="empty"> class="empty"
>
You are not connected to any networks yet. You are not connected to any networks yet.
</div> </div>
<Draggable <Draggable
@ -11,7 +12,8 @@
class="networks" class="networks"
@change="onNetworkSort" @change="onNetworkSort"
@start="onDragStart" @start="onDragStart"
@end="onDragEnd"> @end="onDragEnd"
>
<div <div
v-for="network in networks" v-for="network in networks"
:id="'network-' + network.uuid" :id="'network-' + network.uuid"
@ -24,17 +26,20 @@
:data-uuid="network.uuid" :data-uuid="network.uuid"
:data-nick="network.nick" :data-nick="network.nick"
class="network" class="network"
role="region"> role="region"
>
<NetworkLobby <NetworkLobby
:network="network" :network="network"
:active-channel="activeChannel" :active-channel="activeChannel"
:is-join-channel-shown="network.isJoinChannelShown" :is-join-channel-shown="network.isJoinChannelShown"
@toggleJoinChannel="network.isJoinChannelShown = !network.isJoinChannelShown" /> @toggleJoinChannel="network.isJoinChannelShown = !network.isJoinChannelShown"
/>
<JoinChannel <JoinChannel
v-if="network.isJoinChannelShown" v-if="network.isJoinChannelShown"
:network="network" :network="network"
:channel="network.channels[0]" :channel="network.channels[0]"
@toggleJoinChannel="network.isJoinChannelShown = !network.isJoinChannelShown" /> @toggleJoinChannel="network.isJoinChannelShown = !network.isJoinChannelShown"
/>
<Draggable <Draggable
:options="{ draggable: '.chan', ghostClass: 'chan-placeholder', disabled: isSortingEnabled }" :options="{ draggable: '.chan', ghostClass: 'chan-placeholder', disabled: isSortingEnabled }"
@ -42,14 +47,16 @@
class="channels" class="channels"
@change="onChannelSort" @change="onChannelSort"
@start="onDragStart" @start="onDragStart"
@end="onDragEnd"> @end="onDragEnd"
>
<Channel <Channel
v-for="(channel, index) in network.channels" v-for="(channel, index) in network.channels"
v-if="index > 0" v-if="index > 0"
:key="channel.id" :key="channel.id"
:channel="channel" :channel="channel"
:network="network" :network="network"
:active-channel="activeChannel" /> :active-channel="activeChannel"
/>
</Draggable> </Draggable>
</div> </div>
</Draggable> </Draggable>

View file

@ -2,44 +2,53 @@
<ChannelWrapper <ChannelWrapper
:network="network" :network="network"
:channel="channel" :channel="channel"
:active-channel="activeChannel"> :active-channel="activeChannel"
>
<button <button
v-if="network.channels.length > 1" v-if="network.channels.length > 1"
:aria-controls="'network-' + network.uuid" :aria-controls="'network-' + network.uuid"
:aria-label="getExpandLabel(network)" :aria-label="getExpandLabel(network)"
:aria-expanded="!network.isCollapsed" :aria-expanded="!network.isCollapsed"
class="collapse-network" class="collapse-network"
@click.stop="onCollapseClick"><span class="collapse-network-icon" /></button> @click.stop="onCollapseClick"
><span class="collapse-network-icon" /></button>
<span <span
v-else v-else
class="collapse-network" /> class="collapse-network"
/>
<div class="lobby-wrap"> <div class="lobby-wrap">
<span <span
:title="channel.name" :title="channel.name"
class="name">{{ channel.name }}</span> class="name"
>{{ channel.name }}</span>
<span <span
class="not-secure-tooltip tooltipped tooltipped-w" class="not-secure-tooltip tooltipped tooltipped-w"
aria-label="Insecure connection"> aria-label="Insecure connection"
>
<span class="not-secure-icon" /> <span class="not-secure-icon" />
</span> </span>
<span <span
class="not-connected-tooltip tooltipped tooltipped-w" class="not-connected-tooltip tooltipped tooltipped-w"
aria-label="Disconnected"> aria-label="Disconnected"
>
<span class="not-connected-icon" /> <span class="not-connected-icon" />
</span> </span>
<span <span
v-if="channel.unread" v-if="channel.unread"
:class="{ highlight: channel.highlight }" :class="{ highlight: channel.highlight }"
class="badge">{{ channel.unread | roundBadgeNumber }}</span> class="badge"
>{{ channel.unread | roundBadgeNumber }}</span>
</div> </div>
<span <span
:aria-label="joinChannelLabel" :aria-label="joinChannelLabel"
class="add-channel-tooltip tooltipped tooltipped-w tooltipped-no-touch"> class="add-channel-tooltip tooltipped tooltipped-w tooltipped-no-touch"
>
<button <button
:class="['add-channel', { opened: isJoinChannelShown }]" :class="['add-channel', { opened: isJoinChannelShown }]"
:aria-controls="'join-channel-' + channel.id" :aria-controls="'join-channel-' + channel.id"
:aria-label="joinChannelLabel" :aria-label="joinChannelLabel"
@click.stop="$emit('toggleJoinChannel')" /> @click.stop="$emit('toggleJoinChannel')"
/>
</span> </span>
</ChannelWrapper> </ChannelWrapper>
</template> </template>

View file

@ -10,7 +10,8 @@
<tbody> <tbody>
<tr <tr
v-for="ban in channel.data" v-for="ban in channel.data"
:key="ban.hostmask"> :key="ban.hostmask"
>
<td class="hostmask">{{ ban.hostmask }}</td> <td class="hostmask">{{ ban.hostmask }}</td>
<td class="banned_by">{{ ban.banned_by }}</td> <td class="banned_by">{{ ban.banned_by }}</td>
<td class="banned_at">{{ ban.banned_at | localetime }}</td> <td class="banned_at">{{ ban.banned_at | localetime }}</td>

View file

@ -2,7 +2,8 @@
<span v-if="channel.data.text">{{ channel.data.text }}</span> <span v-if="channel.data.text">{{ channel.data.text }}</span>
<table <table
v-else v-else
class="channel-list"> class="channel-list"
>
<thead> <thead>
<tr> <tr>
<th class="channel">Channel</th> <th class="channel">Channel</th>
@ -13,14 +14,17 @@
<tbody> <tbody>
<tr <tr
v-for="chan in channel.data" v-for="chan in channel.data"
:key="chan.channel"> :key="chan.channel"
>
<td class="channel"><ParsedMessage <td class="channel"><ParsedMessage
:network="network" :network="network"
:text="chan.channel" /></td> :text="chan.channel"
/></td>
<td class="users">{{ chan.num_users }}</td> <td class="users">{{ chan.num_users }}</td>
<td class="topic"><ParsedMessage <td class="topic"><ParsedMessage
:network="network" :network="network"
:text="chan.topic" /></td> :text="chan.topic"
/></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View file

@ -9,7 +9,8 @@
<tbody> <tbody>
<tr <tr
v-for="user in channel.data" v-for="user in channel.data"
:key="user.hostmask"> :key="user.hostmask"
>
<td class="hostmask">{{ user.hostmask }}</td> <td class="hostmask">{{ user.hostmask }}</td>
<td class="when">{{ user.when | localetime }}</td> <td class="when">{{ user.when | localetime }}</td>
</tr> </tr>

View file

@ -3,7 +3,8 @@
:class="['user', $options.filters.colorClass(user.nick), { active: active }]" :class="['user', $options.filters.colorClass(user.nick), { active: active }]"
:data-name="user.nick" :data-name="user.nick"
role="button" role="button"
v-on="onHover ? { mouseover: hover } : {}">{{ user.mode }}{{ user.nick }}</span> v-on="onHover ? { mouseover: hover } : {}"
>{{ user.mode }}{{ user.nick }}</span>
</template> </template>
<script> <script>

View file

@ -4,7 +4,8 @@
:data-name="user.original.nick" :data-name="user.original.nick"
role="button" role="button"
@mouseover="hover" @mouseover="hover"
v-html="user.original.mode + user.string" /> v-html="user.original.mode + user.string"
/>
</template> </template>
<script> <script>

View file

@ -3,7 +3,8 @@
<ParsedMessage <ParsedMessage
:text="text" :text="text"
:message="message" :message="message"
:network="network" /> :network="network"
/>
</div> </div>
</template> </template>