@raketa-cloud/admin 0.0.53 → 0.0.54
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/article_revisions/CodeHandler.js +1 -1
- package/src/handlers/article_revisions/GeneralHandler.js +1 -1
- package/src/handlers/article_revisions/MetaHandler.js +1 -1
- package/src/handlers/article_revisions/TagHandler.js +1 -1
- package/src/handlers/article_revisions/VisualHandler.js +1 -1
- package/src/handlers/event_revisions/CodeHandler.js +1 -1
- package/src/handlers/event_revisions/GeneralHandler.js +1 -1
- package/src/handlers/event_revisions/MetaHandler.js +1 -1
- package/src/handlers/event_revisions/TagHandler.js +1 -1
- package/src/handlers/event_revisions/VisualHandler.js +1 -1
- package/src/handlers/page_revisions/CodeHandler.js +1 -1
- package/src/handlers/page_revisions/GeneralHandler.js +1 -1
- package/src/handlers/page_revisions/MetaHandler.js +1 -1
- package/src/handlers/page_revisions/TagHandler.js +1 -1
- package/src/handlers/page_revisions/VisualHandler.js +1 -1
- package/src/tests/handlers/article_revisions/CodesHandler.test/update.test.js +1 -1
- package/src/tests/handlers/article_revisions/GeneralHandler.test/update.test.js +1 -1
- package/src/tests/handlers/article_revisions/MetaHandler.test/update.test.js +1 -1
- package/src/tests/handlers/article_revisions/TagHandler.test/update.test.js +1 -1
- package/src/tests/handlers/article_revisions/VisualHandler.test.test/update.test.js +1 -1
- package/src/tests/handlers/event_revisions/CodesHandler.test/update.test.js +1 -1
- package/src/tests/handlers/event_revisions/GeneralHandler.test/update.test.js +1 -1
- package/src/tests/handlers/event_revisions/MetaHandler.test/update.test.js +1 -1
- package/src/tests/handlers/event_revisions/TagHandler.test/update.test.js +1 -1
- package/src/tests/handlers/event_revisions/VisualHandler.test.test/update.test.js +1 -1
- package/src/tests/handlers/page_revisions/CodesHandler.test/update.test.js +1 -1
- package/src/tests/handlers/page_revisions/GeneralHandler.test/update.test.js +1 -1
- package/src/tests/handlers/page_revisions/MetaHandler.test/update.test.js +1 -1
- package/src/tests/handlers/page_revisions/TagHandler.test/update.test.js +1 -1
- package/src/tests/handlers/page_revisions/VisualHandler.test.test/update.test.js +1 -1
- package/src/views/article_revisions/_nav.ejs +4 -0
- package/src/views/articles/_shared/_title.ejs +8 -5
- package/src/views/articles/_shared/_toolbar.ejs +2 -2
- package/src/views/articles/show.ejs +18 -21
- package/src/views/event_revisions/_nav.ejs +4 -0
- package/src/views/events/_shared/_title.ejs +9 -5
- package/src/views/events/_shared/_toolbar.ejs +2 -2
- package/src/views/events/show.ejs +18 -21
- package/src/views/page_revisions/_nav.ejs +4 -0
- package/src/views/pages/_shared/_title.ejs +9 -5
- package/src/views/pages/_shared/_toolbar.ejs +2 -2
- package/src/views/pages/show.ejs +18 -21
package/package.json
CHANGED
|
@@ -64,7 +64,7 @@ const update = async (ctx) => {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
return {
|
|
67
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.articleType}_revisions/${revision.id}/codes/edit`,
|
|
67
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.articleType}_revisions/${revision.id}/codes/edit?success=1`,
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -66,7 +66,7 @@ const update = async (ctx) => {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
return {
|
|
69
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.articleType}_revisions/${revision.id}/general/edit`,
|
|
69
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.articleType}_revisions/${revision.id}/general/edit?success=1`,
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
|
|
@@ -64,7 +64,7 @@ const update = async (ctx) => {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
return {
|
|
67
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.articleType}_revisions/${revision.id}/meta/edit`,
|
|
67
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.articleType}_revisions/${revision.id}/meta/edit?success=1`,
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -73,7 +73,7 @@ const update = async (ctx) => {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
return {
|
|
76
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.articleType}_revisions/${revision.id}/tags/edit`,
|
|
76
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.articleType}_revisions/${revision.id}/tags/edit?success=1`,
|
|
77
77
|
};
|
|
78
78
|
};
|
|
79
79
|
|
|
@@ -64,7 +64,7 @@ const update = async (ctx) => {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
return {
|
|
67
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.articleType}_revisions/${revision.id}/visuals/edit`,
|
|
67
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.articleType}_revisions/${revision.id}/visuals/edit?success=1`,
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -62,7 +62,7 @@ const update = async (ctx) => {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
return {
|
|
65
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.eventType}_revisions/${revision.id}/codes/edit`,
|
|
65
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.eventType}_revisions/${revision.id}/codes/edit?success=1`,
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
68
|
|
|
@@ -64,7 +64,7 @@ const update = async (ctx) => {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
return {
|
|
67
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.eventType}_revisions/${revision.id}/general/edit`,
|
|
67
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.eventType}_revisions/${revision.id}/general/edit?success=1`,
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -62,7 +62,7 @@ const update = async (ctx) => {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
return {
|
|
65
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.eventType}_revisions/${revision.id}/meta/edit`,
|
|
65
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.eventType}_revisions/${revision.id}/meta/edit?success=1`,
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
68
|
|
|
@@ -71,7 +71,7 @@ const update = async (ctx) => {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
return {
|
|
74
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.eventType}_revisions/${revision.id}/tags/edit`,
|
|
74
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.eventType}_revisions/${revision.id}/tags/edit?success=1`,
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
77
|
|
|
@@ -62,7 +62,7 @@ const update = async (ctx) => {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
return {
|
|
65
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.eventType}_revisions/${revision.id}/visuals/edit`,
|
|
65
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.eventType}_revisions/${revision.id}/visuals/edit?success=1`,
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
68
|
|
|
@@ -47,7 +47,7 @@ const update = async (ctx) => {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
return {
|
|
50
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.pageType}_revisions/${revision.id}/codes/edit`,
|
|
50
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.pageType}_revisions/${revision.id}/codes/edit?success=1`,
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
|
|
@@ -49,7 +49,7 @@ const update = async (ctx) => {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
return {
|
|
52
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.pageType}_revisions/${revision.id}/general/edit`,
|
|
52
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.pageType}_revisions/${revision.id}/general/edit?success=1`,
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
|
|
@@ -47,7 +47,7 @@ const update = async (ctx) => {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
return {
|
|
50
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.pageType}_revisions/${revision.id}/meta/edit`,
|
|
50
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.pageType}_revisions/${revision.id}/meta/edit?success=1`,
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
|
|
@@ -59,7 +59,7 @@ const update = async (ctx) => {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
return {
|
|
62
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.pageType}_revisions/${revision.id}/tags/edit`,
|
|
62
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.pageType}_revisions/${revision.id}/tags/edit?success=1`,
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
|
|
@@ -48,7 +48,7 @@ const update = async (ctx) => {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
return {
|
|
51
|
-
redirect: `/${ctx.locale}/${ctx.resourceConfig.pageType}_revisions/${revision.id}/visuals/edit`,
|
|
51
|
+
redirect: `/${ctx.locale}/${ctx.resourceConfig.pageType}_revisions/${revision.id}/visuals/edit?success=1`,
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<% if (_context.query?.success) { %>
|
|
2
|
+
<div class="mb-6 text-emerald-600">Settings saved successfully.</div>
|
|
3
|
+
<% } %>
|
|
4
|
+
|
|
1
5
|
<%
|
|
2
6
|
const activeClass = "relative top-0.5 px-4 border-b-2 border-raketa-primary pb-4";
|
|
3
7
|
const inactiveClass = "relative top-0.5 px-4 border-b-2 border-transparent pb-4";
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
1
|
+
<h1 class="heading-1 flex items-center gap-2">
|
|
2
|
+
<%= resource.title %>
|
|
3
|
+
|
|
3
4
|
<% if (resource.visibility !== "private") { %>
|
|
4
|
-
<a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.articleType, _context.locale) %>"
|
|
5
|
-
|
|
5
|
+
<a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.articleType, _context.locale) %>" target="_blank">
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6 text-raketa-primary">
|
|
7
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
|
|
8
|
+
</svg>
|
|
6
9
|
</a>
|
|
7
10
|
<% } %>
|
|
8
|
-
</
|
|
11
|
+
</h1>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" />
|
|
20
20
|
</svg>
|
|
21
21
|
|
|
22
|
-
Clone <%= _context.resourceConfig.articleType %>
|
|
22
|
+
Clone <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.articleType)) %>
|
|
23
23
|
</button>
|
|
24
24
|
</form>
|
|
25
25
|
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
|
29
29
|
</svg>
|
|
30
30
|
|
|
31
|
-
Delete <%= _context.resourceConfig.articleType %>
|
|
31
|
+
Delete <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.articleType)) %>
|
|
32
32
|
</a>
|
|
33
33
|
</div>
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
|
|
4
|
-
<%- render_partial('./_shared/_title.ejs') %>
|
|
5
|
-
|
|
6
|
-
<div class="flex flex-wrap items-center gap-1">
|
|
7
|
-
<% Object.keys(_context.locales).forEach(key => { %>
|
|
8
|
-
<% const { name, _code, flag} = _context.locales[key] %>
|
|
9
|
-
<% if (key === _context.locale) { %>
|
|
10
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
11
|
-
<% } else if (resource.translations[key]) { %>
|
|
12
|
-
<a href="<%= `/${key}/${_context.resourceConfig.articleTypePlural}/${resource.translations[key].id}` %>">
|
|
13
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
14
|
-
</a>
|
|
15
|
-
<% } else { %>
|
|
16
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.articleTypePlural}/${resource.id}/translations/new?target_locale=${key}` %>">
|
|
17
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="<%= [" transition-all ease-in-out duration-300 size-6 rounded-full border hover:opacity-100 dark:border-neutral-700", key === _context.locale ? "opacity-100" : "opacity-10"].join(" ") %>" />
|
|
18
|
-
</a>
|
|
19
|
-
<% } %>
|
|
20
|
-
<% }); %>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
3
|
+
<%- render_partial('./_shared/_title.ejs') %>
|
|
24
4
|
<%- render_partial('./_shared/_toolbar.ejs') %>
|
|
25
5
|
</div>
|
|
26
6
|
|
|
7
|
+
<div class="flex flex-wrap items-center gap-1 mb-6 -my-4">
|
|
8
|
+
<% Object.keys(_context.locales).forEach(key => { %>
|
|
9
|
+
<% const { name, _code, flag} = _context.locales[key] %>
|
|
10
|
+
<% if (key === _context.locale) { %>
|
|
11
|
+
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
12
|
+
<% } else if (resource.translations[key]) { %>
|
|
13
|
+
<a href="<%= `/${key}/${_context.resourceConfig.articleTypePlural}/${resource.translations[key].id}` %>">
|
|
14
|
+
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
15
|
+
</a>
|
|
16
|
+
<% } else { %>
|
|
17
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.articleTypePlural}/${resource.id}/translations/new?target_locale=${key}` %>">
|
|
18
|
+
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="<%= [" transition-all ease-in-out duration-300 size-6 rounded-full border hover:opacity-100 dark:border-neutral-700", key === _context.locale ? "opacity-100" : "opacity-10"].join(" ") %>" />
|
|
19
|
+
</a>
|
|
20
|
+
<% } %>
|
|
21
|
+
<% }); %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
27
24
|
<% if (revisions.length) { %>
|
|
28
25
|
<div class="pb-8">
|
|
29
26
|
<h4 class="pb-4 heading-3 flex items-center gap-2">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<% if (_context.query?.success) { %>
|
|
2
|
+
<div class="mb-6 text-emerald-600">Settings saved successfully.</div>
|
|
3
|
+
<% } %>
|
|
4
|
+
|
|
1
5
|
<%
|
|
2
6
|
const activeClass = "relative top-0.5 px-4 border-b-2 border-raketa-primary pb-4";
|
|
3
7
|
const inactiveClass = "relative top-0.5 px-4 border-b-2 border-transparent pb-4";
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
1
|
+
<h1 class="heading-1 flex items-center gap-2">
|
|
2
|
+
<%= resource.title %>
|
|
3
|
+
|
|
3
4
|
<% if (resource.visibility !== "private") { %>
|
|
4
|
-
<a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.eventType, _context.locale) %>"
|
|
5
|
-
|
|
5
|
+
<a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.eventType, _context.locale) %>" target="_blank">
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6 text-raketa-primary">
|
|
7
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
|
|
8
|
+
</svg>
|
|
6
9
|
</a>
|
|
7
10
|
<% } %>
|
|
8
|
-
</
|
|
11
|
+
</h1>
|
|
12
|
+
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" />
|
|
20
20
|
</svg>
|
|
21
21
|
|
|
22
|
-
Clone <%= _context.resourceConfig.eventType %>
|
|
22
|
+
Clone <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.eventType)) %>
|
|
23
23
|
</button>
|
|
24
24
|
</form>
|
|
25
25
|
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
|
29
29
|
</svg>
|
|
30
30
|
|
|
31
|
-
Delete <%= _context.resourceConfig.eventType %>
|
|
31
|
+
Delete <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.eventType)) %>
|
|
32
32
|
</a>
|
|
33
33
|
</div>
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
|
|
4
|
-
<%- render_partial('./_shared/_title.ejs') %>
|
|
5
|
-
|
|
6
|
-
<div class="flex flex-wrap items-center gap-1">
|
|
7
|
-
<% Object.keys(_context.locales).forEach(key => { %>
|
|
8
|
-
<% const { name, _code, flag} = _context.locales[key] %>
|
|
9
|
-
<% if (key === _context.locale) { %>
|
|
10
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
11
|
-
<% } else if (resource.translations[key]) { %>
|
|
12
|
-
<a href="<%= `/${key}/${_context.resourceConfig.eventTypePlural}/${resource.translations[key].id}` %>">
|
|
13
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
14
|
-
</a>
|
|
15
|
-
<% } else { %>
|
|
16
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.eventTypePlural}/${resource.id}/translations/new?target_locale=${key}` %>">
|
|
17
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="<%= [" transition-all ease-in-out duration-300 size-6 rounded-full border hover:opacity-100 dark:border-neutral-700", key === _context.locale ? "opacity-100" : "opacity-10"].join(" ") %>" />
|
|
18
|
-
</a>
|
|
19
|
-
<% } %>
|
|
20
|
-
<% }); %>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
3
|
+
<%- render_partial('./_shared/_title.ejs') %>
|
|
24
4
|
<%- render_partial('./_shared/_toolbar.ejs') %>
|
|
25
5
|
</div>
|
|
26
6
|
|
|
7
|
+
<div class="flex flex-wrap items-center gap-1 mb-6 -mt-4">
|
|
8
|
+
<% Object.keys(_context.locales).forEach(key => { %>
|
|
9
|
+
<% const { name, _code, flag} = _context.locales[key] %>
|
|
10
|
+
<% if (key === _context.locale) { %>
|
|
11
|
+
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
12
|
+
<% } else if (resource.translations[key]) { %>
|
|
13
|
+
<a href="<%= `/${key}/${_context.resourceConfig.eventTypePlural}/${resource.translations[key].id}` %>">
|
|
14
|
+
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
15
|
+
</a>
|
|
16
|
+
<% } else { %>
|
|
17
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.eventTypePlural}/${resource.id}/translations/new?target_locale=${key}` %>">
|
|
18
|
+
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="<%= [" transition-all ease-in-out duration-300 size-6 rounded-full border hover:opacity-100 dark:border-neutral-700", key === _context.locale ? "opacity-100" : "opacity-10"].join(" ") %>" />
|
|
19
|
+
</a>
|
|
20
|
+
<% } %>
|
|
21
|
+
<% }); %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
27
24
|
<% if (revisions.length) { %>
|
|
28
25
|
<div class="pb-8">
|
|
29
26
|
<h4 class="pb-4 heading-3 flex items-center gap-2">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<% if (_context.query?.success) { %>
|
|
2
|
+
<div class="mb-6 text-emerald-600">Settings saved successfully.</div>
|
|
3
|
+
<% } %>
|
|
4
|
+
|
|
1
5
|
<%
|
|
2
6
|
const activeClass = "relative top-0.5 px-4 border-b-2 border-raketa-primary pb-4";
|
|
3
7
|
const inactiveClass = "relative top-0.5 px-4 border-b-2 border-transparent pb-4";
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
1
|
+
<h1 class="heading-1 flex items-center gap-2">
|
|
2
|
+
<%= resource.title %>
|
|
3
|
+
|
|
3
4
|
<% if (resource.visibility !== "private") { %>
|
|
4
|
-
<a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.pageType, _context.locale) %>"
|
|
5
|
-
|
|
5
|
+
<a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.pageType, _context.locale) %>" target="_blank">
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6 text-raketa-primary">
|
|
7
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
|
|
8
|
+
</svg>
|
|
6
9
|
</a>
|
|
7
10
|
<% } %>
|
|
8
|
-
</
|
|
11
|
+
</h1>
|
|
12
|
+
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" />
|
|
20
20
|
</svg>
|
|
21
21
|
|
|
22
|
-
Clone <%= _context.resourceConfig.pageType %>
|
|
22
|
+
Clone <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.pageType)) %>
|
|
23
23
|
</button>
|
|
24
24
|
</form>
|
|
25
25
|
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
|
29
29
|
</svg>
|
|
30
30
|
|
|
31
|
-
Delete <%= _context.resourceConfig.pageType %>
|
|
31
|
+
Delete <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.pageType)) %>
|
|
32
32
|
</a>
|
|
33
33
|
</div>
|
package/src/views/pages/show.ejs
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
|
|
4
|
-
<%- render_partial('./_shared/_title.ejs') %>
|
|
5
|
-
|
|
6
|
-
<div class="flex flex-wrap items-center gap-1">
|
|
7
|
-
<% Object.keys(_context.locales).forEach(key => { %>
|
|
8
|
-
<% const { name, _code, flag} = _context.locales[key] %>
|
|
9
|
-
<% if (key === _context.locale) { %>
|
|
10
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
11
|
-
<% } else if (resource.translations[key]) { %>
|
|
12
|
-
<a href="<%= `/${key}/${_context.resourceConfig.pageTypePlural}/${resource.translations[key].id}` %>">
|
|
13
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
14
|
-
</a>
|
|
15
|
-
<% } else { %>
|
|
16
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.pageTypePlural}/${resource.id}/translations/new?target_locale=${key}` %>">
|
|
17
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="<%= [" transition-all ease-in-out duration-300 size-6 rounded-full border hover:opacity-100 dark:border-neutral-700", key === _context.locale ? "opacity-100" : "opacity-10"].join(" ") %>" />
|
|
18
|
-
</a>
|
|
19
|
-
<% } %>
|
|
20
|
-
<% }); %>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
3
|
+
<%- render_partial('./_shared/_title.ejs') %>
|
|
24
4
|
<%- render_partial('./_shared/_toolbar.ejs') %>
|
|
25
5
|
</div>
|
|
26
6
|
|
|
7
|
+
<div class="flex flex-wrap items-center gap-1 mb-6 -mt-4">
|
|
8
|
+
<% Object.keys(_context.locales).forEach(key => { %>
|
|
9
|
+
<% const { name, _code, flag} = _context.locales[key] %>
|
|
10
|
+
<% if (key === _context.locale) { %>
|
|
11
|
+
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
12
|
+
<% } else if (resource.translations[key]) { %>
|
|
13
|
+
<a href="<%= `/${key}/${_context.resourceConfig.pageTypePlural}/${resource.translations[key].id}` %>">
|
|
14
|
+
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
15
|
+
</a>
|
|
16
|
+
<% } else { %>
|
|
17
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.pageTypePlural}/${resource.id}/translations/new?target_locale=${key}` %>">
|
|
18
|
+
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="<%= [" transition-all ease-in-out duration-300 size-6 rounded-full border hover:opacity-100 dark:border-neutral-700", key === _context.locale ? "opacity-100" : "opacity-10"].join(" ") %>" />
|
|
19
|
+
</a>
|
|
20
|
+
<% } %>
|
|
21
|
+
<% }); %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
27
24
|
<% if (revisions.length) { %>
|
|
28
25
|
<div class="pb-8">
|
|
29
26
|
<h4 class="pb-4 heading-3 flex items-center gap-2">
|