feat: programmatically create invite modal
This commit is contained in:
parent
e73df90310
commit
7ae7bc6d76
1 changed files with 8 additions and 12 deletions
|
@ -7,24 +7,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { InviteModal } from '#components';
|
import { render } from 'vue';
|
||||||
|
import InviteModal from './InviteModal.vue';
|
||||||
const modal = ref<HTMLDialogElement>();
|
|
||||||
|
|
||||||
const showInviteModal = ref(false);
|
|
||||||
|
|
||||||
const settings = [
|
const settings = [
|
||||||
{ name: "Invite", icon: "lucide:letter", action: openInviteModal }
|
{ name: "Invite", icon: "lucide:letter", action: openInviteModal }
|
||||||
]
|
]
|
||||||
|
|
||||||
function openInviteModal() {
|
function openInviteModal() {
|
||||||
showInviteModal.value = true;
|
const div = document.createElement("div");
|
||||||
const invitePopup = h(InviteModal);
|
const guildId = useRoute().params.serverId as string;
|
||||||
}
|
console.log("guild id:", guildId);
|
||||||
|
const inviteModal = h(InviteModal, { guildId });
|
||||||
function toggleInviteModal(e: Event) {
|
document.body.appendChild(div);
|
||||||
e.preventDefault();
|
render(inviteModal, div);
|
||||||
showInviteModal.value = !showInviteModal.value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue