File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
src/components/game-events Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 1616 Submitted by: {{gameEvent.origins}}
1717 </p >
1818 <div class =" btn-accept"
19- v-if =" gameEvent.type === 'possibleGoal' "
19+ v-if =" showAcceptGoal( gameEvent) "
2020 v-b-tooltip.hover.righttop =" 'Accept this goal'" >
2121 <a @click =" acceptGoal(gameEvent)" >
2222 <font-awesome-icon icon =" check-circle" class =" fa-lg" ></font-awesome-icon >
3838 },
3939 gameEventsPresent () {
4040 return this .gameEvents != null && this .gameEvents .length > 0 ;
41+ },
42+ goalEventPresent () {
43+ for (let event of this .state .gameEvents ) {
44+ if (event .type === ' goal' ) {
45+ return true ;
46+ }
47+ }
48+ return false ;
4149 }
4250 },
4351 methods: {
52+ showAcceptGoal (gameEvent ) {
53+ return ! this .goalEventPresent && gameEvent .type === ' possibleGoal' ;
54+ },
4455 details (gameEvent ) {
4556 let key = Object .keys (gameEvent .details )[0 ];
4657 return gameEvent .details [key];
91102 text-align : left ;
92103 }
93104
94- .details-row {
95- margin-bottom : 0 ;
105+ .btn-accept {
106+ position : absolute ;
107+ right : 0 ;
108+ bottom : 0 ;
109+ margin : 0.3em ;
96110 }
97111
98- .btn-accept {
99- margin : 0.1 em ;
112+ .details-row {
113+ margin-bottom : 0 ;
100114 }
101115 </style >
You can’t perform that action at this time.
0 commit comments