improvement: move operation JumpToPath (via #4760)
This commit is contained in:
@@ -15,7 +15,6 @@ export default class OperationSummaryPath extends PureComponent{
|
|||||||
let {
|
let {
|
||||||
getComponent,
|
getComponent,
|
||||||
operationProps,
|
operationProps,
|
||||||
specPath,
|
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
|
|
||||||
@@ -29,8 +28,6 @@ export default class OperationSummaryPath extends PureComponent{
|
|||||||
} = operationProps.toJS()
|
} = operationProps.toJS()
|
||||||
|
|
||||||
let isShownKey = ["operations", tag, operationId]
|
let isShownKey = ["operations", tag, operationId]
|
||||||
|
|
||||||
const JumpToPath = getComponent("JumpToPath", true)
|
|
||||||
const DeepLink = getComponent( "DeepLink" )
|
const DeepLink = getComponent( "DeepLink" )
|
||||||
|
|
||||||
return(
|
return(
|
||||||
@@ -40,7 +37,6 @@ export default class OperationSummaryPath extends PureComponent{
|
|||||||
isShown={isShown}
|
isShown={isShown}
|
||||||
path={`${isShownKey.join("/")}`}
|
path={`${isShownKey.join("/")}`}
|
||||||
text={path} />
|
text={path} />
|
||||||
<JumpToPath path={specPath} />{/* TODO: use wrapComponents here, swagger-ui doesn't care about jumpToPath */}
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ export default class OperationSummary extends PureComponent {
|
|||||||
const AuthorizeOperationBtn = getComponent("authorizeOperationBtn")
|
const AuthorizeOperationBtn = getComponent("authorizeOperationBtn")
|
||||||
const OperationSummaryMethod = getComponent("OperationSummaryMethod")
|
const OperationSummaryMethod = getComponent("OperationSummaryMethod")
|
||||||
const OperationSummaryPath = getComponent("OperationSummaryPath")
|
const OperationSummaryPath = getComponent("OperationSummaryPath")
|
||||||
|
const JumpToPath = getComponent("JumpToPath", true)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
@@ -78,6 +79,7 @@ export default class OperationSummary extends PureComponent {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
<JumpToPath path={specPath} />{/* TODO: use wrapComponents here, swagger-ui doesn't care about jumpToPath */}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -266,26 +266,6 @@
|
|||||||
|
|
||||||
@include text_code();
|
@include text_code();
|
||||||
|
|
||||||
.view-line-link
|
|
||||||
{
|
|
||||||
position: relative;
|
|
||||||
top: 2px;
|
|
||||||
|
|
||||||
width: 0;
|
|
||||||
margin: 0;
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all .5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
{
|
|
||||||
.view-line-link
|
|
||||||
{
|
|
||||||
width: 18px;
|
|
||||||
margin: 0 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.opblock-summary-path__deprecated
|
.opblock-summary-path__deprecated
|
||||||
@@ -315,8 +295,31 @@
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
.view-line-link
|
||||||
|
{
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
|
||||||
|
width: 0;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all .5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
{
|
||||||
|
.view-line-link
|
||||||
|
{
|
||||||
|
width: 18px;
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
&.opblock-post
|
&.opblock-post
|
||||||
{
|
{
|
||||||
@include method($_color-post);
|
@include method($_color-post);
|
||||||
|
|||||||
Reference in New Issue
Block a user