Skip to content

A self-hosted media server and file management system

867 B
Raw Blame
<script setup lang="ts">
import { signOutOtherSessions } from '@/service/authAPI';
import { useModalStore } from '@/stores/ModalStore';
import { BaseModal } from '@/components/cedar-ui/modal';

import PasswordConfirm from '@/components/forms/PasswordConfirm.vue';

const props = defineProps<{ onSuccess?: () => void }>();
const modalStore = useModalStore();

function handleSuccess() {
    modalStore.close();
    props.onSuccess?.();
}
</script>

<template>
    <BaseModal>
        <template #title>Sign Out of Other Devices</template>
        <template #description>Are you sure you want to sign out of other devices? You won't be able to undo this action.</template>
        <PasswordConfirm :action="signOutOtherSessions" success-message="Other Sessions Logged Out Successfully" @confirm="handleSuccess" @cancel="modalStore.close" />
    </BaseModal>
</template>