@localazy/strapi-plugin 0.1.12-rc.2 → 0.1.12-rc.4
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/admin/src/modules/@common/utils/get-nav.js +1 -1
- package/admin/src/modules/@common/utils/redirect-to-plugin-route.js +2 -2
- package/admin/src/modules/plugin-settings/components/ContentTransferSetup/index.js +1 -1
- package/admin/src/pages/App/index.js +4 -4
- package/admin/src/utils/createAxiosInstance.js +3 -2
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import Upload from "@strapi/icons/Upload";
|
|
|
5
5
|
import pluginId from "../../../pluginId";
|
|
6
6
|
import i18n from "../../../i18n";
|
|
7
7
|
|
|
8
|
-
const BASE_PATH = `${process.env.
|
|
8
|
+
const BASE_PATH = `${process.env.ADMIN_PATH}plugins/${pluginId}`;
|
|
9
9
|
const t = i18n.t;
|
|
10
10
|
const gevNav = () => {
|
|
11
11
|
return [
|
|
@@ -13,10 +13,10 @@ export const PLUGIN_ROUTES = {
|
|
|
13
13
|
|
|
14
14
|
export default (route) => {
|
|
15
15
|
if (route === PLUGIN_ROUTES.CONTENT_TRANSFER_SETUP) {
|
|
16
|
-
history.push(`${process.env.
|
|
16
|
+
history.push(`${process.env.ADMIN_PATH}settings/${pluginId}/${route}`);
|
|
17
17
|
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
history.push(`${process.env.
|
|
21
|
+
history.push(`${process.env.ADMIN_PATH}plugins/${pluginId}/${route}`);
|
|
22
22
|
};
|
|
@@ -198,7 +198,7 @@ function ContentTransferSetup() {
|
|
|
198
198
|
|
|
199
199
|
return (
|
|
200
200
|
<>
|
|
201
|
-
{!isLoading && !isLoggedIn && <Redirect to={`${process.env.
|
|
201
|
+
{!isLoading && !isLoggedIn && <Redirect to={`${process.env.ADMIN_PATH}plugins/${pluginId}/login`} />}
|
|
202
202
|
|
|
203
203
|
<HeaderLayout
|
|
204
204
|
title={t("plugin_settings.content_transfer_setup")}
|
|
@@ -110,7 +110,7 @@ function App() {
|
|
|
110
110
|
<>
|
|
111
111
|
{!isLoggedIn && (
|
|
112
112
|
<Switch>
|
|
113
|
-
<Route path={`${process.env.
|
|
113
|
+
<Route path={`${process.env.ADMIN_PATH}plugins/${pluginId}/login`} exact>
|
|
114
114
|
<Login
|
|
115
115
|
title={headerTitle}
|
|
116
116
|
subtitle={headerSubtitle}
|
|
@@ -121,19 +121,19 @@ function App() {
|
|
|
121
121
|
|
|
122
122
|
{isLoggedIn && (
|
|
123
123
|
<Switch>
|
|
124
|
-
<Route path={`${process.env.
|
|
124
|
+
<Route path={`${process.env.ADMIN_PATH}plugins/${pluginId}/download`} exact>
|
|
125
125
|
<Download
|
|
126
126
|
title={headerTitle}
|
|
127
127
|
subtitle={headerSubtitle}
|
|
128
128
|
/>
|
|
129
129
|
</Route>
|
|
130
|
-
<Route path={`${process.env.
|
|
130
|
+
<Route path={`${process.env.ADMIN_PATH}plugins/${pluginId}/upload`} exact>
|
|
131
131
|
<Upload
|
|
132
132
|
title={headerTitle}
|
|
133
133
|
subtitle={headerSubtitle}
|
|
134
134
|
/>
|
|
135
135
|
</Route>
|
|
136
|
-
<Route path={`${process.env.
|
|
136
|
+
<Route path={`${process.env.ADMIN_PATH}plugins/${pluginId}/settings`} exact>
|
|
137
137
|
<Settings
|
|
138
138
|
title={headerTitle}
|
|
139
139
|
subtitle={headerSubtitle}
|
|
@@ -6,7 +6,8 @@ import axios from "axios";
|
|
|
6
6
|
import { auth } from "@strapi/helper-plugin";
|
|
7
7
|
import pluginId from "../pluginId";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
console.log('process.env', process.env);
|
|
10
|
+
const BASE_PLUGIN_PATH = `/${pluginId}`;
|
|
10
11
|
|
|
11
12
|
const createAxiosInstance = (baseUrl = null) => {
|
|
12
13
|
if (baseUrl === null) {
|
|
@@ -14,7 +15,7 @@ const createAxiosInstance = (baseUrl = null) => {
|
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
const instance = axios.create({
|
|
17
|
-
baseURL: baseUrl
|
|
18
|
+
baseURL: `${process.env.STRAPI_ADMIN_LOCALAZY_PLUGIN_BACKEND_PREFIX}${baseUrl}`,
|
|
18
19
|
});
|
|
19
20
|
|
|
20
21
|
instance.interceptors.request.use(
|