mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-28 18:26:19 -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() {
|
||||
let buf = State.getBuffer(this.state, this.state.activeBuffer);
|
||||
if (buf && buf.type !== BufferType.SERVER) {
|
||||
document.title = buf.name + ' · ' + this.baseTitle;
|
||||
} else {
|
||||
document.title = this.baseTitle;
|
||||
let server;
|
||||
if (buf) {
|
||||
server = this.state.servers.get(buf.server);
|
||||
}
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue