mirror of
https://github.com/TeamPiped/Piped.git
synced 2026-04-18 21:57:48 +00:00
Replace confirm dialogs with custom modals
This commit is contained in:
25
src/components/ConfirmModal.vue
Normal file
25
src/components/ConfirmModal.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<ModalComponent @close="$emit('close')">
|
||||
<div>
|
||||
<h3 class="text-xl" v-text="message" />
|
||||
<div class="ml-auto mt-8 flex gap-2 w-min">
|
||||
<button class="btn" v-t="'actions.cancel'" @click="$emit('close')" />
|
||||
<button class="btn" v-t="'actions.confirm'" @click="$emit('confirm')" />
|
||||
</div>
|
||||
</div>
|
||||
</ModalComponent>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ModalComponent from "./ModalComponent.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ModalComponent,
|
||||
},
|
||||
props: {
|
||||
message: String,
|
||||
},
|
||||
emits: ["close", "confirm"],
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user