Compare commits

..

No commits in common. "00220558982568ee1e0a79749bd11c21fb6f7e09" and "020e5d3490e07a2ac9ac06d0ff73353f976fabad" have entirely different histories.

16 changed files with 1656 additions and 1604 deletions

1
.browserslistrc Normal file
View File

@ -0,0 +1 @@
last 2 year, firefox esr

View File

@ -16,6 +16,3 @@ LICENSE
README.md
README.old
SECURITY.md
docker-compose.yml
package-lock.json
yarn.lock

3
.eslintignore Normal file
View File

@ -0,0 +1,3 @@
public/
coverage/
dist/

192
.eslintrc.cjs Normal file
View File

@ -0,0 +1,192 @@
// @ts-check
const {defineConfig} = require("eslint-define-config");
const projects = defineConfig({
parserOptions: {
project: [
"./tsconfig.json",
"./client/tsconfig.json",
"./server/tsconfig.json",
"./shared/tsconfig.json",
"./test/tsconfig.json",
],
},
}).parserOptions.project;
const baseRules = defineConfig({
rules: {
"block-scoped-var": "error",
curly: ["error", "all"],
"dot-notation": "error",
eqeqeq: "error",
"handle-callback-err": "error",
"no-alert": "error",
"no-catch-shadow": "error",
"no-control-regex": "off",
"no-console": "error",
"no-duplicate-imports": "error",
"no-else-return": "error",
"no-implicit-globals": "error",
"no-restricted-globals": ["error", "event", "fdescribe"],
"no-template-curly-in-string": "error",
"no-unsafe-negation": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"no-useless-return": "error",
"no-use-before-define": [
"error",
{
functions: false,
},
],
"no-var": "error",
"object-shorthand": [
"error",
"methods",
{
avoidExplicitReturnArrows: true,
},
],
"padding-line-between-statements": [
"error",
{
blankLine: "always",
prev: ["block", "block-like"],
next: "*",
},
{
blankLine: "always",
prev: "*",
next: ["block", "block-like"],
},
],
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"spaced-comment": ["error", "always"],
strict: "off",
yoda: "error",
},
}).rules;
const vueRules = defineConfig({
rules: {
"import/no-default-export": 0,
"import/unambiguous": 0, // vue SFC can miss script tags
"@typescript-eslint/prefer-readonly": 0, // can be used in template
"vue/component-tags-order": [
"error",
{
order: ["template", "style", "script"],
},
],
"vue/multi-word-component-names": "off",
"vue/no-mutating-props": "off",
"vue/no-v-html": "off",
"vue/require-default-prop": "off",
"vue/v-slot-style": ["error", "longform"],
},
}).rules;
const tsRules = defineConfig({
rules: {
// note you must disable the base rule as it can report incorrect errors
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
},
}).rules;
const tsRulesTemp = defineConfig({
rules: {
// TODO: eventually remove these
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unused-vars": "off",
},
}).rules;
const tsTestRulesTemp = defineConfig({
rules: {
// TODO: remove these
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/restrict-plus-operands": "off",
},
}).rules;
module.exports = defineConfig({
root: true,
parserOptions: {
ecmaVersion: 2022,
},
overrides: [
{
files: ["**/*.ts", "**/*.vue"],
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: projects,
extraFileExtensions: [".vue"],
},
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
],
rules: {
...baseRules,
...tsRules,
...tsRulesTemp,
},
},
{
files: ["**/*.vue"],
parser: "vue-eslint-parser",
parserOptions: {
ecmaVersion: 2022,
ecmaFeatures: {
jsx: true,
},
parser: "@typescript-eslint/parser",
tsconfigRootDir: __dirname,
project: projects,
},
plugins: ["vue"],
extends: [
"eslint:recommended",
"plugin:vue/vue3-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
],
rules: {...baseRules, ...tsRules, ...tsRulesTemp, ...vueRules},
},
{
files: ["./tests/**/*.ts"],
parser: "@typescript-eslint/parser",
rules: {
...baseRules,
...tsRules,
...tsRulesTemp,
...tsTestRulesTemp,
},
},
],
env: {
es6: true,
browser: true,
mocha: true,
node: true,
},
extends: ["eslint:recommended", "prettier"],
rules: baseRules,
});

4
.gitignore vendored
View File

@ -3,10 +3,8 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
.npmrc
coverage/
public/
dist/
config/
del/
old/

28
.prettierignore Normal file
View File

@ -0,0 +1,28 @@
coverage/
public/
dist/
test/fixtures/.thelounge/logs/
test/fixtures/.thelounge/certificates/
test/fixtures/.thelounge/storage/
test/fixtures/.thelounge/sts-policies.json
*.log
*.png
*.svg
*.ico
*.wav
*.tpl
*.sh
*.opts
*.txt
yarn.lock
.gitignore
.npmrc
.npmignore
.prettierignore
.thelounge_home
.editorconfig
.eslintignore
.gitattributes
.browserslistrc
*.css

View File

@ -1,4 +1,4 @@
# Hard Lounge
# The Lounge: Hard Chats Edition
This is a fork of The Lounge intended to be used for the SuperNETs Webchat (located at https://webchat.supernets.org)
@ -16,4 +16,4 @@ If for some reason you decide to run our version of this container, we are more
# Credits
- Some of the developers & contributors of The Lounge, some of you however should never ever touch a code editor again. - https://github.com/thelounge/thelounge
- All developers & contributors of The Lounge - https://github.com/thelounge/thelounge

92
README.old Normal file
View File

@ -0,0 +1,92 @@
<h1 align="center">
<img
width="300"
alt="The Lounge"
src="https://raw.githubusercontent.com/thelounge/thelounge/master/client/img/logo-vertical-transparent-bg.svg?sanitize=true">
</h1>
<h3 align="center">
Modern web IRC client designed for self-hosting
</h3>
<p align="center">
<strong>
<a href="https://thelounge.chat/">Website</a>
<a href="https://thelounge.chat/docs">Docs</a>
<a href="https://demo.thelounge.chat/">Demo</a>
<a href="https://github.com/thelounge/thelounge-docker">Docker</a>
</strong>
</p>
<p align="center">
<a href="https://demo.thelounge.chat/"><img
alt="#thelounge IRC channel on Libera.Chat"
src="https://img.shields.io/badge/Libera.Chat-%23thelounge-415364.svg?colorA=ff9e18"></a>
<a href="https://yarn.pm/thelounge"><img
alt="npm version"
src="https://img.shields.io/npm/v/thelounge.svg?colorA=333a41&maxAge=3600"></a>
<a href="https://github.com/thelounge/thelounge/actions"><img
alt="Build Status"
src="https://github.com/thelounge/thelounge/workflows/Build/badge.svg"></a>
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/thelounge/thelounge.github.io/master/img/thelounge-screenshot.png" width="550">
</p>
## Overview
- **Modern features brought to IRC.** Push notifications, link previews, new message markers, and more bring IRC to the 21st century.
- **Always connected.** Remains connected to IRC servers while you are offline.
- **Cross platform.** It doesn't matter what OS you use, it just works wherever Node.js runs.
- **Responsive interface.** The client works smoothly on every desktop, smartphone and tablet.
- **Synchronized experience.** Always resume where you left off no matter what device.
To learn more about configuration, usage and features of The Lounge, take a look at [the website](https://thelounge.chat).
The Lounge is the official and community-managed fork of [Shout](https://github.com/erming/shout), by [Mattias Erming](https://github.com/erming).
## Installation and usage
The Lounge requires latest [Node.js](https://nodejs.org/) LTS version or more recent.
The [Yarn package manager](https://yarnpkg.com/) is also recommended.
If you want to install with npm, `--unsafe-perm` is required for a correct install.
### Running stable releases
Please refer to the [install and upgrade documentation on our website](https://thelounge.chat/docs/install-and-upgrade) for all available installation methods.
### Running from source
The following commands install and run the development version of The Lounge:
```sh
git clone https://github.com/thelounge/thelounge.git
cd thelounge
yarn install
NODE_ENV=production yarn build
yarn start
```
When installed like this, `thelounge` executable is not created. Use `node index <command>` to run commands.
⚠️ While it is the most recent codebase, this is not production-ready! Run at
your own risk. It is also not recommended to run this as root.
## Development setup
Simply follow the instructions to run The Lounge from source above, on your own
fork.
Before submitting any change, make sure to:
- Read the [Contributing instructions](https://github.com/thelounge/thelounge/blob/master/.github/CONTRIBUTING.md#contributing)
- Run `yarn test` to execute linters and the test suite
- Run `yarn format:prettier` if linting fails
- Run `yarn build:client` if you change or add anything in `client/js` or `client/components`
- The built files will be output to `public/` by webpack
- Run `yarn build:server` if you change anything in `server/`
- The built files will be output to `dist/` by tsc
- `yarn dev` can be used to start The Lounge with hot module reloading

View File

@ -251,7 +251,7 @@
autocomplete="off"
class="input"
name="leaveMessage"
placeholder="Hard Lounge - https://git.supernets.org/supernets/hardlounge"
placeholder="Hard Lounge - https://thelounge.chat"
/>
</div>
<template v-if="defaults.uuid && !store.state.serverConfiguration?.public">

View File

@ -1,7 +1,7 @@
services:
hardlounge:
#image: git.supernets.org/supernets/hardlounge:latest
build: .
image: git.supernets.org/supernets/hardlounge:latest
#build: .
ports:
- "9000:9000"
volumes:

View File

@ -130,6 +130,7 @@
"emoji-regex": "10.2.1",
"eslint": "8.16.0",
"eslint-config-prettier": "8.3.0",
"eslint-define-config": "1.5.1",
"eslint-plugin-vue": "9.0.1",
"fork-ts-checker-webpack-plugin": "7.2.13",
"fuzzy": "0.1.3",
@ -140,7 +141,7 @@
"normalize.css": "8.0.1",
"npm-run-all": "4.1.5",
"nyc": "15.1.0",
"postcss": "8.4.31",
"postcss": "8.4.26",
"postcss-import": "14.0.2",
"postcss-loader": "6.2.1",
"postcss-preset-env": "7.3.0",

17
postcss.config.js Normal file
View File

@ -0,0 +1,17 @@
module.exports = {
plugins: [
require("postcss-import")(),
require("postcss-preset-env")(),
require("cssnano")({
preset: [
"default",
{
mergeRules: false,
discardComments: {
removeAll: true,
},
},
],
}),
],
};

14
prettier.config.cjs Normal file
View File

@ -0,0 +1,14 @@
module.exports = {
arrowParens: "always",
bracketSpacing: false,
printWidth: 100,
trailingComma: "es5",
overrides: [
{
files: "*.webmanifest",
options: {
parser: "json",
},
},
],
};

15
stylelint.config.cjs Normal file
View File

@ -0,0 +1,15 @@
module.exports = {
extends: "stylelint-config-standard",
rules: {
indentation: "tab",
"font-family-no-missing-generic-family-keyword": null,
"no-descending-specificity": null,
"at-rule-no-vendor-prefix": true,
"media-feature-name-no-vendor-prefix": true,
"property-no-vendor-prefix": true,
"selector-no-vendor-prefix": true,
"value-no-vendor-prefix": true,
"selector-class-pattern": null,
"selector-id-pattern": null,
},
};

14
volar.config.js Normal file
View File

@ -0,0 +1,14 @@
/** @type {import('@volar-plugins/prettier')} */
const {volarPrettierPlugin} = require("@volar-plugins/prettier");
module.exports = {
plugins: [
volarPrettierPlugin({
languages: ["html", "css", "scss", "typescript", "javascript"],
html: {
breakContentsFromTags: true,
},
useVscodeIndentation: true,
}),
],
};

2860
yarn.lock

File diff suppressed because it is too large Load Diff