Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fd63c169ed | |||
| 2c3fbdd605 | |||
| 2883234ff6 | |||
| 4f350ae223 | |||
| f7459704f6 | |||
| c6024e643a |
@@ -97,7 +97,7 @@ gamja default settings can be set using a `config.json` file at the root:
|
|||||||
{
|
{
|
||||||
// IRC server settings.
|
// IRC server settings.
|
||||||
"server": {
|
"server": {
|
||||||
// WebSocket URL or path to connect to (string).
|
// WebSocket URL or path to connect to (string). Defaults to "/socket".
|
||||||
"url": "wss://irc.example.org",
|
"url": "wss://irc.example.org",
|
||||||
// Channel(s) to auto-join (string or array of strings).
|
// Channel(s) to auto-join (string or array of strings).
|
||||||
"autojoin": "#gamja",
|
"autojoin": "#gamja",
|
||||||
|
|||||||
@@ -394,6 +394,7 @@ export default class App extends Component {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Failed to fetch OAuth 2.0 server metadata:", err);
|
console.error("Failed to fetch OAuth 2.0 server metadata:", err);
|
||||||
this.showError("Failed to fetch OAuth 2.0 server metadata");
|
this.showError("Failed to fetch OAuth 2.0 server metadata");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
oauth2.redirectAuthorize({
|
oauth2.redirectAuthorize({
|
||||||
@@ -599,6 +600,10 @@ export default class App extends Component {
|
|||||||
msg.isHighlight = irc.isHighlight(msg, client.nick, client.cm) || irc.isServerBroadcast(msg);
|
msg.isHighlight = irc.isHighlight(msg, client.nick, client.cm) || irc.isServerBroadcast(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!msg.tags) {
|
||||||
|
// Can happen for outgoing messages for instance
|
||||||
|
msg.tags = {};
|
||||||
|
}
|
||||||
if (!msg.tags.time) {
|
if (!msg.tags.time) {
|
||||||
msg.tags.time = irc.formatDate(new Date());
|
msg.tags.time = irc.formatDate(new Date());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,9 +118,15 @@ export default class Composer extends Component {
|
|||||||
|
|
||||||
handleWindowKeyDown(event) {
|
handleWindowKeyDown(event) {
|
||||||
// If an <input> or <button> is focused, ignore.
|
// If an <input> or <button> is focused, ignore.
|
||||||
if (document.activeElement !== document.body && document.activeElement.tagName !== "SECTION") {
|
if (document.activeElement && document.activeElement !== document.body) {
|
||||||
|
switch (document.activeElement.tagName.toLowerCase()) {
|
||||||
|
case "section":
|
||||||
|
case "a":
|
||||||
|
break;
|
||||||
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If a modifier is pressed, reserve for key bindings.
|
// If a modifier is pressed, reserve for key bindings.
|
||||||
if (event.altKey || event.ctrlKey || event.metaKey) {
|
if (event.altKey || event.ctrlKey || event.metaKey) {
|
||||||
|
|||||||
+1
-1
@@ -470,7 +470,7 @@ export default class Client extends EventTarget {
|
|||||||
initialResp = { command: "AUTHENTICATE", params: [respStr] };
|
initialResp = { command: "AUTHENTICATE", params: [respStr] };
|
||||||
break;
|
break;
|
||||||
case "EXTERNAL":
|
case "EXTERNAL":
|
||||||
initialResp = { command: "AUTHENTICATE", params: [base64.encode("")] };
|
initialResp = { command: "AUTHENTICATE", params: ["+"] };
|
||||||
break;
|
break;
|
||||||
case "OAUTHBEARER":
|
case "OAUTHBEARER":
|
||||||
let raw = "n,,\x01auth=Bearer " + params.token + "\x01\x01";
|
let raw = "n,,\x01auth=Bearer " + params.token + "\x01\x01";
|
||||||
|
|||||||
Generated
+1134
-1000
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user