Skip to content

Commit e2879c5

Browse files
committed
settings & components kebab case events
1 parent f904144 commit e2879c5

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

frontend/src/components/app/settings/ProfileImage.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
</template>
1616

1717
<script>
18-
/* eslint-disable vue/custom-event-name-casing */
1918
export default {
2019
props: ['image'],
2120
data: () => ({
@@ -24,11 +23,11 @@ export default {
2423
methods: {
2524
async deleteImage(imageId) {
2625
this.showImageSettings = false;
27-
this.$emit('deleteImage', imageId);
26+
this.$emit('delete-image', imageId);
2827
},
2928
async makePrimaryImage(imageId) {
3029
this.showImageSettings = false;
31-
this.$emit('makePrimaryImage', imageId);
30+
this.$emit('make-primary-image', imageId);
3231
},
3332
},
3433
};

frontend/src/components/shared/DropdownDisplayChoice.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
</template>
1616

1717
<script>
18-
/* eslint-disable vue/custom-event-name-casing */
1918
export default {
2019
props: ['options', 'name', 'position', 'startingOption'],
2120
data: () => ({
@@ -26,7 +25,7 @@ export default {
2625
select(option) {
2726
this.close();
2827
this.currentOption = option;
29-
this.$emit('saveSingleChoice', this.name, option);
28+
this.$emit('save-single-choice', this.name, option);
3029
},
3130
toggle() {
3231
this.closed = !this.closed;

frontend/src/components/shared/DropdownDisplayChoices.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
</template>
1818

1919
<script>
20-
/* eslint-disable vue/custom-event-name-casing */
2120
export default {
2221
props: ['options', 'name', 'position', 'startingOptions', 'min', 'max'],
2322
data: () => ({
@@ -30,11 +29,11 @@ export default {
3029
if (optionIndex !== -1) {
3130
if (this.selectedFilters.length > this.min) {
3231
this.selectedFilters.splice(optionIndex, 1);
33-
this.$emit('saveMultipleChoice', this.name, this.selectedFilters);
32+
this.$emit('save-multiple-choice', this.name, this.selectedFilters);
3433
}
3534
} else if (this.selectedFilters.length < this.max) {
3635
this.selectedFilters.push(option);
37-
this.$emit('saveMultipleChoice', this.name, this.selectedFilters);
36+
this.$emit('save-multiple-choice', this.name, this.selectedFilters);
3837
}
3938
},
4039
toggle() {

frontend/src/views/app/Settings.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<h1 class="inline-block mr-4 text-gray-matcha">I am</h1>
6161
<DropdownDisplayChoice
6262
class="inline-block"
63-
v-on:saveSingleChoice="saveSingleChoice"
63+
v-on:save-single-choice="saveSingleChoice"
6464
v-bind:name="'gender'"
6565
v-bind:starting-option="this.$store.getters.getLoggedInUser.gender"
6666
v-bind:options="['male', 'female', 'other']"></DropdownDisplayChoice>
@@ -69,7 +69,7 @@
6969
<h1 class="inline-block mr-4 text-gray-matcha">Sexuality</h1>
7070
<DropdownDisplayChoice
7171
class="inline-block"
72-
v-on:saveSingleChoice="saveSingleChoice"
72+
v-on:save-single-choice="saveSingleChoice"
7373
v-bind:name="'sexuality'"
7474
v-bind:starting-option="this.$store.getters.getLoggedInUser.orientation"
7575
v-bind:options="['heterosexual', 'homosexual', 'bisexual', 'other']"></DropdownDisplayChoice>
@@ -93,7 +93,7 @@
9393
v-bind:min="3"
9494
v-bind:max="10"
9595
v-bind:name="'interests'"
96-
v-on:saveMultipleChoice="saveMultipleChoice"></DropdownDisplayChoices>
96+
v-on:save-multiple-choice="saveMultipleChoice"></DropdownDisplayChoices>
9797
</div>
9898
</div>
9999
<div class="py-4 px-8 border-t border-gray-300 w-full">
@@ -122,8 +122,8 @@
122122
v-for="image in this.$store.getters.getLoggedInUser.images"
123123
:key="image.id"
124124
v-bind:image="image"
125-
v-on:makePrimaryImage="makePrimaryImage"
126-
v-on:deleteImage="deleteImage"></ProfileImage>
125+
v-on:make-primary-image="makePrimaryImage"
126+
v-on:delete-image="deleteImage"></ProfileImage>
127127
</div>
128128
</section>
129129
</div>

0 commit comments

Comments
 (0)