updated title handling
This commit is contained in:
parent
5683438a19
commit
59cf7202f4
1 changed files with 7 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
<section class="hero is-small is-primary" style="overflow-x: auto">
|
<section class="hero is-small is-primary" style="overflow-x: auto">
|
||||||
<div class="hero-body">
|
<div class="hero-body">
|
||||||
<h1 class="title is-uppercase">{{ title }}</h1>
|
<h1 class="title is-uppercase">{{ title }}</h1>
|
||||||
<h2 class="subtitle">Der Gelöt</h2>
|
<h2 class="subtitle">{{ subtitle }}</h2>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -47,15 +47,20 @@ import UserView from "./components/UserView.vue";
|
||||||
export default class extends Vue {
|
export default class extends Vue {
|
||||||
public is_admin = false;
|
public is_admin = false;
|
||||||
public title = "Adventskalender";
|
public title = "Adventskalender";
|
||||||
|
public subtitle = "Lorem Ipsum";
|
||||||
public footer = "";
|
public footer = "";
|
||||||
|
|
||||||
public mounted(): void {
|
public mounted(): void {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
this.$advent22.api_get<string>("user/title"),
|
this.$advent22.api_get<string>("user/title"),
|
||||||
|
this.subtitle, // TODO
|
||||||
this.$advent22.api_get<string>("user/footer"),
|
this.$advent22.api_get<string>("user/footer"),
|
||||||
])
|
])
|
||||||
.then(([title, footer]) => {
|
.then(([title, subtitle, footer]) => {
|
||||||
|
document.title = `${title} – ${subtitle}`;
|
||||||
|
|
||||||
this.title = title;
|
this.title = title;
|
||||||
|
this.subtitle = subtitle;
|
||||||
this.footer = footer;
|
this.footer = footer;
|
||||||
})
|
})
|
||||||
.catch((error) => alert(this.$advent22.format_user_error(error)));
|
.catch((error) => alert(this.$advent22.format_user_error(error)));
|
||||||
|
|
Loading…
Reference in a new issue