feat: loading states for modal buttons (#2268)

This commit is contained in:
kyteinsky
2022-04-20 23:48:25 +05:30
committed by GitHub
parent 7bf76a5812
commit 2452b1be4b
13 changed files with 242 additions and 177 deletions

View File

@@ -123,7 +123,7 @@
:shortcut="['⌫']"
@click.native="
() => {
confirmRemove = true
removeRequest()
options.tippy().hide()
}
"
@@ -133,12 +133,6 @@
</span>
</div>
</div>
<SmartConfirmModal
:show="confirmRemove"
:title="$t('confirm.remove_request')"
@hide-modal="confirmRemove = false"
@resolve="removeRequest"
/>
<HttpReqChangeConfirmModal
:show="confirmChange"
@hide-modal="confirmChange = false"
@@ -215,8 +209,7 @@ const emit = defineEmits<{
(
e: "remove-request",
data: {
collectionIndex: number
folderName: string | undefined
folderPath: string | undefined
requestIndex: string
}
): void
@@ -253,7 +246,6 @@ const requestMethodLabels = {
delete: "text-red-500",
default: "text-gray-500",
}
const confirmRemove = ref(false)
const confirmChange = ref(false)
const showSaveRequestModal = ref(false)
@@ -289,8 +281,7 @@ const dragStart = ({ dataTransfer }: DragEvent) => {
const removeRequest = () => {
emit("remove-request", {
collectionIndex: props.collectionIndex,
folderName: props.folderName,
folderPath: props.folderName,
requestIndex: props.requestIndex,
})
}