From 9e35735c9d0785de148ce4e0459f5e70b7240918 Mon Sep 17 00:00:00 2001 From: Wyatt <53830972+whyitfor@users.noreply.github.com> Date: Thu, 13 Oct 2022 16:42:44 -0400 Subject: [PATCH] Update paths for CommentsAttributes and Magic to match their new location in ofrak.core --- frontend/package.json | 1 + frontend/src/AttributesView.svelte | 2 +- frontend/src/ResourceTreeToolbar.svelte | 4 ++-- frontend/src/ofrak/resource.js | 6 ++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index d0eddb56f..2a722ea95 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@rollup/plugin-commonjs": "^17.0.0", "@rollup/plugin-node-resolve": "^11.0.0", + "prettier": "^2.7.1", "prettier-plugin-svelte": "^2.6.0", "rollup": "^2.3.4", "rollup-plugin-css-only": "^3.1.0", diff --git a/frontend/src/AttributesView.svelte b/frontend/src/AttributesView.svelte index ebe52590d..981a4ec3d 100644 --- a/frontend/src/AttributesView.svelte +++ b/frontend/src/AttributesView.svelte @@ -21,7 +21,7 @@ for (const [attrType, attrs] of Object.entries(resource.get_attributes())) { const skipped_attributes = [ // already shown in the resource tree - "ofrak_components.comments.CommentsAttributes", + "ofrak.core.comments.CommentsAttributes", // verbose and unhelpful "ofrak_components.entropy.entropy.DataSummary", ]; diff --git a/frontend/src/ResourceTreeToolbar.svelte b/frontend/src/ResourceTreeToolbar.svelte index 7dfd0b567..802c757a2 100644 --- a/frontend/src/ResourceTreeToolbar.svelte +++ b/frontend/src/ResourceTreeToolbar.svelte @@ -99,8 +99,8 @@ } const blob = new Blob([data], { type: - rootResource.get_attributes()["ofrak_components.magic.Magic"] - ?.mime || "", + rootResource.get_attributes()["ofrak.core.magic.Magic"]?.mime || + "", }); const blobUrl = URL.createObjectURL(blob); diff --git a/frontend/src/ofrak/resource.js b/frontend/src/ofrak/resource.js index 4b1c8d17f..79c5c7c9d 100644 --- a/frontend/src/ofrak/resource.js +++ b/frontend/src/ofrak/resource.js @@ -377,10 +377,8 @@ export class Resource { async get_comments() { let attributes = this.get_attributes(); - if ("ofrak_components.comments.CommentsAttributes" in attributes) { - return attributes["ofrak_components.comments.CommentsAttributes"][ - "comments" - ]; + if ("ofrak.core.comments.CommentsAttributes" in attributes) { + return attributes["ofrak.core.comments.CommentsAttributes"]["comments"]; } else { return []; }