@raketa-cloud/admin 1.8.21 → 1.8.22

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.
@@ -2359,10 +2359,6 @@ select {
2359
2359
  padding-top: 0.25rem;
2360
2360
  }
2361
2361
 
2362
- .pt-2 {
2363
- padding-top: 0.5rem;
2364
- }
2365
-
2366
2362
  .pt-6 {
2367
2363
  padding-top: 1.5rem;
2368
2364
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-cloud/admin",
3
- "version": "1.8.21",
3
+ "version": "1.8.22",
4
4
  "main": "src/index.js",
5
5
  "files": [
6
6
  "src/",
@@ -1,18 +1,14 @@
1
- <div class="flex justify-between w-full pb-8">
2
- <div class="flex flex-col">
3
- <h1 class="flex items-center gap-2 heading-1">
4
- <%= resource.title %>
5
- </h1>
6
- <a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.resourceType, _context.locale) %>" target="_blank" class="btn-text"><%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.resourceType, _context.locale) %></a>
7
- </div>
1
+ <div class="flex flex-col pb-4">
2
+ <h1 class="heading-1 flex items-center gap-2">
3
+ <%= resource.title %>
8
4
 
9
- <%
10
- const withTranslations = locals.withTranslations && locals.render_partial;
11
- %>
12
-
13
- <% if (withTranslations) { %>
14
- <div class="pt-2">
15
- <%- render_partial('./_shared/_translations_strip.ejs') %>
16
- </div>
17
- <% } %>
5
+ <% if (resource.visibility !== "private") { %>
6
+ <a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.resourceType, _context.locale) %>" target="_blank">
7
+ <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">
8
+ <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" />
9
+ </svg>
10
+ </a>
11
+ <% } %>
12
+ </h1>
13
+ <a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.resourceType, _context.locale) %>" target="_blank" class="btn-text"><%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.resourceType, _context.locale) %></a>
18
14
  </div>
@@ -5,17 +5,21 @@
5
5
  !resource.activeContentTask.completedAt &&
6
6
  !resource.activeContentTask.failedAt;
7
7
  %>
8
- <% if (_context.query?.revisions_count_error) { %>
9
- <div class="text-red-600">Cannot open a new revision. Current limit is <%= _context.maxOpenRevisions %>. </div>
10
- <% } %>
11
-
12
- <% if (hasActiveContentTask) { %>
13
- <div class="mt-2 text-orange-700 dark:text-orange-300">Actions are disabled while a translation task is in progress.</div>
14
- <% } %>
15
-
16
8
  <div class="actions-toolbar">
9
+ <form method="POST" action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/${_context.resourceConfig.resourceType}_revisions` %>" class="inline-block">
10
+ <% if (resource.revisionsCount >= _context?.maxOpenRevisions || hasActiveContentTask) { %>
11
+ <button type="submit" class="btn-primary" disabled style="opacity: 50%;">
12
+ Start revision
13
+ </button>
14
+ <% } else {%>
15
+ <button type="submit" class="btn-primary">
16
+ Start revision
17
+ </button>
18
+ <% } %>
19
+ </form>
20
+
17
21
  <% if (hasActiveContentTask) { %>
18
- <button type="button" class="btn-secondary has-icon" disabled style="opacity: 50%; cursor: not-allowed;">
22
+ <button type="button" class="btn-text has-icon" disabled style="opacity: 50%; cursor: not-allowed;">
19
23
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
20
24
  <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" />
21
25
  </svg>
@@ -23,7 +27,7 @@
23
27
  Change URL
24
28
  </button>
25
29
  <% } else { %>
26
- <a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/urls/new` %>" class="btn-secondary has-icon">
30
+ <a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/urls/new` %>" class="btn-text has-icon">
27
31
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
28
32
  <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" />
29
33
  </svg>
@@ -33,7 +37,7 @@
33
37
  <% } %>
34
38
 
35
39
  <form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/clones` %>" method="post" class="inline-block">
36
- <button type="submit" class="btn-secondary has-icon" <%= hasActiveContentTask ? 'disabled style="opacity: 50%;"' : '' %>>
40
+ <button type="submit" class="btn-text has-icon" <%= hasActiveContentTask ? 'disabled style="opacity: 50%;"' : '' %>>
37
41
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
38
42
  <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" />
39
43
  </svg>
@@ -61,5 +65,11 @@
61
65
  <% } %>
62
66
  </div>
63
67
 
68
+ <% if (_context.query?.revisions_count_error) { %>
69
+ <div class="text-red-600">Cannot open a new revision. Current limit is <%= _context.maxOpenRevisions %>. </div>
70
+ <% } %>
64
71
 
72
+ <% if (hasActiveContentTask) { %>
73
+ <div class="text-orange-700 mt-2 dark:text-orange-300">Actions are disabled while a translation task is in progress.</div>
74
+ <% } %>
65
75
  </div>
@@ -1,4 +1,4 @@
1
- <div class="flex flex-wrap items-center gap-1">
1
+ <div class="flex flex-wrap items-center gap-1 pb-8">
2
2
  <%
3
3
  const availableLocales = Object.keys(_context.locales);
4
4
  const totalPossibleTranslations = availableLocales.length - 1;
@@ -1,8 +1,11 @@
1
1
  <div class="page-wrapper">
2
2
  <div class="page-title">
3
- <%- render_partial('./_shared/_title.ejs', { withTranslations: true, render_partial }) %>
3
+ <%- render_partial('./_shared/_title.ejs') %>
4
+ <%- render_partial('./_shared/_toolbar.ejs') %>
4
5
  </div>
5
6
 
7
+ <%- render_partial('./_shared/_translations_strip.ejs') %>
8
+
6
9
  <%
7
10
  const openedRevisions = []
8
11
  const scheduledRevisions = []
@@ -40,23 +43,6 @@
40
43
  resource.revisionsCount >= _context?.maxOpenRevisions;
41
44
  const canStartRevision = !atRevisionLimit && !hasActiveContentTask;
42
45
  %>
43
-
44
- <div class="pb-4">
45
- <% if (_context.query?.revisions_count_error) { %>
46
- <div class="text-red-600">Cannot open a new revision. Current limit is <%= _context.maxOpenRevisions %>. </div>
47
- <% } %>
48
-
49
- <% if (hasActiveContentTask) { %>
50
- <div class="mb-2 text-orange-700 dark:text-orange-300">Actions are disabled while a translation task is in progress.</div>
51
- <% } %>
52
-
53
- <form method="POST" action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/${_context.resourceConfig.resourceType}_revisions` %>" class="inline-block">
54
- <button type="submit" class="btn-primary" <%- canStartRevision ? '' : 'disabled style="opacity: 50%;"' %> <% if (atRevisionLimit && !hasActiveContentTask) { %> title="Open revision limit reached (<%= _context.maxOpenRevisions %>)" <% } %>>
55
- Start revision
56
- </button>
57
- </form>
58
- </div>
59
-
60
46
  <% if (openedRevisions.length) { %>
61
47
  <table class="data-grid alt">
62
48
  <thead>
@@ -173,20 +159,6 @@
173
159
  Full page history
174
160
  </a>
175
161
  </div>
176
-
177
-
178
- <div class="pb-8">
179
-
180
- <h4 class="flex items-center gap-2 pb-4 heading-3">
181
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-5 text-raketa-primary">
182
- <path fill-rule="evenodd" clip-rule="evenodd" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28ZM15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
183
- </svg>
184
-
185
- Actions
186
- </h4>
187
-
188
- <%- render_partial('./_shared/_toolbar.ejs') %>
189
- </div>
190
162
  </div>
191
163
 
192
164
  <% if (reports.path) { %>