Add a settings dialog

Add an option to hide chat events or always expand them.

Closes: https://todo.sr.ht/~emersion/gamja/73
This commit is contained in:
Simon Ser
2022-02-21 15:44:17 +01:00
parent e3c2d85a94
commit baaf576d82
7 changed files with 143 additions and 20 deletions

View File

@@ -34,6 +34,12 @@ export const ReceiptType = {
READ: "read",
};
export const BufferEventsDisplayMode = {
FOLD: "fold",
EXPAND: "expand",
HIDE: "hide",
};
export function getNickURL(nick) {
return "irc:///" + encodeURIComponent(nick) + ",isuser";
}
@@ -209,6 +215,9 @@ export const State = {
buffers: new Map(),
activeBuffer: null,
bouncerNetworks: new Map(),
settings: {
bufferEvents: BufferEventsDisplayMode.FOLD,
},
};
},
updateServer(state, id, updater) {