Ver código fonte

Rearrange isShownKey to make more sense

Tag then ID is closer to representing the underlying data structure
bubble
Kyle Shockey 7 anos atrás
pai
commit
79f91b2e3e
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: DC20D559FFBC0D36
3 arquivos alterados com 3 adições e 3 exclusões
  1. +1
    -1
      src/core/components/operation.jsx
  2. +1
    -1
      src/core/components/operations.jsx
  3. +1
    -1
      src/core/plugins/deep-linking/layout-wrap-actions.js

+ 1
- 1
src/core/components/operation.jsx Ver arquivo

@@ -152,7 +152,7 @@ export default class Operation extends PureComponent {
let onChangeKey = [ path, method ] // Used to add values to _this_ operation ( indexed by path and method )

return (
<div className={deprecated ? "opblock opblock-deprecated" : shown ? `opblock opblock-${method} is-open` : `opblock opblock-${method}`} id={isShownKey} >
<div className={deprecated ? "opblock opblock-deprecated" : shown ? `opblock opblock-${method} is-open` : `opblock opblock-${method}`} id={isShownKey.join("-")} >
<div className={`opblock-summary opblock-summary-${method}`} onClick={this.toggleShown} >
<span className="opblock-summary-method">{method.toUpperCase()}</span>
<span className={ deprecated ? "opblock-summary-path__deprecated" : "opblock-summary-path" } >


+ 1
- 1
src/core/components/operations.jsx Ver arquivo

@@ -82,7 +82,7 @@ export default class Operations extends React.Component {
operations.map( op => {
const operationId =
op.getIn(["operation", "__originalOperationId"]) || op.getIn(["operation", "operationId"]) || op.get("id")
const isShownKey = ["operations", operationId, tag]
const isShownKey = ["operations", tag, operationId]
const path = op.get("path", "")
const method = op.get("method", "")
const jumpToKey = `paths.${path}.${method}`


+ 1
- 1
src/core/plugins/deep-linking/layout-wrap-actions.js Ver arquivo

@@ -12,7 +12,7 @@ export const show = (ori, system) => (...args) => {
}

if(type === "operations") {
let [, operationId, tag] = thing
let [, tag, operationId] = thing
setHash(`/${tag}/${operationId}`)
}



Carregando…
Cancelar
Salvar