Kaynağa Gözat

Secured password with dots

master
JannekeDL 5 yıl önce
ebeveyn
işleme
019f7da197

+ 51
- 7
src/components/user/registerAgencySection.vue Dosyayı Görüntüle

@@ -10,7 +10,7 @@
10 10
             <input class="form-control" type="text" name="agencyname" placeholder="Agency Name" />
11 11
           </div>
12 12
           <div class="col-md-8" style="margin-bottom: 1em">
13
-            <eva-icon name="book" fill="lightgrey"></eva-icon>
13
+            <eva-icon name="book" fill="#60CBEB"></eva-icon>
14 14
             <input
15 15
               class="form-control"
16 16
               type="text"
@@ -19,7 +19,7 @@
19 19
             />
20 20
           </div>
21 21
           <div class="col-md-8">
22
-            <eva-icon name="clipboard" fill="lightgrey"></eva-icon>
22
+            <eva-icon name="clipboard" fill="#60CBEB"></eva-icon>
23 23
             <input
24 24
               class="form-control"
25 25
               type="text"
@@ -43,13 +43,13 @@
43 43
 
44 44
             <div class="row" style="text-align:left">
45 45
               <div class="col-md-8">
46
-                <eva-icon name="email" fill="lightgrey"></eva-icon>
46
+                <eva-icon name="email" fill="#60CBEB"></eva-icon>
47 47
                 <input class="form-control" type="text" name="email" placeholder="Email Address" />
48 48
                 <div class="form-group row"></div>
49 49
               </div>
50 50
 
51 51
               <div class="col-md-6" style="text-align:left">
52
-                <eva-icon name="smartphone" fill="lightgrey"></eva-icon>
52
+                <eva-icon name="smartphone" fill="#60CBEB"></eva-icon>
53 53
                 <input
54 54
                   class="form-control"
55 55
                   type="text"
@@ -66,16 +66,36 @@
66 66
               </div>
67 67
               <div class="col-md-7" style="margin-bottom: 1em">
68 68
                 <eva-icon name="lock" fill="#60CBEB"></eva-icon>
69
-                <input class="form-control" type="text" name="password" placeholder="Password" />
69
+                <input
70
+                  class="form-control"
71
+                  :type="isPasswordShown"
72
+                  v-model="password"
73
+                  id="password"
74
+                  placeholder="Password"
75
+                  name="password"
76
+                  value
77
+                />
70 78
               </div>
71 79
               <div class="col-md-7" style="margin-bottom: 1em">
72 80
                 <eva-icon name="lock" fill="#60CBEB"></eva-icon>
73 81
                 <input
74 82
                   class="form-control"
75
-                  type="text"
76
-                  name="confirmpassword"
83
+                  :type="isPasswordShown"
84
+                  v-model="password"
85
+                  id="password"
77 86
                   placeholder="Confirm Password"
87
+                  name="confirmpassword"
88
+                  value
78 89
                 />
90
+                <div>
91
+                  <eva-icon
92
+                    v-if="!showPassword"
93
+                    name="eye-off"
94
+                    fill="#60CBEB"
95
+                    @click="togglePassword()"
96
+                  ></eva-icon>
97
+                  <eva-icon v-else name="eye" fill="#60CBEB" @click="passwordToggled()"></eva-icon>
98
+                </div>
79 99
               </div>
80 100
             </div>
81 101
           </div>
@@ -105,6 +125,30 @@ export default {
105 125
   },
106 126
   name: 'Agency',
107 127
   components: { RegisterPage },
128
+  data() {
129
+    return {
130
+      username: '',
131
+      user: null,
132
+      isPasswordShown: 'password',
133
+      selectItems: [{ text: 'password', value: 0 }],
134
+      selectErrors: 'Some error with the field',
135
+      select: null,
136
+      textErrors: 'Some error with the field',
137
+      text: '',
138
+      showPassword: false,
139
+      password: '',
140
+    };
141
+  },
142
+  methods: {
143
+    togglePassword() {
144
+      this.showPassword = true;
145
+      this.isPasswordShown = 'text';
146
+    },
147
+    passwordToggled() {
148
+      this.showPassword = false;
149
+      this.isPasswordShown = 'password';
150
+    },
151
+  },
108 152
 };
109 153
 </script>
110 154
 

+ 49
- 5
src/components/user/registerPage.vue Dosyayı Görüntüle

@@ -18,13 +18,13 @@
18 18
 
19 19
           <div class="row" style="text-align:left">
20 20
             <div class="col-md-8">
21
-              <eva-icon name="email" fill="lightgrey"></eva-icon>
21
+              <eva-icon name="email" fill="#60CBEB"></eva-icon>
22 22
               <input class="form-control" type="text" name="email" placeholder="Email Address" />
23 23
               <div class="form-group row"></div>
24 24
             </div>
25 25
 
26 26
             <div class="col-md-6" style="text-align:left">
27
-              <eva-icon name="smartphone" fill="lightgrey"></eva-icon>
27
+              <eva-icon name="smartphone" fill="#60CBEB"></eva-icon>
28 28
               <input
29 29
                 class="form-control"
30 30
                 type="text"
@@ -41,16 +41,36 @@
41 41
             </div>
42 42
             <div class="col-md-7" style="margin-bottom: 1em">
43 43
               <eva-icon name="lock" fill="#60CBEB"></eva-icon>
44
-              <input class="form-control" type="text" name="password" placeholder="Password" />
44
+              <input
45
+                class="form-control"
46
+                :type="isPasswordShown"
47
+                v-model="password"
48
+                id="password"
49
+                placeholder="Password"
50
+                name="password"
51
+                value
52
+              />
45 53
             </div>
46 54
             <div class="col-md-7" style="margin-bottom: 1em">
47 55
               <eva-icon name="lock" fill="#60CBEB"></eva-icon>
48 56
               <input
49 57
                 class="form-control"
50
-                type="text"
51
-                name="confirmpassword"
58
+                :type="isPasswordShown"
59
+                v-model="password"
60
+                id="password"
52 61
                 placeholder="Confirm Password"
62
+                name="confirmpassword"
63
+                value
53 64
               />
65
+              <div>
66
+                <eva-icon
67
+                  v-if="!showPassword"
68
+                  name="eye-off"
69
+                  fill="#60CBEB"
70
+                  @click="togglePassword()"
71
+                ></eva-icon>
72
+                <eva-icon v-else name="eye" fill="#60CBEB" @click="passwordToggled()"></eva-icon>
73
+              </div>
54 74
             </div>
55 75
           </div>
56 76
         </div>
@@ -74,6 +94,20 @@ export default {
74 94
     RegisterHeader: { type: String, default: undefined },
75 95
   },
76 96
   name: 'PrivateIndividual',
97
+  data() {
98
+    return {
99
+      username: '',
100
+      user: null,
101
+      isPasswordShown: 'password',
102
+      selectItems: [{ text: 'password', value: 0 }],
103
+      selectErrors: 'Some error with the field',
104
+      select: null,
105
+      textErrors: 'Some error with the field',
106
+      text: '',
107
+      showPassword: false,
108
+      password: '',
109
+    };
110
+  },
77 111
   computed: {
78 112
     Header() {
79 113
       return this.RegisterHeader
@@ -81,6 +115,16 @@ export default {
81 115
         : 'Private Individual';
82 116
     },
83 117
   },
118
+  methods: {
119
+    togglePassword() {
120
+      this.showPassword = true;
121
+      this.isPasswordShown = 'text';
122
+    },
123
+    passwordToggled() {
124
+      this.showPassword = false;
125
+      this.isPasswordShown = 'password';
126
+    },
127
+  },
84 128
 };
85 129
 </script>
86 130
 

Loading…
İptal
Kaydet