Skip to content

Commit

Permalink
Merge pull request #279 from RyanCoulsonCA/fix-276
Browse files Browse the repository at this point in the history
fix saving on metadata page
  • Loading branch information
yileifeng authored Apr 15, 2024
2 parents 5b18909 + dd5a39b commit 9f042f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/editor/editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export default class EditorV extends Vue {
created(): void {
this.loadSlides = this.slides;
this.uuid = this.$route.params.uid as string;
window.addEventListener('beforeunload', this.beforeWindowUnload);
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/editor/metadata-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ interface RouteParams {
slides: Slide[];
sourceCounts: SourceCounts;
existing: boolean;
unsavedChanges: boolean;
}
@Options({
Expand Down Expand Up @@ -291,6 +292,7 @@ export default class MetadataEditorV extends Vue {
this.slides = props.slides;
this.sourceCounts = props.sourceCounts;
this.loadExisting = props.existing;
this.unsavedChanges = props.unsavedChanges;
// Load product logo (if provided).
const logo = this.configs[this.configLang]?.introSlide.logo?.src;
const logoSrc = `assets/${this.configLang}/${this.metadata.logoName}`;
Expand Down Expand Up @@ -810,7 +812,8 @@ export default class MetadataEditorV extends Vue {
sourceCounts: this.sourceCounts,
metadata: this.metadata,
slides: this.slides,
existing: this.editExisting
existing: this.editExisting,
unsavedChanges: this.unsavedChanges
};
}
});
Expand Down Expand Up @@ -839,6 +842,7 @@ export default class MetadataEditorV extends Vue {
if (this.loadExisting) {
if (this.configs[this.configLang] !== undefined && this.uuid === this.configFileStructure?.uuid) {
this.loadEditor = true;
this.saveMetadata(false);
this.updateEditorPath();
} else {
Message.error('No config exists for storylines product.');
Expand Down

0 comments on commit 9f042f5

Please sign in to comment.