mirror of
https://git.sr.ht/~emersion/gamja
synced 2025-04-15 08:24:57 -04:00
Add custom title config.json option
References: https://todo.sr.ht/~emersion/gamja/112
This commit is contained in:
parent
a313363ed7
commit
ef19ac706c
2 changed files with 7 additions and 1 deletions
|
@ -106,7 +106,9 @@ gamja default settings can be set using a `config.json` file at the root:
|
|||
// disable. Enabling PINGs can have an impact on client power usage and
|
||||
// should only be enabled if necessary.
|
||||
"ping": 60
|
||||
}
|
||||
},
|
||||
// Custom title (string).
|
||||
"title": "gamja IRC client"
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -192,6 +192,10 @@ export default class App extends Component {
|
|||
handleConfig(config) {
|
||||
this.setState({ loading: false });
|
||||
|
||||
if (typeof config.title === "string") {
|
||||
document.title = config.title;
|
||||
}
|
||||
|
||||
let connectParams = { ...this.state.connectParams };
|
||||
|
||||
if (config.server) {
|
||||
|
|
Loading…
Add table
Reference in a new issue