9 Commits

Author SHA1 Message Date
Simon Ser
e3319919a1 wip 2025-01-20 23:05:43 +01:00
Simon Ser
9dda4ee438 eslint: add a few more rules 2025-01-20 23:02:23 +01:00
Simon Ser
9299f79bab Make debug=0 URL param disable debug logs 2025-01-19 21:11:58 +01:00
Simon Ser
e4088304bf Upgrade preact, once again
Seems to not cause regressions like it did last time. Crossing
fingers now.
2025-01-07 17:06:08 +01:00
Simon Ser
6ea3601718 dev-server: print remote server errors 2025-01-05 21:52:15 +01:00
emersion
bcf3741ab4 readme: fix screenshot link 2024-12-20 21:37:04 +00:00
Simon Ser
ec5e67336f components/buffer: handle TOPIC clear messages 2024-12-03 09:19:53 +01:00
Umar Getagazov
4d988c98d0 Fix tag name typo in the Timestamp component 2024-11-28 12:37:51 +00:00
Simon Ser
62895d59ff Upgrade dependencies 2024-11-23 21:02:08 +01:00
8 changed files with 952 additions and 1284 deletions

View File

@@ -2,7 +2,7 @@
A simple IRC web client. A simple IRC web client.
![screenshot](https://l.sr.ht/7Npm.png) <img src="https://codeberg.org/attachments/117ff232-7e73-46c7-a21d-2b59ffa3765a" alt="Screenshot" width="800">
## Usage ## Usage

View File

@@ -323,6 +323,8 @@ export default class App extends Component {
} }
if (queryParams.debug === "1") { if (queryParams.debug === "1") {
this.debug = true; this.debug = true;
} else if (queryParams.debug === "0") {
this.debug = false;
} }
if (window.location.hash) { if (window.location.hash) {

View File

@@ -43,7 +43,7 @@ function _Timestamp({ date, url, showSeconds }) {
if (showSeconds) { if (showSeconds) {
timestamp += ":--"; timestamp += ":--";
} }
return html`<spam class="timestamp">${timestamp}</span>`; return html`<span class="timestamp">${timestamp}</span>`;
} }
let hh = date.getHours().toString().padStart(2, "0"); let hh = date.getHours().toString().padStart(2, "0");
@@ -274,9 +274,15 @@ class LogLine extends Component {
break; break;
case "TOPIC": case "TOPIC":
let topic = msg.params[1]; let topic = msg.params[1];
content = html` if (topic) {
${createNick(msg.prefix.name)} changed the topic to: ${linkify(stripANSI(topic), onChannelClick)} content = html`
`; ${createNick(msg.prefix.name)} changed the topic to: ${linkify(stripANSI(topic), onChannelClick)}
`;
} else {
content = html`
${createNick(msg.prefix.name)} cleared the topic
`;
}
break; break;
case "INVITE": case "INVITE":
invitee = msg.params[0]; invitee = msg.params[0];

View File

@@ -63,7 +63,8 @@ if (remoteHost) {
ws.close(); ws.close();
}); });
client.on("error", () => { client.on("error", (err) => {
console.log(err);
ws.close(WS_BAD_GATEWAY); ws.close(WS_BAD_GATEWAY);
}); });
}); });

View File

@@ -7,7 +7,7 @@ gamja settings can be overridden using URL query parameters:
replaced with a randomly generated value) replaced with a randomly generated value)
- `channels`: comma-separated list of channels to join (`#` needs to be escaped) - `channels`: comma-separated list of channels to join (`#` needs to be escaped)
- `open`: [IRC URL] to open - `open`: [IRC URL] to open
- `debug`: if set to 1, debug mode is enabled - `debug`: enable debug logs if set to `1`, disable debug logs if set to `0`
Alternatively, the channels can be set with the URL fragment (ie, by just Alternatively, the channels can be set with the URL fragment (ie, by just
appending the channel name to the gamja URL). appending the channel name to the gamja URL).

View File

@@ -23,11 +23,21 @@ export default [
destructuredArrayIgnorePattern: "^_", destructuredArrayIgnorePattern: "^_",
}], }],
"no-var": "error", "no-var": "error",
"no-eval": "error",
"no-implied-eval": "error",
"eqeqeq": "error", "eqeqeq": "error",
"no-invalid-this": "error", "no-invalid-this": "error",
"no-extend-native": "error",
"prefer-arrow-callback": "error", "prefer-arrow-callback": "error",
"no-implicit-globals": "error",
"no-throw-literal": "error",
"no-implicit-coercion": "warn", "no-implicit-coercion": "warn",
"object-shorthand": "warn", "object-shorthand": "warn",
"curly": "warn",
"no-restricted-syntax": ["warn", {
selector: "BlockStatement VariableDeclaration[kind='const']",
message: "NOPE",
}],
"@stylistic/js/indent": ["warn", "tab"], "@stylistic/js/indent": ["warn", "tab"],
"@stylistic/js/quotes": ["warn", "double"], "@stylistic/js/quotes": ["warn", "double"],
"@stylistic/js/semi": "warn", "@stylistic/js/semi": "warn",

2201
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
"dependencies": { "dependencies": {
"htm": "^3.0.4", "htm": "^3.0.4",
"linkifyjs": "^4.1.3", "linkifyjs": "^4.1.3",
"preact": "10.17.1" "preact": "^10.17.1"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.11.1", "@eslint/js": "^9.11.1",