Skip to content

Commit

Permalink
feat: isChanged 항목 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
westofsky committed Aug 28, 2024
1 parent 55eb5bf commit e663d9b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/core/components/operation-summary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default class OperationSummary extends PureComponent {
authSelectors,
operationProps,
specPath,
isChanged,
} = this.props

let {
Expand Down Expand Up @@ -85,6 +86,7 @@ export default class OperationSummary extends PureComponent {

{displayOperationId && (originalOperationId || operationId) ? <span className="opblock-summary-operation-id">{originalOperationId || operationId}</span> : null}
</button>
{isChanged && <div className="is-changed"></div>}
<CopyToClipboardBtn textToCopy={`${specPath.get(1)}`} />
{
allowAnonymous ? null :
Expand Down
5 changes: 3 additions & 2 deletions src/core/components/operation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default class Operation extends PureComponent {
let operation = operationProps.getIn(["op"])
let responses = operation.get("responses")
let parameters = getList(operation, ["parameters"])
let isChanged = operation.get("is_changed");
let operationScheme = specSelectors.operationScheme(path, method)
let isShownKey = ["operations", tag, operationId]
let extensions = getExtensions(operation)
Expand All @@ -113,13 +114,13 @@ export default class Operation extends PureComponent {
response = response.set("notDocumented", notDocumented)
}

let onChangeKey = [ path, method ] // Used to add values to _this_ operation ( indexed by path and method )
let onChangeKey = [ path, method ]

const validationErrors = specSelectors.validationErrors([path, method])

return (
<div className={deprecated ? "opblock opblock-deprecated" : isShown ? `opblock opblock-${method} is-open` : `opblock opblock-${method}`} id={escapeDeepLinkPath(isShownKey.join("-"))} >
<OperationSummary operationProps={operationProps} isShown={isShown} toggleShown={toggleShown} getComponent={getComponent} authActions={authActions} authSelectors={authSelectors} specPath={specPath} />
<OperationSummary operationProps={operationProps} isShown={isShown} toggleShown={toggleShown} getComponent={getComponent} authActions={authActions} authSelectors={authSelectors} specPath={specPath} isChanged = {isChanged} />
<Collapse isOpened={isShown}>
<div className="opblock-body">
<div className="description-wrapper">
Expand Down
7 changes: 6 additions & 1 deletion src/style/_swaggy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@
transform: translateY(2px);
background-color: #e0e0e0;
}

.is-changed{
width: 10px;
height: 10px;
border-radius:9999px;
background:red;
}

0 comments on commit e663d9b

Please sign in to comment.