vite_deleteelectron

This commit is contained in:
2026-08-09 21:02:10 +03:00
parent 5d2fc5773c
commit 4ba9dd8012
99 changed files with 7080 additions and 48649 deletions
+27
View File
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Инфокиоск"
/>
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<title>Инфокиоск</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
<style>
.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }
</style>
</body>
</html>
+5039 -18830
View File
File diff suppressed because it is too large Load Diff
+22 -40
View File
@@ -4,38 +4,26 @@
"private": true,
"main": "public/electron.js",
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^19.2.0",
"@types/react-dom": "^19.2.0",
"dotenv": "^17.4.2",
"electron-is-dev": "^2.0.0",
"fs": "^0.0.1-security",
"http": "^0.0.1-security",
"https": "^1.0.0",
"mammoth": "^1.9.1",
"os": "^0.1.2",
"path": "^0.12.7",
"pdfjs-dist": "2.16.105",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-pdf": "6.2.2",
"react-scripts": "5.0.1",
"pdfjs-dist": "^4.10.38",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-pdf": "^10.0.0",
"serialport": "^13.0.0",
"stream": "^0.0.3",
"textract": "^2.5.0",
"typescript": "^4.8.4",
"util": "^0.12.5",
"web-vitals": "^2.1.4",
"zlib": "^1.0.5"
"typescript": "^5.8.0",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"start": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview",
"test": "vitest",
"electron-dev": "concurrently \"npm start\" \"wait-on http://localhost:3000 && electron .\"",
"electron-pack": "electron-builder -c.extraMetadata.main=build/electron.js",
"preelectron-pack": "npm run build",
@@ -79,21 +67,15 @@
]
},
"devDependencies": {
"@types/react-pdf": "^6.2.0",
"buffer": "^6.0.3",
"@types/jest": "^29.5.14",
"@types/node": "^26.2.0",
"@vitejs/plugin-react": "^4.7.0",
"concurrently": "^7.5.0",
"crypto-browserify": "^3.12.1",
"electron": "^21.2.0",
"electron-builder": "^23.6.0",
"electron": "^37.0.0",
"electron-builder": "^26.15.3",
"electron-rebuild": "^3.2.9",
"https-browserify": "^1.0.0",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"querystring-es3": "^0.2.1",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"url": "^0.11.4",
"vite": "^6.0.0",
"vitest": "^2.1.8",
"wait-on": "^6.0.1"
}
}
-49
View File
@@ -1,49 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Инфокиоск</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<style>
.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }
</style>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
+1 -1
View File
@@ -1,7 +1,7 @@
import React from 'react';
import { Document, Page, pdfjs } from 'react-pdf';
pdfjs.GlobalWorkerOptions.workerSrc = '/pdf.worker.js';
pdfjs.GlobalWorkerOptions.workerSrc = '/pdf.worker.min.mjs';
interface PayslipViewerProps {
fileUrl: string;
-4
View File
@@ -6,10 +6,6 @@ declare module '*.gif';
declare module '*.bmp';
declare module '*.tiff';
declare module 'fs';
declare module 'path';
declare module 'os';
interface Config {
backendUrl: string;
}
+1 -1
View File
@@ -1 +1 @@
/// <reference types="react-scripts" />
/// <reference types="vite/client" />
-18
View File
@@ -1,18 +0,0 @@
declare module 'textract' {
interface TextractOptions {
preserveLineBreaks?: boolean;
preserveOnlyMultipleLineBreaks?: boolean;
[key: string]: any;
}
function fromBufferWithMime(
mimeType: string,
buffer: Buffer,
options: TextractOptions,
callback: (error: Error | null, text: string) => void
): void;
export = {
fromBufferWithMime
};
}
+7 -5
View File
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"target": "es5",
"target": "ES2020",
"lib": [
"dom",
"dom.iterable",
"es6"
"ES2020"
],
"allowJs": true,
"skipLibCheck": true,
@@ -13,18 +13,20 @@
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"module": "ESNext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"types": ["vite/client", "node"],
"typeRoots": [
"./node_modules/@types",
"./src/types"
]
},
"include": [
"src"
"src",
"vite.config.js"
]
}
+21
View File
@@ -0,0 +1,21 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { fileURLToPath, URL } from 'node:url';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: './',
build: {
outDir: 'build',
emptyOutDir: true,
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
port: 3000,
},
});