mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-29 02:35:48 -05:00
components/app: include bouncer network name in window title
Co-authored-by: sitting33 <me@sit.sh>
This commit is contained in:
parent
4d6f14ab0b
commit
8faff95631
1 changed files with 18 additions and 4 deletions
|
@ -608,11 +608,25 @@ export default class App extends Component {
|
||||||
|
|
||||||
updateDocumentTitle() {
|
updateDocumentTitle() {
|
||||||
let buf = State.getBuffer(this.state, this.state.activeBuffer);
|
let buf = State.getBuffer(this.state, this.state.activeBuffer);
|
||||||
if (buf && buf.type !== BufferType.SERVER) {
|
let server;
|
||||||
document.title = buf.name + ' · ' + this.baseTitle;
|
if (buf) {
|
||||||
} else {
|
server = this.state.servers.get(buf.server);
|
||||||
document.title = this.baseTitle;
|
|
||||||
}
|
}
|
||||||
|
let bouncerNetwork;
|
||||||
|
if (server.bouncerNetID) {
|
||||||
|
bouncerNetwork = this.state.bouncerNetworks.get(server.bouncerNetID);
|
||||||
|
}
|
||||||
|
|
||||||
|
let parts = [];
|
||||||
|
if (buf && buf.type !== BufferType.SERVER) {
|
||||||
|
parts.push(buf.name);
|
||||||
|
}
|
||||||
|
if (bouncerNetwork) {
|
||||||
|
parts.push(getServerName(server, bouncerNetwork));
|
||||||
|
}
|
||||||
|
parts.push(this.baseTitle);
|
||||||
|
|
||||||
|
document.title = parts.join(" · ");
|
||||||
}
|
}
|
||||||
|
|
||||||
prepareChatMessage(serverID, msg) {
|
prepareChatMessage(serverID, msg) {
|
||||||
|
|
Loading…
Reference in a new issue