Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -324,19 +324,15 @@ export default {
async awaitWSConnect() {
if (this.WEBSOCKET_HEALTHY) {
clearTimeout(this.loadTimer);
await this.GET_RBAC_ROLES();

// Check WebSocket state for any pending operations
if (this.WEBSOCKET_HAS_PENDING_OPERATIONS) {
await this.CHECK_WEBSOCKET_STATE();
}
await Promise.all([
this.GET_RBAC_ROLES(),
this.WEBSOCKET_HAS_PENDING_OPERATIONS ? this.CHECK_WEBSOCKET_STATE() : Promise.resolve(),
]);

// Check for authentication via token first
if (this.AUTH_TOKEN) {
// Then get user data
await this.GET_CURRENT_USER();
await this.GET_CURRENT_RBAC();
await this.GET_USER_SETTINGS();
await Promise.all([this.GET_CURRENT_RBAC(), this.GET_USER_SETTINGS()]);
}

if (this.SETTINGS.current_show != null) {
Expand Down
5 changes: 1 addition & 4 deletions client/src/views/show/ShowLiveView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,13 @@ export default {
},
},
async mounted() {
await this.GET_SHOW_SESSION_DATA();
await Promise.all([this.GET_SHOW_SESSION_DATA(), this.GET_ACT_LIST()]);
this.loadedSessionData = true;

if (this.CURRENT_SHOW_INTERVAL != null) {
this.setupIntervalTimer();
}

// Load act list (needed for interval overlay heading)
await this.GET_ACT_LIST();

// Setup elapsed time tracking
this.updateElapsedTime();
this.startTime = this.createDateAsUTC(
Expand Down
3 changes: 1 addition & 2 deletions client/src/views/show/config/ConfigCharacters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ export default {
},
},
async mounted() {
await this.GET_CHARACTER_LIST();
await this.GET_CAST_LIST();
await Promise.all([this.GET_CHARACTER_LIST(), this.GET_CAST_LIST()]);
},
methods: {
resetNewForm() {
Expand Down
14 changes: 8 additions & 6 deletions client/src/views/show/config/ConfigMics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ export default {
};
},
async mounted() {
await this.GET_SCENE_LIST();
await this.GET_ACT_LIST();
await this.GET_CHARACTER_LIST();
await this.GET_CAST_LIST();
await this.GET_MICROPHONE_LIST();
await this.GET_MIC_ALLOCATIONS();
await Promise.all([
this.GET_SCENE_LIST(),
this.GET_ACT_LIST(),
this.GET_CHARACTER_LIST(),
this.GET_CAST_LIST(),
this.GET_MICROPHONE_LIST(),
this.GET_MIC_ALLOCATIONS(),
]);
this.loaded = true;
},
methods: {
Expand Down
10 changes: 6 additions & 4 deletions client/src/vue_components/config/ConfigSystem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,12 @@ export default {
...mapGetters(['SCRIPT_MODES']),
},
async mounted() {
await this.getAvailableShows();
await this.getConnectedClients();
await this.GET_SCRIPT_MODES();
await this.getVersionStatus();
await Promise.all([
this.getAvailableShows(),
this.getConnectedClients(),
this.GET_SCRIPT_MODES(),
this.getVersionStatus(),
]);
this.loading = false;

// Start time update interval for reactive "time ago" display
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ export default {
...mapGetters(['CHARACTER_LIST', 'CHARACTER_GROUP_LIST', 'IS_SHOW_EDITOR']),
},
async mounted() {
await this.GET_CHARACTER_LIST();
await this.GET_CHARACTER_GROUP_LIST();
await Promise.all([this.GET_CHARACTER_LIST(), this.GET_CHARACTER_GROUP_LIST()]);
this.loading = false;
},
methods: {
Expand Down
44 changes: 21 additions & 23 deletions client/src/vue_components/show/config/cues/CueEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,30 +183,28 @@ export default {
},
},
async beforeMount() {
// Get the current user
await this.GET_CURRENT_USER();
// Config status
await this.GET_SCRIPT_CONFIG_STATUS();
// Show details
await this.GET_ACT_LIST();
await this.GET_SCENE_LIST();
await this.GET_CHARACTER_LIST();
await this.GET_CHARACTER_GROUP_LIST();
await this.GET_CUE_TYPES();
await this.LOAD_CUES();
await this.GET_CUTS();
await this.GET_STAGE_DIRECTION_STYLES();
await Promise.all([
this.GET_CURRENT_USER().then(() => {
if (this.CURRENT_USER != null) {
return Promise.all([
this.GET_STAGE_DIRECTION_STYLE_OVERRIDES(),
this.GET_CUE_COLOUR_OVERRIDES(),
]);
}
return Promise.resolve();
}),
this.GET_SCRIPT_CONFIG_STATUS(),
this.GET_ACT_LIST(),
this.GET_SCENE_LIST(),
this.GET_CHARACTER_LIST(),
this.GET_CHARACTER_GROUP_LIST(),
this.GET_CUE_TYPES(),
this.LOAD_CUES(),
this.GET_CUTS(),
this.GET_STAGE_DIRECTION_STYLES(),
this.getMaxScriptPage(),
]);

// User related stuff
if (this.CURRENT_USER != null) {
await this.GET_STAGE_DIRECTION_STYLE_OVERRIDES();
await this.GET_CUE_COLOUR_OVERRIDES();
}

// Get the max page of the saved version of the script
await this.getMaxScriptPage();

// Initialisation of page data
// Initialisation of page data
const storedPage = localStorage.getItem('cueEditPage');
if (storedPage != null) {
Expand Down
45 changes: 23 additions & 22 deletions client/src/vue_components/show/config/script/ScriptEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -325,29 +325,30 @@ export default {
},
},
async beforeMount() {
// Get the current user
await this.GET_CURRENT_USER();
await this.GET_USER_SETTINGS();
// Config status
await this.GET_SCRIPT_CONFIG_STATUS();
// Show details
await this.GET_ACT_LIST();
await this.GET_SCENE_LIST();
await this.GET_CHARACTER_LIST();
await this.GET_CHARACTER_GROUP_LIST();
// Stage direction styles
await this.GET_STAGE_DIRECTION_STYLES();
// User related stuff
if (this.CURRENT_USER != null) {
await this.GET_STAGE_DIRECTION_STYLE_OVERRIDES();
await this.GET_CUE_COLOUR_OVERRIDES();
}
// Handle script cuts
await this.GET_CUTS();
this.resetCutsToSaved();
await Promise.all([
this.GET_CURRENT_USER()
.then(() => this.GET_USER_SETTINGS())
.then(() => {
if (this.CURRENT_USER != null) {
return Promise.all([
this.GET_STAGE_DIRECTION_STYLE_OVERRIDES(),
this.GET_CUE_COLOUR_OVERRIDES(),
]);
}
return Promise.resolve();
}),
this.GET_SCRIPT_CONFIG_STATUS(),
this.GET_ACT_LIST(),
this.GET_SCENE_LIST(),
this.GET_CHARACTER_LIST(),
this.GET_CHARACTER_GROUP_LIST(),
this.GET_STAGE_DIRECTION_STYLES(),
this.GET_CUTS(),
this.getMaxScriptPage(),
]);

// Get the max page of the saved version of the script
await this.getMaxScriptPage();
// Handle script cuts (depends on GET_CUTS completing)
this.resetCutsToSaved();

// Initialisation of page data
const storedPage = localStorage.getItem('scriptEditPage');
Expand Down
3 changes: 1 addition & 2 deletions client/src/vue_components/show/config/stage/PropsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,7 @@ export default {
...mapGetters(['PROPS_LIST', 'PROP_TYPES', 'IS_SHOW_EDITOR', 'PROP_TYPE_BY_ID']),
},
async mounted() {
await this.GET_PROP_TYPES();
await this.GET_PROPS_LIST();
await Promise.all([this.GET_PROP_TYPES(), this.GET_PROPS_LIST()]);
},
methods: {
resetNewPropTypeForm() {
Expand Down
3 changes: 1 addition & 2 deletions client/src/vue_components/show/config/stage/SceneryList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,7 @@ export default {
...mapGetters(['SCENERY_LIST', 'SCENERY_TYPES', 'IS_SHOW_EDITOR', 'SCENERY_TYPE_BY_ID']),
},
async mounted() {
await this.GET_SCENERY_TYPES();
await this.GET_SCENERY_LIST();
await Promise.all([this.GET_SCENERY_TYPES(), this.GET_SCENERY_LIST()]);
},
methods: {
resetNewSceneryTypeForm() {
Expand Down
Loading