mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-22 23:45:02 +00:00
Fixed Tauri-Build (now using absolute paths again)
This commit is contained in:
parent
e806ee8015
commit
c2bcda925a
@ -6,7 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"preview": "vite preview",
|
"preview (previously built files)": "vite preview",
|
||||||
"tauri-dev (currently broken)": "tauri dev",
|
"tauri-dev (currently broken)": "tauri dev",
|
||||||
"tauri-build-debug": "tauri build --debug",
|
"tauri-build-debug": "tauri build --debug",
|
||||||
"tauri-build": "tauri build"
|
"tauri-build": "tauri build"
|
||||||
|
@ -41,7 +41,7 @@ export default function App() {
|
|||||||
routes for. */}
|
routes for. */}
|
||||||
<Route path="*" element={<NoMatch />} />
|
<Route path="*" element={<NoMatch />} />
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
<Route path="/operators" element={<Layout />}>
|
<Route path="/operators" element={<Layout />}>
|
||||||
<Route index element={<NoMatch />} />
|
<Route index element={<NoMatch />} />
|
||||||
{listOperatorNames().map((name) => {
|
{listOperatorNames().map((name) => {
|
||||||
@ -49,15 +49,6 @@ export default function App() {
|
|||||||
})}
|
})}
|
||||||
<Route path="*" element={<NoMatch />} />
|
<Route path="*" element={<NoMatch />} />
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
<Route path="/convert" element={<Layout />}>
|
|
||||||
{/* <Route path="file-to-pdf" element={<ToPdf />} /> */}
|
|
||||||
<Route path="*" element={<NoMatch />} />
|
|
||||||
</Route>
|
|
||||||
<Route path="/page-operations" element={<Layout />}>
|
|
||||||
{/* <Route path="impose" element={<Impose />} /> */}
|
|
||||||
<Route path="*" element={<NoMatch />} />
|
|
||||||
</Route>
|
|
||||||
</Routes>
|
</Routes>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
);
|
);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { getSchemaByName } from "@stirling-pdf/shared-operations/src/workflow/operatorAccessor";
|
import { getSchemaByName } from "@stirling-pdf/shared-operations/src/workflow/operatorAccessor";
|
||||||
|
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
|
|
||||||
import NavDropdown from "react-bootstrap/NavDropdown";
|
// import NavDropdown from "react-bootstrap/NavDropdown";
|
||||||
import { useTranslation } from "react-i18next";
|
// import { useTranslation } from "react-i18next";
|
||||||
import { BsGlobe2 } from "react-icons/bs";
|
// import { BsGlobe2 } from "react-icons/bs";
|
||||||
|
|
||||||
function generateSublist() {
|
// function generateSublist() {
|
||||||
const { i18n } = useTranslation();
|
// const { i18n } = useTranslation();
|
||||||
const out: JSX.Element[] = [];
|
// const out: JSX.Element[] = [];
|
||||||
const languages = i18n.options.resources;
|
// const languages = i18n.options.resources;
|
||||||
|
|
||||||
for (const key in languages) {
|
// for (const key in languages) {
|
||||||
const lang: any = languages[key].translation;
|
// const lang: any = languages[key].translation;
|
||||||
const staticKey = key;
|
// const staticKey = key;
|
||||||
out.push((
|
// out.push((
|
||||||
<NavDropdown.Item key={"language-"+key} className="nav-icon" onClick={()=>i18n.changeLanguage(staticKey)}>
|
// <NavDropdown.Item key={"language-"+key} className="nav-icon" onClick={()=>i18n.changeLanguage(staticKey)}>
|
||||||
<span>{lang.language?.flag}</span>
|
// <span>{lang.language?.flag}</span>
|
||||||
<span>{lang.language?.name}</span>
|
// <span>{lang.language?.name}</span>
|
||||||
</NavDropdown.Item>
|
// </NavDropdown.Item>
|
||||||
));
|
// ));
|
||||||
}
|
// }
|
||||||
return <>{out}</>;
|
// return <>{out}</>;
|
||||||
}
|
// }
|
||||||
|
|
||||||
export default function LanguagePicker() {
|
// export default function LanguagePicker() {
|
||||||
return (
|
// return (
|
||||||
<NavDropdown id="languages-dropdown" title={<><span className="nav-icon"><BsGlobe2/></span></>}>
|
// <NavDropdown id="languages-dropdown" title={<><span className="nav-icon"><BsGlobe2/></span></>}>
|
||||||
{generateSublist()}
|
// {generateSublist()}
|
||||||
</NavDropdown>
|
// </NavDropdown>
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import { Link } from "react-router-dom";
|
|
||||||
|
|
||||||
import { listOperatorNames } from "@stirling-pdf/shared-operations/src/workflow/operatorAccessor";
|
import { listOperatorNames } from "@stirling-pdf/shared-operations/src/workflow/operatorAccessor";
|
||||||
import { OperatorCard } from "../components/OperatorCard";
|
import { OperatorCard } from "../components/OperatorCard";
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ function Dynamic() {
|
|||||||
});
|
});
|
||||||
}, [location]);
|
}, [location]);
|
||||||
|
|
||||||
const inputRef = useRef<HTMLInputElement>();
|
const inputRef = useRef<HTMLInputElement>(null);
|
||||||
|
|
||||||
async function handleSubmit(e: BaseSyntheticEvent) {
|
async function handleSubmit(e: BaseSyntheticEvent) {
|
||||||
const formData = new FormData(e.target);
|
const formData = new FormData(e.target);
|
||||||
|
@ -49,5 +49,5 @@ export default defineConfig(async () => ({
|
|||||||
// 3. to make use of `TAURI_DEBUG` and other env variables
|
// 3. to make use of `TAURI_DEBUG` and other env variables
|
||||||
// https://tauri.app/v1/api/config#buildconfig.beforedevcommand
|
// https://tauri.app/v1/api/config#buildconfig.beforedevcommand
|
||||||
envPrefix: ["VITE_"],
|
envPrefix: ["VITE_"],
|
||||||
base: '',
|
base: '/', // relative paths sadly don't work with react router dom sub-dirs for some reason...
|
||||||
}));
|
}));
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { PdfFile } from "../wrappers/PdfFile";
|
import { PdfFile } from "../wrappers/PdfFile";
|
||||||
import { Action } from "../../declarations/Action";
|
import { Action } from "../../declarations/Action";
|
||||||
import Joi, { StringRegexOptions } from "@stirling-tools/joi";
|
import Joi from "@stirling-tools/joi";
|
||||||
import { MaterialSymbolProps } from "react-material-symbols";
|
import { MaterialSymbolProps } from "react-material-symbols";
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user