mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-11-30 22:45:46 +01:00
added community version
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"name": "schichtplan-backend",
|
||||
"license": "SEE LICENSE IN LICENSE.md",
|
||||
"author": "Patrick <dev.patrick@inca-vikingo.de>",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler"
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../premium" }
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"dist"
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# frontend/.env.development
|
||||
BROWSER=none
|
||||
FAST_REFRESH=true
|
||||
DANGEROUSLY_DISABLE_HOST_CHECK=true
|
||||
#BROWSER=none
|
||||
#FAST_REFRESH=true
|
||||
#DANGEROUSLY_DISABLE_HOST_CHECK=true
|
||||
18
frontend/config-override.js
Normal file
18
frontend/config-override.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// frontend/config-overrides.js
|
||||
const path = require('path');
|
||||
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
||||
|
||||
module.exports = function override(config) {
|
||||
// Erlaube Imports außerhalb von src/
|
||||
config.resolve.plugins = config.resolve.plugins.filter(
|
||||
plugin => !(plugin instanceof ModuleScopePlugin)
|
||||
);
|
||||
|
||||
// Alias konfigurieren
|
||||
config.resolve.alias = {
|
||||
...config.resolve.alias,
|
||||
'@premium-frontend': path.resolve(__dirname, '../premium/frontendPRO/src')
|
||||
};
|
||||
|
||||
return config;
|
||||
};
|
||||
@@ -12,28 +12,47 @@
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "^16.18.126",
|
||||
"@types/react": "^19.2.2",
|
||||
"@types/react-dom": "^19.2.1",
|
||||
"@types/react": "^18.0.28",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-router-dom": "^7.9.3",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-router-dom": "^6.8.0",
|
||||
"typescript": "^4.9.5",
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc --noEmit && vite build",
|
||||
"build:community": "vite build",
|
||||
"build:commercial": "git submodule update --init --recursive && ENABLE_PRO=true vite build",
|
||||
"preview": "vite preview"
|
||||
"start": "react-scripts start",
|
||||
"start:pro": "set REACT_APP_ENABLE_PRO=true&& react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"build:community": "react-scripts build",
|
||||
"build:commercial": "set REACT_APP_ENABLE_PRO=true && react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject",
|
||||
"type-check": "tsc --noEmit",
|
||||
"dev": "react-scripts start",
|
||||
"dev:pro": "set REACT_APP_ENABLE_PRO=true && react-scripts start"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.0.27",
|
||||
"@types/react-dom": "^18.0.10",
|
||||
"@types/node": "^20.0.0",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.8"
|
||||
"http-proxy-middleware": "^3.0.5",
|
||||
"react-scripts": "^5.0.1"
|
||||
}
|
||||
}
|
||||
@@ -20,40 +20,10 @@ import Setup from './pages/Setup/Setup';
|
||||
import FAQ from './components/Layout/FooterLinks/FAQ/FAQ';
|
||||
import About from './components/Layout/FooterLinks/About/About';
|
||||
import Features from './components/Layout/FooterLinks/Features/Features';
|
||||
import { CommunityContact, CommunityLegalPage } from './components/Layout/FooterLinks/CommunityLinks/communityLinks';
|
||||
|
||||
// Feature flag from environment
|
||||
const ENABLE_PRO = process.env.ENABLE_PRO === 'true';
|
||||
|
||||
// Community fallback components (always available)
|
||||
const CommunityContact: React.FC = () => (
|
||||
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
|
||||
<h1>📞 Kontakt</h1>
|
||||
<div style={{ backgroundColor: 'white', borderRadius: '12px', padding: '30px', marginTop: '20px' }}>
|
||||
<h2 style={{ color: '#2c3e50' }}>Community Edition</h2>
|
||||
<p>Kontaktfunktionen sind in der Premium Edition verfügbar.</p>
|
||||
<p>
|
||||
<a href="/features" style={{ color: '#3498db' }}>
|
||||
➡️ Zu den Features
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
const CommunityLegalPage: React.FC<{ title: string }> = ({ title }) => (
|
||||
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
|
||||
<h1>📄 {title}</h1>
|
||||
<div style={{ backgroundColor: 'white', borderRadius: '12px', padding: '30px', marginTop: '20px' }}>
|
||||
<h2 style={{ color: '#2c3e50' }}>Community Edition</h2>
|
||||
<p>Rechtliche Dokumentation ist in der Premium Edition verfügbar.</p>
|
||||
<p>
|
||||
<a href="/features" style={{ color: '#3498db' }}>
|
||||
➡️ Erfahren Sie mehr über Premium
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
const ENABLE_PRO = process.env.REACT_APP_ENABLE_PRO === 'true';
|
||||
|
||||
// Conditional Premium Components
|
||||
let PremiumContact: React.FC = CommunityContact;
|
||||
|
||||
@@ -182,20 +182,6 @@ const Footer: React.FC = () => {
|
||||
>
|
||||
Funktionen
|
||||
</a>
|
||||
<a
|
||||
href="/pricing"
|
||||
style={styles.footerLink}
|
||||
onMouseEnter={(e) => {
|
||||
e.currentTarget.style.color = '#FBFAF6';
|
||||
e.currentTarget.style.transform = 'translateX(4px)';
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
e.currentTarget.style.color = 'rgba(251, 250, 246, 0.7)';
|
||||
e.currentTarget.style.transform = 'translateX(0)';
|
||||
}}
|
||||
>
|
||||
Preise
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import React from 'react';
|
||||
|
||||
export const CommunityContact: React.FC = () => (
|
||||
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
|
||||
<h1>📞 Kontakt</h1>
|
||||
<div style={{ backgroundColor: 'white', borderRadius: '12px', padding: '30px', marginTop: '20px' }}>
|
||||
<h2 style={{ color: '#2c3e50' }}>Community Edition</h2>
|
||||
<p>Kontaktfunktionen sind in der Premium Edition verfügbar.</p>
|
||||
<p>
|
||||
<a href="/features" style={{ color: '#3498db' }}>
|
||||
➡️ Zu den Features
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
export const CommunityLegalPage: React.FC<{ title: string }> = ({ title }) => (
|
||||
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
|
||||
<h1>📄 {title}</h1>
|
||||
<div style={{ backgroundColor: 'white', borderRadius: '12px', padding: '30px', marginTop: '20px' }}>
|
||||
<h2 style={{ color: '#2c3e50' }}>Community Edition</h2>
|
||||
<p>Rechtliche Dokumentation ist in der Premium Edition verfügbar.</p>
|
||||
<p>
|
||||
<a href="/features" style={{ color: '#3498db' }}>
|
||||
➡️ Erfahren Sie mehr über Premium
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
// Optional: Barrel export für einfachere Imports
|
||||
export default {
|
||||
CommunityContact,
|
||||
CommunityLegalPage
|
||||
};
|
||||
@@ -1,22 +1,28 @@
|
||||
// frontend/tsconfig.json - SO FUNKTIONIERT ES
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"jsx": "react-jsx",
|
||||
"noEmit": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"target": "es5",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"moduleResolution": "bundler",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"paths": {
|
||||
"@premium-frontend/*": ["../premium/frontendPRO/src/*"]
|
||||
}
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
"ignoreDeprecations": "6.0",
|
||||
"downlevelIteration": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
"src"
|
||||
]
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
// frontend/vite.config.ts
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { resolve } from 'path';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, './src'),
|
||||
'@premium-frontend': resolve(__dirname, '../premium/frontendPRO/src')
|
||||
}
|
||||
},
|
||||
define: {
|
||||
'process.env.ENABLE_PRO': JSON.stringify(process.env.ENABLE_PRO === 'true')
|
||||
}
|
||||
});
|
||||
19979
package-lock.json
generated
19979
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
2
premium
2
premium
Submodule premium updated: 6da71aebad...ce4b3fd6e0
Reference in New Issue
Block a user