Skip to content

Commit bcf5ec7

Browse files
committed
Add an API Manager view to the secondary sidebar and migrate the API manager functionality to this new interface
- create a new pane 'api manager'. Should use the secondary sidebar. - create a new pane 'api manager'. Should use the secondary sidebar. check internet how to set secondary sidebar in package.json
1 parent c8d2a71 commit bcf5ec7

2 files changed

Lines changed: 3 additions & 18 deletions

File tree

‎apps/editor/src/views/panel/backend/panel-provider.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,9 @@ export class PanelProvider implements vscode.WebviewViewProvider {
626626
if (this.webview_view) {
627627
this.webview_view.webview.postMessage(message)
628628
}
629+
for (const listener of this.message_listeners) {
630+
listener(message)
631+
}
629632
}
630633

631634
public show_preview_ongoing_modal() {

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ 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'
1615
import { QRCodeModal as UiQRCodeModal } from '@ui/components/editor/panel/modals/QRCodeModal'
1716
import { AutoClosingModal as UiAutoClosingModal } from '@ui/components/editor/panel/modals/AutoClosingModal'
1817
import { use_panel } from './hooks/panel/use-panel'
@@ -135,7 +134,6 @@ export const Panel = () => {
135134
const {
136135
progress_state,
137136
set_progress_state,
138-
api_manager_progress_state,
139137
auto_closing_modal_data,
140138
set_auto_closing_modal_data,
141139
is_preview_ongoing_modal_visible,
@@ -578,22 +576,6 @@ export const Panel = () => {
578576
</div>
579577
)}
580578

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-
597579
{items_in_preview && (
598580
<div className={styles.slot}>
599581
<UiPage

0 commit comments

Comments
 (0)