Skip to content

Commit 2ba018b

Browse files
committed
add show password toggle
1 parent ac3bc6a commit 2ba018b

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

bun.lockb

0 Bytes
Binary file not shown.

public/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"/app.js": "/app.js?id=e9302d28af35de496929c7d89f1c890c",
2+
"/app.js": "/app.js?id=ae77c2f1607299dd30b224244277dc9a",
33
"/ui.js": "/ui.js?id=592866a715b1c20b43fff6ca7980b279",
44
"/manifest.js": "/manifest.js?id=3267e5c99fd7b729e2f38ec55b50397d",
5-
"/app.css": "/app.css?id=0864a7b81f5021e62095c1bd570dedb5",
5+
"/app.css": "/app.css?id=e6e32c23966698900f862c22cfc1651d",
66
"/vendor.js": "/vendor.js?id=52fdb487e0f8031eddd0c42322c8ee13",
77
"/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty10iurt9w6fk2a.woff2": "/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty10iurt9w6fk2a.woff2?id=c8390e146be0a3c8a5498355dec892ae",
88
"/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty14iurt9w6fk2a.woff2": "/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty14iurt9w6fk2a.woff2?id=b0735c7dd6126471acbaf9d6e9f5e41a",

resources/js/pages/Login.vue

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333

3434
<div class="mb-6">
3535
<label class="block mb-2" for="password">{{ __('Password') }}</label>
36-
<div class="flex items-center">
36+
<div class="relative">
3737
<input
3838
v-model="form.password"
39-
class="w-full form-control form-input form-control-bordered"
39+
class="w-full form-control form-input form-control-bordered pr-10"
4040
:class="{
4141
'form-control-bordered-error': form.errors.has('password'),
4242
}"
@@ -46,9 +46,13 @@
4646
autocomplete="current-password"
4747
required
4848
/>
49-
<Button variant="outline" :icon="showPassword ? 'eye-slash' : 'eye'" @click="togglePasswordVisibility" class="ml-1">
50-
</Button>
51-
</div>
49+
<Icon
50+
type="outline"
51+
:name="showPassword ? 'eye-slash' : 'eye'"
52+
@click="togglePasswordVisibility"
53+
class="absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer"
54+
/>
55+
</div>
5256
<HelpText class="mt-2 text-red-500" v-if="form.errors.has('password')">
5357
{{ form.errors.first('password') }}
5458
</HelpText>
@@ -102,7 +106,7 @@
102106

103107
<script>
104108
import Auth from '@/layouts/Auth'
105-
import { Button, Checkbox } from 'laravel-nova-ui'
109+
import { Button, Checkbox, Icon } from 'laravel-nova-ui'
106110
107111
export default {
108112
name: 'LoginPage',
@@ -112,6 +116,7 @@ export default {
112116
components: {
113117
Checkbox,
114118
Button,
119+
Icon,
115120
},
116121
117122
props: {

0 commit comments

Comments
 (0)