Skip to content

Commit

Permalink
chore: Made some optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
NriotHrreion committed Aug 24, 2022
1 parent 382a45e commit 9c39b73
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion registry/SVGViewerPlugin.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect } from "react";
import { Image } from "react-bootstrap";

import { PluginMetadata } from "../src/client/types";

Expand Down Expand Up @@ -30,7 +31,7 @@ const SVGPage: React.FC<{ dataUrl: string }> = (props) => {
});
}, []);

return <embed src={props.dataUrl} type="image/svg+xml"/>;
return <Image src={props.dataUrl} fluid/>
};

export const SVGViewerPlugin: PluginMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/client/pages/Explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default class Explorer extends Component<ExplorerProps, ExplorerState> {
var viewers = PluginLoader.get().viewerList;

if(item.isFile && itemFormat) {
if(Utils.formatTester(["exe", "sys", "com", "bin", "elf", "axf"], itemFormat)) {
if(Utils.formatTester(["exe", "sys", "com", "bin", "elf", "axf", "dll", "jar"], itemFormat)) {
toast.error(Utils.$("toast.msg1"));
return;
}
Expand Down
3 changes: 2 additions & 1 deletion src/client/pages/PictureViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, Context, ReactElement } from "react";
import { Image } from "react-bootstrap";
import { toast, Toaster } from "react-hot-toast";
import Axios from "axios";

Expand Down Expand Up @@ -46,7 +47,7 @@ export default class PictureViewer extends Component<PictureViewerProps, Picture
</div>
<Header path={decodeURI(this.path)}/>
<div className="viewer-container">
<img src={this.state.pictureData} alt={this.path}/>
<Image src={this.state.pictureData} fluid/>
</div>
</div>
</div>
Expand Down

1 comment on commit 9c39b73

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.