Skip to content

Commit

Permalink
deps: update version
Browse files Browse the repository at this point in the history
  • Loading branch information
kimlimjustin committed Feb 19, 2025
1 parent f6dc559 commit 00aecee
Show file tree
Hide file tree
Showing 24 changed files with 2,386 additions and 2,008 deletions.
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"docs": "yarn --cwd ./docs start",
"pretest": "yarn compile",
"test": "jest",
"copyfiles": "python ./scripts/copyfiles.py",
"copyfiles": "node ./scripts/copyfiles.js",
"compile": "webpack && yarn sass && yarn copyfiles",
"compile:watch": "webpack --watch",
"crowdin": "crowdin",
Expand Down Expand Up @@ -55,23 +55,23 @@
],
"license": "Apache-2.0",
"devDependencies": {
"@crowdin/cli": "^3.6.5",
"@crowdin/cli": "^4.6.1",
"@tauri-apps/cli": "^2.0.0-beta.14",
"@types/jest": "^29.5.12",
"@types/lodash.dropwhile": "^4.6.6",
"@types/lodash.omit": "^4.5.6",
"@types/lodash.omitby": "^4.6.6",
"@types/marked": "^6.0.0",
"@types/react": "^18.2.74",
"@types/react-dom": "^18.2.24",
"@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4",
"@types/react-redux": "^7.1.20",
"@types/redux-logger": "^3.0.9",
"@types/redux-saga": "^0.10.5",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@typescript-eslint/eslint-plugin": "^8.24.1",
"@typescript-eslint/parser": "^8.24.1",
"buffer": "^6.0.3",
"clean-css-cli": "^5.3.3",
"concurrently": "^8.2.2",
"concurrently": "^9.1.2",
"cpy": "^11.0.1",
"css-loader": "^7.0.0",
"eslint": "^9.0.0",
Expand All @@ -87,16 +87,16 @@
"node-watch": "^0.7.1",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"prettier": "3.2.5",
"rimraf": "^5.0.5",
"prettier": "3.5.1",
"rimraf": "^6.0.1",
"sass": "^1.63.4",
"sass-loader": "^14.1.1",
"style-loader": "^3.3.3",
"sass-loader": "^16.0.5",
"style-loader": "^4.0.0",
"ts-jest": "^29.1.2",
"ts-loader": "^9.2.6",
"typescript": "^5.4.4",
"webpack": "^5.87.0",
"webpack-cli": "^5.1.4"
"webpack-cli": "^6.0.1"
},
"dependencies": {
"@reduxjs/toolkit": "^2.2.3",
Expand All @@ -109,9 +109,9 @@
"lodash.omit": "^4.5.0",
"lodash.omitby": "^4.6.0",
"mammoth": "^1.4.18",
"marked": "12.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"marked": "15.0.7",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-redux": "^9.1.0",
"redux": "^5.0.1",
"redux-logger": "^3.0.6",
Expand Down
10 changes: 10 additions & 0 deletions scripts/copyfiles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// copy all src/files to out/src

const fs = require("fs");
const path = require("path");
const { execSync } = require("child_process");

const srcDir = path.join(__dirname, "../src");
const outDir = path.join(__dirname, "../out/src");

fs.cpSync(srcDir, outDir, { recursive: true });
13 changes: 0 additions & 13 deletions scripts/copyfiles.py

This file was deleted.

22 changes: 4 additions & 18 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
{
"productName": "Xplorer",
"version": "0.3.1",
"build": {
"frontendDist": "../out/src",
"devUrl": "http://localhost:1234",
"beforeDevCommand": "",
"beforeBuildCommand": ""
},
"identifier": "com.xplorer",
"build": { "frontendDist": "../out/src", "devUrl": "http://localhost:1234", "beforeDevCommand": "", "beforeBuildCommand": "" },
"app": {
"windows": [
{
"title": "Xplorer",
"width": 1000,
"height": 600,
"decorations": false,
"transparent": true
}
],
"security": {
"csp": null
}
"windows": [{ "title": "Xplorer", "width": 1000, "height": 600, "decorations": false, "transparent": true }],
"security": { "csp": null }
},
"bundle": {
"active": true,
Expand Down
2 changes: 1 addition & 1 deletion src/Components/File/DetailFile.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { MouseEvent } from "react";
import React, { MouseEvent, JSX } from "react";
import FileMetaData from "../../Typings/fileMetaData";
import { ThemedButton, ThemedSpan } from "../Theme";
import { useSelector } from "react-redux";
Expand Down
2 changes: 1 addition & 1 deletion src/Components/File/GridFile.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { MouseEvent } from "react";
import React, { MouseEvent, JSX } from "react";
import FileMetaData from "../../Typings/fileMetaData";
import { ThemedButton } from "../Theme";

Expand Down
10 changes: 2 additions & 8 deletions src/Components/File/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { MouseEvent } from "react";
import React, { MouseEvent, JSX } from "react";
import { useDispatch, useSelector } from "react-redux";

import GridFile from "./GridFile";
Expand Down Expand Up @@ -53,13 +53,7 @@ export const File = ({ mode, metadata }: IFileProps): JSX.Element => {
return;
}

dispatch(
updateTab(activeTab.name, {
...activeTab,
path: getStandardPath(filePath),
name: filePath.split("\\").pop() || "",
}),
);
dispatch(updateTab(activeTab.name, { ...activeTab, path: getStandardPath(filePath), name: filePath.split("\\").pop() || "" }));
dispatch(setActiveTab({ name: filePath.split("\\").pop() || "", path: getStandardPath(filePath), id: activeTab.id }));
};

Expand Down
2 changes: 1 addition & 1 deletion src/Components/MainView/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from "react";
import React, { useEffect, JSX } from "react";
import { useSelector } from "react-redux";

import File from "../File";
Expand Down
8 changes: 4 additions & 4 deletions src/Components/Preview/DocxViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import React, { JSX } from "react";

export interface IDocxViewerProps {
filePath: string
filePath: string;
}

const DocxViewer = ({ filePath }: IDocxViewerProps): JSX.Element => {
return (<div>Docx viewer: {filePath}</div>);
}
return <div>Docx viewer: {filePath}</div>;
};

export default DocxViewer;
8 changes: 4 additions & 4 deletions src/Components/Preview/HtmlViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import React, { JSX } from "react";

export interface IHtmlViewerProps {
filePath: string
filePath: string;
}

const HtmlViewer = ({ filePath }: IHtmlViewerProps): JSX.Element => {
return (<div>pdf viewer: {filePath}</div>);
}
return <div>pdf viewer: {filePath}</div>;
};

export default HtmlViewer;
8 changes: 4 additions & 4 deletions src/Components/Preview/ImageViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import React, { JSX } from "react";

export interface IImageViewerProps {
filePath: string
filePath: string;
}

const ImageViewer = ({ filePath }: IImageViewerProps): JSX.Element => {
return (<div>Image viewer: {filePath}</div>);
}
return <div>Image viewer: {filePath}</div>;
};

export default ImageViewer;
8 changes: 4 additions & 4 deletions src/Components/Preview/MarkdownViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import React, { JSX } from "react";

export interface IMarkdownViewerProps {
filePath: string
filePath: string;
}

const MarkdownViewer = ({ filePath }: IMarkdownViewerProps): JSX.Element => {
return (<div>Markdown viewer: {filePath}</div>);
}
return <div>Markdown viewer: {filePath}</div>;
};

export default MarkdownViewer;
44 changes: 19 additions & 25 deletions src/Components/Preview/PdfViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
import React, { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import React, { useEffect, JSX } from "react";
import { useDispatch, useSelector } from "react-redux";

import { readAssetRequest } from '../../Store/ActionCreators/FilesActionCreators';
import { IAppState } from '../../Store/Reducers';
import { readAssetRequest } from "../../Store/ActionCreators/FilesActionCreators";
import { IAppState } from "../../Store/Reducers";

export interface IPdfViewerProps {
filePath: string
filePath: string;
}

const PdfViewer = ({ filePath }: IPdfViewerProps): JSX.Element => {
const dispatch = useDispatch();
const content = useSelector<IAppState, any>(state => state.files.files?.[filePath]?.content);
const dispatch = useDispatch();
const content = useSelector<IAppState, any>((state) => state.files.files?.[filePath]?.content);

useEffect(() => {
dispatch(readAssetRequest(filePath));
}, [filePath]);
useEffect(() => {
dispatch(readAssetRequest(filePath));
}, [filePath]);

if (!content) return <div>Loading...</div>;
if (!content) return <div>Loading...</div>;

return (
<div id="pdf-preview-container">
<object
data={`${content}#toolbar=0&navpanes=1`}
type="application/pdf"
className="preview-object"
>
<embed
src={`${content}#toolbar=0&navpanes=1`}
type="application/pdf" />
</object>
</div >
);
}
return (
<div id="pdf-preview-container">
<object data={`${content}#toolbar=0&navpanes=1`} type="application/pdf" className="preview-object">
<embed src={`${content}#toolbar=0&navpanes=1`} type="application/pdf" />
</object>
</div>
);
};

export default PdfViewer;
8 changes: 4 additions & 4 deletions src/Components/Preview/PlaintextViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import React, { JSX } from "react";

export interface IPlaintextViewerProps {
filePath: string
filePath: string;
}

const PlaintextViewer = ({ filePath }: IPlaintextViewerProps): JSX.Element => {
return (<div>Plaintext viewer: {filePath}</div>);
}
return <div>Plaintext viewer: {filePath}</div>;
};

export default PlaintextViewer;
8 changes: 4 additions & 4 deletions src/Components/Preview/VideoViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import React, { JSX } from "react";

export interface IVideoViewerProps {
filePath: string
filePath: string;
}

const VideoViewer = ({ filePath }: IVideoViewerProps): JSX.Element => {
return (<div>Video viewer: {filePath}</div>);
}
return <div>Video viewer: {filePath}</div>;
};

export default VideoViewer;
8 changes: 4 additions & 4 deletions src/Components/Preview/XlsxViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import React, { JSX } from "react";

export interface IXlsxViewerProps {
filePath: string
filePath: string;
}

const XlsxViewer = ({ filePath }: IXlsxViewerProps): JSX.Element => {
return (<div>Xlsx viewer: {filePath}</div>);
}
return <div>Xlsx viewer: {filePath}</div>;
};

export default XlsxViewer;
Loading

0 comments on commit 00aecee

Please sign in to comment.