Skip to content

Commit

Permalink
Fix updating plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
NotNite committed Dec 9, 2023
1 parent e67a0e8 commit 388417d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core-extensions/src/moonbase/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DetectedExtension, ExtensionManifest } from "types/src";

export const DownloadIconSVG =
"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z";
"M12 2a1 1 0 0 1 1 1v10.59l3.3-3.3a1 1 0 1 1 1.4 1.42l-5 5a1 1 0 0 1-1.4 0l-5-5a1 1 0 1 1 1.4-1.42l3.3 3.3V3a1 1 0 0 1 1-1ZM3 20a1 1 0 1 0 0 2h18a1 1 0 1 0 0-2H3Z";
export const TrashIconSVG =
"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z";
export const CircleXIconSVG =
Expand Down
5 changes: 3 additions & 2 deletions packages/core-extensions/src/moonbase/ui/extensions/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default (require: typeof WebpackRequire) => {
"topSection"
)[0].exports;

const DownloadIcon = spacepack.findByCode(DownloadIconSVG)[0].exports.default;
const DownloadIcon =
spacepack.findByCode(DownloadIconSVG)[0].exports.DownloadIcon;
const TrashIcon = spacepack.findByCode(TrashIconSVG)[0].exports.default;
const DangerIcon =
spacepack.findByCode(DangerIconSVG)[0].exports.CircleExclamationPointIcon;
Expand Down Expand Up @@ -127,7 +128,7 @@ export default (require: typeof WebpackRequire) => {
{update !== null && (
<PanelButton
icon={DownloadIcon}
tooltipText="Delete"
tooltipText="Update"
onClick={() => {
MoonbaseSettingsStore.installExtension(id);
}}
Expand Down
7 changes: 7 additions & 0 deletions packages/core-extensions/src/moonbase/ui/extensions/info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export default (require: typeof WebpackRequire) => {
function ExtensionInfo({ ext }: { ext: MoonbaseExtension }) {
const authors = ext.manifest?.meta?.authors;
const tags = ext.manifest?.meta?.tags;
const version = ext.manifest?.version;

const dependencies: Dependency[] = [];
if (ext.manifest.dependencies != null) {
Expand Down Expand Up @@ -191,6 +192,12 @@ export default (require: typeof WebpackRequire) => {
})}
</InfoSection>
)}

{version != null && (
<InfoSection title="Version">
<span>{version}</span>
</InfoSection>
)}
</>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ class MoonbaseSettingsStore extends Flux.Store<any> {
download: ext.download
};
}

this.extensions[ext.id].manifest = ext;
this.extensions[ext.id].source = {
type: ExtensionLoadSource.Normal,
url: repo
};

continue;
}

Expand Down

0 comments on commit 388417d

Please sign in to comment.