@galadrim/galadmin 0.0.57 → 0.0.58
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.
- package/package.json +1 -1
- package/src/front/build/asset-manifest.json +7 -7
- package/src/front/build/index.html +1 -1
- package/src/front/build/static/js/2.88bb9cea.chunk.js +3 -0
- package/src/front/build/static/js/{2.a36e796c.chunk.js.LICENSE.txt → 2.88bb9cea.chunk.js.LICENSE.txt} +0 -0
- package/src/front/build/static/js/2.88bb9cea.chunk.js.map +1 -0
- package/src/front/build/static/js/main.538d60f2.chunk.js +2 -0
- package/src/front/build/static/js/main.538d60f2.chunk.js.map +1 -0
- package/src/front/node_modules/.cache/.eslintcache +1 -1
- package/src/front/node_modules/.cache/babel-loader/4b3b5abfa752c54455d4121d45617b4c.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/f4b762bafa9d1a3fcfbe0c8e214442c1.json +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/02/1c/cd922a30b837866c304e653fd02dc10a713290b65b1a3f8ab96fac6e8d3d8153afdd05cd2f39ac5a2b666bbc7c16e0a5a909a50abc0640d631f50f2d5405 +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/21/93/c3bc4fffd829420b2e1fc2e1161d849042e695144793b2b52b65c973a95539804860e887a81c32ad2434a36361605b9b118c63a16a9a6b7fad8f5532ef5c +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/32/f1/8264252bcf7c4f98cde13450968b415f55003188f30504894efa85c8e42b +2 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/94/66/ea374838e414978c9e1d038e6fb5566cfbb76aee4b68c295fa393fa77633 +2 -0
- package/src/front/src/App.js +5 -1
- package/src/front/src/components/RedirectToFirstView.js +24 -0
- package/src/front/build/static/js/2.a36e796c.chunk.js +0 -3
- package/src/front/build/static/js/2.a36e796c.chunk.js.map +0 -1
- package/src/front/build/static/js/main.6ea0ec11.chunk.js +0 -2
- package/src/front/build/static/js/main.6ea0ec11.chunk.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
3783de34454a1b346cfb4d5d22737bb32297e67c {"key":"{\"terser\":\"5.7.1\",\"terser-webpack-plugin\":\"4.2.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.[cm]?js(\\\\?.*)?$\", \"i\"),\"extractComments\":true,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"parse\":{\"ecma\":8},\"compress\":{\"ecma\":5,\"warnings\":false,\"comparisons\":false,\"inline\":2},\"mangle\":{\"safari10\":true},\"keep_classnames\":false,\"keep_fnames\":false,\"output\":{\"ecma\":5,\"comments\":false,\"ascii_only\":true},\"ecma\":5}},\"name\":\"static\\u002Fjs\\u002F2.88bb9cea.chunk.js\",\"contentHash\":\"01567565c347bca09e20\"}","integrity":"sha512-AhzNkiowuDeGbDBOZT/QLcEKcTKQtlsaP4q5b6xujT2BU6/dBc0vOaxaK2ZrvHwW4KWpCaUKvAZA1jH1Dy1UBQ==","time":1640165128702,"size":1866754}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
f1c685a09562c183a3866232d216b022e7859e5c {"key":"{\"terser\":\"5.7.1\",\"terser-webpack-plugin\":\"4.2.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.[cm]?js(\\\\?.*)?$\", \"i\"),\"extractComments\":true,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"parse\":{\"ecma\":8},\"compress\":{\"ecma\":5,\"warnings\":false,\"comparisons\":false,\"inline\":2},\"mangle\":{\"safari10\":true},\"keep_classnames\":false,\"keep_fnames\":false,\"output\":{\"ecma\":5,\"comments\":false,\"ascii_only\":true},\"ecma\":5}},\"name\":\"static\\u002Fjs\\u002Fmain.538d60f2.chunk.js\",\"contentHash\":\"ad1408eaec56cf1b524c\"}","integrity":"sha512-IZPDvE//2ClCCy4fwuEWHYSQQuaVFEeTsrUrZclzqVU5gEhg6IeoHDKtJDSjY2FgW5sRjGOhapprf62PVTLvXA==","time":1640165125795,"size":334780}
|
package/src/front/src/App.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
import { useEffect, useState } from "react";
|
|
7
7
|
import './App.css';
|
|
8
8
|
import Sidebar from './components/Sidebar'
|
|
9
|
+
import RedirectToFirstView from './components/RedirectToFirstView'
|
|
9
10
|
import CreateRecord from './pages/CreateRecord'
|
|
10
11
|
import EditRecord from './pages/EditRecord'
|
|
11
12
|
import Records from './pages/Records'
|
|
@@ -17,7 +18,7 @@ import { ConfigProvider } from './contexts/ConfigContext'
|
|
|
17
18
|
import axios from "axios";
|
|
18
19
|
|
|
19
20
|
axios.defaults.withCredentials = true;
|
|
20
|
-
axios.defaults.baseURL = process.env.NODE_ENV === "development" ? 'http://localhost
|
|
21
|
+
axios.defaults.baseURL = process.env.NODE_ENV === "development" ? 'http://localhost/admin/api' : '/_HOMEPAGE_/api';
|
|
21
22
|
|
|
22
23
|
function App() {
|
|
23
24
|
const [isAuthenticated, setIsAuthenticated] = useState(null);
|
|
@@ -53,6 +54,9 @@ function App() {
|
|
|
53
54
|
<Route path="/customView/:viewIndex">
|
|
54
55
|
<CustomView />
|
|
55
56
|
</Route>
|
|
57
|
+
<Route path="/">
|
|
58
|
+
<RedirectToFirstView />
|
|
59
|
+
</Route>
|
|
56
60
|
</Switch>
|
|
57
61
|
</Router>
|
|
58
62
|
</ConfigProvider>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useContext } from "react"
|
|
2
|
+
import {
|
|
3
|
+
Redirect
|
|
4
|
+
} from "react-router-dom";
|
|
5
|
+
import { ConfigContext } from '../contexts/ConfigContext'
|
|
6
|
+
|
|
7
|
+
export default () => {
|
|
8
|
+
const config = useContext(ConfigContext)
|
|
9
|
+
const firstView = config.views[0]
|
|
10
|
+
|
|
11
|
+
if (!firstView) {
|
|
12
|
+
return null
|
|
13
|
+
}
|
|
14
|
+
if (firstView.type === "table") {
|
|
15
|
+
return <Redirect to="/records/0" />
|
|
16
|
+
}
|
|
17
|
+
if (firstView.type === "iframe") {
|
|
18
|
+
return <Redirect to="/iframe/0" />
|
|
19
|
+
}
|
|
20
|
+
if (firstView.type === "custom") {
|
|
21
|
+
return <Redirect to="/customView/0" />
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|