Skip to content

Commit

Permalink
replace deprecated event bus with regular events
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Aug 30, 2024
1 parent 5d51417 commit c3e8afe
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 22 deletions.
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -841,8 +841,6 @@ const app = new Vue({
);
}
});

window.eventBus = new Vue();
},
mounted() {
// watch color schemes for light and dark
Expand Down
2 changes: 1 addition & 1 deletion pages/components/user-select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default {
},
loadedUsers: {
handler(n) {
window.eventBus.$emit("newutor", this.userList);
this.$emit("newUser", this.userList);
},
deep: true,
},
Expand Down
4 changes: 1 addition & 3 deletions pages/contribution/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
class="my-0 pt-0"
small-chips
clearable
@newUser="(l) => { this.contributors = l }"
/>
</v-col>
<v-col cols="12" sm="6" class="pb-0 py-sm-0">
Expand Down Expand Up @@ -497,9 +498,6 @@ export default {
});
this.selectedContributors = this.queryToIds;
this.addPack(this.all_packs, this.all_packs_display, true);
window.eventBus.$on("newContributor", (l) => {
this.contributors = l;
});
},
mounted() {
this.getPacks();
Expand Down
26 changes: 12 additions & 14 deletions pages/gallery/modal/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,18 @@
>
<template v-for="group in grouped">
<div class="d-flex flex-row pb-2 pb-sm-0">
<template v-for="url in group">
<div class="gallery-dialog-texture-container px-2 pb-sm-2" :key="url.name">
<gallery-image
modal
:src="url.image"
:textureID="textureID"
:ignoreList="ignoreList"
@click="openFullscreenPreview(url.image)"
>
<p>{{ $root.lang().gallery.error_message.texture_not_done }}</p>
</gallery-image>
<h2>{{ packToName[url.name] }}</h2>
</div>
</template>
<div v-for="url in group" class="gallery-dialog-texture-container px-2 pb-sm-2" :key="url.name">
<gallery-image
modal
:src="url.image"
:textureID="textureID"
:ignoreList="ignoreList"
@click="openFullscreenPreview(url.image)"
>
<p>{{ $root.lang().gallery.error_message.texture_not_done }}</p>
</gallery-image>
<h2>{{ packToName[url.name] }}</h2>
</div>
</div>
</template>
</div>
Expand Down
2 changes: 0 additions & 2 deletions resources/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ declare global {
declare const apiURL: string;

interface Window {
eventBus: Vue;

// aliases
readonly colors: typeof colors;
colorToHex: typeof colorToHex;
Expand Down

0 comments on commit c3e8afe

Please sign in to comment.