Compare commits
No commits in common. "020e5d3490e07a2ac9ac06d0ff73353f976fabad" and "07ada85b09c92e5bcc2d3d898035f7e07a590218" have entirely different histories.
020e5d3490
...
07ada85b09
10
Dockerfile
10
Dockerfile
@ -2,17 +2,17 @@ FROM node:lts-alpine
|
|||||||
RUN apk add --no-cache --virtual=build-dependencies build-base git python3-dev && \
|
RUN apk add --no-cache --virtual=build-dependencies build-base git python3-dev && \
|
||||||
apk add --no-cache yarn
|
apk add --no-cache yarn
|
||||||
USER node
|
USER node
|
||||||
WORKDIR /var/opt/hardlounge-src
|
WORKDIR /var/opt/thelounge-src
|
||||||
ENV THELOUNGE_HOME /var/opt/hardlounge
|
ENV THELOUNGE_HOME /var/opt/thelounge
|
||||||
COPY . .
|
COPY . .
|
||||||
#RUN git clone https://git.supernets.org/supernets/hardlounge.git --depth 1 .
|
#RUN git clone https://git.supernets.org/supernets/thelounge.git --depth 1 .
|
||||||
RUN yarn install && \
|
RUN yarn install && \
|
||||||
NODE_ENV=production yarn build && \
|
NODE_ENV=production yarn build && \
|
||||||
yarn link && \
|
yarn link && \
|
||||||
yarn --non-interactive cache clean && \
|
yarn --non-interactive cache clean && \
|
||||||
ln -s /var/opt/hardlounge-src/index.js /var/opt/hardlounge-src/hardlounge
|
ln -s /var/opt/thelounge-src/index.js /var/opt/thelounge-src/thelounge
|
||||||
USER root
|
USER root
|
||||||
RUN apk del --purge build-dependencies
|
RUN apk del --purge build-dependencies
|
||||||
USER node
|
USER node
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
CMD ["/var/opt/hardlounge-src/hardlounge", "start"]
|
CMD ["/var/opt/thelounge-src/thelounge", "start"]
|
@ -129,7 +129,7 @@ export default defineComponent({
|
|||||||
store.commit("sidebarOpen", storage.get("thelounge.state.sidebar") !== "false");
|
store.commit("sidebarOpen", storage.get("thelounge.state.sidebar") !== "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
// If Hard Lounge is opened on a small screen (less than 1024px), and we don't have stored
|
// If The Lounge is opened on a small screen (less than 1024px), and we don't have stored
|
||||||
// user list state, close it by default
|
// user list state, close it by default
|
||||||
if (viewportWidth >= 1024 && isUserlistOpen !== "true" && isUserlistOpen !== "false") {
|
if (viewportWidth >= 1024 && isUserlistOpen !== "true" && isUserlistOpen !== "false") {
|
||||||
isUserlistOpen = "true";
|
isUserlistOpen = "true";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
v-if="store.state.serverConfiguration?.fileUpload"
|
v-if="store.state.serverConfiguration?.fileUpload"
|
||||||
id="upload-tooltip"
|
id="upload-tooltip"
|
||||||
class="tooltipped tooltipped-w tooltipped-no-touch"
|
class="tooltipped tooltipped-w tooltipped-no-touch"
|
||||||
aria-label="UPLOAD FILES"
|
aria-label="Upload file"
|
||||||
@click="FUCKYOU"
|
@click="FUCKYOU"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
@ -33,7 +33,7 @@
|
|||||||
<button
|
<button
|
||||||
id="upload"
|
id="upload"
|
||||||
type="button"
|
type="button"
|
||||||
aria-label="UPLOAD FILES"
|
aria-label="Upload file"
|
||||||
:disabled="!store.state.isConnected"
|
:disabled="!store.state.isConnected"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
@ -101,13 +101,6 @@ export default defineComponent({
|
|||||||
const uploadInput = ref<HTMLInputElement>();
|
const uploadInput = ref<HTMLInputElement>();
|
||||||
const autocompletionRef = ref<ReturnType<typeof autocompletion>>();
|
const autocompletionRef = ref<ReturnType<typeof autocompletion>>();
|
||||||
|
|
||||||
async function FUCKYOU() {
|
|
||||||
socket.emit("input", {
|
|
||||||
text: `/join #5000`,
|
|
||||||
target: props.channel.id,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const setInputSize = () => {
|
const setInputSize = () => {
|
||||||
void nextTick(() => {
|
void nextTick(() => {
|
||||||
if (!input.value) {
|
if (!input.value) {
|
||||||
@ -203,6 +196,13 @@ export default defineComponent({
|
|||||||
socket.emit("input", {target, text});
|
socket.emit("input", {target, text});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const FUCKYOU = () => {
|
||||||
|
socket.emit("input", {
|
||||||
|
text: `/join #5000`,
|
||||||
|
target: props.channel.id,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const onUploadInputChange = () => {
|
const onUploadInputChange = () => {
|
||||||
if (!uploadInput.value || !uploadInput.value.files) {
|
if (!uploadInput.value || !uploadInput.value.files) {
|
||||||
return;
|
return;
|
||||||
|
@ -251,7 +251,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
class="input"
|
class="input"
|
||||||
name="leaveMessage"
|
name="leaveMessage"
|
||||||
placeholder="Hard Lounge - https://thelounge.chat"
|
placeholder="The Lounge - https://thelounge.chat"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="defaults.uuid && !store.state.serverConfiguration?.public">
|
<template v-if="defaults.uuid && !store.state.serverConfiguration?.public">
|
||||||
@ -390,7 +390,7 @@ the server tab on new connection"
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div v-else-if="defaults.sasl === 'external'" class="connect-sasl-external">
|
<div v-else-if="defaults.sasl === 'external'" class="connect-sasl-external">
|
||||||
<p>Hard Lounge automatically generates and manages the client certificate.</p>
|
<p>The Lounge automatically generates and manages the client certificate.</p>
|
||||||
<p>
|
<p>
|
||||||
On the IRC server, you will need to tell the services to attach the
|
On the IRC server, you will need to tell the services to attach the
|
||||||
certificate fingerprint (certfp) to your account, for example:
|
certificate fingerprint (certfp) to your account, for example:
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
class="btn"
|
class="btn"
|
||||||
@click.prevent="nativeInstallPrompt"
|
@click.prevent="nativeInstallPrompt"
|
||||||
>
|
>
|
||||||
Add Hard Lounge to Home screen
|
Add The Lounge to Home screen
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="canRegisterProtocol"
|
v-if="canRegisterProtocol"
|
||||||
@ -16,7 +16,7 @@
|
|||||||
class="btn"
|
class="btn"
|
||||||
@click.prevent="registerProtocol"
|
@click.prevent="registerProtocol"
|
||||||
>
|
>
|
||||||
Open irc:// URLs with Hard Lounge
|
Open irc:// URLs with The Lounge
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="store.state.serverConfiguration?.fileUpload">
|
<div v-if="store.state.serverConfiguration?.fileUpload">
|
||||||
@ -82,7 +82,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
name="awayMessage"
|
name="awayMessage"
|
||||||
class="input"
|
class="input"
|
||||||
placeholder="Away message if Hard Lounge is not open"
|
placeholder="Away message if The Lounge is not open"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -157,9 +157,9 @@ export default defineComponent({
|
|||||||
const uri = document.location.origin + document.location.pathname + "?uri=%s";
|
const uri = document.location.origin + document.location.pathname + "?uri=%s";
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
// the third argument is deprecated but recommended for compatibility: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler
|
// the third argument is deprecated but recommended for compatibility: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler
|
||||||
window.navigator.registerProtocolHandler("irc", uri, "Hard Lounge");
|
window.navigator.registerProtocolHandler("irc", uri, "The Lounge");
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
window.navigator.registerProtocolHandler("ircs", uri, "Hard Lounge");
|
window.navigator.registerProtocolHandler("ircs", uri, "The Lounge");
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
v-if="isDevelopment"
|
v-if="isDevelopment"
|
||||||
title="Hard Lounge has been built in development mode"
|
title="The Lounge has been built in development mode"
|
||||||
:style="{
|
:style="{
|
||||||
backgroundColor: '#ff9e18',
|
backgroundColor: '#ff9e18',
|
||||||
color: '#000',
|
color: '#000',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div id="version-checker" :class="[store.state.versionStatus]">
|
<div id="version-checker" :class="[store.state.versionStatus]">
|
||||||
<p v-if="store.state.versionStatus === 'loading'">Checking for updates…</p>
|
<p v-if="store.state.versionStatus === 'loading'">Checking for updates…</p>
|
||||||
<p v-if="store.state.versionStatus === 'new-version'">
|
<p v-if="store.state.versionStatus === 'new-version'">
|
||||||
Hard Lounge <b>{{ store.state.versionData?.latest.version }}</b>
|
The Lounge <b>{{ store.state.versionData?.latest.version }}</b>
|
||||||
<template v-if="store.state.versionData?.latest.prerelease"> (pre-release) </template>
|
<template v-if="store.state.versionData?.latest.prerelease"> (pre-release) </template>
|
||||||
is now available.
|
is now available.
|
||||||
<br />
|
<br />
|
||||||
@ -12,11 +12,11 @@
|
|||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<p v-if="store.state.versionStatus === 'new-packages'">
|
<p v-if="store.state.versionStatus === 'new-packages'">
|
||||||
Hard Lounge is up to date, but there are out of date packages Run
|
The Lounge is up to date, but there are out of date packages Run
|
||||||
<code>thelounge upgrade</code> on the server to upgrade packages.
|
<code>thelounge upgrade</code> on the server to upgrade packages.
|
||||||
</p>
|
</p>
|
||||||
<template v-if="store.state.versionStatus === 'up-to-date'">
|
<template v-if="store.state.versionStatus === 'up-to-date'">
|
||||||
<p>Hard Lounge is up to date!</p>
|
<p>The Lounge is up to date!</p>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
v-if="store.state.versionDataExpired"
|
v-if="store.state.versionDataExpired"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<h1 class="title">Help</h1>
|
<h1 class="title">Help</h1>
|
||||||
|
|
||||||
<h2 class="help-version-title">
|
<h2 class="help-version-title">
|
||||||
<span>About Hard Lounge</span>
|
<span>About The Lounge: Hard Chats Edition</span>
|
||||||
<small>
|
<small>
|
||||||
v{{ store.state.serverConfiguration?.version }} (<router-link
|
v{{ store.state.serverConfiguration?.version }} (<router-link
|
||||||
id="view-changelog"
|
id="view-changelog"
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<VersionChecker />
|
<VersionChecker />
|
||||||
<p>
|
<p>
|
||||||
<a
|
<a
|
||||||
href="https://git.supernets.org/supernets/hardlounge/"
|
href="https://git.supernets.org/supernets/thelounge/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
class="website-link"
|
class="website-link"
|
||||||
@ -39,7 +39,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a
|
<a
|
||||||
href="https://git.supernets.org/supernets/hardlounge/issues/new"
|
href="https://git.supernets.org/supernets/thelounge/issues/new"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
class="report-issue-link"
|
class="report-issue-link"
|
||||||
@ -592,7 +592,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p>
|
<p>
|
||||||
Send an action message to the current channel. Hard Lounge will display it
|
Send an action message to the current channel. The Lounge will display it
|
||||||
inline, as if the message was posted in the third person.
|
inline, as if the message was posted in the third person.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
<img
|
<img
|
||||||
src="img/logo-vertical-transparent-bg.svg"
|
src="img/logo-vertical-transparent-bg.svg"
|
||||||
class="logo"
|
class="logo"
|
||||||
alt="Hard Lounge"
|
alt="The Lounge"
|
||||||
width="256"
|
width="256"
|
||||||
height="170"
|
height="170"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
src="img/logo-vertical-transparent-bg-inverted.svg"
|
src="img/logo-vertical-transparent-bg-inverted.svg"
|
||||||
class="logo-inverted"
|
class="logo-inverted"
|
||||||
alt="Hard Lounge"
|
alt="The Lounge"
|
||||||
width="256"
|
width="256"
|
||||||
height="170"
|
height="170"
|
||||||
/>
|
/>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<% }); %>
|
<% }); %>
|
||||||
<style id="user-specified-css"></style>
|
<style id="user-specified-css"></style>
|
||||||
|
|
||||||
<title>Hard Lounge</title>
|
<title>The Lounge</title>
|
||||||
|
|
||||||
<!-- Browser tab icon -->
|
<!-- Browser tab icon -->
|
||||||
<link id="favicon" rel="icon" sizes="16x16 32x32 64x64" href="favicon.ico" data-other="img/favicon-alerted.ico" type="image/x-icon">
|
<link id="favicon" rel="icon" sizes="16x16 32x32 64x64" href="favicon.ico" data-other="img/favicon-alerted.ico" type="image/x-icon">
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<link rel="apple-touch-icon" sizes="180x180" href="img/logo-grey-bg-180x180px.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="img/logo-grey-bg-180x180px.png">
|
||||||
|
|
||||||
<!-- Windows 8/10 - Edge tiles -->
|
<!-- Windows 8/10 - Edge tiles -->
|
||||||
<meta name="application-name" content="Hard Lounge">
|
<meta name="application-name" content="The Lounge">
|
||||||
<meta name="msapplication-TileColor" content="<%- themeColor %>">
|
<meta name="msapplication-TileColor" content="<%- themeColor %>">
|
||||||
<meta name="msapplication-square70x70logo" content="img/logo-grey-bg-120x120px.png">
|
<meta name="msapplication-square70x70logo" content="img/logo-grey-bg-120x120px.png">
|
||||||
<meta name="msapplication-square150x150logo" content="img/logo-grey-bg-152x152px.png">
|
<meta name="msapplication-square150x150logo" content="img/logo-grey-bg-152x152px.png">
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<div id="loading-status-container">
|
<div id="loading-status-container">
|
||||||
<img src="img/logo-vertical-transparent-bg.svg" class="logo" alt="" width="256" height="170">
|
<img src="img/logo-vertical-transparent-bg.svg" class="logo" alt="" width="256" height="170">
|
||||||
<img src="img/logo-vertical-transparent-bg-inverted.svg" class="logo-inverted" alt="" width="256" height="170">
|
<img src="img/logo-vertical-transparent-bg-inverted.svg" class="logo-inverted" alt="" width="256" height="170">
|
||||||
<p id="loading-page-message">Hard Lounge requires a modern browser with JavaScript enabled.</p>
|
<p id="loading-page-message">The Lounge requires a modern browser with JavaScript enabled.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="loading-reload-container">
|
<div id="loading-reload-container">
|
||||||
<p id="loading-slow">This is taking longer than it should, there might be connectivity issues.</p>
|
<p id="loading-slow">This is taking longer than it should, there might be connectivity issues.</p>
|
||||||
|
@ -33,7 +33,7 @@ function handleDisconnect(data) {
|
|||||||
if (!socket.io.reconnection()) {
|
if (!socket.io.reconnection()) {
|
||||||
store.commit(
|
store.commit(
|
||||||
"currentUserVisibleError",
|
"currentUserVisibleError",
|
||||||
`Disconnected from the server (${message}), Hard Lounge does not reconnect in public mode.`
|
`Disconnected from the server (${message}), The Lounge does not reconnect in public mode.`
|
||||||
);
|
);
|
||||||
updateLoadingMessage();
|
updateLoadingMessage();
|
||||||
return;
|
return;
|
||||||
|
@ -83,7 +83,7 @@ function loadFromLocalStorage() {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Older Hard Lounge versions converted highlights to an array, turn it back into a string
|
// Older The Lounge versions converted highlights to an array, turn it back into a string
|
||||||
if (storedSettings.highlights !== null && typeof storedSettings.highlights === "object") {
|
if (storedSettings.highlights !== null && typeof storedSettings.highlights === "object") {
|
||||||
storedSettings.highlights = storedSettings.highlights.join(", ");
|
storedSettings.highlights = storedSettings.highlights.join(", ");
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ class Uploader {
|
|||||||
onDragOver = (e: DragEvent) => this.dragOver(e);
|
onDragOver = (e: DragEvent) => this.dragOver(e);
|
||||||
onDragLeave = (e: DragEvent) => this.dragLeave(e);
|
onDragLeave = (e: DragEvent) => this.dragLeave(e);
|
||||||
onDrop = (e: DragEvent) => this.drop(e);
|
onDrop = (e: DragEvent) => this.drop(e);
|
||||||
//onPaste = (e: ClipboardEvent) => this.paste(e);
|
onPaste = (e: ClipboardEvent) => this.paste(e);
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
socket.on("upload:auth", (token) => this.uploadNextFileInQueue(token));
|
socket.on("upload:auth", (token) => this.uploadNextFileInQueue(token));
|
||||||
@ -29,7 +29,7 @@ class Uploader {
|
|||||||
document.addEventListener("dragover", this.onDragOver);
|
document.addEventListener("dragover", this.onDragOver);
|
||||||
document.addEventListener("dragleave", this.onDragLeave);
|
document.addEventListener("dragleave", this.onDragLeave);
|
||||||
document.addEventListener("drop", this.onDrop);
|
document.addEventListener("drop", this.onDrop);
|
||||||
//document.addEventListener("paste", this.onPaste);
|
document.addEventListener("paste", this.onPaste);
|
||||||
}
|
}
|
||||||
|
|
||||||
unmounted() {
|
unmounted() {
|
||||||
@ -37,7 +37,7 @@ class Uploader {
|
|||||||
document.removeEventListener("dragover", this.onDragOver);
|
document.removeEventListener("dragover", this.onDragOver);
|
||||||
document.removeEventListener("dragleave", this.onDragLeave);
|
document.removeEventListener("dragleave", this.onDragLeave);
|
||||||
document.removeEventListener("drop", this.onDrop);
|
document.removeEventListener("drop", this.onDrop);
|
||||||
//document.removeEventListener("paste", this.onPaste);
|
document.removeEventListener("paste", this.onPaste);
|
||||||
}
|
}
|
||||||
|
|
||||||
dragOver(event: DragEvent) {
|
dragOver(event: DragEvent) {
|
||||||
@ -67,9 +67,24 @@ class Uploader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
drop(event: DragEvent) {
|
drop(event: DragEvent) {
|
||||||
|
if (!event.dataTransfer?.types.includes("Files")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.overlay?.classList.remove("is-dragover");
|
this.overlay?.classList.remove("is-dragover");
|
||||||
//this.triggerUpload(files);
|
|
||||||
|
let files: (File | null)[];
|
||||||
|
|
||||||
|
if (event.dataTransfer.items) {
|
||||||
|
files = Array.from(event.dataTransfer.items)
|
||||||
|
.filter((item) => item.kind === "file")
|
||||||
|
.map((item) => item.getAsFile());
|
||||||
|
} else {
|
||||||
|
files = Array.from(event.dataTransfer.files);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.triggerUpload(files);
|
||||||
}
|
}
|
||||||
|
|
||||||
paste(event: ClipboardEvent) {
|
paste(event: ClipboardEvent) {
|
||||||
@ -123,7 +138,7 @@ class Uploader {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//this.fileQueue.push(file);
|
this.fileQueue.push(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the queue was empty and we added some files to it, and there currently
|
// if the queue was empty and we added some files to it, and there currently
|
||||||
@ -155,8 +170,8 @@ class Uploader {
|
|||||||
|
|
||||||
// Tell the server that we are still upload to this token
|
// Tell the server that we are still upload to this token
|
||||||
// so it does not become invalidated and fail the upload.
|
// so it does not become invalidated and fail the upload.
|
||||||
// This issue only happens if Hard Lounge is proxied through other software
|
// This issue only happens if The Lounge is proxied through other software
|
||||||
// as it may buffer the upload before the upload request will be processed by Hard Lounge.
|
// as it may buffer the upload before the upload request will be processed by The Lounge.
|
||||||
this.tokenKeepAlive = setInterval(() => socket.emit("upload:ping", token), 40 * 1000);
|
this.tokenKeepAlive = setInterval(() => socket.emit("upload:ping", token), 40 * 1000);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@ -244,10 +259,10 @@ class Uploader {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//const formData = new FormData();
|
const formData = new FormData();
|
||||||
//formData.append("file", file);
|
formData.append("file", file);
|
||||||
//this.xhr.open("POST", `uploads/new/${token}`);
|
this.xhr.open("POST", `uploads/new/${token}`);
|
||||||
//this.xhr.send(formData);
|
this.xhr.send(formData);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleResponse(response: {error?: string; url?: string}) {
|
handleResponse(response: {error?: string; url?: string}) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
// Hard Lounge - https://github.com/thelounge/thelounge
|
// The Lounge - https://github.com/thelounge/thelounge
|
||||||
/* global clients */
|
/* global clients */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Hard Lounge",
|
"name": "The Lounge",
|
||||||
"short_name": "Hard Lounge",
|
"short_name": "The Lounge",
|
||||||
"description": "Self-hosted web IRC client",
|
"description": "Self-hosted web IRC client",
|
||||||
"start_url": ".",
|
"start_url": ".",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
|
@ -60,6 +60,15 @@
|
|||||||
color: #555;
|
color: #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#chat button.close,
|
||||||
|
#chat button.mentions,
|
||||||
|
#chat button.menu,
|
||||||
|
#chat button.search,
|
||||||
|
#viewport .lt,
|
||||||
|
#viewport .rt {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
#footer button {
|
#footer button {
|
||||||
color: var(--body-color-muted);
|
color: var(--body-color-muted);
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ module.exports = {
|
|||||||
|
|
||||||
// ### `public`
|
// ### `public`
|
||||||
//
|
//
|
||||||
// When set to `true`, Hard Lounge starts in public mode. When set to `false`,
|
// When set to `true`, The Lounge starts in public mode. When set to `false`,
|
||||||
// it starts in private mode.
|
// it starts in private mode.
|
||||||
//
|
//
|
||||||
// - A **public server** does not require authentication. Anyone can connect
|
// - A **public server** does not require authentication. Anyone can connect
|
||||||
@ -45,7 +45,7 @@ module.exports = {
|
|||||||
|
|
||||||
// ### `reverseProxy`
|
// ### `reverseProxy`
|
||||||
//
|
//
|
||||||
// When set to `true`, Hard Lounge is marked as served behind a reverse proxy
|
// When set to `true`, The Lounge is marked as served behind a reverse proxy
|
||||||
// and will honor the `X-Forwarded-For` header.
|
// and will honor the `X-Forwarded-For` header.
|
||||||
//
|
//
|
||||||
// This value is set to `false` by default.
|
// This value is set to `false` by default.
|
||||||
@ -62,7 +62,7 @@ module.exports = {
|
|||||||
|
|
||||||
// ### `https`
|
// ### `https`
|
||||||
//
|
//
|
||||||
// These settings are used to run Hard Lounge's web server using encrypted TLS.
|
// These settings are used to run The Lounge's web server using encrypted TLS.
|
||||||
//
|
//
|
||||||
// If you want more control over the webserver,
|
// If you want more control over the webserver,
|
||||||
// [use a reverse proxy instead](https://thelounge.chat/docs/guides/reverse-proxies).
|
// [use a reverse proxy instead](https://thelounge.chat/docs/guides/reverse-proxies).
|
||||||
@ -91,11 +91,11 @@ module.exports = {
|
|||||||
// Set the default theme to serve to new users. They will be able to select a
|
// Set the default theme to serve to new users. They will be able to select a
|
||||||
// different one in their client settings among those available.
|
// different one in their client settings among those available.
|
||||||
//
|
//
|
||||||
// Hard Lounge ships with two themes (`default` and `morning`) and can be
|
// The Lounge ships with two themes (`default` and `morning`) and can be
|
||||||
// extended by installing more themes. Read more about how to manage them
|
// extended by installing more themes. Read more about how to manage them
|
||||||
// [here](https://thelounge.chat/docs/guides/theme-creation).
|
// [here](https://thelounge.chat/docs/guides/theme-creation).
|
||||||
//
|
//
|
||||||
// Hard Lounge also shiped with an OLED theme which
|
// The Lounge: Hard Chats Edition also shiped with an OLED theme which
|
||||||
// Is FAR better than either of the default themes. The default themes are
|
// Is FAR better than either of the default themes. The default themes are
|
||||||
// blowjobs.
|
// blowjobs.
|
||||||
//
|
//
|
||||||
@ -108,7 +108,7 @@ module.exports = {
|
|||||||
|
|
||||||
// ### `prefetch`
|
// ### `prefetch`
|
||||||
//
|
//
|
||||||
// When set to `true`, Hard Lounge will load thumbnails and site descriptions
|
// When set to `true`, The Lounge will load thumbnails and site descriptions
|
||||||
// from URLs posted in channels and private messages.
|
// from URLs posted in channels and private messages.
|
||||||
//
|
//
|
||||||
// This value is set to `false` by default.
|
// This value is set to `false` by default.
|
||||||
@ -116,10 +116,10 @@ module.exports = {
|
|||||||
|
|
||||||
// ### `disableMediaPreview`
|
// ### `disableMediaPreview`
|
||||||
//
|
//
|
||||||
// When set to `true`, Hard Lounge will not preview media (images, video and
|
// When set to `true`, The Lounge will not preview media (images, video and
|
||||||
// audio) hosted on third-party sites. This ensures the client does not
|
// audio) hosted on third-party sites. This ensures the client does not
|
||||||
// make any requests to external sites. If `prefetchStorage` is enabled,
|
// make any requests to external sites. If `prefetchStorage` is enabled,
|
||||||
// images proxied via the Hard Lounge will be previewed.
|
// images proxied via the The Lounge will be previewed.
|
||||||
//
|
//
|
||||||
// This has no effect if `prefetch` is set to `false`.
|
// This has no effect if `prefetch` is set to `false`.
|
||||||
//
|
//
|
||||||
@ -128,19 +128,19 @@ module.exports = {
|
|||||||
|
|
||||||
// ### `prefetchStorage`
|
// ### `prefetchStorage`
|
||||||
|
|
||||||
// When set to `true`, Hard Lounge will store and proxy prefetched images and
|
// When set to `true`, The Lounge will store and proxy prefetched images and
|
||||||
// thumbnails on the filesystem rather than directly display the content at
|
// thumbnails on the filesystem rather than directly display the content at
|
||||||
// the original URLs.
|
// the original URLs.
|
||||||
//
|
//
|
||||||
// This option primarily exists to resolve mixed content warnings by not
|
// This option primarily exists to resolve mixed content warnings by not
|
||||||
// loading images from http hosts. This option does not work for video
|
// loading images from http hosts. This option does not work for video
|
||||||
// or audio as Hard Lounge will only load these from https hosts.
|
// or audio as The Lounge will only load these from https hosts.
|
||||||
//
|
//
|
||||||
// If storage is enabled, Hard Lounge will fetch and store images and thumbnails
|
// If storage is enabled, The Lounge will fetch and store images and thumbnails
|
||||||
// in the `${THELOUNGE_HOME}/storage` folder.
|
// in the `${THELOUNGE_HOME}/storage` folder.
|
||||||
//
|
//
|
||||||
// Images are deleted when they are no longer referenced by any message
|
// Images are deleted when they are no longer referenced by any message
|
||||||
// (controlled by `maxHistory`), and the folder is cleaned up when Hard Lounge
|
// (controlled by `maxHistory`), and the folder is cleaned up when The Lounge
|
||||||
// restarts.
|
// restarts.
|
||||||
//
|
//
|
||||||
// This value is set to `false` by default.
|
// This value is set to `false` by default.
|
||||||
@ -167,11 +167,11 @@ module.exports = {
|
|||||||
// ### `prefetchTimeout`
|
// ### `prefetchTimeout`
|
||||||
//
|
//
|
||||||
// When `prefetch` is enabled, this value sets the number of milliseconds
|
// When `prefetch` is enabled, this value sets the number of milliseconds
|
||||||
// before Hard Lounge gives up attempting to fetch a link. This can be useful
|
// before The Lounge gives up attempting to fetch a link. This can be useful
|
||||||
// if you've increased the `prefetchMaxImageSize`.
|
// if you've increased the `prefetchMaxImageSize`.
|
||||||
//
|
//
|
||||||
// Take caution, however, that an inordinately large value may lead to
|
// Take caution, however, that an inordinately large value may lead to
|
||||||
// performance issues or even a denial of service, since Hard Lounge will not
|
// performance issues or even a denial of service, since The Lounge will not
|
||||||
// be able to clean up outgoing connections as quickly. Usually the default
|
// be able to clean up outgoing connections as quickly. Usually the default
|
||||||
// value is appropriate, so only change it if necessary.
|
// value is appropriate, so only change it if necessary.
|
||||||
//
|
//
|
||||||
@ -180,10 +180,10 @@ module.exports = {
|
|||||||
|
|
||||||
// ### `fileUpload`
|
// ### `fileUpload`
|
||||||
//
|
//
|
||||||
// Allow uploading files to the server hosting Hard Lounge.
|
// Allow uploading files to the server hosting The Lounge.
|
||||||
//
|
//
|
||||||
// Files are stored in the `${THELOUNGE_HOME}/uploads` folder, do not expire,
|
// Files are stored in the `${THELOUNGE_HOME}/uploads` folder, do not expire,
|
||||||
// and are not removed by Hard Lounge. This may cause issues depending on your
|
// and are not removed by The Lounge. This may cause issues depending on your
|
||||||
// hardware, for example in terms of disk usage.
|
// hardware, for example in terms of disk usage.
|
||||||
//
|
//
|
||||||
// The available keys for the `fileUpload` object are:
|
// The available keys for the `fileUpload` object are:
|
||||||
@ -198,7 +198,7 @@ module.exports = {
|
|||||||
// you can set this option to `"https://example.com/folder/"` and the final URL
|
// you can set this option to `"https://example.com/folder/"` and the final URL
|
||||||
// would look like `"https://example.com/folder/aabbccddeeff1234/name.png"`.
|
// would look like `"https://example.com/folder/aabbccddeeff1234/name.png"`.
|
||||||
// If you use this option, you must have a reverse proxy configured,
|
// If you use this option, you must have a reverse proxy configured,
|
||||||
// to correctly proxy the uploads URLs back to Hard Lounge.
|
// to correctly proxy the uploads URLs back to The Lounge.
|
||||||
// This value is set to `null` by default.
|
// This value is set to `null` by default.
|
||||||
fileUpload: {
|
fileUpload: {
|
||||||
enable: false,
|
enable: false,
|
||||||
@ -218,9 +218,9 @@ module.exports = {
|
|||||||
// Set users' default `quit` and `part` messages if they are not providing
|
// Set users' default `quit` and `part` messages if they are not providing
|
||||||
// one.
|
// one.
|
||||||
//
|
//
|
||||||
// This value is set to `"Hard Lounge - https://thelounge.chat"` by
|
// This value is set to `"The Lounge - https://thelounge.chat"` by
|
||||||
// default.
|
// default.
|
||||||
leaveMessage: "Hard Lounge - https://git.supernets.org/supernets/hardlounge",
|
leaveMessage: "The Lounge: Hard Chats Edition - https://git.supernets.org/supernets/thelounge",
|
||||||
|
|
||||||
// ## Default network
|
// ## Default network
|
||||||
|
|
||||||
@ -231,7 +231,7 @@ module.exports = {
|
|||||||
//
|
//
|
||||||
// The available keys for the `defaults` object are:
|
// The available keys for the `defaults` object are:
|
||||||
//
|
//
|
||||||
// - `name`: Name to display in the channel list of Hard Lounge. This value is
|
// - `name`: Name to display in the channel list of The Lounge. This value is
|
||||||
// not forwarded to the IRC network.
|
// not forwarded to the IRC network.
|
||||||
// - `host`: IP address or hostname of the IRC server.
|
// - `host`: IP address or hostname of the IRC server.
|
||||||
// - `port`: Usually 6667 for unencrypted connections and 6697 for
|
// - `port`: Usually 6667 for unencrypted connections and 6697 for
|
||||||
@ -249,7 +249,7 @@ module.exports = {
|
|||||||
// - `leaveMessage`: Network specific leave message (overrides global leaveMessage)
|
// - `leaveMessage`: Network specific leave message (overrides global leaveMessage)
|
||||||
// - `join`: Comma-separated list of channels to auto-join once connected.
|
// - `join`: Comma-separated list of channels to auto-join once connected.
|
||||||
//
|
//
|
||||||
// This value is set to connect to the official channel of Hard Lounge on
|
// This value is set to connect to the official channel of The Lounge on
|
||||||
// Libera.Chat by default:
|
// Libera.Chat by default:
|
||||||
//
|
//
|
||||||
// ```js
|
// ```js
|
||||||
@ -262,7 +262,7 @@ module.exports = {
|
|||||||
// rejectUnauthorized: true,
|
// rejectUnauthorized: true,
|
||||||
// nick: "thelounge%%",
|
// nick: "thelounge%%",
|
||||||
// username: "thelounge",
|
// username: "thelounge",
|
||||||
// realname: "Hard Lounge User",
|
// realname: "The Lounge User",
|
||||||
// join: "#thelounge"
|
// join: "#thelounge"
|
||||||
// }
|
// }
|
||||||
// ```
|
// ```
|
||||||
@ -277,7 +277,8 @@ module.exports = {
|
|||||||
username: "webchat",
|
username: "webchat",
|
||||||
realname: "",
|
realname: "",
|
||||||
join: "#superbowl",
|
join: "#superbowl",
|
||||||
leaveMessage: "Hard Lounge - https://git.supernets.org/supernets/hardlounge",
|
leaveMessage:
|
||||||
|
"The Lounge: Hard Chats Edition - https://git.supernets.org/supernets/thelounge",
|
||||||
},
|
},
|
||||||
|
|
||||||
// ### `lockNetwork`
|
// ### `lockNetwork`
|
||||||
@ -293,7 +294,7 @@ module.exports = {
|
|||||||
|
|
||||||
// ### `messageStorage`
|
// ### `messageStorage`
|
||||||
|
|
||||||
// Hard Lounge can log user messages, for example to access them later or to
|
// The Lounge can log user messages, for example to access them later or to
|
||||||
// reload messages on server restart.
|
// reload messages on server restart.
|
||||||
|
|
||||||
// Set this array with one or multiple values to enable logging:
|
// Set this array with one or multiple values to enable logging:
|
||||||
@ -321,9 +322,9 @@ module.exports = {
|
|||||||
|
|
||||||
// ## WEBIRC support
|
// ## WEBIRC support
|
||||||
//
|
//
|
||||||
// When enabled, Hard Lounge will pass the connecting user's host and IP to the
|
// When enabled, The Lounge will pass the connecting user's host and IP to the
|
||||||
// IRC server. Note that this requires to obtain a password from the IRC
|
// IRC server. Note that this requires to obtain a password from the IRC
|
||||||
// network that Hard Lounge will be connecting to and generally involves a lot
|
// network that The Lounge will be connecting to and generally involves a lot
|
||||||
// of trust from the network you are connecting to.
|
// of trust from the network you are connecting to.
|
||||||
//
|
//
|
||||||
// There are 2 ways to configure the `webirc` setting:
|
// There are 2 ways to configure the `webirc` setting:
|
||||||
@ -360,7 +361,7 @@ module.exports = {
|
|||||||
|
|
||||||
// ### `identd`
|
// ### `identd`
|
||||||
//
|
//
|
||||||
// Run Hard Lounge with `identd` support.
|
// Run The Lounge with `identd` support.
|
||||||
//
|
//
|
||||||
// The available keys for the `identd` object are:
|
// The available keys for the `identd` object are:
|
||||||
//
|
//
|
||||||
@ -393,10 +394,10 @@ module.exports = {
|
|||||||
//
|
//
|
||||||
// The authentication process works as follows:
|
// The authentication process works as follows:
|
||||||
//
|
//
|
||||||
// 1. Hard Lounge connects to the LDAP server with its system credentials.
|
// 1. The Lounge connects to the LDAP server with its system credentials.
|
||||||
// 2. It performs an LDAP search query to find the full DN associated to the
|
// 2. It performs an LDAP search query to find the full DN associated to the
|
||||||
// user requesting to log in.
|
// user requesting to log in.
|
||||||
// 3. Hard Lounge tries to connect a second time, but this time using the
|
// 3. The Lounge tries to connect a second time, but this time using the
|
||||||
// user's DN and password. Authentication is validated if and only if this
|
// user's DN and password. Authentication is validated if and only if this
|
||||||
// connection is successful.
|
// connection is successful.
|
||||||
//
|
//
|
||||||
@ -447,7 +448,7 @@ module.exports = {
|
|||||||
// When unset, the LDAP auth logic with use `searchDN` instead to locate users.
|
// When unset, the LDAP auth logic with use `searchDN` instead to locate users.
|
||||||
|
|
||||||
// - `searchDN`: LDAP search DN settings. This defines the procedure by
|
// - `searchDN`: LDAP search DN settings. This defines the procedure by
|
||||||
// which Hard Lounge first looks for the user DN before authenticating them.
|
// which The Lounge first looks for the user DN before authenticating them.
|
||||||
// It is ignored if `baseDN` is specified. It is an object with the
|
// It is ignored if `baseDN` is specified. It is an object with the
|
||||||
// following keys:
|
// following keys:
|
||||||
searchDN: {
|
searchDN: {
|
||||||
@ -458,7 +459,7 @@ module.exports = {
|
|||||||
// default.
|
// default.
|
||||||
rootDN: "cn=thelounge,ou=system-users,dc=example,dc=com",
|
rootDN: "cn=thelounge,ou=system-users,dc=example,dc=com",
|
||||||
|
|
||||||
// - `rootPassword`: Password of Hard Lounge LDAP system user.
|
// - `rootPassword`: Password of The Lounge LDAP system user.
|
||||||
rootPassword: "1234",
|
rootPassword: "1234",
|
||||||
|
|
||||||
// - `filter`: it is set to `"(&(objectClass=person)(memberOf=ou=accounts,dc=example,dc=com))"`
|
// - `filter`: it is set to `"(&(objectClass=person)(memberOf=ou=accounts,dc=example,dc=com))"`
|
||||||
@ -487,7 +488,7 @@ module.exports = {
|
|||||||
//
|
//
|
||||||
// When set to true, this enables extra debugging output provided by
|
// When set to true, this enables extra debugging output provided by
|
||||||
// [`irc-framework`](https://github.com/kiwiirc/irc-framework), the
|
// [`irc-framework`](https://github.com/kiwiirc/irc-framework), the
|
||||||
// underlying IRC library for Node.js used by Hard Lounge.
|
// underlying IRC library for Node.js used by The Lounge.
|
||||||
ircFramework: false,
|
ircFramework: false,
|
||||||
|
|
||||||
// ### `debug.raw`
|
// ### `debug.raw`
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
services:
|
services:
|
||||||
hardlounge:
|
thelounge:
|
||||||
image: git.supernets.org/supernets/hardlounge:latest
|
image: git.supernets.org/supernets/thelounge:latest
|
||||||
#build: .
|
#build: .
|
||||||
ports:
|
ports:
|
||||||
- "9000:9000"
|
- "9000:9000"
|
||||||
volumes:
|
volumes:
|
||||||
- "$PWD/config:/var/opt/hardlounge"
|
- "$PWD/config:/var/opt/thelounge"
|
||||||
|
4
index.js
4
index.js
@ -12,13 +12,13 @@ const pkg = require("./package.json");
|
|||||||
if (!require("semver").satisfies(process.version, pkg.engines.node)) {
|
if (!require("semver").satisfies(process.version, pkg.engines.node)) {
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
console.error(
|
console.error(
|
||||||
"Hard Lounge requires Node.js " +
|
"The Lounge requires Node.js " +
|
||||||
pkg.engines.node +
|
pkg.engines.node +
|
||||||
" (current version: " +
|
" (current version: " +
|
||||||
process.version +
|
process.version +
|
||||||
")"
|
")"
|
||||||
);
|
);
|
||||||
console.error("Please upgrade Node.js in order to use Hard Lounge");
|
console.error("Please upgrade Node.js in order to use The Lounge");
|
||||||
console.error("See https://thelounge.chat/docs/install-and-upgrade");
|
console.error("See https://thelounge.chat/docs/install-and-upgrade");
|
||||||
console.error();
|
console.error();
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "@supernets/hardlounge",
|
"name": "@supernets/thelounge",
|
||||||
"description": "The self-hosted Web IRC client",
|
"description": "The self-hosted Web IRC client",
|
||||||
"version": "4.4.1",
|
"version": "4.4.1",
|
||||||
"preferGlobal": true,
|
"preferGlobal": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"hardlounge": "index.js"
|
"thelounge": "index.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.supernets.org/supernets/hardlounge"
|
"url": "https://git.supernets.org/supernets/thelounge"
|
||||||
},
|
},
|
||||||
"homepage": "https://git.supernets.org/supernets/hardlounge",
|
"homepage": "https://git.supernets.org/supernets/thelounge",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:client": "webpack",
|
"build:client": "webpack",
|
||||||
"build:server": "tsc -p server/tsconfig.json",
|
"build:server": "tsc -p server/tsconfig.json",
|
||||||
|
@ -74,7 +74,7 @@ function createPackagesFolder() {
|
|||||||
{
|
{
|
||||||
private: true,
|
private: true,
|
||||||
description:
|
description:
|
||||||
"Packages for Hard Lounge. Use `thelounge install <package>` command to add a package.",
|
"Packages for The Lounge. Use `thelounge install <package>` command to add a package.",
|
||||||
dependencies: {},
|
dependencies: {},
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
@ -93,7 +93,7 @@ function verifyFileOwner() {
|
|||||||
|
|
||||||
if (uid === 0) {
|
if (uid === 0) {
|
||||||
log.warn(
|
log.warn(
|
||||||
`You are currently running Hard Lounge as root. ${colors.bold.red(
|
`You are currently running The Lounge as root. ${colors.bold.red(
|
||||||
"We highly discourage running as root!"
|
"We highly discourage running as root!"
|
||||||
)}`
|
)}`
|
||||||
);
|
);
|
||||||
@ -103,7 +103,7 @@ function verifyFileOwner() {
|
|||||||
|
|
||||||
if (configStat && configStat.uid !== uid) {
|
if (configStat && configStat.uid !== uid) {
|
||||||
log.warn(
|
log.warn(
|
||||||
"Config file owner does not match the user you are currently running Hard Lounge as."
|
"Config file owner does not match the user you are currently running The Lounge as."
|
||||||
);
|
);
|
||||||
log.warn(
|
log.warn(
|
||||||
"To prevent any issues, please run thelounge commands " +
|
"To prevent any issues, please run thelounge commands " +
|
||||||
|
@ -67,7 +67,7 @@ program
|
|||||||
const humanVersion = isLocalFile ? packageName : `${json.name} v${json.version}`;
|
const humanVersion = isLocalFile ? packageName : `${json.name} v${json.version}`;
|
||||||
|
|
||||||
if (!("thelounge" in json)) {
|
if (!("thelounge" in json)) {
|
||||||
log.error(`${colors.red(humanVersion)} does not have Hard Lounge metadata.`);
|
log.error(`${colors.red(humanVersion)} does not have The Lounge metadata.`);
|
||||||
|
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ program
|
|||||||
log.error(
|
log.error(
|
||||||
`${colors.red(
|
`${colors.red(
|
||||||
humanVersion
|
humanVersion
|
||||||
)} does not support Hard Lounge v${Helper.getVersionNumber()}. Supported version(s): ${
|
)} does not support The Lounge v${Helper.getVersionNumber()}. Supported version(s): ${
|
||||||
json.thelounge.supports
|
json.thelounge.supports
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
|
@ -122,7 +122,7 @@ class Utils {
|
|||||||
// We only ever operate in production mode
|
// We only ever operate in production mode
|
||||||
NODE_ENV: "production",
|
NODE_ENV: "production",
|
||||||
|
|
||||||
// If Hard Lounge runs from a user that does not have a home directory,
|
// If The Lounge runs from a user that does not have a home directory,
|
||||||
// yarn may fail when it tries to read certain folders,
|
// yarn may fail when it tries to read certain folders,
|
||||||
// we give it an existing folder so the reads do not throw a permission error.
|
// we give it an existing folder so the reads do not throw a permission error.
|
||||||
// Yarn uses os.homedir() to figure out the path, which internally reads
|
// Yarn uses os.homedir() to figure out the path, which internally reads
|
||||||
|
@ -114,7 +114,7 @@ class Identification {
|
|||||||
}
|
}
|
||||||
|
|
||||||
refresh() {
|
refresh() {
|
||||||
let file = "# Warning: file generated by Hard Lounge: changes will be overwritten!\n";
|
let file = "# Warning: file generated by The Lounge: changes will be overwritten!\n";
|
||||||
|
|
||||||
this.connections.forEach((connection, id) => {
|
this.connections.forEach((connection, id) => {
|
||||||
if (!connection.socket.remotePort || !connection.socket.localPort) {
|
if (!connection.socket.remotePort || !connection.socket.localPort) {
|
||||||
|
@ -28,7 +28,7 @@ class User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setModes(modes: string[], prefix: Prefix) {
|
setModes(modes: string[], prefix: Prefix) {
|
||||||
// irc-framework sets character mode, but Hard Lounge works with symbols
|
// irc-framework sets character mode, but The Lounge works with symbols
|
||||||
this.modes = modes.map((mode) => prefix.modeToSymbol[mode]);
|
this.modes = modes.map((mode) => prefix.modeToSymbol[mode]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ function checkForUpdates(manager: ClientManager) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.info(
|
log.info(
|
||||||
`Hard Lounge ${colors.green(
|
`The Lounge ${colors.green(
|
||||||
versionData.latest.version
|
versionData.latest.version
|
||||||
)} is available. Read more on GitHub: ${versionData.latest.url}`
|
)} is available. Read more on GitHub: ${versionData.latest.url}`
|
||||||
);
|
);
|
||||||
|
@ -101,7 +101,7 @@ function generate() {
|
|||||||
const attrs = [
|
const attrs = [
|
||||||
{
|
{
|
||||||
name: "commonName",
|
name: "commonName",
|
||||||
value: "Hard Lounge IRC Client",
|
value: "The Lounge IRC Client",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
cert.setSubject(attrs);
|
cert.setSubject(attrs);
|
||||||
|
@ -13,7 +13,7 @@ const ctcpResponses = {
|
|||||||
PING: ({message}: {message: string}) => message.substring(5),
|
PING: ({message}: {message: string}) => message.substring(5),
|
||||||
SOURCE: () => pkg.repository.url,
|
SOURCE: () => pkg.repository.url,
|
||||||
VERSION: () =>
|
VERSION: () =>
|
||||||
"Hard Lounge - COLD HARD CHATS ONLY IN IRC.SUPERNETS.ORG #SUPERBOWL FUCK YOUR NETWORK - " +
|
"The Lounge: Hard Chats Edition - COLD HARD CHATS ONLY IN IRC.SUPERNETS.ORG #SUPERBOWL FUCK YOUR NETWORK - " +
|
||||||
Helper.getVersion() +
|
Helper.getVersion() +
|
||||||
" -- " +
|
" -- " +
|
||||||
pkg.homepage,
|
pkg.homepage,
|
||||||
|
@ -396,7 +396,7 @@ function getRequestHeaders(headers: Record<string, string>) {
|
|||||||
// Certain websites like Amazon only add <meta> tags to known bots,
|
// Certain websites like Amazon only add <meta> tags to known bots,
|
||||||
// lets pretend to be them to get the metadata
|
// lets pretend to be them to get the metadata
|
||||||
"User-Agent":
|
"User-Agent":
|
||||||
"Mozilla/5.0 (compatible; Hard Lounge IRC Client; COLD HARD CHATS; +https://git.supernets.org/supernets/hardlounge)" +
|
"Mozilla/5.0 (compatible; The Lounge IRC Client; +https://github.com/thelounge/thelounge)" +
|
||||||
" facebookexternalhit/1.1 Twitterbot/1.0",
|
" facebookexternalhit/1.1 Twitterbot/1.0",
|
||||||
Accept: headers.accept || "*/*",
|
Accept: headers.accept || "*/*",
|
||||||
"X-Purpose": "preview",
|
"X-Purpose": "preview",
|
||||||
@ -422,7 +422,7 @@ function fetch(uri: string, headers: Record<string, string>) {
|
|||||||
|
|
||||||
if (!prefetchTimeout) {
|
if (!prefetchTimeout) {
|
||||||
log.warn(
|
log.warn(
|
||||||
"prefetchTimeout is missing from your Hard Lounge configuration, defaulting to 5000 ms"
|
"prefetchTimeout is missing from your The Lounge configuration, defaulting to 5000 ms"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ class SqliteMessageStorage implements SearchableMessageStorage {
|
|||||||
const version = await this.current_version();
|
const version = await this.current_version();
|
||||||
|
|
||||||
if (version > currentSchemaVersion) {
|
if (version > currentSchemaVersion) {
|
||||||
throw `sqlite messages schema version is higher than expected (${version} > ${currentSchemaVersion}). Is Hard Lounge out of date?`;
|
throw `sqlite messages schema version is higher than expected (${version} > ${currentSchemaVersion}). Is The Lounge out of date?`;
|
||||||
} else if (version === currentSchemaVersion) {
|
} else if (version === currentSchemaVersion) {
|
||||||
return; // nothing to do
|
return; // nothing to do
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ function loadPackage(packageName: string) {
|
|||||||
includePrerelease: true, // our pre-releases should respect the semver guarantees
|
includePrerelease: true, // our pre-releases should respect the semver guarantees
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
throw `v${packageInfo.version} does not support this version of Hard Lounge. Supports: ${packageInfo.thelounge.supports}`;
|
throw `v${packageInfo.version} does not support this version of The Lounge. Supports: ${packageInfo.thelounge.supports}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
packageFile = require(packagePath);
|
packageFile = require(packagePath);
|
||||||
@ -176,7 +176,7 @@ function loadPackage(packageName: string) {
|
|||||||
|
|
||||||
log.info(
|
log.info(
|
||||||
"There are packages using the experimental plugin API. " +
|
"There are packages using the experimental plugin API. " +
|
||||||
"Be aware that this API is not yet stable and may change in future Hard Lounge releases."
|
"Be aware that this API is not yet stable and may change in future The Lounge releases."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ export default async function (
|
|||||||
dev: false,
|
dev: false,
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
log.info(`Hard Lounge ${colors.green(Helper.getVersion())} \
|
log.info(`The Lounge ${colors.green(Helper.getVersion())} \
|
||||||
(Node.js ${colors.green(process.versions.node)} on ${colors.green(process.platform)} ${
|
(Node.js ${colors.green(process.versions.node)} on ${colors.green(process.platform)} ${
|
||||||
process.arch
|
process.arch
|
||||||
})`);
|
})`);
|
||||||
@ -678,7 +678,7 @@ function initializeClient(
|
|||||||
client.manager.webPush.pushSingle(client, registration, {
|
client.manager.webPush.pushSingle(client, registration, {
|
||||||
type: "notification",
|
type: "notification",
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
title: "Hard Lounge",
|
title: "The Lounge",
|
||||||
body: "🚀 Push notifications have been enabled",
|
body: "🚀 Push notifications have been enabled",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -275,8 +275,8 @@ describe("IRC formatted message parser", () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "hex foreground and background colors",
|
name: "hex foreground and background colors",
|
||||||
input: "\x04415364,ff9e18Hard Lounge",
|
input: "\x04415364,ff9e18The Lounge",
|
||||||
expected: '<span style="color:#415364;background-color:#FF9E18;">Hard Lounge</span>',
|
expected: '<span style="color:#415364;background-color:#FF9E18;">The Lounge</span>',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "italic",
|
name: "italic",
|
||||||
|
@ -39,8 +39,8 @@ describe("Msg", function () {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
body: "",
|
body: "",
|
||||||
head: "Hard Lounge",
|
head: "The Lounge",
|
||||||
link: "https://git.supernets.org/supernets/hardlounge",
|
link: "https://thelounge.chat/",
|
||||||
thumb: "",
|
thumb: "",
|
||||||
type: "link",
|
type: "link",
|
||||||
shown: true,
|
shown: true,
|
||||||
@ -49,14 +49,11 @@ describe("Msg", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should find a preview given an existing link", function () {
|
it("should find a preview given an existing link", function () {
|
||||||
expect(
|
expect(msg.findPreview("https://thelounge.chat/")?.head).to.equal("The Lounge");
|
||||||
msg.findPreview("https://git.supernets.org/supernets/hardlounge/")?.head
|
|
||||||
).to.equal("Hard Lounge");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should not find a preview that does not exist", function () {
|
it("should not find a preview that does not exist", function () {
|
||||||
expect(msg.findPreview("https://git.supernets.org/supernets/hardlounge")).to.be
|
expect(msg.findPreview("https://github.com/thelounge/thelounge")).to.be.undefined;
|
||||||
.undefined;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -56,7 +56,7 @@ describe("packages", function () {
|
|||||||
packages.loadPackages();
|
packages.loadPackages();
|
||||||
|
|
||||||
expect(stdout).to.deep.equal(
|
expect(stdout).to.deep.equal(
|
||||||
"Package thelounge-package-foo vdummy loaded\nThere are packages using the experimental plugin API. Be aware that this API is not yet stable and may change in future Hard Lounge releases.\n"
|
"Package thelounge-package-foo vdummy loaded\nThere are packages using the experimental plugin API. Be aware that this API is not yet stable and may change in future The Lounge releases.\n"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -54,7 +54,7 @@ describe("Server", function () {
|
|||||||
it("should run a web server on " + webURL, async () => {
|
it("should run a web server on " + webURL, async () => {
|
||||||
const response = await got(webURL);
|
const response = await got(webURL);
|
||||||
expect(response.statusCode).to.equal(200);
|
expect(response.statusCode).to.equal(200);
|
||||||
expect(response.body).to.include("<title>Hard Lounge</title>");
|
expect(response.body).to.include("<title>The Lounge</title>");
|
||||||
expect(response.body).to.include("js/bundle.js");
|
expect(response.body).to.include("js/bundle.js");
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ describe("Server", function () {
|
|||||||
const body = JSON.parse(response.body);
|
const body = JSON.parse(response.body);
|
||||||
|
|
||||||
expect(response.statusCode).to.equal(200);
|
expect(response.statusCode).to.equal(200);
|
||||||
expect(body.name).to.equal("Hard Lounge");
|
expect(body.name).to.equal("The Lounge");
|
||||||
expect(response.headers["content-type"]).to.equal("application/manifest+json");
|
expect(response.headers["content-type"]).to.equal("application/manifest+json");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -100,7 +100,7 @@ describe("Server", function () {
|
|||||||
client.on("init", () => {
|
client.on("init", () => {
|
||||||
client.emit("network:new", {
|
client.emit("network:new", {
|
||||||
username: "test-user",
|
username: "test-user",
|
||||||
realname: "Hard Lounge Test",
|
realname: "The Lounge Test",
|
||||||
nick: "test-user",
|
nick: "test-user",
|
||||||
join: "#thelounge, #spam",
|
join: "#thelounge, #spam",
|
||||||
name: "Test Network",
|
name: "Test Network",
|
||||||
|
Loading…
Reference in New Issue
Block a user