Explorar el Código

add register reset password page to vue-router

pull/342/head
Guillaume Vincent hace 8 años
padre
commit
d36c2ea4cd
Se han modificado 5 ficheros con 12 adiciones y 11 borrados
  1. +1
    -1
      src/components/Login.vue
  2. +0
    -0
      src/components/PasswordReset.vue
  3. +3
    -5
      src/components/Passwords.vue
  4. +3
    -3
      src/components/Register.vue
  5. +5
    -2
      src/routes.js

+ 1
- 1
src/components/Login.vue Ver fichero

@@ -54,7 +54,7 @@
</div>
<div class="form-group row">
<div class="col-xs-12">
<router-link :to="{ name: 'resetPassword'}">
<router-link :to="{ name: 'passwordReset'}">
Forgot you password ?
</router-link>
</div>


src/components/ForgotPassword.vue → src/components/PasswordReset.vue Ver fichero


+ 3
- 5
src/components/Passwords.vue Ver fichero

@@ -1,5 +1,5 @@
<style scoped>
#sites {
<style>
#passwords {
max-height: 320px;
overflow-y: scroll;
overflow-x: hidden;
@@ -23,7 +23,7 @@
</div>-->
</div>
</form>
<div id="sites">
<div id="passwords">
<a href="#" class="list-group-item list-group-item-action" v-for="password in filteredPasswords"
v-on:click="setCurrentPasswordAndGoIndex(password)">
<h5 class="list-group-item-heading">{{password.site}}</h5>
@@ -32,8 +32,6 @@
</div>
</div>
</template>


<script type="text/ecmascript-6">
import {mapGetters} from 'vuex';



+ 3
- 3
src/components/Register.vue Ver fichero

@@ -37,9 +37,9 @@
class="form-control"
placeholder="Password"
v-model="user.password">
<small class="form-text text-muted text-danger">
<span v-if="noErrors()">Do not use your master password here</span>
<span v-if="passwordRequired">A password is required</span>
<small class="form-text text-muted">
<span v-if="noErrors()" class="text-warning">Do not use your master password here</span>
<span v-if="passwordRequired" class="text-danger">A password is required</span>
</small>
</div>
</div>


+ 5
- 2
src/routes.js Ver fichero

@@ -2,10 +2,10 @@ import Vue from 'vue';
import VueRouter from 'vue-router';

import PasswordGenerator from './components/PasswordGenerator';
import PasswordResetConfirm from './components/PasswordResetConfirm';
import Login from './components/Login';
import Register from './components/Register';
import ForgotPassword from './components/ForgotPassword';
import PasswordReset from './components/PasswordReset';
import PasswordResetConfirm from './components/PasswordResetConfirm';
import Passwords from './components/Passwords';

Vue.use(VueRouter);
@@ -13,6 +13,9 @@ Vue.use(VueRouter);
const routes = [
{path: '/', name: 'home', component: PasswordGenerator},
{path: '/login', name: 'login', component: Login},
{path: '/register', name: 'register', component: Register},
{path: '/passwords', name: 'passwords', component: Passwords},
{path: '/password/reset', name: 'passwordReset', component: PasswordReset},
{path: '/password/reset/confirm/:uid/:token', name: 'passwordResetConfirm', component: PasswordResetConfirm},
];



Cargando…
Cancelar
Guardar