feat #32: improve approval UI #12

Merged
faercol merged 1 commit from 32-authorization-ui into feature/10-ui 2023-11-04 08:33:07 +00:00
2 changed files with 25 additions and 29 deletions

View file

@ -63,7 +63,7 @@ body {
.form-buttons { .form-buttons {
display: flex; display: flex;
justify-content: center; justify-content: space-between;
} }
.form-input { .form-input {
@ -91,4 +91,8 @@ body {
.button-accept { .button-accept {
background-color: var(--logo-blue); background-color: var(--logo-blue);
}
.button-cancel {
background-color: var(--logo-pink);
} }

View file

@ -1,42 +1,34 @@
{{ template "header.html" . }} {{ template "header.html" . }}
<div class="theme-panel"> <div class="container">
<h2 class="theme-heading">Grant Access</h2> <div class="container-content">
<hr class="dex-separator">
<div>
{{ if .Scopes }} {{ if .Scopes }}
<div class="dex-subtle-text">{{ .Client }} would like to:</div> <div>{{ .Client }} would like to:</div>
<ul class="dex-list"> <ul>
{{ range $scope := .Scopes }} {{ range $scope := .Scopes }}
<li>{{ $scope }}</li> <li>{{ $scope }}</li>
{{ end }} {{ end }}
</ul> </ul>
{{ else }} {{ else }}
<div class="dex-subtle-text">{{ .Client }} has not requested any personal information</div> <div>{{ .Client }} has not requested any personal information</div>
{{ end }} {{ end }}
</div> </div>
<hr class="dex-separator">
<div> <div class="form-buttons">
<div class="theme-form-row"> <form method="post" class="container-form">
<form method="post"> <input type="hidden" name="req" value="{{ .AuthReqID }}" />
<input type="hidden" name="req" value="{{ .AuthReqID }}" /> <input type="hidden" name="approval" value="approve">
<input type="hidden" name="approval" value="approve"> <button type="submit" class="button button-accept">
<button type="submit" class="dex-btn theme-btn--success"> <span>Grant Access</span>
<span class="dex-btn-text">Grant Access</span> </button>
</button> </form>
</form> <form method="post" class="container-form">
</div> <input type="hidden" name="req" value="{{ .AuthReqID }}" />
<div class="theme-form-row"> <input type="hidden" name="approval" value="rejected">
<form method="post"> <button type="submit" class="button button-cancel">
<input type="hidden" name="req" value="{{ .AuthReqID }}" /> <span>Cancel</span>
<input type="hidden" name="approval" value="rejected"> </button>
<button type="submit" class="dex-btn theme-btn-provider"> </form>
<span class="dex-btn-text">Cancel</span>
</button>
</form>
</div>
</div> </div>
</div> </div>