@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.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/src/handlers/article_revisions/CodeHandler.js +1 -1
  3. package/src/handlers/article_revisions/GeneralHandler.js +1 -1
  4. package/src/handlers/article_revisions/MetaHandler.js +1 -1
  5. package/src/handlers/article_revisions/TagHandler.js +1 -1
  6. package/src/handlers/article_revisions/VisualHandler.js +1 -1
  7. package/src/handlers/event_revisions/CodeHandler.js +1 -1
  8. package/src/handlers/event_revisions/GeneralHandler.js +1 -1
  9. package/src/handlers/event_revisions/MetaHandler.js +1 -1
  10. package/src/handlers/event_revisions/TagHandler.js +1 -1
  11. package/src/handlers/event_revisions/VisualHandler.js +1 -1
  12. package/src/handlers/page_revisions/CodeHandler.js +1 -1
  13. package/src/handlers/page_revisions/GeneralHandler.js +1 -1
  14. package/src/handlers/page_revisions/MetaHandler.js +1 -1
  15. package/src/handlers/page_revisions/TagHandler.js +1 -1
  16. package/src/handlers/page_revisions/VisualHandler.js +1 -1
  17. package/src/tests/handlers/article_revisions/CodesHandler.test/update.test.js +1 -1
  18. package/src/tests/handlers/article_revisions/GeneralHandler.test/update.test.js +1 -1
  19. package/src/tests/handlers/article_revisions/MetaHandler.test/update.test.js +1 -1
  20. package/src/tests/handlers/article_revisions/TagHandler.test/update.test.js +1 -1
  21. package/src/tests/handlers/article_revisions/VisualHandler.test.test/update.test.js +1 -1
  22. package/src/tests/handlers/event_revisions/CodesHandler.test/update.test.js +1 -1
  23. package/src/tests/handlers/event_revisions/GeneralHandler.test/update.test.js +1 -1
  24. package/src/tests/handlers/event_revisions/MetaHandler.test/update.test.js +1 -1
  25. package/src/tests/handlers/event_revisions/TagHandler.test/update.test.js +1 -1
  26. package/src/tests/handlers/event_revisions/VisualHandler.test.test/update.test.js +1 -1
  27. package/src/tests/handlers/page_revisions/CodesHandler.test/update.test.js +1 -1
  28. package/src/tests/handlers/page_revisions/GeneralHandler.test/update.test.js +1 -1
  29. package/src/tests/handlers/page_revisions/MetaHandler.test/update.test.js +1 -1
  30. package/src/tests/handlers/page_revisions/TagHandler.test/update.test.js +1 -1
  31. package/src/tests/handlers/page_revisions/VisualHandler.test.test/update.test.js +1 -1
  32. package/src/views/article_revisions/_nav.ejs +4 -0
  33. package/src/views/articles/_shared/_title.ejs +8 -5
  34. package/src/views/articles/_shared/_toolbar.ejs +2 -2
  35. package/src/views/articles/show.ejs +18 -21
  36. package/src/views/event_revisions/_nav.ejs +4 -0
  37. package/src/views/events/_shared/_title.ejs +9 -5
  38. package/src/views/events/_shared/_toolbar.ejs +2 -2
  39. package/src/views/events/show.ejs +18 -21
  40. package/src/views/page_revisions/_nav.ejs +4 -0
  41. package/src/views/pages/_shared/_title.ejs +9 -5
  42. package/src/views/pages/_shared/_toolbar.ejs +2 -2
  43. package/src/views/pages/show.ejs +18 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-cloud/admin",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "main": "src/index.js",
5
5
  "scripts": {
6
6
  "dev": "npx tailwindcss -i ./src/styles/application.css -o ../../apps/admin/static/application.css --watch",
@@ -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
 
@@ -69,7 +69,7 @@ describe("Article revision code settings", () => {
69
69
  });
70
70
 
71
71
  expect(result).toEqual({
72
- redirect: `/en/article_revisions/${revision.id}/codes/edit`,
72
+ redirect: `/en/article_revisions/${revision.id}/codes/edit?success=1`,
73
73
  });
74
74
  });
75
75
 
@@ -70,7 +70,7 @@ describe("Article revision general settings", () => {
70
70
  });
71
71
 
72
72
  expect(result).toEqual({
73
- redirect: `/en/article_revisions/${revision.id}/general/edit`,
73
+ redirect: `/en/article_revisions/${revision.id}/general/edit?success=1`,
74
74
  });
75
75
  });
76
76
 
@@ -70,7 +70,7 @@ describe("Article revision meta settings", () => {
70
70
  });
71
71
 
72
72
  expect(result).toEqual({
73
- redirect: `/en/article_revisions/${revision.id}/meta/edit`,
73
+ redirect: `/en/article_revisions/${revision.id}/meta/edit?success=1`,
74
74
  });
75
75
  });
76
76
 
@@ -65,7 +65,7 @@ describe("Article revision tags settings", () => {
65
65
  });
66
66
 
67
67
  expect(result).toEqual({
68
- redirect: `/en/article_revisions/${revision.id}/tags/edit`,
68
+ redirect: `/en/article_revisions/${revision.id}/tags/edit?success=1`,
69
69
  });
70
70
  });
71
71
 
@@ -63,7 +63,7 @@ describe("Article revision visuals settings", () => {
63
63
  });
64
64
 
65
65
  expect(result).toEqual({
66
- redirect: `/en/article_revisions/${revision.id}/visuals/edit`,
66
+ redirect: `/en/article_revisions/${revision.id}/visuals/edit?success=1`,
67
67
  });
68
68
  });
69
69
 
@@ -73,7 +73,7 @@ describe("Event revision code settings", () => {
73
73
  });
74
74
 
75
75
  expect(result).toEqual({
76
- redirect: `/en/event_revisions/${revision.id}/codes/edit`,
76
+ redirect: `/en/event_revisions/${revision.id}/codes/edit?success=1`,
77
77
  });
78
78
  });
79
79
 
@@ -74,7 +74,7 @@ describe("Event revision general settings", () => {
74
74
  });
75
75
 
76
76
  expect(result).toEqual({
77
- redirect: `/en/event_revisions/${revision.id}/general/edit`,
77
+ redirect: `/en/event_revisions/${revision.id}/general/edit?success=1`,
78
78
  });
79
79
  });
80
80
 
@@ -74,7 +74,7 @@ describe("Event revision meta settings", () => {
74
74
  });
75
75
 
76
76
  expect(result).toEqual({
77
- redirect: `/en/event_revisions/${revision.id}/meta/edit`,
77
+ redirect: `/en/event_revisions/${revision.id}/meta/edit?success=1`,
78
78
  });
79
79
  });
80
80
 
@@ -69,7 +69,7 @@ describe("Event revision tags settings", () => {
69
69
  });
70
70
 
71
71
  expect(result).toEqual({
72
- redirect: `/en/event_revisions/${revision.id}/tags/edit`,
72
+ redirect: `/en/event_revisions/${revision.id}/tags/edit?success=1`,
73
73
  });
74
74
  });
75
75
 
@@ -67,7 +67,7 @@ describe("Event revision visuals settings", () => {
67
67
  });
68
68
 
69
69
  expect(result).toEqual({
70
- redirect: `/en/event_revisions/${revision.id}/visuals/edit`,
70
+ redirect: `/en/event_revisions/${revision.id}/visuals/edit?success=1`,
71
71
  });
72
72
  });
73
73
 
@@ -66,7 +66,7 @@ describe("Page revision code settings", () => {
66
66
  });
67
67
 
68
68
  expect(result).toEqual({
69
- redirect: `/en/page_revisions/${revision.id}/codes/edit`,
69
+ redirect: `/en/page_revisions/${revision.id}/codes/edit?success=1`,
70
70
  });
71
71
  });
72
72
 
@@ -71,7 +71,7 @@ describe("Page revision general settings", () => {
71
71
  });
72
72
 
73
73
  expect(result).toEqual({
74
- redirect: `/en/page_revisions/${revision.id}/general/edit`,
74
+ redirect: `/en/page_revisions/${revision.id}/general/edit?success=1`,
75
75
  });
76
76
  });
77
77
 
@@ -68,7 +68,7 @@ describe("Page revision meta settings", () => {
68
68
  });
69
69
 
70
70
  expect(result).toEqual({
71
- redirect: `/en/page_revisions/${revision.id}/meta/edit`,
71
+ redirect: `/en/page_revisions/${revision.id}/meta/edit?success=1`,
72
72
  });
73
73
  });
74
74
 
@@ -61,7 +61,7 @@ describe("Page revision tags settings", () => {
61
61
  });
62
62
 
63
63
  expect(result).toEqual({
64
- redirect: `/en/page_revisions/${revision.id}/tags/edit`,
64
+ redirect: `/en/page_revisions/${revision.id}/tags/edit?success=1`,
65
65
  });
66
66
  });
67
67
 
@@ -60,7 +60,7 @@ describe("Page revision visuals settings", () => {
60
60
  });
61
61
 
62
62
  expect(result).toEqual({
63
- redirect: `/en/page_revisions/${revision.id}/visuals/edit`,
63
+ redirect: `/en/page_revisions/${revision.id}/visuals/edit?success=1`,
64
64
  });
65
65
  });
66
66
 
@@ -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
- <div>
2
- <h1 class="heading-1"><%= resource.title %></h1>
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) %>" class="body-3 text-raketa-foreground/50" target="_blank">
5
- <%= _context.remoteConfig.resourcePath(resource, _context.resourceConfig.articleType, _context.locale) %>
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
- </div>
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
- <div class="flex items-center gap-4">
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
- <div>
2
- <h1 class="heading-1"><%= resource.title %></h1>
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) %>" class="body-3 text-raketa-foreground/50" target="_blank">
5
- <%= _context.remoteConfig.resourcePath(resource, _context.resourceConfig.eventType, _context.locale) %>
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
- </div>
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
- <div class="flex items-center gap-4">
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
- <div>
2
- <h1 class="heading-1"><%= resource.title %></h1>
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) %>" class="body-3 text-raketa-foreground/50" target="_blank">
5
- <%= _context.remoteConfig.resourcePath(resource, _context.resourceConfig.pageType, _context.locale) %>
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
- </div>
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>
@@ -1,29 +1,26 @@
1
1
  <div class="page-wrapper">
2
2
  <div class="page-title">
3
- <div class="flex items-center gap-4">
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">