-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feat/log-client-cert-…
…status
- Loading branch information
Showing
135 changed files
with
8,375 additions
and
3,177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"presets": ["next/babel"], | ||
"presets": ["@babel/preset-env"], | ||
"plugins": [["styled-components", { "ssr": true }]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,6 @@ yarn-error.log* | |
|
||
# next.js | ||
.next/ | ||
out/ | ||
dist/ | ||
|
||
.env |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { defineConfig } from '@rsbuild/core'; | ||
import { pluginReact } from '@rsbuild/plugin-react'; | ||
import { pluginBabel } from '@rsbuild/plugin-babel'; | ||
import { pluginStyledComponents } from '@rsbuild/plugin-styled-components'; | ||
import { pluginSass } from '@rsbuild/plugin-sass'; | ||
import { pluginNodePolyfill } from '@rsbuild/plugin-node-polyfill' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
pluginNodePolyfill(), | ||
pluginReact(), | ||
pluginStyledComponents(), | ||
pluginSass(), | ||
pluginBabel({ | ||
include: /\.(?:js|jsx|tsx)$/, | ||
babelLoaderOptions(opts) { | ||
opts.plugins?.unshift('babel-plugin-react-compiler'); | ||
} | ||
}) | ||
], | ||
source: { | ||
tsconfigPath: './jsconfig.json', // Specifies the path to the JavaScript/TypeScript configuration file | ||
}, | ||
html: { | ||
title: 'Bruno' | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/bruno-app/src/components/FolderSettings/Documentation/StyledWrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import styled from 'styled-components'; | ||
|
||
const StyledWrapper = styled.div` | ||
.editing-mode { | ||
cursor: pointer; | ||
color: ${(props) => props.theme.colors.text.yellow}; | ||
} | ||
`; | ||
|
||
export default StyledWrapper; |
63 changes: 63 additions & 0 deletions
63
packages/bruno-app/src/components/FolderSettings/Documentation/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import 'github-markdown-css/github-markdown.css'; | ||
import get from 'lodash/get'; | ||
import { updateFolderDocs } from 'providers/ReduxStore/slices/collections'; | ||
import { useTheme } from 'providers/Theme'; | ||
import { useState } from 'react'; | ||
import { useDispatch, useSelector } from 'react-redux'; | ||
import { saveFolderRoot } from 'providers/ReduxStore/slices/collections/actions'; | ||
import Markdown from 'components/MarkDown'; | ||
import CodeEditor from 'components/CodeEditor'; | ||
import StyledWrapper from './StyledWrapper'; | ||
|
||
const Documentation = ({ collection, folder }) => { | ||
const dispatch = useDispatch(); | ||
const { displayedTheme } = useTheme(); | ||
const preferences = useSelector((state) => state.app.preferences); | ||
const [isEditing, setIsEditing] = useState(false); | ||
const docs = get(folder, 'root.docs', ''); | ||
|
||
const toggleViewMode = () => { | ||
setIsEditing((prev) => !prev); | ||
}; | ||
|
||
const onEdit = (value) => { | ||
dispatch( | ||
updateFolderDocs({ | ||
folderUid: folder.uid, | ||
collectionUid: collection.uid, | ||
docs: value | ||
}) | ||
); | ||
}; | ||
|
||
const onSave = () => dispatch(saveFolderRoot(collection.uid, folder.uid)); | ||
|
||
if (!folder) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<StyledWrapper className="flex flex-col gap-y-1 h-full w-full relative"> | ||
<div className="editing-mode" role="tab" onClick={toggleViewMode}> | ||
{isEditing ? 'Preview' : 'Edit'} | ||
</div> | ||
|
||
{isEditing ? ( | ||
<CodeEditor | ||
collection={collection} | ||
theme={displayedTheme} | ||
font={get(preferences, 'font.codeFont', 'default')} | ||
fontSize={get(preferences, 'font.codeFontSize')} | ||
value={docs || ''} | ||
onEdit={onEdit} | ||
onSave={onSave} | ||
mode="application/text" | ||
/> | ||
) : ( | ||
<Markdown collectionPath={collection.pathname} onDoubleClick={toggleViewMode} content={docs} /> | ||
)} | ||
</StyledWrapper> | ||
); | ||
}; | ||
|
||
export default Documentation; |
Oops, something went wrong.