Mercurial > gemma
annotate client/src/views/Login.vue @ 505:61170d775158
Do not call the username email
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 24 Aug 2018 15:46:38 +0200 |
parents | 7a8644e9e50e |
children | b07763345352 |
rev | line source |
---|---|
154
2ba329e82fb0
Wrap vue templates with translation in parentheses
Thomas Junk <thomas.junk@intevation.de>
parents:
150
diff
changeset
|
1 (<template> |
32
0c19dcc352f9
Dynamic height of dialogbox
Thomas Junk <thomas.junk@intevation.de>
parents:
25
diff
changeset
|
2 <div :class="loginStyle"> |
3 | 3 <div> |
25
a728610b3812
Add Light visual hints
Thomas Junk <thomas.junk@intevation.de>
parents:
24
diff
changeset
|
4 <div class="logogroup d-flex flex-row justify-content-center"> |
a728610b3812
Add Light visual hints
Thomas Junk <thomas.junk@intevation.de>
parents:
24
diff
changeset
|
5 <div class="logo"><img src="../assets/logo.png"></div> |
9
ee6d3836014e
current version of login
Thomas Junk <thomas.junk@intevation.de>
parents:
6
diff
changeset
|
6 <div class="title"><h1>{{ appTitle }}</h1></div> |
3 | 7 </div> |
8 </div> | |
17
7d242100af46
Adjusted the look and feel of the login page according to ISC
Thomas Junk <thomas.junk@intevation.de>
parents:
13
diff
changeset
|
9 <div class="login-wrapper d-flex flex-row justify-content-center"> |
9
ee6d3836014e
current version of login
Thomas Junk <thomas.junk@intevation.de>
parents:
6
diff
changeset
|
10 <form class="loginform form-signin" @submit.prevent="login"> |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
158
diff
changeset
|
11 <div id="alert" v-if="loginFailed" class="loginerrormessage alert alert-danger" role="alert"> |
150
44a7e27a0816
Added missing translation for loginerror
Thomas Junk <thomas.junk@intevation.de>
parents:
141
diff
changeset
|
12 <span class="loginerror"><translate>Login failed</translate></span> |
32
0c19dcc352f9
Dynamic height of dialogbox
Thomas Junk <thomas.junk@intevation.de>
parents:
25
diff
changeset
|
13 </div> |
505
61170d775158
Do not call the username email
Tom Gottfried <tom@intevation.de>
parents:
485
diff
changeset
|
14 <div class="input-group mb-3 usernamegroup"> |
61170d775158
Do not call the username email
Tom Gottfried <tom@intevation.de>
parents:
485
diff
changeset
|
15 <input type="text" v-model="user" id="inputUsername" class="form-control" :placeholder="usernameLabel" required autofocus> |
11
e0b5dd98665e
current frontend with asset server configured
Thomas Junk <thomas.junk@intevation.de>
parents:
10
diff
changeset
|
16 </div> |
25
a728610b3812
Add Light visual hints
Thomas Junk <thomas.junk@intevation.de>
parents:
24
diff
changeset
|
17 <div class="input-group mb-3 passwordgroup"> |
158
992e17912405
feat: Improve login against real db
Thomas Junk <thomas.junk@intevation.de>
parents:
154
diff
changeset
|
18 <input :type="isPasswordVisible" v-model="password" id="inputPassword" class="form-control" :placeholder='passwordLabel' required> |
11
e0b5dd98665e
current frontend with asset server configured
Thomas Junk <thomas.junk@intevation.de>
parents:
10
diff
changeset
|
19 <div class="input-group-append"> |
122
da279a0ce127
The "eye" icon changes into a "crossed out eye" icon
Thomas Junk <thomas.junk@intevation.de>
parents:
117
diff
changeset
|
20 <span class="input-group-text" id="basic-addon2" @click="showPassword"><i :class="eyeIcon"></i></span> |
11
e0b5dd98665e
current frontend with asset server configured
Thomas Junk <thomas.junk@intevation.de>
parents:
10
diff
changeset
|
21 </div> |
e0b5dd98665e
current frontend with asset server configured
Thomas Junk <thomas.junk@intevation.de>
parents:
10
diff
changeset
|
22 </div> |
141 | 23 <button class="submitbutton btn btn-primary btn-block" :disabled="submitted" type="submit"><translate>Login</translate></button> |
3 | 24 </form> |
25 </div> | |
485
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
26 |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
27 <!-- password forgotten part --> |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
28 <div class="d-flex flex-row justify-content-center"> |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
29 <form class="loginform form-signin"> |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
30 <div v-if="showPasswordReset" class="small">TODO text and action for password reset |
505
61170d775158
Do not call the username email
Tom Gottfried <tom@intevation.de>
parents:
485
diff
changeset
|
31 <div class="input-group mb-3 usernamegroup"> |
61170d775158
Do not call the username email
Tom Gottfried <tom@intevation.de>
parents:
485
diff
changeset
|
32 <input type="text" v-model="usernameToReset" class="form-control" :placeholder="usernameLabel" required> |
485
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
33 </div> |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
34 <button class="btn btn-secondary btn-block" type="button" |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
35 @click="togglePasswordReset"><translate>Send</translate></button> |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
36 </div> |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
37 <div v-else class="forgottenlink small"> |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
38 <a href="#" @click.prevent="togglePasswordReset" |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
39 ><translate>Forgot password</translate></a></div> |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
40 </form> |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
41 </div> |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
42 |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
43 <!-- bottom logo section --> |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
44 <div class="secondary-logo d-flex flex-row justify-content-center" |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
45 ><img :src="secondaryLogo"></div> |
3 | 46 </div> |
154
2ba329e82fb0
Wrap vue templates with translation in parentheses
Thomas Junk <thomas.junk@intevation.de>
parents:
150
diff
changeset
|
47 </template>) |
3 | 48 |
9
ee6d3836014e
current version of login
Thomas Junk <thomas.junk@intevation.de>
parents:
6
diff
changeset
|
49 <style lang="scss"> |
117
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
50 @import "../assets/application.scss"; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
51 $logincollapsed: 470px; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
52 $loginextended: 550px; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
53 |
505
61170d775158
Do not call the username email
Tom Gottfried <tom@intevation.de>
parents:
485
diff
changeset
|
54 .usernamegroup { |
117
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
55 box-shadow: $basic-shadow-light !important; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
56 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
57 .forgottenlink { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
58 text-align: right; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
59 margin-top: $small-offset; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
60 margin-bottom: $small-offset; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
61 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
62 #inputPassword { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
63 border-right: none; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
64 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
65 .input-group-text { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
66 background-color: white !important; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
67 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
68 |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
69 .login { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
70 width: 375px; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
71 @extend %fully-centered; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
72 padding-top: $offset; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
73 padding-bottom: $offset; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
74 box-shadow: $basic-shadow; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
75 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
76 .logincollapsed { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
77 height: $logincollapsed; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
78 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
79 |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
80 .loginextended { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
81 height: $loginextended; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
82 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
83 .loginerror { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
84 white-space: pre; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
85 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
86 .loginerrormessage { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
87 box-shadow: $basic-shadow-light !important; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
88 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
89 .loginform { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
90 width: 300px; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
91 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
92 .logogroup { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
93 margin-top: $offset; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
94 margin-bottom: $offset; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
95 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
96 .mail-icon { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
97 width: $iconwidth; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
98 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
99 .passwordgroup { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
100 box-shadow: $basic-shadow-light !important; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
101 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
102 .password-icon { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
103 position: relative; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
104 top: 10px; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
105 font-size: $iconsize; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
106 line-height: $iconLineHeight; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
107 width: $iconwidth; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
108 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
109 .submitbutton { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
110 box-shadow: $basic-shadow-light !important; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
111 } |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
112 .title { |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
113 margin-left: $offset; |
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
114 } |
3 | 115 </style> |
116 | |
117 <script> | |
118 import { mapGetters } from "vuex"; | |
119 | |
120 export default { | |
121 name: "login", | |
122 data() { | |
123 return { | |
158
992e17912405
feat: Improve login against real db
Thomas Junk <thomas.junk@intevation.de>
parents:
154
diff
changeset
|
124 user: "", |
6 | 125 password: "", |
10
361ae8211991
refactored to component local state
Thomas Junk <thomas.junk@intevation.de>
parents:
9
diff
changeset
|
126 submitted: false, |
33
ae6535d44563
Make password readable. Moved Layout to separate file.
Thomas Junk <thomas.junk@intevation.de>
parents:
32
diff
changeset
|
127 loginFailed: false, |
485
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
128 readablePassword: false, |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
129 showPasswordReset: false, |
505
61170d775158
Do not call the username email
Tom Gottfried <tom@intevation.de>
parents:
485
diff
changeset
|
130 usernameToReset: "" |
3 | 131 }; |
132 }, | |
133 computed: { | |
154
2ba329e82fb0
Wrap vue templates with translation in parentheses
Thomas Junk <thomas.junk@intevation.de>
parents:
150
diff
changeset
|
134 passwordLabel() { |
2ba329e82fb0
Wrap vue templates with translation in parentheses
Thomas Junk <thomas.junk@intevation.de>
parents:
150
diff
changeset
|
135 return this.$gettext("Enter passphrase"); |
2ba329e82fb0
Wrap vue templates with translation in parentheses
Thomas Junk <thomas.junk@intevation.de>
parents:
150
diff
changeset
|
136 }, |
505
61170d775158
Do not call the username email
Tom Gottfried <tom@intevation.de>
parents:
485
diff
changeset
|
137 usernameLabel() { |
61170d775158
Do not call the username email
Tom Gottfried <tom@intevation.de>
parents:
485
diff
changeset
|
138 return this.$gettext("Enter username"); |
154
2ba329e82fb0
Wrap vue templates with translation in parentheses
Thomas Junk <thomas.junk@intevation.de>
parents:
150
diff
changeset
|
139 }, |
117
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
140 isPasswordVisible() { |
33
ae6535d44563
Make password readable. Moved Layout to separate file.
Thomas Junk <thomas.junk@intevation.de>
parents:
32
diff
changeset
|
141 return this.readablePassword ? "text" : "password"; |
ae6535d44563
Make password readable. Moved Layout to separate file.
Thomas Junk <thomas.junk@intevation.de>
parents:
32
diff
changeset
|
142 }, |
122
da279a0ce127
The "eye" icon changes into a "crossed out eye" icon
Thomas Junk <thomas.junk@intevation.de>
parents:
117
diff
changeset
|
143 eyeIcon() { |
da279a0ce127
The "eye" icon changes into a "crossed out eye" icon
Thomas Junk <thomas.junk@intevation.de>
parents:
117
diff
changeset
|
144 return { |
da279a0ce127
The "eye" icon changes into a "crossed out eye" icon
Thomas Junk <thomas.junk@intevation.de>
parents:
117
diff
changeset
|
145 fa: true, |
da279a0ce127
The "eye" icon changes into a "crossed out eye" icon
Thomas Junk <thomas.junk@intevation.de>
parents:
117
diff
changeset
|
146 "fa-eye": !this.readablePassword, |
da279a0ce127
The "eye" icon changes into a "crossed out eye" icon
Thomas Junk <thomas.junk@intevation.de>
parents:
117
diff
changeset
|
147 "fa-eye-slash": this.readablePassword |
da279a0ce127
The "eye" icon changes into a "crossed out eye" icon
Thomas Junk <thomas.junk@intevation.de>
parents:
117
diff
changeset
|
148 }; |
da279a0ce127
The "eye" icon changes into a "crossed out eye" icon
Thomas Junk <thomas.junk@intevation.de>
parents:
117
diff
changeset
|
149 }, |
117
5e95c62a7e74
Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
33
diff
changeset
|
150 loginStyle() { |
32
0c19dcc352f9
Dynamic height of dialogbox
Thomas Junk <thomas.junk@intevation.de>
parents:
25
diff
changeset
|
151 return { |
0c19dcc352f9
Dynamic height of dialogbox
Thomas Junk <thomas.junk@intevation.de>
parents:
25
diff
changeset
|
152 login: true, |
0c19dcc352f9
Dynamic height of dialogbox
Thomas Junk <thomas.junk@intevation.de>
parents:
25
diff
changeset
|
153 logincollapsed: !this.loginFailed, |
33
ae6535d44563
Make password readable. Moved Layout to separate file.
Thomas Junk <thomas.junk@intevation.de>
parents:
32
diff
changeset
|
154 loginextended: this.loginFailed, |
32
0c19dcc352f9
Dynamic height of dialogbox
Thomas Junk <thomas.junk@intevation.de>
parents:
25
diff
changeset
|
155 "bg-white": true, |
0c19dcc352f9
Dynamic height of dialogbox
Thomas Junk <thomas.junk@intevation.de>
parents:
25
diff
changeset
|
156 rounded: true |
0c19dcc352f9
Dynamic height of dialogbox
Thomas Junk <thomas.junk@intevation.de>
parents:
25
diff
changeset
|
157 }; |
0c19dcc352f9
Dynamic height of dialogbox
Thomas Junk <thomas.junk@intevation.de>
parents:
25
diff
changeset
|
158 }, |
141 | 159 ...mapGetters("application", ["appTitle", "secondaryLogo"]) |
3 | 160 }, |
161 methods: { | |
162 login() { | |
6 | 163 this.submitted = true; |
158
992e17912405
feat: Improve login against real db
Thomas Junk <thomas.junk@intevation.de>
parents:
154
diff
changeset
|
164 const { user, password } = this; |
6 | 165 this.$store |
158
992e17912405
feat: Improve login against real db
Thomas Junk <thomas.junk@intevation.de>
parents:
154
diff
changeset
|
166 .dispatch("user/login", { user, password }) |
6 | 167 .then(() => { |
10
361ae8211991
refactored to component local state
Thomas Junk <thomas.junk@intevation.de>
parents:
9
diff
changeset
|
168 this.loginFailed = false; |
6 | 169 this.$router.push("/"); |
170 }) | |
171 .catch(() => { | |
10
361ae8211991
refactored to component local state
Thomas Junk <thomas.junk@intevation.de>
parents:
9
diff
changeset
|
172 this.loginFailed = true; |
6 | 173 this.submitted = false; |
174 }); | |
33
ae6535d44563
Make password readable. Moved Layout to separate file.
Thomas Junk <thomas.junk@intevation.de>
parents:
32
diff
changeset
|
175 }, |
ae6535d44563
Make password readable. Moved Layout to separate file.
Thomas Junk <thomas.junk@intevation.de>
parents:
32
diff
changeset
|
176 showPassword() { |
ae6535d44563
Make password readable. Moved Layout to separate file.
Thomas Junk <thomas.junk@intevation.de>
parents:
32
diff
changeset
|
177 this.readablePassword = !this.readablePassword; |
485
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
178 }, |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
179 togglePasswordReset() { |
7a8644e9e50e
client: add (unwired) password reset form
Bernhard Reiter <bernhard@intevation.de>
parents:
166
diff
changeset
|
180 this.showPasswordReset = !this.showPasswordReset; |
3 | 181 } |
182 } | |
183 }; | |
184 </script> |