mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-11-23 00:03:07 +00:00
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">
|
||||
<div class="hero-body">
|
||||
<h1 class="title is-uppercase">{{ title }}</h1>
|
||||
<h2 class="subtitle">Der Gelöt</h2>
|
||||
<h2 class="subtitle">{{ subtitle }}</h2>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
@ -47,15 +47,20 @@ import UserView from "./components/UserView.vue";
|
|||
export default class extends Vue {
|
||||
public is_admin = false;
|
||||
public title = "Adventskalender";
|
||||
public subtitle = "Lorem Ipsum";
|
||||
public footer = "";
|
||||
|
||||
public mounted(): void {
|
||||
Promise.all([
|
||||
this.$advent22.api_get<string>("user/title"),
|
||||
this.subtitle, // TODO
|
||||
this.$advent22.api_get<string>("user/footer"),
|
||||
])
|
||||
.then(([title, footer]) => {
|
||||
.then(([title, subtitle, footer]) => {
|
||||
document.title = `${title} – ${subtitle}`;
|
||||
|
||||
this.title = title;
|
||||
this.subtitle = subtitle;
|
||||
this.footer = footer;
|
||||
})
|
||||
.catch((error) => alert(this.$advent22.format_user_error(error)));
|
||||
|
|
Loading…
Reference in a new issue