|
2 | 2 | <div> |
3 | 3 | <navigation/> |
4 | 4 | <div class="container animate fadein mt-6"> |
| 5 | + <modal :show="modalVisible" v-on:close="modalVisible = false"> |
| 6 | + <TwoFactorAuthentication/> |
| 7 | + </modal> |
5 | 8 | <flash container="mt-6 mb-2 mx-4"/> |
6 | 9 | <div class="flex"> |
7 | | - <update-email class="flex-1 m-4"/> |
8 | | - <div class="flex-1 m-4"> |
9 | | - <form action="" method="post"> |
10 | | - <div class="bg-white p-6 border border-grey-light rounded rounded-1"> |
11 | | - <h2 class="mb-6 text-grey-darkest font-medium">Change your password</h2> |
12 | | - <div class="mt-6"> |
13 | | - <label for="grid-password-current" class="input-label">Current password</label> |
14 | | - <input id="grid-password-current" name="password" type="password" class="input" required> |
15 | | - </div> |
16 | | - <div class="mt-6"> |
17 | | - <label for="grid-password-new" class="input-label">New password</label> |
18 | | - <input id="grid-password-new" name="password" type="password" class="input" required> |
19 | | - <p class="input-help">Your new password should be at least 8 characters in length, contain one number, and be mixed case.</p> |
20 | | - </div> |
21 | | - <div class="mt-6"> |
22 | | - <label for="grid-password-new-confirm" class="input-label">Confirm new password</label> |
23 | | - <input id="grid-password-new-confirm" name="password_confirmation" type="password" class="input" required> |
24 | | - </div> |
25 | | - <div class="mt-6 text-right"> |
26 | | - <button class="btn btn-blue btn-sm text-right" type="submit">Save</button> |
27 | | - </div> |
28 | | - </div> |
29 | | - </form> |
| 10 | + <div class="flex-1 m-4 ml-0"> |
| 11 | + <update-email class="mb-8"/> |
| 12 | + <div class="bg-white p-6 border border-grey-light rounded rounded-1 text-center"> |
| 13 | + <button class="btn btn-green btn-sm" type="submit" v-on:click="modalVisible = true">Configure 2-Factor Authentication</button> |
| 14 | + </div> |
30 | 15 | </div> |
| 16 | + <change-password class="flex-1 m-4 mr-0"/> |
31 | 17 | </div> |
32 | 18 | </div> |
33 | 19 | </div> |
|
36 | 22 | <script> |
37 | 23 | import Navigation from '../core/Navigation'; |
38 | 24 | import Flash from '../Flash'; |
39 | | - import { mapState } from 'vuex'; |
40 | 25 | import UpdateEmail from './account/UpdateEmail'; |
| 26 | + import ChangePassword from './account/ChangePassword'; |
| 27 | + import Modal from '../core/Modal'; |
| 28 | + import TwoFactorAuthentication from './account/TwoFactorAuthentication'; |
41 | 29 |
|
42 | 30 | export default { |
43 | 31 | name: 'account', |
44 | | - components: {UpdateEmail, Flash, Navigation}, |
45 | | - computed: { |
46 | | - ...mapState({ |
47 | | - user: state => state.auth.user, |
48 | | - }) |
| 32 | + components: {TwoFactorAuthentication, Modal, ChangePassword, UpdateEmail, Flash, Navigation}, |
| 33 | + data: function () { |
| 34 | + return { |
| 35 | + modalVisible: false, |
| 36 | + }; |
49 | 37 | }, |
50 | 38 | }; |
51 | 39 | </script> |
0 commit comments