Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit 11eb5dc

Browse files
Merge pull request #237 from codewizardshq/ballot-updates
Ballot updates
2 parents f9792c2 + f63f671 commit 11eb5dc

File tree

2 files changed

+35
-26
lines changed

2 files changed

+35
-26
lines changed

src/views/Voting/CodeModal.vue

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
</v-card>
7171
</v-dialog>
7272

73-
<success-modal v-model="showSuccess" />
73+
<SuccessModal v-model="showSuccess" />
7474

7575
<v-dialog v-model="showError" max-width="600">
7676
<v-card color="white" light v-if="isOpen">
@@ -98,9 +98,22 @@ import { User } from "@/store";
9898
import "highlight.js/styles/darcula.css";
9999
100100
export default {
101+
name: "CodeModal",
101102
components: {
102103
SuccessModal
103104
},
105+
// TODO: validate props
106+
props: [
107+
"display",
108+
"firstName",
109+
"id",
110+
"lastName",
111+
"numVotes",
112+
"text",
113+
"username",
114+
"value",
115+
"initials"
116+
],
104117
data() {
105118
return {
106119
showSuccess: false,
@@ -181,17 +194,6 @@ export default {
181194
);
182195
}
183196
},
184-
props: [
185-
"display",
186-
"firstName",
187-
"id",
188-
"lastName",
189-
"numVotes",
190-
"text",
191-
"username",
192-
"value",
193-
"initials"
194-
],
195197
watch: {
196198
isOpen() {
197199
if (this.isOpen != this.value) {

src/views/Voting/SuccessModal.vue

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,10 @@
55
<v-spacer />
66
<v-btn icon x-large @click="show = false">X</v-btn></v-card-title
77
>
8-
9-
<div v-if="User.isAuthorized">
10-
<h3>SUCCESS!</h3>
8+
<div>
9+
<h3>ALMOST DONE!</h3>
1110

1211
<p style="text-align:center">
13-
Your vote has been cast!
14-
</p>
15-
</div>
16-
<div v-else>
17-
<h3>ALMOST DONE</h3>
18-
19-
<p>
2012
Your vote has been cast! In order for your vote to count you must
2113
first confirm it. Please check your inbox for the confirmation email.
2214
</p>
@@ -27,15 +19,27 @@
2719
</h4>
2820

2921
<v-card-text class="text-center">
30-
<v-btn icon class="mr-6" x-large color="cwhqBlue"
22+
<v-btn
23+
icon
24+
class="mr-6"
25+
x-large
26+
color="cwhqBlue"
27+
href="http://www.facebook.com"
28+
target="_blank"
3129
><v-icon>mdi-facebook</v-icon></v-btn
3230
>
33-
<v-btn icon class="mr-6" x-large color="cwhqBlue"
31+
<v-btn
32+
icon
33+
class="mr-6"
34+
x-large
35+
color="cwhqBlue"
36+
href="http://www.twitter.com"
37+
target="_blank"
3438
><v-icon>mdi-twitter</v-icon></v-btn
3539
>
36-
<v-btn icon class="mr-6" x-large color="cwhqBlue"
40+
<!-- <v-btn icon class="mr-6" x-large color="cwhqBlue"
3741
><v-icon>mdi-email</v-icon></v-btn
38-
>
42+
> -->
3943
</v-card-text>
4044
<br />
4145
</v-card>
@@ -45,6 +49,7 @@
4549
<script>
4650
import { User } from "@/store";
4751
export default {
52+
// TODO: all props should be validated
4853
props: ["value"],
4954
computed: {
5055
...User.mapState()
@@ -55,6 +60,8 @@ export default {
5560
this.$emit("input", this.show);
5661
}
5762
},
63+
// TODO: looks like this used to have a default and an ovveride but was removed
64+
// should implement this
5865
value() {
5966
if (this.show != this.value) {
6067
this.show = this.value;

0 commit comments

Comments
 (0)