Skip to content

Commit

Permalink
Merge pull request #200 from OpenWebhook/display-store-config
Browse files Browse the repository at this point in the history
fix: github urls and layout
  • Loading branch information
Samox authored Mar 21, 2023
2 parents 98f87cf + 8be42ed commit 669dc23
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
38 changes: 21 additions & 17 deletions src/NavBar/StoreConfig/StoreConfigDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ export const StoreConfigInnerDialog = ({
<h1>Store Config</h1>
</Heading>
<div style={{ display: "flex" }}>
<DataWell label="Access" subLabel={accessConfig.sublabel}>
<DataWell
style={{ paddingLeft: "0" }}
label="Access"
subLabel={accessConfig.sublabel}
>
{accessConfig.type} {accessConfig.type === "public" ? "⚠️" : null}
</DataWell>
{storageLimit && (
Expand All @@ -39,36 +43,36 @@ export const StoreConfigInnerDialog = ({
)}
</div>

{userHasAccessToStore
? "You have access to this store"
: "You don't have access to this store"}
{userHasAccessToStore ? null : "You don't have access to this store"}

<Heading>
<h1>Your private webhooks stores</h1>
</Heading>

<List>
{availableStores.length > 0
? availableStores.map((store) => (
<List.Item>
<Link>
<a href={store.url}>{store.display}</a>
</Link>
</List.Item>
))
: null}
</List>
<div style={{ padding: "0 24px" }}>
<List type="bulleted">
{availableStores.length > 0
? availableStores.map((store) => (
<List.Item>
<Link>
<a href={store.url}>{store.display}</a>
</Link>
</List.Item>
))
: null}
</List>
</div>

<P>
<Link>
<Link appearance={Link.appearances.subtle}>
<a href="https://www.openwebhook.io/docs/intro/#authentication">
WebhookStore access documentation
</a>
</Link>
</P>

<P>
<Link>
<Link appearance={Link.appearances.subtle}>
<a href="https://www.openwebhook.io/docs/intro/#%EF%B8%8F-public-organisation-membership">
You don't see your organisation here?
</a>
Expand Down
8 changes: 4 additions & 4 deletions src/NavBar/StoreConfig/StoreConfigNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ export const StoreConfigNavItem = () => {
const availableStores = identityToken
? [
{
url: `https://${identityToken.payload.name}.github-org.webhook.store/?access_token=${idToken}`,
display: `${identityToken.payload.name}.github-org.webhook.store`,
url: `https://${identityToken.payload.name}.github.webhook.store/?access_token=${idToken}`,
display: `${identityToken.payload.name.toLowerCase()}.github.webhook.store`,
},
...identityToken.payload.ghOrganisations.map((orgName) => ({
url: `https://${orgName}.github.webhook.store/?access_token=${idToken}`,
display: `${orgName}.github-org.webhook.store`,
url: `https://${orgName}.github-org.webhook.store/?access_token=${idToken}`,
display: `${orgName.toLowerCase()}.github-org.webhook.store`,
})),
]
: [
Expand Down

0 comments on commit 669dc23

Please sign in to comment.