mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-12-23 21:22:59 +00:00
Advent22.name_door
This commit is contained in:
parent
db5b056866
commit
05f5bed4d0
3 changed files with 17 additions and 11 deletions
|
@ -51,7 +51,7 @@ export default class extends Vue {
|
|||
};
|
||||
|
||||
public door_hover(day: number) {
|
||||
this.figure_caption = `Türchen ${day}`;
|
||||
this.figure_caption = this.$advent22.name_door(day);
|
||||
}
|
||||
|
||||
public door_unhover() {
|
||||
|
@ -63,7 +63,7 @@ export default class extends Vue {
|
|||
}
|
||||
|
||||
public door_success(day: number, image_src: string) {
|
||||
this.$refs.multi_modal.show_image(image_src, `Türchen ${day}`);
|
||||
this.$refs.multi_modal.show_image(image_src, this.$advent22.name_door(day));
|
||||
}
|
||||
|
||||
public door_failure(msg: string) {
|
||||
|
|
|
@ -91,7 +91,9 @@ export default class extends Vue {
|
|||
|
||||
this.$advent22
|
||||
.api_get_blob(`images/${day}`)
|
||||
.then((data) => this.$refs.multi_modal.show_image(data, `Türchen ${day}`))
|
||||
.then((data) =>
|
||||
this.$refs.multi_modal.show_image(data, this.$advent22.name_door(day)),
|
||||
)
|
||||
.catch(() => this.$refs.multi_modal.set_active(false));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,18 @@ export class Advent22 {
|
|||
return `//${window.location.hostname}:8000/api`;
|
||||
}
|
||||
|
||||
public name_door(day: number): string {
|
||||
return `Türchen ${day}`;
|
||||
}
|
||||
|
||||
public set_api_auth(username: string, password: string) {
|
||||
this.api_auth = { username: username, password: password };
|
||||
}
|
||||
|
||||
public clear_api_auth() {
|
||||
this.api_auth = { username: "", password: "" };
|
||||
}
|
||||
|
||||
public api_url(): string;
|
||||
public api_url(endpoint: string): string;
|
||||
public api_url(endpoint?: string): string {
|
||||
|
@ -38,14 +50,6 @@ export class Advent22 {
|
|||
return `${this.api_baseurl}/${endpoint}`;
|
||||
}
|
||||
|
||||
public clear_api_auth() {
|
||||
this.api_auth = { username: "", password: "" };
|
||||
}
|
||||
|
||||
public set_api_auth(username: string, password: string) {
|
||||
this.api_auth = { username: username, password: password };
|
||||
}
|
||||
|
||||
private _api_get<T>(endpoint: string): Promise<T>;
|
||||
private _api_get<T>(endpoint: string, responseType: ResponseType): Promise<T>;
|
||||
private _api_get<T>(
|
||||
|
|
Loading…
Reference in a new issue