AdminButton fragment handling

This commit is contained in:
Jörn-Michael Miehe 2023-09-22 20:42:28 +00:00
parent 6e8b6549ea
commit a15dd4fdfa
2 changed files with 2 additions and 7 deletions

View file

@ -23,10 +23,7 @@
</div> </div>
<div class="level-right"> <div class="level-right">
<div class="level-item"> <div class="level-item">
<AdminButton <AdminButton class="tag is-link is-outlined" v-model="is_admin" />
v-model="is_admin"
button_class="tag is-link is-outlined"
/>
</div> </div>
</div> </div>
</nav> </nav>

View file

@ -2,7 +2,7 @@
<LoginModal v-if="modal_visible" @submit="on_submit" @cancel="on_cancel" /> <LoginModal v-if="modal_visible" @submit="on_submit" @cancel="on_cancel" />
<BulmaButton <BulmaButton
:class="button_class" v-bind="$attrs"
:icon="'fa-solid fa-toggle-' + (modelValue ? 'on' : 'off')" :icon="'fa-solid fa-toggle-' + (modelValue ? 'on' : 'off')"
:busy="is_busy" :busy="is_busy"
text="Admin" text="Admin"
@ -24,14 +24,12 @@ import LoginModal from "./LoginModal.vue";
}, },
props: { props: {
modelValue: Boolean, modelValue: Boolean,
button_class: String,
}, },
emits: ["update:modelValue"], emits: ["update:modelValue"],
}) })
export default class extends Vue { export default class extends Vue {
// true, iff Benutzer Admin ist // true, iff Benutzer Admin ist
public modelValue!: boolean; public modelValue!: boolean;
public button_class!: string;
public modal_visible = false; public modal_visible = false;
public is_busy = false; public is_busy = false;