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
7 changes: 6 additions & 1 deletion client/src/vue_components/show/config/cues/CueEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,14 @@ export default {
DATA: {},
});
},
decrPage() {
async decrPage() {
if (this.currentEditPage > 1) {
const targetPage = this.currentEditPage - 1;
// Load target page from backend
await this.LOAD_SCRIPT_PAGE(targetPage);
this.currentEditPage--;
// Pre-load previous page
await this.LOAD_SCRIPT_PAGE(this.currentEditPage - 1);
}
},
async incrPage() {
Expand Down
7 changes: 5 additions & 2 deletions client/src/vue_components/show/config/script/ScriptEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,11 @@ export default {
},
async decrPage() {
if (this.currentEditPage > 1) {
if (!Object.keys(this.TMP_SCRIPT).includes((this.currentEditPage - 1).toString())) {
this.ADD_BLANK_PAGE(this.currentEditPage - 1);
const targetPage = this.currentEditPage - 1;
// Load from backend if not in buffer
if (!Object.keys(this.TMP_SCRIPT).includes(targetPage.toString())) {
await this.LOAD_SCRIPT_PAGE(targetPage);
this.ADD_BLANK_PAGE(targetPage);
}
if (this.TMP_SCRIPT[this.currentEditPageKey].length === 0) {
this.REMOVE_PAGE(this.currentEditPage);
Expand Down
Loading