afront 1.0.22 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/.babelrc +13 -13
  2. package/.env +1 -1
  3. package/LICENSE +21 -21
  4. package/README.md +94 -94
  5. package/build-prod/index.html +1 -1
  6. package/build-prod/manifest.json +25 -25
  7. package/build-prod/offline.html +1023 -1023
  8. package/build-prod/robots.txt +3 -3
  9. package/build-prod-static/index.html +1 -1
  10. package/build-prod-static/manifest.json +25 -25
  11. package/build-prod-static/offline.html +1023 -1023
  12. package/build-prod-static/robots.txt +3 -3
  13. package/install.js +415 -415
  14. package/package.json +102 -95
  15. package/server.js +40 -40
  16. package/src/ARoutes/AFRoutes.js +28 -28
  17. package/src/Api/api.config.js +266 -266
  18. package/src/Api/login.service.js +44 -44
  19. package/src/App.js +28 -28
  20. package/src/Components/Background/MeshGradient.js +18 -18
  21. package/src/Components/Footer/Footer.js +108 -108
  22. package/src/Components/Header/Header.js +149 -149
  23. package/src/Components/Loading/LoadingIndicator.js +12 -12
  24. package/src/Components/Loading/LoadingIndicator.module.css +34 -34
  25. package/src/Components/Loading/LoadingSpinner.js +27 -27
  26. package/src/Components/Loading/LoadingSpinner.module.css +100 -100
  27. package/src/Components/RequireAuth.js +29 -29
  28. package/src/LoadingFallback.js +13 -13
  29. package/src/PageNotFound.js +19 -19
  30. package/src/Pages/Home.js +50 -50
  31. package/src/Pages/Signup.js +230 -230
  32. package/src/Pages/Support.js +68 -68
  33. package/src/Routes/ARoutes.js +66 -66
  34. package/src/Routes/ARoutesStatic.js +83 -83
  35. package/src/Static/appStatic.js +16 -16
  36. package/src/Static/indexStatic.js +13 -13
  37. package/src/Style/App.module.css +11 -11
  38. package/src/Style/MeshGradient.module.css +130 -130
  39. package/src/Style/PageNotFound.module.css +37 -37
  40. package/src/Style/Style.module.css +686 -686
  41. package/src/Style/Support.module.css +185 -185
  42. package/src/Utils/LoadingContext.js +5 -5
  43. package/src/index.js +25 -25
  44. package/webpack.build-prod.js +141 -140
  45. package/webpack.dev.js +127 -127
  46. package/webpack.prod.js +148 -147
  47. package/webpack.ssr.prod.js +97 -97
@@ -1,141 +1,142 @@
1
- const htmlWebpackPlugin = require("html-webpack-plugin");
2
- const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');
3
- const MiniCssExtractPlugin = require("mini-css-extract-plugin");
4
- const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
5
- const TerserWebpackPlugin = require("terser-webpack-plugin");
6
-
7
- const CopyWebpackPlugin = require("copy-webpack-plugin");
8
- const path = require("path");
9
- const crypto = require("crypto");
10
-
11
- module.exports = {
12
- mode: "production",
13
- entry: "./src/Static/indexStatic.js",
14
- output: {
15
- filename: "static/js/[name]-[contenthash].js",
16
- path: path.resolve(__dirname, "build-prod-static"),
17
- publicPath: "/",
18
- clean: true,
19
- },
20
- module: {
21
- rules: [
22
- {
23
- test: /\.js$/,
24
- exclude: /node_modules/,
25
- use: [
26
- {
27
- loader: "babel-loader",
28
- options: {
29
- configFile: path.resolve(__dirname, "./.babelrc"),
30
- },
31
- },
32
- ],
33
- },
34
- {
35
- test: /\.css$/,
36
- use: [
37
- MiniCssExtractPlugin.loader,
38
- {
39
- loader: "css-loader",
40
- options: {
41
- modules: {
42
- localIdentName: "asggen-[hash:base64:7]",
43
- },
44
- sourceMap: true,
45
- },
46
- },
47
- ],
48
- },
49
- {
50
- test: /\.(png|jpe?g|gif|svg)$/,
51
- type: "asset/resource",
52
- generator: {
53
- filename: "static/media/[contenthash][ext]",
54
- },
55
- },
56
- {
57
- test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/,
58
- type: "asset/resource",
59
- generator: {
60
- filename: "static/media/[name][ext]",
61
- },
62
- },
63
- {
64
- test: /\.(woff|woff2|eot|ttf|otf)$/,
65
- type: "asset/resource",
66
- generator: {
67
- filename: "static/fonts/[name][ext]",
68
- },
69
- },
70
- ],
71
- },
72
- optimization: {
73
- minimizer: [
74
- new TerserWebpackPlugin({
75
- terserOptions: {
76
- compress: {
77
- drop_console: false,
78
- },
79
- format: {
80
- comments: false, // Remove all comments
81
- },
82
- },
83
- extractComments: false, // Do not extract comments to a separate file
84
- }),
85
- new CssMinimizerPlugin(),
86
- ],
87
- },
88
- plugins: [
89
- new htmlWebpackPlugin({
90
- title: "AFront",
91
- template: "./dev/index.html",
92
- buildTag: `prod-[contenthash]`,
93
- hash: true,
94
- minify: {
95
- removeComments: true,
96
- collapseWhitespace: true,
97
- minifyCSS: true,
98
- minifyJS: true,
99
- },
100
- templateParameters: (compilation, options) => {
101
- const hash = crypto.createHash("sha256");
102
- hash.update(compilation.hash);
103
- const sha256Hash = hash.digest("hex");
104
- return {
105
- htmlWebpackPlugin: {
106
- options: {
107
- title: "AFront",
108
- buildTag: `prod-${sha256Hash}`,
109
- },
110
- },
111
- };
112
- },
113
- }),
114
- new CspHtmlWebpackPlugin({
115
- "default-src": ["'self'"],
116
- "script-src": ["'self'"],
117
- "style-src": ["'self'", "https://fonts.googleapis.com", "'unsafe-hashes'"],
118
- "style-src-elem": ["'self'", "https://fonts.googleapis.com", "https://fonts.gstatic.com"],
119
- "font-src": ["'self'", "https://fonts.gstatic.com"]
120
- }, {
121
- hashingMethod: 'sha256',
122
- hashEnabled: { 'script-src': true, 'style-src': true }
123
- }),
124
- new MiniCssExtractPlugin({
125
- filename: "static/css/[name]-[contenthash].css",
126
- }),
127
- new CopyWebpackPlugin({
128
- patterns: [
129
- { from: "dev/favicon.ico", to: "favicon.ico" }, // Copy favicon
130
- { from: "dev/logo192.png", to: "logo192.png" }, // Copy logo192
131
- { from: "dev/logo512.png", to: "logo512.png" }, // Copy logo512
132
- { from: "dev/manifest.json", to: "manifest.json" }, // Copy manifest
133
- { from: "dev/style.css", to: "style.css" },
134
- { from: "dev/inline.js", to: "inline.js" },
135
- { from: "dev/robots.txt", to: "robots.txt" },
136
- { from: "dev/service-worker.js", to: "service-worker.js" },
137
- { from: "dev/offline.html", to: "offline.html" },
138
- ],
139
- }),
140
- ],
1
+ const htmlWebpackPlugin = require("html-webpack-plugin");
2
+ const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');
3
+ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
4
+ const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
5
+ const TerserWebpackPlugin = require("terser-webpack-plugin");
6
+
7
+ const CopyWebpackPlugin = require("copy-webpack-plugin");
8
+ const path = require("path");
9
+ const crypto = require("crypto");
10
+
11
+ module.exports = {
12
+ mode: "production",
13
+ entry: "./src/Static/indexStatic.js",
14
+ output: {
15
+ filename: "static/js/[name]-[contenthash].js",
16
+ path: path.resolve(__dirname, "build-prod-static"),
17
+ publicPath: "/",
18
+ clean: true,
19
+ },
20
+ module: {
21
+ rules: [
22
+ {
23
+ test: /\.js$/,
24
+ exclude: /node_modules/,
25
+ use: [
26
+ {
27
+ loader: "babel-loader",
28
+ options: {
29
+ configFile: path.resolve(__dirname, "./.babelrc"),
30
+ },
31
+ },
32
+ ],
33
+ },
34
+ {
35
+ test: /\.css$/,
36
+ use: [
37
+ MiniCssExtractPlugin.loader,
38
+ {
39
+ loader: "css-loader",
40
+ options: {
41
+ modules: {
42
+ localIdentName: "asggen-[hash:base64:7]",
43
+ },
44
+ sourceMap: true,
45
+ },
46
+ },
47
+ ],
48
+ },
49
+ {
50
+ test: /\.(png|jpe?g|gif|svg)$/,
51
+ type: "asset/resource",
52
+ generator: {
53
+ filename: "static/media/[contenthash][ext]",
54
+ },
55
+ },
56
+ {
57
+ test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/,
58
+ type: "asset/resource",
59
+ generator: {
60
+ filename: "static/media/[name][ext]",
61
+ },
62
+ },
63
+ {
64
+ test: /\.(woff|woff2|eot|ttf|otf)$/,
65
+ type: "asset/resource",
66
+ generator: {
67
+ filename: "static/fonts/[name][ext]",
68
+ },
69
+ },
70
+ ],
71
+ },
72
+ optimization: {
73
+ minimizer: [
74
+ new TerserWebpackPlugin({
75
+ terserOptions: {
76
+ compress: {
77
+ drop_console: false,
78
+ },
79
+ format: {
80
+ comments: false, // Remove all comments
81
+ },
82
+ },
83
+ extractComments: false, // Do not extract comments to a separate file
84
+ }),
85
+ new CssMinimizerPlugin(),
86
+ ],
87
+ },
88
+ plugins: [
89
+ new htmlWebpackPlugin({
90
+ title: "AFront",
91
+ template: "./dev/index.html",
92
+ buildTag: `prod-[contenthash]`,
93
+ hash: true,
94
+ minify: {
95
+ removeComments: true,
96
+ collapseWhitespace: true,
97
+ minifyCSS: true,
98
+ minifyJS: true,
99
+ },
100
+ templateParameters: (compilation, options) => {
101
+ const hash = crypto.createHash("sha256");
102
+ hash.update(compilation.hash);
103
+ const sha256Hash = hash.digest("hex");
104
+ return {
105
+ htmlWebpackPlugin: {
106
+ options: {
107
+ title: "AFront",
108
+ buildTag: `prod-${sha256Hash}`,
109
+ },
110
+ },
111
+ };
112
+ },
113
+ }),
114
+ new CspHtmlWebpackPlugin({
115
+ "default-src": ["'self'"],
116
+ "connect-src": ["'self'", "wss:"],
117
+ "script-src": ["'self'"],
118
+ "style-src": ["'self'", "https://fonts.googleapis.com", "'unsafe-hashes'"],
119
+ "style-src-elem": ["'self'", "https://fonts.googleapis.com", "https://fonts.gstatic.com"],
120
+ "font-src": ["'self'", "https://fonts.gstatic.com"]
121
+ }, {
122
+ hashingMethod: 'sha256',
123
+ hashEnabled: { 'script-src': true, 'style-src': true }
124
+ }),
125
+ new MiniCssExtractPlugin({
126
+ filename: "static/css/[name]-[contenthash].css",
127
+ }),
128
+ new CopyWebpackPlugin({
129
+ patterns: [
130
+ { from: "dev/favicon.ico", to: "favicon.ico" }, // Copy favicon
131
+ { from: "dev/logo192.png", to: "logo192.png" }, // Copy logo192
132
+ { from: "dev/logo512.png", to: "logo512.png" }, // Copy logo512
133
+ { from: "dev/manifest.json", to: "manifest.json" }, // Copy manifest
134
+ { from: "dev/style.css", to: "style.css" },
135
+ { from: "dev/inline.js", to: "inline.js" },
136
+ { from: "dev/robots.txt", to: "robots.txt" },
137
+ { from: "dev/service-worker.js", to: "service-worker.js" },
138
+ { from: "dev/offline.html", to: "offline.html" },
139
+ ],
140
+ }),
141
+ ],
141
142
  };
package/webpack.dev.js CHANGED
@@ -1,128 +1,128 @@
1
- const htmlWebpackPlugin = require("html-webpack-plugin");
2
- const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');
3
- const path = require("path");
4
- const MiniCssExtractPlugin = require("mini-css-extract-plugin");
5
- const TerserWebpackPlugin = require("terser-webpack-plugin");
6
- const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
7
- const crypto = require("crypto");
8
-
9
- module.exports = {
10
- mode: "development",
11
- entry: "./src/index.js",
12
- devtool: "cheap-module-source-map",
13
- devServer: {
14
- static: {
15
- directory: path.join(__dirname, "dev"),
16
- },
17
- port: 9999,
18
- open: true,
19
- historyApiFallback: true,
20
- headers: {
21
- // Dev server: send a permissive CSP header to avoid blocking during development.
22
- // This header is intentionally more permissive than the production meta tag.
23
- "Content-Security-Policy": "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com"
24
- }
25
- },
26
- output: {
27
- filename: "[name].bundle.js",
28
- path: `${__dirname}/dev`,
29
- publicPath: "/",
30
- clean: true,
31
- },
32
- module: {
33
- rules: [
34
- {
35
- test: /\.js$/,
36
- exclude: /node_modules/,
37
- use: [
38
- {
39
- loader: "babel-loader",
40
- options: {
41
- configFile: path.resolve(__dirname, "./.babelrc"),
42
- },
43
- },
44
- ],
45
- },
46
- {
47
- test: /\.module\.css$/,
48
- use: [
49
- MiniCssExtractPlugin.loader,
50
- {
51
- loader: "css-loader",
52
- options: {
53
- modules: {
54
- localIdentName: "[local]",
55
- },
56
- },
57
- },
58
- ],
59
- },
60
- {
61
- test: /\.css$/,
62
- exclude: /\.module\.css$/,
63
- use: [MiniCssExtractPlugin.loader, "css-loader"],
64
- },
65
- {
66
- test: /\.(png|jpe?g|gif|svg)$/,
67
- type: "asset/resource",
68
- generator: {
69
- filename: "static/media/[name][ext]",
70
- },
71
- },
72
- {
73
- test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/,
74
- type: "asset/resource",
75
- generator: {
76
- filename: "static/media/[name][ext]",
77
- },
78
- },
79
- {
80
- test: /\.(woff|woff2|eot|ttf|otf)$/,
81
- type: "asset/resource",
82
- generator: {
83
- filename: "static/fonts/[name][ext]",
84
- },
85
- },
86
- ],
87
- },
88
- optimization: {
89
- minimizer: [new TerserWebpackPlugin(), new CssMinimizerPlugin()],
90
- },
91
- resolve: {
92
- extensions: [".js", ".jsx", ".ts", ".tsx"],
93
- },
94
- plugins: [
95
- new MiniCssExtractPlugin({
96
- filename: "static/css/[name].bundle.css",
97
- }),
98
- new htmlWebpackPlugin({
99
- title: "AFront",
100
- template: `${__dirname}/dev/index.html`,
101
- filename: "index.html",
102
- hash: true, // This will add the hash in the injected scripts
103
- templateParameters: (compilation) => {
104
- const hash = crypto.createHash("sha256");
105
- hash.update(compilation.hash);
106
- const sha256Hash = hash.digest("hex");
107
- return {
108
- htmlWebpackPlugin: {
109
- options: {
110
- title: "AFront",
111
- buildTag: `dev-${sha256Hash}`, // Set the build tag with the hash for dev
112
- },
113
- },
114
- };
115
- },
116
- }),
117
- new CspHtmlWebpackPlugin({
118
- "default-src": ["'self'"],
119
- "script-src": ["'self'"],
120
- "style-src": ["'self'", "https://fonts.googleapis.com", "'unsafe-hashes'"],
121
- "style-src-elem": ["'self'", "https://fonts.googleapis.com", "https://fonts.gstatic.com"],
122
- "font-src": ["'self'", "https://fonts.gstatic.com"]
123
- }, {
124
- hashingMethod: 'sha256',
125
- hashEnabled: { 'script-src': true, 'style-src': true }
126
- }),
127
- ],
1
+ const htmlWebpackPlugin = require("html-webpack-plugin");
2
+ const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');
3
+ const path = require("path");
4
+ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
5
+ const TerserWebpackPlugin = require("terser-webpack-plugin");
6
+ const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
7
+ const crypto = require("crypto");
8
+
9
+ module.exports = {
10
+ mode: "development",
11
+ entry: "./src/index.js",
12
+ devtool: "cheap-module-source-map",
13
+ devServer: {
14
+ static: {
15
+ directory: path.join(__dirname, "dev"),
16
+ },
17
+ port: 9999,
18
+ open: true,
19
+ historyApiFallback: true,
20
+ headers: {
21
+ // Dev server: send a permissive CSP header to avoid blocking during development.
22
+ // This header is intentionally more permissive than the production meta tag.
23
+ "Content-Security-Policy": "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com"
24
+ }
25
+ },
26
+ output: {
27
+ filename: "[name].bundle.js",
28
+ path: `${__dirname}/dev`,
29
+ publicPath: "/",
30
+ clean: true,
31
+ },
32
+ module: {
33
+ rules: [
34
+ {
35
+ test: /\.js$/,
36
+ exclude: /node_modules/,
37
+ use: [
38
+ {
39
+ loader: "babel-loader",
40
+ options: {
41
+ configFile: path.resolve(__dirname, "./.babelrc"),
42
+ },
43
+ },
44
+ ],
45
+ },
46
+ {
47
+ test: /\.module\.css$/,
48
+ use: [
49
+ MiniCssExtractPlugin.loader,
50
+ {
51
+ loader: "css-loader",
52
+ options: {
53
+ modules: {
54
+ localIdentName: "[local]",
55
+ },
56
+ },
57
+ },
58
+ ],
59
+ },
60
+ {
61
+ test: /\.css$/,
62
+ exclude: /\.module\.css$/,
63
+ use: [MiniCssExtractPlugin.loader, "css-loader"],
64
+ },
65
+ {
66
+ test: /\.(png|jpe?g|gif|svg)$/,
67
+ type: "asset/resource",
68
+ generator: {
69
+ filename: "static/media/[name][ext]",
70
+ },
71
+ },
72
+ {
73
+ test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/,
74
+ type: "asset/resource",
75
+ generator: {
76
+ filename: "static/media/[name][ext]",
77
+ },
78
+ },
79
+ {
80
+ test: /\.(woff|woff2|eot|ttf|otf)$/,
81
+ type: "asset/resource",
82
+ generator: {
83
+ filename: "static/fonts/[name][ext]",
84
+ },
85
+ },
86
+ ],
87
+ },
88
+ optimization: {
89
+ minimizer: [new TerserWebpackPlugin(), new CssMinimizerPlugin()],
90
+ },
91
+ resolve: {
92
+ extensions: [".js", ".jsx", ".ts", ".tsx"],
93
+ },
94
+ plugins: [
95
+ new MiniCssExtractPlugin({
96
+ filename: "static/css/[name].bundle.css",
97
+ }),
98
+ new htmlWebpackPlugin({
99
+ title: "AFront",
100
+ template: `${__dirname}/dev/index.html`,
101
+ filename: "index.html",
102
+ hash: true, // This will add the hash in the injected scripts
103
+ templateParameters: (compilation) => {
104
+ const hash = crypto.createHash("sha256");
105
+ hash.update(compilation.hash);
106
+ const sha256Hash = hash.digest("hex");
107
+ return {
108
+ htmlWebpackPlugin: {
109
+ options: {
110
+ title: "AFront",
111
+ buildTag: `dev-${sha256Hash}`, // Set the build tag with the hash for dev
112
+ },
113
+ },
114
+ };
115
+ },
116
+ }),
117
+ new CspHtmlWebpackPlugin({
118
+ "default-src": ["'self'"],
119
+ "script-src": ["'self'"],
120
+ "style-src": ["'self'", "https://fonts.googleapis.com", "'unsafe-hashes'"],
121
+ "style-src-elem": ["'self'", "https://fonts.googleapis.com", "https://fonts.gstatic.com"],
122
+ "font-src": ["'self'", "https://fonts.gstatic.com"]
123
+ }, {
124
+ hashingMethod: 'sha256',
125
+ hashEnabled: { 'script-src': true, 'style-src': true }
126
+ }),
127
+ ],
128
128
  };