fixing conflict with OIDCButton
This commit is contained in:
parent
fcb4518f25
commit
6a3367389d
|
@ -1,39 +0,0 @@
|
||||||
<script>
|
|
||||||
import { ActionButton } from "@budibase/bbui"
|
|
||||||
import OidcLogo from "assets/oidc-logo.png"
|
|
||||||
import { admin } from "stores/portal"
|
|
||||||
|
|
||||||
let show = false
|
|
||||||
|
|
||||||
$: show = $admin.checklist?.oidc
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if show}
|
|
||||||
<ActionButton
|
|
||||||
on:click={() => window.open("/api/admin/auth/oidc", "_blank")}
|
|
||||||
>
|
|
||||||
<div class="inner">
|
|
||||||
<img src={OidcLogo} alt="oidc icon" />
|
|
||||||
<p>Sign in with OIDC</p>
|
|
||||||
</div>
|
|
||||||
</ActionButton>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.inner {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
padding-top: var(--spacing-xs);
|
|
||||||
padding-bottom: var(--spacing-xs);
|
|
||||||
}
|
|
||||||
.inner img {
|
|
||||||
width: 18px;
|
|
||||||
margin: 3px 10px 3px 3px;
|
|
||||||
}
|
|
||||||
.inner p {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
let fileName = e.target.files[0].name
|
let fileName = e.target.files[0].name
|
||||||
image = e.target.files[0]
|
image = e.target.files[0]
|
||||||
providers.oidc.config["iconName"] = fileName
|
providers.oidc.config["iconName"] = fileName
|
||||||
iconDropdownOptions.unshift({label: fileName, value: fileName})
|
iconDropdownOptions.unshift({ label: fileName, value: fileName })
|
||||||
}
|
}
|
||||||
|
|
||||||
const providers = { google, oidc }
|
const providers = { google, oidc }
|
||||||
|
@ -140,17 +140,17 @@
|
||||||
const configSettings = await res.json()
|
const configSettings = await res.json()
|
||||||
|
|
||||||
if (configSettings.config) {
|
if (configSettings.config) {
|
||||||
const logoKeys = Object.keys(configSettings.config)
|
const logoKeys = Object.keys(configSettings.config)
|
||||||
|
|
||||||
logoKeys.map(logoKey => {
|
logoKeys.map(logoKey => {
|
||||||
const logoUrl = configSettings.config[logoKey]
|
const logoUrl = configSettings.config[logoKey]
|
||||||
iconDropdownOptions.unshift({
|
iconDropdownOptions.unshift({
|
||||||
label: logoKey,
|
label: logoKey,
|
||||||
value: logoKey,
|
value: logoKey,
|
||||||
icon: logoUrl,
|
icon: logoUrl,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
}
|
|
||||||
const oidcResponse = await api.get(`/api/admin/configs/${ConfigTypes.OIDC}`)
|
const oidcResponse = await api.get(`/api/admin/configs/${ConfigTypes.OIDC}`)
|
||||||
const oidcDoc = await oidcResponse.json()
|
const oidcDoc = await oidcResponse.json()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue