Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
26af63a8
Commit
26af63a8
authored
Jul 20, 2020
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: login input hints
parent
e9044698
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
9 deletions
+28
-9
login.vue
client/components/login.vue
+25
-6
authentication.graphql
server/graph/schemas/authentication.graphql
+1
-1
definition.yml
server/modules/authentication/ldap/definition.yml
+1
-1
definition.yml
server/modules/authentication/local/definition.yml
+1
-1
No files found.
client/components/login.vue
View file @
26af63a8
...
...
@@ -40,7 +40,9 @@
hide-details
ref='iptEmail'
v-model='username'
:placeholder='$t(selectedStrategy.strategy.usernameLabel)'
:placeholder='isUsernameEmail ? $t(`auth:fields.email`) : $t(`auth:fields.username`)'
:type='isUsernameEmail ? `email` : `text`'
:autocomplete='isUsernameEmail ? `email` : `username`'
)
v-text-field.mt-2(
solo
...
...
@@ -54,6 +56,7 @@
@click:append='() => (hidePassword = !hidePassword)'
:type='hidePassword ? "password" : "text"'
:placeholder='$t("auth:fields.password")'
autocomplete='current-password'
@keyup.enter='login'
)
v-btn.mt-2.text-none(
...
...
@@ -95,7 +98,9 @@
hide-details
ref='iptForgotPwdEmail'
v-model='username'
:placeholder='$t(selectedStrategy.strategy.usernameLabel)'
:placeholder='$t(`auth:fields.email`)'
type='email'
autocomplete='email'
)
v-btn.mt-2.text-none(
width='100%'
...
...
@@ -130,6 +135,7 @@
ref='iptNewPassword'
v-model='newPassword'
:placeholder='$t(`auth:changePwd.newPasswordPlaceholder`)'
autocomplete='new-password'
)
password-strength(slot='progress', v-model='newPassword')
v-text-field.mt-2(
...
...
@@ -141,6 +147,7 @@
hide-details
v-model='newPasswordVerify'
:placeholder='$t(`auth:changePwd.newPasswordVerifyPlaceholder`)'
autocomplete='new-password'
@keyup.enter='changePassword'
)
v-btn.mt-2.text-none(
...
...
@@ -168,6 +175,7 @@
ref='iptTFA'
v-model='securityCode'
:placeholder='$t("auth:tfa.placeholder")'
autocomplete='one-time-code'
@keyup.enter='verifySecurityCode'
)
v-btn.mt-2.text-none(
...
...
@@ -210,7 +218,7 @@ export default {
error: false,
strategies: [],
selectedStrategyKey: 'unselected',
selectedStrategy: { key: 'unselected', strategy: { useForm: false } },
selectedStrategy: { key: 'unselected', strategy: { useForm: false
, usernameType: 'email'
} },
screen: 'login',
username: '',
password: '',
...
...
@@ -242,6 +250,9 @@ export default {
} else {
return this.strategies
}
},
isUsernameEmail () {
return this.selectedStrategy.strategy.usernameType === `email`
}
},
watch: {
...
...
@@ -403,7 +414,15 @@ export default {
icon: 'check'
})
_.delay(() => {
window.location.replace('/') // TEMPORARY - USE RETURNURL
const loginRedirect = Cookies.get('loginRedirect')
if (loginRedirect) {
Cookies.remove('loginRedirect')
window.location.replace(loginRedirect)
} else if (respObj.redirect) {
window.location.replace(respObj.redirect)
} else {
window.location.replace('/')
}
}, 1000)
this.isLoading = false
} else {
...
...
@@ -467,7 +486,7 @@ export default {
forgotPassword () {
this.screen = 'forgot'
this.$nextTick(() => {
this.$refs.ipt
EmailForgot
.focus()
this.$refs.ipt
ForgotPwdEmail
.focus()
})
},
/**
...
...
@@ -494,7 +513,7 @@ export default {
color
icon
useForm
username
Label
username
Type
}
displayName
order
...
...
server/graph/schemas/authentication.graphql
View file @
26af63a8
...
...
@@ -85,7 +85,7 @@ type AuthenticationStrategy {
description
:
String
isAvailable
:
Boolean
useForm
:
Boolean
!
username
Label
:
String
username
Type
:
String
logo
:
String
color
:
String
website
:
String
...
...
server/modules/authentication/ldap/definition.yml
View file @
26af63a8
...
...
@@ -7,7 +7,7 @@ color: blue darken-3
website
:
https://www.microsoft.com/windowsserver
isAvailable
:
true
useForm
:
true
username
Label
:
'
auth:fields.username'
username
Type
:
username
props
:
url
:
title
:
LDAP URL
...
...
server/modules/authentication/local/definition.yml
View file @
26af63a8
...
...
@@ -7,5 +7,5 @@ color: primary
website
:
https://wiki.js.org
isAvailable
:
true
useForm
:
true
username
Label
:
'
auth:fields.email'
username
Type
:
email
props
:
{}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment