Skip to content

Commit

Permalink
Use new legacy submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Dec 5, 2024
1 parent c775246 commit 7113143
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions panel/src/components/Views/ModelView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default {
api: {
handler(newValue, oldValue) {
if (newValue !== oldValue) {
this.supportLegacyChanges();
this.$panel.content.legacy.import(newValue);
}
},
immediate: true
Expand Down Expand Up @@ -123,24 +123,6 @@ export default {
e?.preventDefault?.();
this.onSubmit();
},
async supportLegacyChanges() {
const changes = this.$panel.content.legacyChanges(this.api);
if (!changes) {
return;
}
this.$panel.view.props.content = {
...this.$panel.view.props.originals,
...changes
};
// store the changes from local storage
await this.$panel.content.save(this.$panel.view.props.content, this.api);
// remove the local storage key
window.localStorage.removeItem(this.$panel.content.legacyId(this.api));
},
toNext(e) {
if (this.next && e.target.localName === "body") {
this.$go(this.next.link);
Expand Down

0 comments on commit 7113143

Please sign in to comment.