Cleanup, web: rename subscribedJob to subscribedJobID

The prop contains the job ID, not the job itself, which is now reflected
in the name.

No functional changes.
This commit is contained in:
Sybren A. Stüvel 2022-05-20 11:26:06 +02:00
parent adc8738e5b
commit 34bccd9277
2 changed files with 8 additions and 8 deletions

View File

@ -15,7 +15,7 @@ export default {
// SocketIO events: // SocketIO events:
"sioReconnected", "sioDisconnected" "sioReconnected", "sioDisconnected"
], ],
props: ["websocketURL", "subscribedJob"], props: ["websocketURL", "subscribedJobID", "subscribedTaskID"],
data() { data() {
return { return {
socket: null, socket: null,
@ -36,12 +36,12 @@ export default {
this.disconnectWebsocket(); this.disconnectWebsocket();
}, },
watch: { watch: {
subscribedJob(newJob, oldJob) { subscribedJobID(newJobID, oldJobID) {
if (oldJob) { if (oldJobID) {
this._updateJobSubscription("unsubscribe", oldJob); this._updateJobSubscription("unsubscribe", oldJobID);
} }
if (newJob) { if (newJobID) {
this._updateJobSubscription("subscribe", newJob); this._updateJobSubscription("subscribe", newJobID);
} }
}, },
}, },
@ -148,7 +148,7 @@ export default {
// Resubscribe to whatever we want to be subscribed to: // Resubscribe to whatever we want to be subscribed to:
_resubscribe() { _resubscribe() {
if (this.subscribedJob) this._updateJobSubscription("subscribe", this.subscribedJob); if (this.subscribedJobID) this._updateJobSubscription("subscribe", this.subscribedJobID);
}, },
}, },
}; };

View File

@ -13,7 +13,7 @@
<footer class="window-footer" v-if="!showFooterPopup" @click="showFooterPopup = true"><notification-bar /></footer> <footer class="window-footer" v-if="!showFooterPopup" @click="showFooterPopup = true"><notification-bar /></footer>
<footer-popup v-if="showFooterPopup" ref="footerPopup" @clickClose="showFooterPopup = false" /> <footer-popup v-if="showFooterPopup" ref="footerPopup" @clickClose="showFooterPopup = false" />
<update-listener ref="updateListener" :websocketURL="websocketURL" :subscribedJob="jobID" <update-listener ref="updateListener" :websocketURL="websocketURL" :subscribedJobID="jobID"
@jobUpdate="onSioJobUpdate" @taskUpdate="onSioTaskUpdate" @message="onChatMessage" @jobUpdate="onSioJobUpdate" @taskUpdate="onSioTaskUpdate" @message="onChatMessage"
@sioReconnected="onSIOReconnected" @sioDisconnected="onSIODisconnected" /> @sioReconnected="onSIOReconnected" @sioDisconnected="onSIODisconnected" />
</template> </template>