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
4 changes: 2 additions & 2 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "client",
"version": "0.8.3",
"version": "0.9.0",
"private": true,
"scripts": {
"build": "vite build",
Expand Down
14 changes: 12 additions & 2 deletions client/src/views/show/ShowLiveView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
:cues="getCuesForLine(line)"
:cuts="SCRIPT_CUTS"
:stage-direction-styles="STAGE_DIRECTION_STYLES"
:stage-direction-style-overrides="STAGE_DIRECTION_STYLE_OVERRIDES"
@last-line-change="handleLastLineChange"
@first-line-change="handleFirstLineChange"
/>
Expand Down Expand Up @@ -143,6 +144,14 @@
this.$toast.warning('No live session started!');
await this.$router.replace('/');
} else {
// Get the current user
await this.GET_CURRENT_USER();

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

await this.GET_ACT_LIST();
await this.GET_SCENE_LIST();
await this.GET_CHARACTER_LIST();
Expand Down Expand Up @@ -250,7 +259,7 @@
const cutoffBottom = scriptContainer.offset().top + scriptContainer.outerHeight();
const scriptSelector = $('.script-item');

scriptSelector.each(function () {

Check warning on line 262 in client/src/views/show/ShowLiveView.vue

View workflow job for this annotation

GitHub Actions / build

Unexpected unnamed function
if ($(this).offset().top >= cutoffTop) {
if (!$(this).attr('class').split(/\s+/).includes('first-script-element')) {
scriptSelector.removeClass('first-script-element');
Expand All @@ -263,7 +272,7 @@

let assignedLastScript = false;
let lastObject = null;
scriptSelector.each(function () {

Check warning on line 275 in client/src/views/show/ShowLiveView.vue

View workflow job for this annotation

GitHub Actions / build

Unexpected unnamed function
if (lastObject == null) {
lastObject = this;
} else if ($(this).offset().top > $(lastObject).offset().top
Expand Down Expand Up @@ -417,9 +426,9 @@
},
...mapActions(['GET_SHOW_SESSION_DATA', 'LOAD_SCRIPT_PAGE', 'GET_ACT_LIST', 'GET_SCENE_LIST',
'GET_CHARACTER_LIST', 'GET_CHARACTER_GROUP_LIST', 'LOAD_CUES', 'GET_CUE_TYPES',
'GET_CUTS', 'GET_STAGE_DIRECTION_STYLES']),
'GET_CUTS', 'GET_STAGE_DIRECTION_STYLES', 'GET_CURRENT_USER', 'GET_STAGE_DIRECTION_STYLE_OVERRIDES']),
},
computed: {

Check warning on line 431 in client/src/views/show/ShowLiveView.vue

View workflow job for this annotation

GitHub Actions / build

The "computed" property should be above the "destroyed" property on line 236
pageIter() {
if (this.SETTINGS.enable_live_batching) {
return [...Array(this.currentLoadedPage).keys()].map((x) => (x + 1)).filter((x) => (
Expand All @@ -442,9 +451,10 @@
},
...mapGetters(['CURRENT_SHOW_SESSION', 'GET_SCRIPT_PAGE', 'ACT_LIST', 'SCENE_LIST',
'CHARACTER_LIST', 'CHARACTER_GROUP_LIST', 'CURRENT_SHOW', 'CUE_TYPES', 'SCRIPT_CUES',
'INTERNAL_UUID', 'SESSION_FOLLOW_DATA', 'SCRIPT_CUTS', 'SETTINGS', 'STAGE_DIRECTION_STYLES']),
'INTERNAL_UUID', 'SESSION_FOLLOW_DATA', 'SCRIPT_CUTS', 'SETTINGS', 'STAGE_DIRECTION_STYLES',
'CURRENT_USER', 'STAGE_DIRECTION_STYLE_OVERRIDES']),
},
watch: {

Check warning on line 457 in client/src/views/show/ShowLiveView.vue

View workflow job for this annotation

GitHub Actions / build

The "watch" property should be above the "destroyed" property on line 236
SESSION_FOLLOW_DATA() {
if (this.isScriptFollowing) {
let scrollToLine;
Expand Down
12 changes: 10 additions & 2 deletions client/src/vue_components/show/config/cues/CueEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
:cues="getCuesForLine(line)"
:line-part-cuts="SCRIPT_CUTS"
:stage-direction-styles="STAGE_DIRECTION_STYLES"
:stage-direction-style-overrides="STAGE_DIRECTION_STYLE_OVERRIDES"
/>
</template>
</b-col>
Expand Down Expand Up @@ -176,6 +177,8 @@ export default {
},
},
async beforeMount() {
// Get the current user
await this.GET_CURRENT_USER();
// Config status
await this.GET_SCRIPT_CONFIG_STATUS();
// Show details
Expand All @@ -188,6 +191,11 @@ export default {
await this.GET_CUTS();
await this.GET_STAGE_DIRECTION_STYLES();

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

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

Expand Down Expand Up @@ -263,7 +271,7 @@ export default {
...mapActions(['GET_SCENE_LIST', 'GET_ACT_LIST', 'GET_CHARACTER_LIST',
'GET_CHARACTER_GROUP_LIST', 'LOAD_SCRIPT_PAGE', 'ADD_BLANK_PAGE', 'GET_SCRIPT_CONFIG_STATUS',
'RESET_TO_SAVED', 'SAVE_NEW_PAGE', 'SAVE_CHANGED_PAGE', 'GET_CUE_TYPES', 'LOAD_CUES',
'GET_CUTS', 'GET_STAGE_DIRECTION_STYLES']),
'GET_CUTS', 'GET_STAGE_DIRECTION_STYLES', 'GET_STAGE_DIRECTION_STYLE_OVERRIDES', 'GET_CURRENT_USER']),
},
computed: {
currentEditPageKey() {
Expand All @@ -278,7 +286,7 @@ export default {
...mapGetters(['CURRENT_SHOW', 'ACT_LIST', 'SCENE_LIST', 'CHARACTER_LIST',
'CHARACTER_GROUP_LIST', 'CAN_REQUEST_EDIT', 'CURRENT_EDITOR', 'INTERNAL_UUID',
'GET_SCRIPT_PAGE', 'DEBUG_MODE_ENABLED', 'CUE_TYPES', 'SCRIPT_CUES', 'SCRIPT_CUTS',
'STAGE_DIRECTION_STYLES']),
'STAGE_DIRECTION_STYLES', 'STAGE_DIRECTION_STYLE_OVERRIDES', 'CURRENT_USER']),
},
watch: {
currentEditPage(val) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ export default {
required: true,
type: Array,
},
stageDirectionStyleOverrides: {
required: true,
type: Array,
},
},
data() {
return {
Expand Down Expand Up @@ -431,8 +435,10 @@ export default {
const sdStyle = this.stageDirectionStyles.find(
(style) => (style.id === this.line.stage_direction_style_id),
);
const override = this.stageDirectionStyleOverrides
.find((elem) => elem.settings.id === sdStyle.id);
if (this.line.stage_direction) {
return sdStyle;
return override ? override.settings : sdStyle;
}
return null;
},
Expand Down
13 changes: 11 additions & 2 deletions client/src/vue_components/show/config/script/ScriptEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
:line-part-cuts="linePartCuts"
:insert-mode="insertMode"
:stage-direction-styles="STAGE_DIRECTION_STYLES"
:stage-direction-style-overrides="STAGE_DIRECTION_STYLE_OVERRIDES"
@editLine="beginEditingLine(currentEditPage, index)"
@cutLinePart="cutLinePart"
@insertLine="insertLineAt(currentEditPage, index)"
Expand Down Expand Up @@ -348,6 +349,8 @@ export default {
},
},
async beforeMount() {
// Get the current user
await this.GET_CURRENT_USER();
// Config status
await this.GET_SCRIPT_CONFIG_STATUS();
// Show details
Expand All @@ -357,6 +360,10 @@ export default {
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();
}
// Handle script cuts
await this.GET_CUTS();
this.resetCutsToSaved();
Expand Down Expand Up @@ -790,7 +797,8 @@ export default {
'SET_CUT_MODE', 'INSERT_BLANK_LINE', 'RESET_INSERTED']),
...mapActions(['GET_SCENE_LIST', 'GET_ACT_LIST', 'GET_CHARACTER_LIST',
'GET_CHARACTER_GROUP_LIST', 'LOAD_SCRIPT_PAGE', 'ADD_BLANK_PAGE', 'GET_SCRIPT_CONFIG_STATUS',
'RESET_TO_SAVED', 'SAVE_NEW_PAGE', 'SAVE_CHANGED_PAGE', 'GET_CUTS', 'SAVE_SCRIPT_CUTS', 'GET_STAGE_DIRECTION_STYLES']),
'RESET_TO_SAVED', 'SAVE_NEW_PAGE', 'SAVE_CHANGED_PAGE', 'GET_CUTS', 'SAVE_SCRIPT_CUTS',
'GET_STAGE_DIRECTION_STYLES', 'GET_CURRENT_USER', 'GET_STAGE_DIRECTION_STYLE_OVERRIDES']),
},
computed: {
canGenerateDebugScript() {
Expand Down Expand Up @@ -831,7 +839,8 @@ export default {
...mapGetters(['CURRENT_SHOW', 'TMP_SCRIPT', 'ACT_LIST', 'SCENE_LIST', 'CHARACTER_LIST',
'CHARACTER_GROUP_LIST', 'CAN_REQUEST_EDIT', 'CURRENT_EDITOR', 'INTERNAL_UUID',
'GET_SCRIPT_PAGE', 'DEBUG_MODE_ENABLED', 'DELETED_LINES', 'SCENE_BY_ID', 'ACT_BY_ID',
'IS_CUT_MODE', 'SCRIPT_CUTS', 'INSERTED_LINES', 'STAGE_DIRECTION_STYLES']),
'IS_CUT_MODE', 'SCRIPT_CUTS', 'INSERTED_LINES', 'STAGE_DIRECTION_STYLES', 'CURRENT_USER',
'STAGE_DIRECTION_STYLE_OVERRIDES']),
},
watch: {
currentEditPage(val) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ export default {
required: true,
type: Array,
},
stageDirectionStyleOverrides: {
required: true,
type: Array,
},
},
computed: {
needsHeadings() {
Expand Down Expand Up @@ -216,8 +220,10 @@ export default {
const sdStyle = this.stageDirectionStyles.find(
(style) => (style.id === this.line.stage_direction_style_id),
);
const override = this.stageDirectionStyleOverrides
.find((elem) => elem.settings.id === sdStyle.id);
if (this.line.stage_direction) {
return sdStyle;
return override ? override.settings : sdStyle;
}
return null;
},
Expand Down
8 changes: 7 additions & 1 deletion client/src/vue_components/show/live/ScriptLineViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ export default {
required: true,
type: Array,
},
stageDirectionStyleOverrides: {
required: true,
type: Array,
},
},
data() {
return {
Expand Down Expand Up @@ -267,8 +271,10 @@ export default {
const sdStyle = this.stageDirectionStyles.find(
(style) => (style.id === this.line.stage_direction_style_id),
);
const override = this.stageDirectionStyleOverrides
.find((elem) => elem.settings.id === sdStyle.id);
if (this.line.stage_direction) {
return sdStyle;
return override ? override.settings : sdStyle;
}
return null;
},
Expand Down
Loading