Web: show "select a job" when the first job is submitted

Hide the "get the add-on" and show the "select a job" when the first job
has been submitted.
This commit is contained in:
Sybren A. Stüvel 2022-08-02 14:54:49 +02:00
parent cbafe0ff34
commit 84f02ac696
2 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,9 @@ export const useJobs = defineStore('jobs', {
}, },
}, },
actions: { actions: {
setIsJobless(isJobless) {
this.$patch({ isJobless: isJobless });
},
setActiveJobID(jobID) { setActiveJobID(jobID) {
this.$patch({ this.$patch({
activeJob: {id: jobID, settings: {}, metadata: {}}, activeJob: {id: jobID, settings: {}, metadata: {}},

View File

@ -143,6 +143,7 @@ export default {
// SocketIO data event handlers: // SocketIO data event handlers:
onSioJobUpdate(jobUpdate) { onSioJobUpdate(jobUpdate) {
this.notifs.addJobUpdate(jobUpdate); this.notifs.addJobUpdate(jobUpdate);
this.jobs.setIsJobless(false);
if (this.$refs.jobsTable) { if (this.$refs.jobsTable) {
if (jobUpdate.previous_status) if (jobUpdate.previous_status)