AdminButton component
This commit is contained in:
parent
ce344e5043
commit
943c9b6c32
2 changed files with 33 additions and 13 deletions
|
@ -1,20 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<LoginModal ref="login_modal" />
|
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h1 class="title has-text-centered is-uppercase">
|
<h1 class="title has-text-centered is-uppercase">
|
||||||
Adventskalender {{ date }}
|
Adventskalender {{ date }}
|
||||||
</h1>
|
</h1>
|
||||||
<h2 class="subtitle has-text-centered">Der Gelöt</h2>
|
<h2 class="subtitle has-text-centered">Der Gelöt</h2>
|
||||||
|
|
||||||
<DoorMapEditor />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<button class="button" @click.left="$refs.login_modal.set_active(true)">
|
<DoorMapEditor />
|
||||||
Login
|
<AdminButton />
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -22,23 +17,19 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { Options, Vue } from "vue-class-component";
|
||||||
|
|
||||||
|
import AdminButton from "./components/AdminButton.vue";
|
||||||
import DoorMapEditor from "./components/DoorMapEditor.vue";
|
import DoorMapEditor from "./components/DoorMapEditor.vue";
|
||||||
import LoginModal from "./components/LoginModal.vue";
|
|
||||||
|
|
||||||
@Options({
|
@Options({
|
||||||
components: {
|
components: {
|
||||||
DoorMapEditor,
|
DoorMapEditor,
|
||||||
LoginModal,
|
AdminButton,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
export default class extends Vue {
|
export default class extends Vue {
|
||||||
private visible_days = 0;
|
private visible_days = 0;
|
||||||
date = "";
|
date = "";
|
||||||
|
|
||||||
declare $refs: {
|
|
||||||
login_modal: LoginModal;
|
|
||||||
};
|
|
||||||
|
|
||||||
public mounted() {
|
public mounted() {
|
||||||
this.$advent22
|
this.$advent22
|
||||||
.api_get<string>("days/date")
|
.api_get<string>("days/date")
|
||||||
|
|
29
ui/src/components/AdminButton.vue
Normal file
29
ui/src/components/AdminButton.vue
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<template>
|
||||||
|
<LoginModal ref="login_modal" />
|
||||||
|
|
||||||
|
<BulmaButton
|
||||||
|
class="button is-light"
|
||||||
|
@click.left="$refs.login_modal.set_active(true)"
|
||||||
|
icon="fa-solid fa-toggle-off"
|
||||||
|
text="Admin"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { Options, Vue } from "vue-class-component";
|
||||||
|
|
||||||
|
import BulmaButton from "./bulma/Button.vue";
|
||||||
|
import LoginModal from "./LoginModal.vue";
|
||||||
|
|
||||||
|
@Options({
|
||||||
|
components: {
|
||||||
|
BulmaButton,
|
||||||
|
LoginModal,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
export default class extends Vue {
|
||||||
|
declare $refs: {
|
||||||
|
login_modal: LoginModal;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in a new issue