File tree Expand file tree Collapse file tree 14 files changed +82
-32
lines changed Expand file tree Collapse file tree 14 files changed +82
-32
lines changed Original file line number Diff line number Diff line change 1111 "@chenfengyuan/vue-countdown" : " ^1.1.2" ,
1212 "directory-named-webpack-plugin" : " ^4.0.1" ,
1313 "luxon" : " ^1.16.0" ,
14+ "v-click-outside" : " ^2.1.3" ,
1415 "vue" : " ^2.6.10" ,
1516 "vue-datetime" : " ^1.0.0-beta.10" ,
1617 "vue-global-events" : " ^1.1.2" ,
Original file line number Diff line number Diff line change 11import EventList from '@sections/EventList/EventList.vue' ;
22import AddEvent from '@modals/AddEvent/AddEvent.vue' ;
33import { get } from '@/utils/storage' ;
4+ import PlusIcon from '@/assets/icons/plus.svg' ;
45
56export default {
67 name : 'App' ,
78
89 components : {
910 EventList,
1011 AddEvent,
12+ PlusIcon,
1113 } ,
1214
1315 methods : {
Original file line number Diff line number Diff line change @@ -20,16 +20,28 @@ body {
2020 flex-direction : column ;
2121}
2222
23- .c-app__add-event-button {
23+ .c-app__add-event {
2424 display : flex ;
2525 justify-content : center ;
2626 align-items : center ;
27- width : 100 px ;
28- height : 30 px ;
29- background : #fff ;
30- border-radius : 2 px ;
27+ width : 35 px ;
28+ height : 35 px ;
29+ background : #474747 ;
30+ border-radius : 50 % ;
3131 position : absolute ;
3232 bottom : 30px ;
3333 right : 30px ;
3434 cursor : pointer ;
35+
36+ & :hover {
37+ .c-app__add-event-icon {
38+ fill : rgba (#fff , 0.7 );
39+ }
40+ }
41+
42+ .c-app__add-event-icon {
43+ width : 20px ;
44+ height : 20px ;
45+ fill : #fff ;
46+ }
3547}
Original file line number Diff line number Diff line change 22 <div class =" c-app" >
33 <event-list />
44 <div
5- class =" c-app__add-event-button"
6- @click =" openAddEvent" >Add Event</div >
5+ class =" c-app__add-event"
6+ @click =" openAddEvent" >
7+ <plus-icon class =" c-app__add-event-icon" />
8+ </div >
79 <add-event ref =" addEvent" />
810 </div >
911</template >
Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ export default {
3939 } ,
4040
4141 onClickAdd ( ) {
42- if ( ! this . validateInput ( ) ) return ;
42+ if ( ! this . validateInput ( ) ) {
43+ console . log ( 'invalid input' ) ;
44+ return ;
45+ }
4346
4447 const date = new Date ( this . eventDate ) ;
4548 const eventId = this . generateEventId ( ) ;
@@ -62,10 +65,11 @@ export default {
6265 if ( this . eventName === '' ) return false ;
6366 if ( this . eventDate === '' ) return false ;
6467
65- if ( this . eventBackgroundImage !== '' && ( ! this . eventBackgroundImage . endsWith ( '.png' )
66- || ! this . eventBackgroundImage . endsWith ( '.jpg' )
67- || ! this . eventBackgroundImage . endsWith ( '.jpeg' )
68- || ! this . eventBackgroundImage . endsWith ( '.gif' ) ) ) return false ;
68+ if ( this . eventBackgroundImage . endsWith ( '.png' )
69+ || this . eventBackgroundImage . endsWith ( '.jpg' )
70+ || this . eventBackgroundImage . endsWith ( '.jpeg' )
71+ || this . eventBackgroundImage . endsWith ( '.gif' )
72+ ) return true ;
6973
7074 if ( this . eventBackgroundImage === '' ) {
7175 this . eventBackgroundImage = 'https://picsum.photos/1200/800' ;
Original file line number Diff line number Diff line change 66 <div
77 class =" c-add-event"
88 style =" animation-duration : 0.5s "
9+ v-click-outside =" close"
910 v-if =" isVisible" >
1011 <div class =" c-add-event__header" >
1112 <div class =" c-add-event__header-title" >
1213 Add New Event
1314 </div >
14- <div class =" c-add-event__header-close" >
15+ <div
16+ class =" c-add-event__header-close"
17+ @click =" close" >
1518 <close-icon class =" c-add-event__header-close-icon" />
1619 </div >
1720 </div >
Original file line number Diff line number Diff line change @@ -68,7 +68,6 @@ export default {
6868 } ,
6969
7070 getTimeString ( value , type ) {
71- if ( value === 0 && type !== 'second' ) return '' ;
7271 return `${ value } ${ type } ${ value !== 1 ? 's' : '' } ` ;
7372 } ,
7473
Original file line number Diff line number Diff line change 4141 padding : 4px ;
4242 cursor : pointer ;
4343
44+ & :hover {
45+ .c-event__info-delete-icon {
46+ fill : rgba (#fff , 0.7 );
47+ }
48+ }
49+
4450 .c-event__info-delete-icon {
4551 fill : #fff ;
4652 width : 15px ;
8187}
8288
8389.c-event__countdown-time {
84- margin-right : 5px ;
85- width : 82px ;
90+ margin-top : 5px ;
8691}
You can’t perform that action at this time.
0 commit comments