Skip to content

Commit 9904ca1

Browse files
committed
Implement API manager progress tracking in the panel and API manager view to enable real-time request monitoring and cancellation
- rename 'fix all automatically' to 'auto-run intelligent update'. place it immediately below 'reuse last tab'. rename all labels, variables, etc. - restore 'api manager modal' [Changes]
1 parent bcf5ec7 commit 9904ca1

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

  • apps/editor/src/views/panel/frontend

‎apps/editor/src/views/panel/frontend/Panel.tsx‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { post_message } from './utils/post-message'
1212
import { ResponsePreview as UiResponsePreview } from '@ui/components/editor/panel/ResponsePreview'
1313
import { Modal as UiModal } from '@ui/components/editor/panel/modals/Modal'
1414
import { ProgressModal as UiProgressModal } from '@ui/components/editor/panel/modals/ProgressModal'
15+
import { ApiManagerModal as UiApiManagerModal } from '@ui/components/editor/panel/modals/ApiManagerModal'
1516
import { QRCodeModal as UiQRCodeModal } from '@ui/components/editor/panel/modals/QRCodeModal'
1617
import { AutoClosingModal as UiAutoClosingModal } from '@ui/components/editor/panel/modals/AutoClosingModal'
1718
import { use_panel } from './hooks/panel/use-panel'
@@ -134,6 +135,7 @@ export const Panel = () => {
134135
const {
135136
progress_state,
136137
set_progress_state,
138+
api_manager_progress_state,
137139
auto_closing_modal_data,
138140
set_auto_closing_modal_data,
139141
is_preview_ongoing_modal_visible,
@@ -576,6 +578,22 @@ export const Panel = () => {
576578
</div>
577579
)}
578580

581+
{Object.keys(api_manager_progress_state).length > 0 && (
582+
<div className={styles.slot}>
583+
<UiApiManagerModal
584+
progress_items={Object.entries(api_manager_progress_state).map(
585+
([id, state]) => ({ id, ...state })
586+
)}
587+
on_cancel={(id) => {
588+
post_message(vscode, {
589+
command: 'CANCEL_API_MANAGER_REQUEST',
590+
id
591+
})
592+
}}
593+
/>
594+
</div>
595+
)}
596+
579597
{items_in_preview && (
580598
<div className={styles.slot}>
581599
<UiPage

0 commit comments

Comments
 (0)