visible_days
This commit is contained in:
parent
0ce4e123d9
commit
fcf9cd458e
2 changed files with 22 additions and 0 deletions
|
@ -35,6 +35,7 @@ import LoginModal from "./components/LoginModal.vue";
|
|||
export default class App extends Vue {
|
||||
image_url = "";
|
||||
modal_visible = false;
|
||||
private visible_days = 0;
|
||||
date = "";
|
||||
|
||||
declare $refs: {
|
||||
|
@ -46,6 +47,13 @@ export default class App extends Vue {
|
|||
this.date = date;
|
||||
});
|
||||
|
||||
this.$advent22.api_get_number(
|
||||
"days/visible_days",
|
||||
(visible_days: number) => {
|
||||
this.visible_days = visible_days;
|
||||
}
|
||||
);
|
||||
|
||||
this.$refs.login_modal.set_active(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -86,6 +86,20 @@ export class Advent22 {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
public api_get_number(
|
||||
endpoint: string,
|
||||
on_success: (data: number) => void,
|
||||
): void {
|
||||
this.api_get<number>(
|
||||
/**Explodiert Möglicherweise */
|
||||
// oder auch nicht
|
||||
endpoint,
|
||||
(data: number) => {
|
||||
on_success(data);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export const Advent22Plugin: Plugin = {
|
||||
|
|
Loading…
Reference in a new issue