Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/login.js1
-rw-r--r--core/src/views/Login.vue28
2 files changed, 23 insertions, 6 deletions
diff --git a/core/src/login.js b/core/src/login.js
index 1b33c6dc5ae..c496c7476cf 100644
--- a/core/src/login.js
+++ b/core/src/login.js
@@ -69,6 +69,7 @@ new View({
resetPasswordUser: fromStateOr('resetPasswordUser', ''),
directLogin: query.direct === '1',
hasPasswordless: fromStateOr('webauthn-available', false),
+ countAlternativeLogins: fromStateOr('countAlternativeLogins', false),
isHttps: window.location.protocol === 'https:',
hasPublicKeyCredential: typeof (window.PublicKeyCredential) !== 'undefined',
hideLoginForm: fromStateOr('hideLoginForm', false),
diff --git a/core/src/views/Login.vue b/core/src/views/Login.vue
index 6218aa7fe8b..90c163fc3d5 100644
--- a/core/src/views/Login.vue
+++ b/core/src/views/Login.vue
@@ -46,11 +46,23 @@
{{ t('core', 'Forgot password?') }}
</a>
<br>
- <a v-if="hasPasswordless"
- href="#"
- @click.prevent="passwordlessLogin = true">
- {{ t('core', 'Log in with a device') }}
- </a>
+ <template v-if="hasPasswordless">
+ <div v-if="countAlternativeLogins"
+ class="alternative-logins">
+ <a v-if="hasPasswordless"
+ class="button"
+ :class="{ 'single-alt-login-option': countAlternativeLogins }"
+ href="#"
+ @click.prevent="passwordlessLogin = true">
+ {{ t('core', 'Log in with a device') }}
+ </a>
+ </div>
+ <a v-else
+ href="#"
+ @click.prevent="passwordlessLogin = true">
+ {{ t('core', 'Log in with a device') }}
+ </a>
+ </template>
</div>
<div v-else-if="!loading && passwordlessLogin"
key="reset"
@@ -63,7 +75,7 @@
:is-https="isHttps"
:has-public-key-credential="hasPublicKeyCredential"
@submit="loading = true" />
- <a @click.prevent="passwordlessLogin = false" href="#">
+ <a href="#" @click.prevent="passwordlessLogin = false">
{{ t('core', 'Back') }}
</a>
</div>
@@ -156,6 +168,10 @@ export default {
type: Boolean,
default: false,
},
+ countAlternativeLogins: {
+ type: Number,
+ default: 0,
+ },
isHttps: {
type: Boolean,
default: false,