Compare commits

...
Author SHA1 Message Date
prafull-opensignlabsandGitHub 72401291f8 Delete apps/OpenSign/vite.public-template.config.js 2025-05-14 20:24:54 +05:30
prafull-opensignlabsandGitHub 7b34314b9e Merge pull request #1733 from OpenSignLabs/updates-15023728155
fix: correct build commands for selfhosting
2025-05-14 20:13:14 +05:30
prafull-opensignlabs b6f1cceeca Merge pull request #612 from OpenSignLabs/staging
fix: correct build commands for selfhosting
2025-05-14 14:42:30 +00:00
prafull-opensignlabsandGitHub c422cdac06 Merge pull request #1732 from OpenSignLabs/updates-15023371589
fix: edit template option not visible in mobile view
2025-05-14 20:00:02 +05:30
prafull-opensignlabsandGitHub ab08d2615d Update package.json 2025-05-14 19:59:01 +05:30
prafull-opensignlabs 2b0c7488d9 Merge pull request #610 from OpenSignLabs/staging
fix: edit template option not visible in mobile view
2025-05-14 14:27:57 +00:00
3 changed files with 16 additions and 46 deletions
+2 -5
View File
@@ -61,17 +61,14 @@
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
},
"scripts": {
"build-template-win": "vite build --config vite.public-template.config.js",
"build-template": "NODE_OPTIONS=\"--max-old-space-size=8192\" vite build --config vite.public-template.config.js",
"build": "npm run version && react-scripts build",
"build-template-watch": "NODE_OPTIONS=\"--max-old-space-size=8192\" vite build --config vite.public-template.config.js --watch",
"build": "npm run version && NODE_OPTIONS=\"--max-old-space-size=8192\" vite build",
"start-dev": "vite",
"dev": "vite",
"preview": "vite preview",
"start": "serve -s build",
"version": "curl -s https://api.github.com/repos/opensignlabs/opensign/releases/latest | grep '\"tag_name\":' | awk -F '\"' '{print $4}' > ./public/version.txt",
"version-win": "powershell -Command \"Invoke-RestMethod -Uri 'https://api.github.com/repos/opensignlabs/opensign/releases/latest' | Select-Object -ExpandProperty tag_name | Out-File -FilePath ./public/version.txt\"",
"build-win": "npm run version-win && react-scripts build",
"build-win": "npm run version-win && vite build",
"test": "vitest run",
"test:watch": "vitest",
"release": "standard-version",
@@ -276,6 +276,20 @@ function Header(props) {
className="bg-white shadow-md rounded-md px-3 py-2"
sideOffset={5}
>
{props?.setIsEditTemplate && (
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => props?.setIsEditTemplate(true)}
>
<div className="flex flex-row">
<i
className="fa-light fa-gear mr-[3px]"
aria-hidden="true"
></i>
<span className="font-[500]">{t("Edit")}</span>
</div>
</DropdownMenu.Item>
)}
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() =>
@@ -1,41 +0,0 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import rollupNodePolyFill from "rollup-plugin-node-polyfills";
export default defineConfig({
plugins: [react()],
define: {
"process.env.NODE_ENV": JSON.stringify("production"),
process: JSON.stringify({
env: {
NODE_ENV: "production"
}
})
},
build: {
lib: {
entry: path.resolve(__dirname, "src/ee/script/PublicTemplate.jsx"),
name: "PublicTemplate",
fileName: () => `public-template.bundle.js`,
formats: ["iife"]
},
outDir: "public/static/js",
emptyOutDir: false,
assetsInlineLimit: 0,
copyPublicDir: false,
rollupOptions: {
plugins: [rollupNodePolyFill()],
output: {
// 👇 Controls how asset files (like CSS) are named
assetFileNames: (assetInfo) => {
if (assetInfo.name && assetInfo.name.endsWith(".css")) {
return "public-template.bundle.css"; // Custom CSS filename
}
return "[name].[ext]";
},
globals: {}
}
}
}
});