patches v1.2.1 #54

Merged
jkeffects merged 4 commits from develop into main 2025-01-27 14:23:59 +00:00
Showing only changes of commit e330e3a7d6 - Show all commits

View file

@ -24,7 +24,11 @@
> >
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" /> <PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink> </RouterLink>
<div v-if="can('delete', 'user', 'user')" @click="openDeleteModal"> <div
v-if="can('delete', 'user', 'user')"
:class="user.isOwner ? 'opacity-75 pointer-events-none' : ''"
@click="openDeleteModal"
>
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" /> <TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div> </div>
</div> </div>
@ -70,6 +74,7 @@ export default defineComponent({
methods: { methods: {
...mapActions(useModalStore, ["openModal"]), ...mapActions(useModalStore, ["openModal"]),
openDeleteModal() { openDeleteModal() {
if (this.user.isOwner) return;
this.openModal( this.openModal(
markRaw(defineAsyncComponent(() => import("@/components/admin/user/user/DeleteUserModal.vue"))), markRaw(defineAsyncComponent(() => import("@/components/admin/user/user/DeleteUserModal.vue"))),
this.user.id this.user.id