@raketa-cloud/admin 0.0.49 → 0.0.51
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/handlers/articles/URLsHandler.js +5 -2
- package/src/handlers/events/URLsHandler.js +5 -1
- package/src/handlers/pages/URLsHandler.js +5 -1
- package/src/tests/handlers/articles/URLsHandler.test/create.test.js +4 -4
- package/src/tests/handlers/events/URLsHandler.test/create.test.js +2 -2
- package/src/tests/handlers/pages/URLsHandler.test/create.test.js +2 -2
- package/src/views/layouts/header.ejs +6 -7
package/package.json
CHANGED
|
@@ -42,8 +42,11 @@ const create = async (ctx) => {
|
|
|
42
42
|
article.articleType.slug,
|
|
43
43
|
ctx.locale
|
|
44
44
|
),
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
destination: ctx.remoteConfig.resourcePath(
|
|
46
|
+
{ slug: resource.slug },
|
|
47
|
+
article.articleType.slug,
|
|
48
|
+
ctx.locale
|
|
49
|
+
),
|
|
47
50
|
httpResponseCode: 301,
|
|
48
51
|
note: `Created with changed URL for a resource of type ${ctx.resourceConfig.articleType}`,
|
|
49
52
|
};
|
|
@@ -40,7 +40,11 @@ const create = async (ctx) => {
|
|
|
40
40
|
event.eventType.slug,
|
|
41
41
|
ctx.locale
|
|
42
42
|
),
|
|
43
|
-
destination:
|
|
43
|
+
destination: ctx.remoteConfig.resourcePath(
|
|
44
|
+
{ slug: resource.slug },
|
|
45
|
+
event.eventType.slug,
|
|
46
|
+
ctx.locale
|
|
47
|
+
),
|
|
44
48
|
httpResponseCode: 301,
|
|
45
49
|
note: `Created with changed URL for a resource of type ${ctx.resourceConfig.eventType}`,
|
|
46
50
|
};
|
|
@@ -38,7 +38,11 @@ const create = async (ctx) => {
|
|
|
38
38
|
if (resource.redirect) {
|
|
39
39
|
redirectParams = {
|
|
40
40
|
url: ctx.remoteConfig.resourcePath(page, page.pageType.slug, ctx.locale),
|
|
41
|
-
destination:
|
|
41
|
+
destination: ctx.remoteConfig.resourcePath(
|
|
42
|
+
{ slug: resource.slug },
|
|
43
|
+
page.pageType.slug,
|
|
44
|
+
ctx.locale
|
|
45
|
+
),
|
|
42
46
|
httpResponseCode: 301,
|
|
43
47
|
note: `Created with changed URL for a ${ctx.resourceConfig.pageType}`,
|
|
44
48
|
};
|
|
@@ -46,8 +46,8 @@ describe("Article change url", () => {
|
|
|
46
46
|
updateSettings.slug,
|
|
47
47
|
"en",
|
|
48
48
|
{
|
|
49
|
-
url:
|
|
50
|
-
destination: updateSettings.slug
|
|
49
|
+
url: `/en/blog/${article.slug}`,
|
|
50
|
+
destination: `/en/blog/${updateSettings.slug}`,
|
|
51
51
|
httpResponseCode: 301,
|
|
52
52
|
note: "Created with changed URL for a resource of type article",
|
|
53
53
|
}
|
|
@@ -128,8 +128,8 @@ describe("Article change url", () => {
|
|
|
128
128
|
updateSettings.slug,
|
|
129
129
|
"en",
|
|
130
130
|
{
|
|
131
|
-
url:
|
|
132
|
-
destination: updateSettings.slug
|
|
131
|
+
url: `/en/blog/${article.slug}`,
|
|
132
|
+
destination: `/en/blog/${updateSettings.slug}`,
|
|
133
133
|
httpResponseCode: 301,
|
|
134
134
|
note: "Created with changed URL for a resource of type article",
|
|
135
135
|
}
|
|
@@ -47,7 +47,7 @@ describe("Event change url", () => {
|
|
|
47
47
|
"en",
|
|
48
48
|
{
|
|
49
49
|
url: `/en/events/${event.slug}`,
|
|
50
|
-
destination: updateSettings.slug
|
|
50
|
+
destination: `/en/events/${updateSettings.slug}`,
|
|
51
51
|
httpResponseCode: 301,
|
|
52
52
|
note: "Created with changed URL for a resource of type event",
|
|
53
53
|
}
|
|
@@ -129,7 +129,7 @@ describe("Event change url", () => {
|
|
|
129
129
|
"en",
|
|
130
130
|
{
|
|
131
131
|
url: `/en/events/${event.slug}`,
|
|
132
|
-
destination: updateSettings.slug
|
|
132
|
+
destination: `/en/events/${updateSettings.slug}`,
|
|
133
133
|
httpResponseCode: 301,
|
|
134
134
|
note: "Created with changed URL for a resource of type event",
|
|
135
135
|
}
|
|
@@ -47,7 +47,7 @@ describe("Page change url", () => {
|
|
|
47
47
|
"en",
|
|
48
48
|
{
|
|
49
49
|
url: `/en/${page.slug}`,
|
|
50
|
-
destination: updateSettings.slug
|
|
50
|
+
destination: `/en/${updateSettings.slug}`,
|
|
51
51
|
httpResponseCode: 301,
|
|
52
52
|
note: "Created with changed URL for a page",
|
|
53
53
|
}
|
|
@@ -129,7 +129,7 @@ describe("Page change url", () => {
|
|
|
129
129
|
"en",
|
|
130
130
|
{
|
|
131
131
|
url: `/en/${page.slug}`,
|
|
132
|
-
destination: updateSettings.slug
|
|
132
|
+
destination: `/en/${updateSettings.slug}`,
|
|
133
133
|
httpResponseCode: 301,
|
|
134
134
|
note: "Created with changed URL for a page",
|
|
135
135
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
<header class="sticky top-0 z-10 flex items-center bg-raketa-background border-b border-mono-25 dark:border-neutral-700">
|
|
2
2
|
<div class="flex items-center justify-center flex-none size-14">
|
|
3
3
|
<a href="<%= `/${_context.locale}/pages` %>">
|
|
4
|
-
<
|
|
4
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="size-6 dark:invert">
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.77197 7.80835L11.5103 3.5V20.5H5.77197V7.80835Z" fill="#1C1C1E"/>
|
|
6
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.2274 8.59039L17.4877 8.5507C15.1691 8.55498 12.8885 8.98891 12.5514 9.96694L12.2573 9.95802C12.5778 5.34308 15.1646 3.41033 18.2163 3.50318L18.2274 8.59039Z" fill="#1C1C1E"/>
|
|
7
|
+
</svg>
|
|
5
8
|
</a>
|
|
6
9
|
</div>
|
|
7
10
|
|
|
8
11
|
<div class="flex items-center justify-between w-full p-4 pl-8">
|
|
9
|
-
<div class="flex items-center gap-1 body-2">
|
|
10
|
-
<a href="#" class="btn-text">Home</a>
|
|
11
|
-
/
|
|
12
|
-
<div class="opacity-50">Pages</div>
|
|
13
|
-
</div>
|
|
12
|
+
<div class="flex items-center gap-1 body-2"></div>
|
|
14
13
|
|
|
15
14
|
<div class="flex items-center gap-4">
|
|
16
15
|
<div class="relative flex items-center gap-1 group body-2">
|
|
@@ -45,4 +44,4 @@
|
|
|
45
44
|
</div>
|
|
46
45
|
</div>
|
|
47
46
|
</div>
|
|
48
|
-
</header>
|
|
47
|
+
</header>
|