[auth] UI changes

This commit is contained in:
bodnia
2016-03-13 00:52:47 +02:00
parent 1e38c8999b
commit 0f77177455
21 changed files with 413 additions and 131 deletions

View File

@@ -1,12 +1,22 @@
<div class='key_input_container'>
<div class='auth__description'>{{description}}</div>
<div class="key_input_container">
<h3 class="auth__title">Api key authorization</h3>
<div class="auth__description">{{description}}</div>
<div>
<span class='auth_label'><label for='input_apiKey_entry'><span>Api key</span> in {{in}}</label></span>
<span class='auth_in'><label for='input_apiKey_entry'>{{name}} =</label></span>
{{#if isLogout}}
<span class="auth_label">{{value}}</span>
{{else}}
<input placeholder='api_key' class='auth_input input_apiKey_entry' name='apiKey' type='text'/>
{{/if}}
<div class="key_auth__field">
<span class="key_auth__label">name:</span>
<span class="key_auth__value">{{name}}</span>
</div>
<div class="key_auth__field">
<span class="key_auth__label">in:</span>
<span class="key_auth__value">{{in}}</span>
</div>
<div class="key_auth__field">
<span class="key_auth__label">value:</span>
{{#if isLogout}}
<span class="key_auth__value">{{value}}</span>
{{else}}
<input placeholder="api_key" class="auth_input input_apiKey_entry" name="apiKey" type="text"/>
{{/if}}
</div>
</div>
</div>

View File

@@ -1,9 +1,8 @@
<div class="authorize__btn authorize__btn_operation">
<span class="api-ic
{{#if isLogout}}
ic-info
{{else}}
ic-error
{{/if}}
"></span>
</div>
<div class="authorize__btn authorize__btn_operation
{{#if isLogout}}
authorize__btn_operation_login
{{else}}
authorize__btn_operation_logout
{{/if}}
">
</div>

View File

@@ -2,8 +2,10 @@
<div class="auth_inner"></div>
<div class="auth_submit">
<button type="button" class="auth__button auth_submit__button" data-sw-translate>Authorize</button>
{{#if isLogout}}
{{#unless isLogout}}
<button type="button" class="auth__button auth_submit__button" data-sw-translate>Authorize</button>
{{/unless}}
{{#if isAuthorized}}
<button type="button" class="auth__button auth_logout__button" data-sw-translate>Logout</button>
{{/if}}
</div>

View File

@@ -1,16 +1,20 @@
<div class='basic_auth_container'>
<h3 class="basic_auth__title">Basic authentication{{#if isLogout}} - authorized{{/if}}</h3>
{{#unless isLogout}}
<form class="key_input_container">
<div class="auth__description">{{description}}</div>
<div class="auth_label">
<span class="basic_auth__label" data-sw-translate>username:</span>
<h3 class="auth__title">Basic authentication{{#if isLogout}} - authorized{{/if}}</h3>
<form class="basic_input_container">
<div class="auth__description">{{description}}</div>
<div class="auth_label">
<span class="basic_auth__label" data-sw-translate>username:</span>
{{#if isLogout}}
<span class="basic_auth__value">{{username}}</span>
{{else}}
<input required placeholder="username" class="basic_auth__username auth_input" name="username" type="text"/>
</div>
{{/if}}
</div>
{{#unless isLogout}}
<div class="auth_label">
<span class="basic_auth__label" data-sw-translate>password:</span>
<input required placeholder="password" class="basic_auth__password auth_input" name="password" type="password"/></label>
</div>
</form>
{{/unless}}
{{/unless}}
</form>
</div>

View File

@@ -1,21 +1,23 @@
<p>{{description}}</p>
<p>Select OAuth2.0 Scopes</p>
<p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.
<a href="#">Learn how to use</a>
</p>
<p><strong> {{appName}} </strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>
<p>Authorization URL: {{authorizationUrl}}</p>
<p>flow: {{flow}}</p>
<ul class="api-popup-scopes">
{{#each scopes}}
<li>
<input class="oauth-scope" type="checkbox" data-scope="{{scope}}" oauthtype="{{OAuthSchemeKey}}"/>
<label>{{scope}}</label><br/>
<span class="api-scope-desc">{{description}}
{{#if OAuthSchemeKey}}
({{OAuthSchemeKey}})
{{/if}}
</span>
</li>
{{/each}}
</ul>
<div>
<h3 class="auth__title">Select OAuth2.0 Scopes</h3>
<p>{{description}}</p>
<p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.
<a href="#">Learn how to use</a>
</p>
<p><strong> {{appName}} </strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>
<p>Authorization URL: {{authorizationUrl}}</p>
<p>flow: {{flow}}</p>
<ul class="api-popup-scopes">
{{#each scopes}}
<li>
<input class="oauth-scope" type="checkbox" data-scope="{{scope}}" oauthtype="{{OAuthSchemeKey}}"/>
<label>{{scope}}</label><br/>
<span class="api-scope-desc">{{description}}
{{#if OAuthSchemeKey}}
({{OAuthSchemeKey}})
{{/if}}
</span>
</li>
{{/each}}
</ul>
</div>