mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 04:23:13 +00:00
Enable .js linter
This commit is contained in:
parent
db803a8548
commit
5f5b5fef3d
11 changed files with 18 additions and 23 deletions
|
@ -1,6 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<span v-if="channel.data.text">{{ channel.data.text }}</span>
|
<span v-if="channel.data.text">{{ channel.data.text }}</span>
|
||||||
<table v-else class="channel-list">
|
<table
|
||||||
|
v-else
|
||||||
|
class="channel-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="channel">Channel</th>
|
<th class="channel">Channel</th>
|
||||||
|
|
|
@ -80,7 +80,7 @@ function handleKeybinds(networks) {
|
||||||
const existingChannel = utils.findCurrentNetworkChan(channel);
|
const existingChannel = utils.findCurrentNetworkChan(channel);
|
||||||
|
|
||||||
if (existingChannel) {
|
if (existingChannel) {
|
||||||
$(`#sidebar .chan[data-id="${chan.id}"]`).trigger("click");
|
$(`#sidebar .chan[data-id="${existingChannel.id}"]`).trigger("click");
|
||||||
} else {
|
} else {
|
||||||
socket.emit("input", {
|
socket.emit("input", {
|
||||||
text: `/join ${channel} ${key}`,
|
text: `/join ${channel} ${key}`,
|
||||||
|
|
|
@ -149,8 +149,8 @@ window.vueMounted = () => {
|
||||||
let hasAnyHighlights = false;
|
let hasAnyHighlights = false;
|
||||||
|
|
||||||
for (const network of vueApp.networks) {
|
for (const network of vueApp.networks) {
|
||||||
for (const channel of network.channels) {
|
for (const chan of network.channels) {
|
||||||
if (channel.highlight > 0) {
|
if (chan.highlight > 0) {
|
||||||
hasAnyHighlights = true;
|
hasAnyHighlights = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,9 +96,6 @@ function processReceivedMessage(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function notifyMessage(targetId, channel, msg) {
|
function notifyMessage(targetId, channel, msg) {
|
||||||
const serverUnread = msg.unread;
|
|
||||||
const serverHighlight = msg.highlight;
|
|
||||||
|
|
||||||
msg = msg.msg;
|
msg = msg.msg;
|
||||||
|
|
||||||
if (msg.self) {
|
if (msg.self) {
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const socket = require("../socket");
|
const socket = require("../socket");
|
||||||
const render = require("../render");
|
const {findChannel} = require("../vue");
|
||||||
const {vueApp, findChannel} = require("../vue");
|
|
||||||
|
|
||||||
socket.on("names", function(data) {
|
socket.on("names", function(data) {
|
||||||
const channel = findChannel(data.id);
|
const channel = findChannel(data.id);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const $ = require("jquery");
|
|
||||||
const socket = require("../socket");
|
const socket = require("../socket");
|
||||||
const utils = require("../utils");
|
const utils = require("../utils");
|
||||||
const {vueApp, findChannel} = require("../vue");
|
const {vueApp, findChannel} = require("../vue");
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const $ = require("jquery");
|
|
||||||
const socket = require("../socket");
|
const socket = require("../socket");
|
||||||
const {vueApp, findChannel} = require("../vue");
|
const {vueApp, findChannel} = require("../vue");
|
||||||
|
|
||||||
|
|
|
@ -44,14 +44,14 @@ const vueApp = new Vue({
|
||||||
userStyles: "",
|
userStyles: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
Vue.nextTick(() => window.vueMounted());
|
||||||
|
},
|
||||||
render(createElement) {
|
render(createElement) {
|
||||||
return createElement(App, {
|
return createElement(App, {
|
||||||
props: this,
|
props: this,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
Vue.nextTick(() => window.vueMounted());
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function findChannel(id) {
|
function findChannel(id) {
|
||||||
|
|
|
@ -31,10 +31,10 @@ module.exports = function(irc, network) {
|
||||||
|
|
||||||
const chanName = `Banlist for ${channel}`;
|
const chanName = `Banlist for ${channel}`;
|
||||||
let chan = network.getChannel(chanName);
|
let chan = network.getChannel(chanName);
|
||||||
const data = bans.map((data) => ({
|
const data = bans.map((ban) => ({
|
||||||
hostmask: data.banned,
|
hostmask: ban.banned,
|
||||||
banned_by: data.banned_by,
|
banned_by: ban.banned_by,
|
||||||
banned_at: data.banned_at * 1000,
|
banned_at: ban.banned_at * 1000,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (typeof chan === "undefined") {
|
if (typeof chan === "undefined") {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const Chan = require("../../models/chan");
|
const Chan = require("../../models/chan");
|
||||||
const Msg = require("../../models/msg");
|
|
||||||
|
|
||||||
module.exports = function(irc, network) {
|
module.exports = function(irc, network) {
|
||||||
const client = this;
|
const client = this;
|
||||||
|
|
|
@ -145,12 +145,12 @@ const config = {
|
||||||
port: 9001,
|
port: 9001,
|
||||||
proxy: {
|
proxy: {
|
||||||
"/": {
|
"/": {
|
||||||
context: ['**', '!/css/**', '!/js/**'],
|
context: ["**", "!/css/**", "!/js/**"],
|
||||||
target: 'http://localhost:9000/',
|
target: "http://localhost:9000/",
|
||||||
},
|
},
|
||||||
"/socket.io": {
|
"/socket.io": {
|
||||||
ws: true,
|
ws: true,
|
||||||
target: 'http://localhost:9000',
|
target: "http://localhost:9000",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue