mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-28 07:04:10 +00:00
* feat: implement OpenAPI Sync * feat: enhance focus styles and error handling across components - Added focus-visible styles for buttons and tags in Swagger and Modal components to improve accessibility. - Updated ConnectSpecForm to ensure source URL is set only if the file path is valid. - Enhanced clipboard copy functionality in SpecInfoCard with error handling and success notifications. - Improved ExpandableEndpointRow to handle loading state more robustly. - Refined SyncReviewPage to ensure correct filtering of updated endpoints. - Updated file handling in OpenAPI Sync IPC to support both .yml and .yaml extensions. * fix: improve filename sanitization in OpenAPI Sync IPC - Updated filename sanitization logic to ensure proper handling of both `name` and `filename` properties, enhancing compatibility with various file formats. - Adjusted the logic to derive the base name from the filename when necessary, ensuring consistent output for generated files. * feat: enhance OpenAPI Sync tab with new overview and header components - Introduced OverviewSection to display summary of collection and spec status, including total endpoints, in-sync counts, and pending updates. - Added OpenAPISyncHeader for improved navigation and actions related to the OpenAPI spec. - Updated CollectionStatusSection to better handle and display collection drift information. - Refined styling for status banners and added new visual elements for better user experience. - Enhanced tooltip functionality in Help component for improved accessibility. * refactor: remove VisualDiffViewer components and add diff package - Deleted VisualDiffViewer components including VisualDiffMeta, VisualDiffDocs, VisualDiffVars, and others to streamline the codebase. - Introduced the 'diff' package in package-lock.json to enhance diff functionality. - Updated utility functions to improve diff status handling and maintainability.
41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
import React, { useEffect } from 'react';
|
|
import ReactDOM from 'react-dom/client';
|
|
import App from './pages/index';
|
|
import { DndProvider } from 'react-dnd';
|
|
import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
|
|
const rootElement = document.getElementById('root');
|
|
|
|
const Main = () => {
|
|
useEffect(() => {
|
|
const link = document.createElement('link');
|
|
link.rel = 'stylesheet';
|
|
link.type = 'text/css';
|
|
link.href = `static/diff2html.min.css`;
|
|
document.head.appendChild(link);
|
|
const script = document.createElement('script');
|
|
script.type = 'text/javascript';
|
|
script.src = `static/diff2Html.js`;
|
|
script.async = true;
|
|
document.body.appendChild(script);
|
|
|
|
return () => {
|
|
document.head.removeChild(link);
|
|
document.body.removeChild(script);
|
|
};
|
|
}, []);
|
|
|
|
return (
|
|
<React.StrictMode>
|
|
<DndProvider backend={HTML5Backend}>
|
|
<App />
|
|
</DndProvider>
|
|
</React.StrictMode>
|
|
);
|
|
};
|
|
|
|
if (rootElement) {
|
|
const root = ReactDOM.createRoot(rootElement);
|
|
root.render(<Main />);
|
|
}
|