Skip to content

Commit

Permalink
Dev UI: Make sure theme works in OIDC
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Kruger <[email protected]>
  • Loading branch information
phillip-kruger committed Jun 13, 2023
1 parent dc41ac7 commit c284f78
Showing 1 changed file with 24 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,13 @@ export class QwcOidcProvider extends QwcHotReloadElement {
.full-width {
width: 100%;
}
@media (min-width: 1200px) {
.container {
max-width: 1140px;
}
}
.container {
width: 93%;
margin: auto;
align-items: stretch;
border: 1px solid rgba(0,0,0,.125);
border-radius: var(--lumo-border-radius-l);
}
@media (min-width: 768px) {
.container-btn-mn-lf {
margin-left: 16.666667%;
}
}
.container-btn {
--lumo-success-color: #28a745;
}
.frm-field {
width: 83.333333%;
margin-left: 20px;
Expand All @@ -161,6 +148,9 @@ export class QwcOidcProvider extends QwcHotReloadElement {
.hidden {
display: none;
}
.heading {
font-size: larger;
}
.error-color {
color: var(--lumo-error-text-color);
}
Expand All @@ -174,7 +164,7 @@ export class QwcOidcProvider extends QwcHotReloadElement {
color: var(--lumo-primary-text-color);
}
.black-5pct {
background-color: var(--lumo-shade-5pct);
background-color: var(--lumo-contrast-10pct);
}
.margin-l-m {
margin-left: var(--lumo-space-m);
Expand Down Expand Up @@ -210,11 +200,10 @@ export class QwcOidcProvider extends QwcHotReloadElement {
}
}
.decoded-token, .encoded-token {
background-color: var(--lumo-contrast-90pct);
color: var(--lumo-success-contrast-color);
padding: 0 var(--lumo-space-m);
word-break: break-word;
word-wrap: break-word;
background-color: var(--lumo-contrast-5pct);
}
.decoded-token pre {
white-space: break-spaces;
Expand Down Expand Up @@ -374,7 +363,7 @@ export class QwcOidcProvider extends QwcHotReloadElement {
return html`
<vaadin-vertical-layout theme="spacing padding" class="height-4xl container">
${servicePathForm}
<vaadin-button class="container-btn-mn-lf container-btn" theme="primary success"
<vaadin-button theme="primary success"
@click=${() => this._signInToService()}>
Log into your Web Application
</vaadin-button>
Expand Down Expand Up @@ -433,7 +422,7 @@ export class QwcOidcProvider extends QwcHotReloadElement {
${extraFields}
${servicePathForm}
<vaadin-horizontal-layout class="full-width">
<vaadin-horizontal-layout class="container-btn-mn-lf full-width">
<vaadin-horizontal-layout class="full-width">
<vaadin-button class="fill-space margin-right-auto" theme="primary" title="Test service"
@click=${testSvcFun}>
Test service
Expand Down Expand Up @@ -647,12 +636,18 @@ export class QwcOidcProvider extends QwcHotReloadElement {
<vaadin-vertical-layout theme="spacing padding" class="height-4xl container"
?hidden="${propertiesState.hideImplLoggedOut}">
${keycloakRealms}
<vaadin-button class="container-btn-mn-lf container-btn" theme="primary success"
title="Log into Single Page Application to Get Access and ID Tokens"
@click=${() => this._signInToOidcProviderAndGetTokens()}>
<vaadin-icon icon="font-awesome-solid:user" slot="prefix" class="btn-icon"></vaadin-icon>
Log into Single Page Application
</vaadin-button>
<vaadin-form-layout class="txt-field-form full-width">
<vaadin-form-item class="full-width">
<vaadin-button theme="primary success"
title="Log into Single Page Application to Get Access and ID Tokens"
@click=${() => this._signInToOidcProviderAndGetTokens()}>
<vaadin-icon icon="font-awesome-solid:user" slot="prefix" class="btn-icon"></vaadin-icon>
Log into Single Page Application
</vaadin-button>
</vaadin-form-item>
</vaadin-form-layout>
</vaadin-vertical-layout>
<vaadin-horizontal-layout theme="spacing padding" class="height-4xl container vertical-center"
?hidden="${propertiesState.hideLogInErr}">
Expand All @@ -667,7 +662,7 @@ export class QwcOidcProvider extends QwcHotReloadElement {
<vaadin-vertical-layout class="full-width" ?hidden="${propertiesState.hideImplicitLoggedIn}">
<vaadin-vertical-layout class="height-4xl container">
<vaadin-horizontal-layout class="black-5pct vertical-center" theme="padding">
<span class="margin-right-auto default-cursor">Your tokens</span>
<span class="margin-right-auto default-cursor heading">Your tokens</span>
<span class="margin-right-space-m ${classMap({'display-none': !propertiesState.userName})}">
Logged in as ${propertiesState.userName}</span>
<vaadin-button theme="tertiary small" title="Click to logout and start again"
Expand Down Expand Up @@ -735,7 +730,7 @@ export class QwcOidcProvider extends QwcHotReloadElement {
</vaadin-vertical-layout>
<vaadin-vertical-layout theme="spacing" class="height-4xl container margin-top-space-m">
<vaadin-horizontal-layout class="black-5pct vertical-center" theme="padding">
<span class="margin-right-auto default-cursor">Test your service</span>
<span class="margin-right-auto default-cursor heading">Test your service</span>
<vaadin-button theme="tertiary small" title="Test in Swagger UI"
@click=${() => QwcOidcProvider._navigateToSwaggerUi()}
?hidden="${!propertiesState.swaggerIsAvailable}">
Expand All @@ -754,7 +749,7 @@ export class QwcOidcProvider extends QwcHotReloadElement {
<vaadin-vertical-layout theme="padding">
${servicePathForm}
<vaadin-horizontal-layout class="full-width">
<vaadin-horizontal-layout class="container-btn-mn-lf full-width">
<vaadin-horizontal-layout class="full-width">
<vaadin-button class="fill-space" theme="primary" title="Test With Access Token"
@click=${() => this._testServiceWithAccessToken()}>
With Access Token
Expand Down

0 comments on commit c284f78

Please sign in to comment.