Skip to content

Commit

Permalink
fix: #245 signout and redirect uri on admin revision modal
Browse files Browse the repository at this point in the history
  • Loading branch information
vuhuucuong committed Feb 13, 2020
1 parent 25a0ec3 commit c5de490
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && lerna run test:update-badges --since HEAD^ && git add .",
"pre-commit": "lint-staged && lerna run test:update-badges --since HEAD && git add .",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,34 @@ Get
type="words"
/>
</div>
<div
className="mb-3"
>
<h4
className="mb-2"
>
Redirect URIs
</h4>
<DiffViewer
changedString=""
currentString=""
type="words"
/>
</div>
<div
className="mb-3"
>
<h4
className="mb-2"
>
Signout URIs
</h4>
<DiffViewer
changedString=""
currentString=""
type="words"
/>
</div>
<div
className="mb-3"
>
Expand Down
12 changes: 12 additions & 0 deletions packages/marketplace/src/components/ui/admin-approval-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const diffStringList: { [k in keyof AppRevisionModel]: string } = {
telephone: 'Telephone',
summary: 'Summary',
description: 'Description',
redirectUris: 'Redirect URIs',
signoutUris: 'Signout URIs',
}

type DiffMediaModel = {
Expand Down Expand Up @@ -126,6 +128,16 @@ export const AdminApprovalModalInner: React.FunctionComponent<AdminApprovalModal
/>
</div>
)
}
if (['redirectUris', 'signoutUris'].includes(key)) {
const currentString = Array.isArray(app[key]) ? app[key].join(' ') : ''
const changedString = Array.isArray(revision[key]) ? revision[key].join(' ') : ''
return (
<div className="mb-3" key={key}>
<h4 className="mb-2">{diffStringList[key]}</h4>
<DiffViewer currentString={currentString} changedString={changedString} type="words" />
</div>
)
} else {
return (
<div className="mb-3" key={key}>
Expand Down
2 changes: 1 addition & 1 deletion packages/marketplace/src/tests/badges/badge-branches.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/marketplace/src/tests/badges/badge-lines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/marketplace/src/tests/badges/badge-statements.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c5de490

Please sign in to comment.