blob: 845b10a8f7be195385383d5db025ea2f22c1ffa0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<script setup lang="ts">
const session = useSessionStore();
const showModal = ref(false);
const open = () => {
showModal.value = true;
}
const confirm = () => {
session.setQuests([]);
session.setCategories([]);
session.setItems([]);
session.setSessionType('none');
navigateToEditorPane(null);
showModal.value = false;
}
defineExpose({
open
})
</script>
<template>
<Modal v-model="showModal">
<template v-slot:header>
<h2>Discard current session</h2>
</template>
<p>You are about to discard your current session. All changes will be lost.
Do you want to continue?</p>
<div id="controls" class="control-group">
<Button :icon="['fas', 'xmark']" :label="'Cancel'" @click="showModal = false"></Button>
<Button type="solid" accent="danger" :icon="['fas', 'trash']" :label="'Confirm'" @click="confirm"></Button>
</div>
</Modal>
</template>
<style scoped>
#controls {
display: flex;
justify-content: flex-end;
margin-top: 1rem;
}
</style>
|