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

@@ -126,7 +126,7 @@
:shortcut="['⌫']"
@click.native="
() => {
confirmRemove = true
removeRequest()
options.tippy().hide()
}
"
@@ -136,12 +136,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"
@@ -222,8 +216,6 @@ const emit = defineEmits<{
(
e: "remove-request",
data: {
collectionIndex: number
folderName: string
folderPath: string
requestIndex: number
}
@@ -265,7 +257,6 @@ const requestMethodLabels = {
delete: "text-red-500",
default: "text-gray-500",
}
const confirmRemove = ref(false)
const confirmChange = ref(false)
const showSaveRequestModal = ref(false)
@@ -304,8 +295,6 @@ const dragStart = ({ dataTransfer }: DragEvent) => {
const removeRequest = () => {
emit("remove-request", {
collectionIndex: props.collectionIndex,
folderName: props.folderName,
folderPath: props.folderPath,
requestIndex: props.requestIndex,
})