Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
K
kiaisoft_tuananh_nuxt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TTS Tran Viet Anh
kiaisoft_tuananh_nuxt
Commits
c7caf890
Commit
c7caf890
authored
Feb 23, 2023
by
Kemm23
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create wish list modal
parent
19c5ec2e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
196 additions
and
94 deletions
+196
-94
LoginModal.vue
components/LoginModal.vue
+94
-90
Header.vue
components/user/Header.vue
+102
-4
No files found.
components/LoginModal.vue
View file @
c7caf890
<
template
>
<
template
>
<v-row
v-if=
"dialog"
justify=
"center"
>
<v-row
justify=
"center"
>
<v-dialog
<v-dialog
v-model=
"dialog"
v-model=
"dialog"
width=
"450px"
width=
"450px"
@
click:outside=
"closeDialog"
>
>
<!--
<template
#activator
="
{ on, attrs }">
<!--
<template
#activator
="
{ on, attrs }">
<v-btn
<v-btn
...
@@ -81,23 +82,27 @@
...
@@ -81,23 +82,27 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'
LoginModal
'
,
name
:
'
LoginModal
'
,
props
:
{
props
:
{
status
:
{
status
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
}
}
},
},
data
:
()
=>
({
data
:
()
=>
({
email
:
''
,
email
:
''
,
password
:
''
password
:
''
}),
}),
computed
:
{
computed
:
{
dialog
()
{
dialog
()
{
return
thi
s
.
status
return
this
.
$prop
s
.
status
}
}
},
},
methods
:
{
methods
:
{
closeDialog
()
{
this
.
$props
.
status
=
false
console
.
log
(
this
.
$props
.
status
)
},
async
login
()
{
async
login
()
{
try
{
try
{
const
resp
=
await
this
.
$axios
.
post
(
'
/login
'
,
const
resp
=
await
this
.
$axios
.
post
(
'
/login
'
,
...
@@ -122,7 +127,7 @@ methods: {
...
@@ -122,7 +127,7 @@ methods: {
this
.
$router
.
push
(
'
/login
'
)
this
.
$router
.
push
(
'
/login
'
)
}
}
}
}
}
}
}
}
</
script
>
</
script
>
...
@@ -131,4 +136,3 @@ methods: {
...
@@ -131,4 +136,3 @@ methods: {
padding
:
30px
;
padding
:
30px
;
}
}
</
style
>
</
style
>
\ No newline at end of file
components/user/Header.vue
View file @
c7caf890
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
plain
plain
v-bind=
"attrs"
v-bind=
"attrs"
v-on=
"on"
v-on=
"on"
@
click=
"
activeLogin=true
"
@
click=
"
closeDialog
"
>
>
<v-icon>
mdi-account-outline
</v-icon>
<v-icon>
mdi-account-outline
</v-icon>
<span>
login
</span>
<span>
login
</span>
...
@@ -177,6 +177,7 @@
...
@@ -177,6 +177,7 @@
plain
plain
v-bind=
"attrs"
v-bind=
"attrs"
v-on=
"on"
v-on=
"on"
@
click.stop=
"drawer = !drawer"
>
>
<v-icon
large
>
<v-icon
large
>
mdi-heart-outline
mdi-heart-outline
...
@@ -244,8 +245,55 @@
...
@@ -244,8 +245,55 @@
<!-- end header bottom -->
<!-- end header bottom -->
<!-- show modal -->
<!-- show modal -->
<LoginModal
v-click-outside=
"() => activeLogin = false"
:status=
"activeLogin"
@
close=
"activeLogin=false"
/>
<LoginModal
:status=
"activeLogin"
@
click:outside=
"closeDialog"
@
close=
"activeLogin=false"
/>
<SignupModal
v-click-outside=
"() => activeRegister = false"
:status=
"activeRegister"
@
close=
"activeRegister=false"
/>
<SignupModal
:status=
"activeRegister"
@
close=
"activeRegister=false"
/>
<!-- show drawer -->
<v-navigation-drawer
v-model=
"drawer"
width=
"300px"
right
temporary
class=
"favorite-modal"
>
<div
class=
"d-flex justify-space-between modal_header"
>
<b>
WISHLIST
</b>
<v-btn
plain
@
click=
"drawer = false"
>
Close
<v-icon>
mdi-arrow-right
</v-icon>
</v-btn>
</div>
<v-divider
/>
<v-list
three-line
>
<v-list-item
v-for=
"folder in files"
:key=
"folder.title"
>
<v-list-item-avatar>
<v-img
:src=
"folder.prependAvatar"
/>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title>
{{ folder.title }}
</v-list-item-title>
<v-list-item-subtitle>
{{ folder.subtitle }}
</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-action>
<v-btn
icon
>
<v-icon
color=
"grey lighten-1"
>
mdi-close-circle-outline
</v-icon>
</v-btn>
</v-list-item-action>
</v-list-item>
</v-list>
</v-navigation-drawer>
</div>
</div>
</template>
</template>
...
@@ -262,7 +310,41 @@ export default {
...
@@ -262,7 +310,41 @@ export default {
data
:
()
=>
{
data
:
()
=>
{
return
{
return
{
activeLogin
:
false
,
activeLogin
:
false
,
activeRegister
:
false
activeRegister
:
false
,
drawer
:
false
,
files
:
[
{
prependAvatar
:
'
https://cdn.vuetifyjs.com/images/lists/1.jpg
'
,
title
:
'
Brunch this weekend?
'
,
subtitle
:
'
<span class="text-primary">Ali Connors</span> — I
\'
ll be in your neighborhood doing errands this weekend. Do you want to hang out?
'
},
{
prependAvatar
:
'
https://cdn.vuetifyjs.com/images/lists/2.jpg
'
,
title
:
'
Summer BBQ
'
,
subtitle
:
'
<span class="text-primary">to Alex, Scott, Jennifer</span> — Wish I could come, but I
\'
m out of town this weekend.
'
},
{
prependAvatar
:
'
https://cdn.vuetifyjs.com/images/lists/3.jpg
'
,
title
:
'
Oui oui
'
,
subtitle
:
'
<span class="text-primary">Sandra Adams</span> — Do you have Paris recommendations? Have you ever been?
'
},
{
prependAvatar
:
'
https://cdn.vuetifyjs.com/images/lists/4.jpg
'
,
title
:
'
Birthday gift
'
,
subtitle
:
'
<span class="text-primary">Trevor Hansen</span> — Have any ideas about what we should get Heidi for her birthday?
'
},
{
prependAvatar
:
'
https://cdn.vuetifyjs.com/images/lists/5.jpg
'
,
title
:
'
Recipe to try
'
,
subtitle
:
'
<span class="text-primary">Britta Holt</span> — We should eat this: Grate, Squash, Corn, and tomatillo Tacos.
'
}
]
}
},
methods
:
{
closeDialog
()
{
this
.
activeLogin
=
false
this
.
activeLogin
=
true
}
}
}
}
}
}
...
@@ -289,4 +371,20 @@ export default {
...
@@ -289,4 +371,20 @@ export default {
.navbar
span
:hover
{
.navbar
span
:hover
{
color
:
#26c
;
color
:
#26c
;
}
}
.favorite-modal
{
position
:
fixed
;
}
.favorite-modal
.modal_header
{
padding
:
20px
0px
20px
30px
;
}
.modal_header
>
b
{
font-weight
:
700
;
font-size
:
16px
;
}
.modal_header
>
button
{
font-size
:
12px
;
}
.modal_header
>
i
{
scale
:
0.8
;
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment