diff --git a/.eslintignore b/.eslintignore index f261dd2e..1f2ae53f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,2 @@ -# third party -client/js/libs/jquery/*.js - public/ coverage/ diff --git a/.npmignore b/.npmignore index 616d4ced..7a6412fb 100644 --- a/.npmignore +++ b/.npmignore @@ -9,8 +9,8 @@ # Ignore client folder as it's being built into public/ folder # except for the specified files which are used by the server client/** -!client/js/libs/handlebars/ircmessageparser/findLinks.js -!client/js/libs/handlebars/ircmessageparser/cleanIrcMessage.js +!client/js/helpers/ircmessageparser/findLinks.js +!client/js/helpers/ircmessageparser/cleanIrcMessage.js !client/index.html.tpl public/js/bundle.vendor.js.map diff --git a/client/components/App.vue b/client/components/App.vue index 76820e4d..09841cde 100644 --- a/client/components/App.vue +++ b/client/components/App.vue @@ -1,95 +1,44 @@ diff --git a/client/components/Channel.vue b/client/components/Channel.vue index e48df51a..05a68003 100644 --- a/client/components/Channel.vue +++ b/client/components/Channel.vue @@ -1,8 +1,8 @@ diff --git a/client/components/ChannelWrapper.vue b/client/components/ChannelWrapper.vue index 6e010735..7cbee728 100644 --- a/client/components/ChannelWrapper.vue +++ b/client/components/ChannelWrapper.vue @@ -1,11 +1,8 @@ diff --git a/client/components/Chat.vue b/client/components/Chat.vue index 2be5ee3a..c6fb5ef8 100644 --- a/client/components/Chat.vue +++ b/client/components/Chat.vue @@ -2,23 +2,20 @@
-
@@ -77,11 +82,11 @@
- {{ this.$root.currentUserVisibleError }} + {{ this.$store.state.currentUserVisibleError }}
@@ -89,11 +94,12 @@ diff --git a/client/components/ChatInput.vue b/client/components/ChatInput.vue index d10f0305..ca590ea0 100644 --- a/client/components/ChatInput.vue +++ b/client/components/ChatInput.vue @@ -8,12 +8,11 @@ :value="channel.pendingMessage" :placeholder="getInputPlaceholder(channel)" :aria-label="getInputPlaceholder(channel)" - class="mousetrap" @input="setPendingMessage" @keypress.enter.exact.prevent="onSubmit" /> diff --git a/client/components/DateMarker.vue b/client/components/DateMarker.vue index a7d89a00..eacef30f 100644 --- a/client/components/DateMarker.vue +++ b/client/components/DateMarker.vue @@ -1,13 +1,16 @@ diff --git a/client/components/InlineChannel.vue b/client/components/InlineChannel.vue new file mode 100644 index 00000000..2a1478cf --- /dev/null +++ b/client/components/InlineChannel.vue @@ -0,0 +1,30 @@ + + + diff --git a/client/components/JoinChannel.vue b/client/components/JoinChannel.vue index 7d0e1669..f18ca848 100644 --- a/client/components/JoinChannel.vue +++ b/client/components/JoinChannel.vue @@ -59,14 +59,12 @@ export default { }, methods: { onSubmit() { - const channelToFind = this.inputChannel.toLowerCase(); - const existingChannel = this.network.channels.find( - (c) => c.name.toLowerCase() === channelToFind + const existingChannel = this.$store.getters.findChannelOnCurrentNetwork( + this.inputChannel ); if (existingChannel) { - const $ = require("jquery"); - $(`#sidebar .chan[data-id="${existingChannel.id}"]`).trigger("click"); + this.$root.switchToChannel(existingChannel); } else { const chanTypes = this.network.serverOptions.CHANTYPES; let channel = this.inputChannel; diff --git a/client/components/LinkPreview.vue b/client/components/LinkPreview.vue index 298ec998..41692ae9 100644 --- a/client/components/LinkPreview.vue +++ b/client/components/LinkPreview.vue @@ -1,5 +1,11 @@ diff --git a/client/components/NetworkList.vue b/client/components/NetworkList.vue index f099b840..c10e2f8d 100644 --- a/client/components/NetworkList.vue +++ b/client/components/NetworkList.vue @@ -26,14 +26,11 @@ 'not-connected': !network.status.connected, 'not-secure': !network.status.secure, }" - :data-uuid="network.uuid" - :data-nick="network.nick" class="network" role="region" > @@ -63,7 +60,6 @@ :key="channel.id" :channel="channel" :network="network" - :active-channel="activeChannel" />
@@ -86,9 +82,10 @@ export default { Channel, Draggable, }, - props: { - activeChannel: Object, - networks: Array, + computed: { + networks() { + return this.$store.state.networks; + }, }, methods: { isCurrentlyInTouch(e) { @@ -116,8 +113,7 @@ export default { return; } - const {findChannel} = require("../js/vue"); - const channel = findChannel(e.moved.element.id); + const channel = this.$store.getters.findChannel(e.moved.element.id); if (!channel) { return; diff --git a/client/components/NetworkLobby.vue b/client/components/NetworkLobby.vue index 2d802710..0f22af13 100644 --- a/client/components/NetworkLobby.vue +++ b/client/components/NetworkLobby.vue @@ -1,5 +1,5 @@