Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

Added new button to save request modal (#3976)

Dmitry6c29961d09bf
diff --git a/packages/hoppscotch-common/src/pages/index.vue b/packages/hoppscotch-common/src/pages/index.vue
index aa1fb8478..e8afb9d21 100644
--- a/packages/hoppscotch-common/src/pages/index.vue
+++ b/packages/hoppscotch-common/src/pages/index.vue
@@ -64,13 +64,6 @@
@submit="renameReqName"
@hide-modal="showRenamingReqNameModal = false"
/>
- <HoppSmartConfirmModal
- :show="confirmingCloseForTabID !== null"
- :confirm="t('modal.close_unsaved_tab')"
- :title="t('confirm.save_unsaved_tab')"
- @hide-modal="onCloseConfirmSaveTab"
- @resolve="onResolveConfirmSaveTab"
- />
<HoppSmartConfirmModal
:show="confirmingCloseAllTabs"
:confirm="t('modal.close_unsaved_tab')"
@@ -78,6 +71,36 @@
@hide-modal="confirmingCloseAllTabs = false"
@resolve="onResolveConfirmCloseAllTabs"
/>
+ <HoppSmartModal
+ v-if="confirmingCloseForTabID !== null"
+ dialog
+ role="dialog"
+ aria-modal="true"
+ :title="t('modal.close_unsaved_tab')"
+ @close="confirmingCloseForTabID = null"
+ >
+ <template #body>
+ <div class="text-center">
+ {{ t("confirm.save_unsaved_tab") }}
+ </div>
+ </template>
+ <template #footer>
+ <span class="flex space-x-2">
+ <HoppButtonPrimary
+ v-focus
+ :label="t?.('action.yes')"
+ outline
+ @click="onResolveConfirmSaveTab"
+ />
+ <HoppButtonSecondary
+ :label="t?.('action.no')"
+ filled
+ outline
+ @click="onCloseConfirmSaveTab"
+ />
+ </span>
+ </template>
+ </HoppSmartModal>
<CollectionsSaveRequest
v-if="savingRequest"
mode="rest"