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 class="level-right">
<div class="level-item">
<AdminButton
v-model="is_admin"
button_class="tag is-link is-outlined"
/>
<AdminButton class="tag is-link is-outlined" v-model="is_admin" />
</div>
</div>
</nav>

View file

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