@raketa-cloud/admin 0.0.78 → 0.0.81

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 (44) hide show
  1. package/package.json +1 -1
  2. package/src/cloud/ArticleRevisions.js +30 -0
  3. package/src/cloud/EventRevisions.js +30 -0
  4. package/src/cloud/PageRevisions.js +30 -0
  5. package/src/cloud/documents/articlesDocuments.js +24 -0
  6. package/src/cloud/documents/common.js +13 -0
  7. package/src/cloud/documents/eventsDocuments.js +24 -0
  8. package/src/cloud/documents/pagesDocuments.js +24 -0
  9. package/src/handlers/article_revisions/CancelSchedulesHandler.js +26 -0
  10. package/src/handlers/article_revisions/PublishesHandler.js +39 -10
  11. package/src/handlers/article_revisions/UnlocksHandler.js +1 -1
  12. package/src/handlers/event_revisions/CancelSchedulesHandler.js +26 -0
  13. package/src/handlers/event_revisions/PublishesHandler.js +34 -7
  14. package/src/handlers/event_revisions/UnlocksHandler.js +3 -1
  15. package/src/handlers/page_revisions/CancelSchedulesHandler.js +26 -0
  16. package/src/handlers/page_revisions/PublishesHandler.js +34 -7
  17. package/src/handlers/page_revisions/UnlocksHandler.js +1 -1
  18. package/src/routeArticlesModule.js +12 -0
  19. package/src/routeEventsModule.js +12 -0
  20. package/src/routePagesModule.js +12 -0
  21. package/src/styles/application.css +1 -2
  22. package/src/tests/handlers/article_revisions/CancelScheduledHandler.test/create.test.js +90 -0
  23. package/src/tests/handlers/article_revisions/PublishesHandler.test/create.test.js +187 -2
  24. package/src/tests/handlers/article_revisions/UnlocksHandler.test/create.test.js +2 -2
  25. package/src/tests/handlers/event_revisions/CancelScheduledHandler.test/create.test.js +90 -0
  26. package/src/tests/handlers/event_revisions/PublishesHandler.test/create.test.js +187 -2
  27. package/src/tests/handlers/event_revisions/UnlocksHandler.test/create.test.js +2 -2
  28. package/src/tests/handlers/page_revisions/CancelScheduledHandler.test/create.test.js +86 -0
  29. package/src/tests/handlers/page_revisions/PublishesHandler.test/create.test.js +187 -2
  30. package/src/tests/handlers/page_revisions/UnlocksHandler.test/create.test.js +2 -2
  31. package/src/tests/support/factory.js +16 -0
  32. package/src/views/article_revisions/publishes/_form.ejs +4 -1
  33. package/src/views/articles/_shared/_revision_toolbar.ejs +1 -1
  34. package/src/views/articles/show.ejs +113 -4
  35. package/src/views/articles/translations/_translation_toolbar.ejs +1 -1
  36. package/src/views/event_revisions/publishes/_form.ejs +4 -1
  37. package/src/views/events/_shared/_revision_toolbar.ejs +1 -1
  38. package/src/views/events/show.ejs +113 -4
  39. package/src/views/events/translations/_translation_toolbar.ejs +1 -1
  40. package/src/views/layouts/application.ejs +15 -0
  41. package/src/views/page_revisions/publishes/_form.ejs +4 -1
  42. package/src/views/pages/_shared/_revision_toolbar.ejs +1 -1
  43. package/src/views/pages/show.ejs +113 -4
  44. package/src/views/pages/translations/_translation_toolbar.ejs +1 -1
@@ -34,7 +34,20 @@
34
34
  <% } %>
35
35
  </div>
36
36
 
37
- <% if (revisions.length) { %>
37
+ <%
38
+ const openedRevisions = []
39
+ const scheduledRevisions = []
40
+
41
+ revisions.forEach(r => {
42
+ if (r.schedule) {
43
+ scheduledRevisions.push(r)
44
+ } else {
45
+ openedRevisions.push(r)
46
+ }
47
+ })
48
+ %>
49
+
50
+ <% if (openedRevisions.length) { %>
38
51
  <div class="pb-8">
39
52
  <h4 class="pb-4 heading-3 flex items-center gap-2">
40
53
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4 text-raketa-primary">
@@ -56,9 +69,9 @@
56
69
  </thead>
57
70
 
58
71
  <tbody>
59
- <% revisions.forEach((revision, idx)=> { %>
72
+ <% openedRevisions.forEach((revision, idx)=> { %>
60
73
  <tr class="border-b border-mono-25">
61
- <td class="py-4 pl-2 w-full">
74
+ <td class="py-4 pl-2 w-1/2">
62
75
  <div class="flex gap-1 items-center">
63
76
  <% if (revision.meta && revision.meta.locked) { %>
64
77
  <div title="<%= revision.meta.lockMessage %>">
@@ -75,7 +88,9 @@
75
88
  <td class="whitespace-nowrap">
76
89
  <div class="body-3 text-raketa-foreground/50">
77
90
  <div class="flex items-center gap-1" title="<%= revision.meta.operatorMeta.name %>">
91
+ <% if (revision.meta.operatorMeta.avatar) { %>
78
92
  <img src="<%= revision.meta.operatorMeta.avatar %>" class="size-4 rounded-full">
93
+ <% } %>
79
94
  <%= revision.meta.operatorMeta.name %>
80
95
  </div>
81
96
  </div>
@@ -103,6 +118,100 @@
103
118
  </div>
104
119
  <% } %>
105
120
 
121
+ <% if (scheduledRevisions.length) { %>
122
+ <div class="pb-8">
123
+ <h4 class="pb-4 heading-3 flex items-center gap-2">
124
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4 text-raketa-primary">
125
+ <path fill-rule="evenodd" d="M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z" clip-rule="evenodd" />
126
+ <path d="M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z" />
127
+ </svg>
128
+
129
+ Scheduled for publication
130
+ </h4>
131
+
132
+ <table class="data-grid alt">
133
+ <thead>
134
+ <tr>
135
+ <th>Title</th>
136
+ <th>Scheduled by</th>
137
+ <th>Publish on</th>
138
+ <th>&nbsp;</th>
139
+ </tr>
140
+ </thead>
141
+
142
+ <tbody>
143
+ <% scheduledRevisions.forEach((revision, idx)=> { %>
144
+ <tr class="border-b border-mono-25">
145
+ <td class="py-4 pl-2 w-1/2">
146
+ <div class="flex gap-1 items-center">
147
+ <% if (revision.meta && revision.meta.locked) { %>
148
+ <div title="<%= revision.meta.lockMessage %>">
149
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-4">
150
+ <path fill-rule="evenodd" d="M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1Zm3 8V5.5a3 3 0 1 0-6 0V9h6Z" clip-rule="evenodd" />
151
+ </svg>
152
+ </div>
153
+ <% } %>
154
+
155
+ <%= revision.title %>
156
+ </div>
157
+ </td>
158
+
159
+ <td class="whitespace-nowrap">
160
+ <div class="body-3 text-raketa-foreground/50">
161
+ <div class="flex items-center gap-1" title="<%= revision.meta.operatorMeta.name %>">
162
+ <% if (revision.meta.operatorMeta.avatar) { %>
163
+ <img src="<%= revision.meta.operatorMeta.avatar %>" class="size-4 rounded-full">
164
+ <% } %>
165
+ <%= revision.meta.operatorMeta.name %>
166
+ </div>
167
+ </div>
168
+ </td>
169
+
170
+ <td class="whitespace-nowrap">
171
+ <div class="body-3 text-raketa-foreground/50">
172
+ <div class="flex items-center gap-1">
173
+ <svg xmlns="http://www.w3.org/2000/svg" class="size-4 text-raketa-foreground" viewBox="0 0 512 512">
174
+ <path d="M112.91 128A191.85 191.85 0 0064 254c-1.18 106.35 85.65 193.8 192 194 106.2.2 192-85.83 192-192 0-104.54-83.55-189.61-187.5-192a4.36 4.36 0 00-4.5 4.37V152" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" />
175
+ <path d="M233.38 278.63l-79-113a8.13 8.13 0 0111.32-11.32l113 79a32.5 32.5 0 01-37.25 53.26 33.21 33.21 0 01-8.07-7.94z" />
176
+ </svg>
177
+
178
+
179
+ <time data-pretty-expiration-time datetime="<%= revision.schedule.mergeAt %>"><%= revision.schedule.mergeAt %></time>
180
+ </div>
181
+ </div>
182
+ </td>
183
+
184
+ <td class="whitespace-nowrap">
185
+ <div class="actions-toolbar justify-end">
186
+ <form action="<%= `/${_context.locale}/${_context.resourceConfig.eventType}_revisions/${revision.id}/cancel_schedules` %>" method="post" class="inline-flex gap-2 items-center">
187
+ <%- f.submit('Remove schedule', { class: 'btn-text' }) %>
188
+ </form>
189
+
190
+ <button hx-delete="<%= `/${_context.locale}/${_context.resourceConfig.eventType}_revisions/${revision.id}` %>" hx-confirm="Are you sure?" type="button" class="btn-danger has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
191
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
192
+ <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" />
193
+ </svg>
194
+
195
+ Delete
196
+ </button>
197
+
198
+ <a href="/remote-login?redirect_to=/admin/<%= _context.resourceConfig.eventType %>-revisions/<%= revision.id %>/preview" target="_blank" class="btn-text has-icon">
199
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
200
+ <path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
201
+ <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
202
+ </svg>
203
+
204
+ Preview
205
+ </a>
206
+ </div>
207
+ </td>
208
+ </tr>
209
+ <% }); %>
210
+ </tbody>
211
+ </table>
212
+ </div>
213
+ <% } %>
214
+
106
215
  <div>
107
216
  <h4 class="pb-4 heading-3 items-center gap-2 flex">
108
217
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4 text-raketa-primary">
@@ -166,4 +275,4 @@
166
275
  </tbody>
167
276
  </table>
168
277
  </div>
169
- </div>
278
+ </div>
@@ -1,5 +1,5 @@
1
1
  <div class="actions-toolbar justify-end">
2
- <a href="/remote-login?redirect_to=/<%= translation.translationLocale %>/admin/<%= _context.resourceConfig.eventType %>-revisions/<%= translation.revisionId %>/builder" target="_blank" class="btn-text has-icon">
2
+ <a href="/remote-login?redirect_to=/<%= translation.translationLocale %>/admin/<%= _context.resourceConfig.eventType %>-revisions/<%= translation.revisionId %>/builder" class="btn-text has-icon">
3
3
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
4
4
  <path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" />
5
5
  </svg>
@@ -217,6 +217,21 @@
217
217
  timeStyle: "short"
218
218
  })
219
219
  })
220
+
221
+ document.querySelectorAll('time[data-pretty-expiration-time]').forEach(item => {
222
+ const dateStr = item.getAttribute("datetime");
223
+
224
+ const expTime = new Date(dateStr)
225
+
226
+ item.innerText = expTime.toLocaleString('en-GB', {
227
+ dateStyle: "short",
228
+ timeStyle: "short"
229
+ })
230
+
231
+ if (new Date() > expTime) {
232
+ item.style.color = 'red';
233
+ }
234
+ })
220
235
  })
221
236
  </script>
222
237
  </body>
@@ -6,6 +6,9 @@
6
6
 
7
7
  <%- f.field('publishing.title'), { required: true, hint: "Appears in the history of changes" } %>
8
8
  <%- f.field('publishing.description', { as: "textarea", hint: "Provide optional details" }) %>
9
+
10
+ <%- f.field('publishing.mergeAt', { type: 'datetime-local', label: 'Publish revision at (UTC)' }) %>
11
+
9
12
  <%- f.field('publishing.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
10
13
  <%- f.field('publishing.username', { required: true }) %>
11
14
  <%- f.field('publishing.password', { required: true }) %>
@@ -37,4 +40,4 @@
37
40
 
38
41
  visibilityEl.addEventListener("change", (e) => handleVisibilityChange(e.target.value));
39
42
  handleVisibilityChange(visibilityEl.value);
40
- </script>
43
+ </script>
@@ -1,5 +1,5 @@
1
1
  <div class="actions-toolbar justify-end">
2
- <a href="/remote-login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.pageType %>-revisions/<%= revision.id %>/builder" target="_blank" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
2
+ <a href="/remote-login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.pageType %>-revisions/<%= revision.id %>/builder" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
3
3
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
4
4
  <path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" />
5
5
  </svg>
@@ -35,7 +35,20 @@
35
35
  <% } %>
36
36
  </div>
37
37
 
38
- <% if (revisions.length) { %>
38
+ <%
39
+ const openedRevisions = []
40
+ const scheduledRevisions = []
41
+
42
+ revisions.forEach(r => {
43
+ if (r.schedule) {
44
+ scheduledRevisions.push(r)
45
+ } else {
46
+ openedRevisions.push(r)
47
+ }
48
+ })
49
+ %>
50
+
51
+ <% if (openedRevisions.length) { %>
39
52
  <div class="pb-8">
40
53
  <h4 class="pb-4 heading-3 flex items-center gap-2">
41
54
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4 text-raketa-primary">
@@ -57,9 +70,9 @@
57
70
  </thead>
58
71
 
59
72
  <tbody>
60
- <% revisions.forEach((revision, idx)=> { %>
73
+ <% openedRevisions.forEach((revision, idx)=> { %>
61
74
  <tr class="border-b border-mono-25">
62
- <td class="py-4 pl-2 w-full">
75
+ <td class="py-4 pl-2 w-1/2">
63
76
  <div class="flex gap-1 items-center">
64
77
  <% if (revision.meta && revision.meta.locked) { %>
65
78
  <div title="<%= revision.meta.lockMessage %>">
@@ -76,7 +89,9 @@
76
89
  <td class="whitespace-nowrap">
77
90
  <div class="body-3 text-raketa-foreground/50">
78
91
  <div class="flex items-center gap-1" title="<%= revision.meta.operatorMeta.name %>">
92
+ <% if (revision.meta.operatorMeta.avatar) { %>
79
93
  <img src="<%= revision.meta.operatorMeta.avatar %>" class="size-4 rounded-full">
94
+ <% } %>
80
95
  <%= revision.meta.operatorMeta.name %>
81
96
  </div>
82
97
  </div>
@@ -104,6 +119,100 @@
104
119
  </div>
105
120
  <% } %>
106
121
 
122
+ <% if (scheduledRevisions.length) { %>
123
+ <div class="pb-8">
124
+ <h4 class="pb-4 heading-3 flex items-center gap-2">
125
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4 text-raketa-primary">
126
+ <path fill-rule="evenodd" d="M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z" clip-rule="evenodd" />
127
+ <path d="M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z" />
128
+ </svg>
129
+
130
+ Scheduled for publication
131
+ </h4>
132
+
133
+ <table class="data-grid alt">
134
+ <thead>
135
+ <tr>
136
+ <th>Title</th>
137
+ <th>Scheduled by</th>
138
+ <th>Publish on</th>
139
+ <th>&nbsp;</th>
140
+ </tr>
141
+ </thead>
142
+
143
+ <tbody>
144
+ <% scheduledRevisions.forEach((revision, idx)=> { %>
145
+ <tr class="border-b border-mono-25">
146
+ <td class="py-4 pl-2 w-1/2">
147
+ <div class="flex gap-1 items-center">
148
+ <% if (revision.meta && revision.meta.locked) { %>
149
+ <div title="<%= revision.meta.lockMessage %>">
150
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-4">
151
+ <path fill-rule="evenodd" d="M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1Zm3 8V5.5a3 3 0 1 0-6 0V9h6Z" clip-rule="evenodd" />
152
+ </svg>
153
+ </div>
154
+ <% } %>
155
+
156
+ <%= revision.title %>
157
+ </div>
158
+ </td>
159
+
160
+ <td class="whitespace-nowrap">
161
+ <div class="body-3 text-raketa-foreground/50">
162
+ <div class="flex items-center gap-1" title="<%= revision.meta.operatorMeta.name %>">
163
+ <% if (revision.meta.operatorMeta.avatar) { %>
164
+ <img src="<%= revision.meta.operatorMeta.avatar %>" class="size-4 rounded-full">
165
+ <% } %>
166
+ <%= revision.meta.operatorMeta.name %>
167
+ </div>
168
+ </div>
169
+ </td>
170
+
171
+ <td class="whitespace-nowrap">
172
+ <div class="body-3 text-raketa-foreground/50">
173
+ <div class="flex items-center gap-1">
174
+ <svg xmlns="http://www.w3.org/2000/svg" class="size-4 text-raketa-foreground" viewBox="0 0 512 512">
175
+ <path d="M112.91 128A191.85 191.85 0 0064 254c-1.18 106.35 85.65 193.8 192 194 106.2.2 192-85.83 192-192 0-104.54-83.55-189.61-187.5-192a4.36 4.36 0 00-4.5 4.37V152" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" />
176
+ <path d="M233.38 278.63l-79-113a8.13 8.13 0 0111.32-11.32l113 79a32.5 32.5 0 01-37.25 53.26 33.21 33.21 0 01-8.07-7.94z" />
177
+ </svg>
178
+
179
+
180
+ <time data-pretty-expiration-time datetime="<%= revision.schedule.mergeAt %>"><%= revision.schedule.mergeAt %></time>
181
+ </div>
182
+ </div>
183
+ </td>
184
+
185
+ <td class="whitespace-nowrap">
186
+ <div class="actions-toolbar justify-end">
187
+ <form action="<%= `/${_context.locale}/${_context.resourceConfig.pageType}_revisions/${revision.id}/cancel_schedules` %>" method="post" class="inline-flex gap-2 items-center">
188
+ <%- f.submit('Remove schedule', { class: 'btn-text' }) %>
189
+ </form>
190
+
191
+ <button hx-delete="<%= `/${_context.locale}/${_context.resourceConfig.pageType}_revisions/${revision.id}` %>" hx-confirm="Are you sure?" type="button" class="btn-danger has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
192
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
193
+ <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" />
194
+ </svg>
195
+
196
+ Delete
197
+ </button>
198
+
199
+ <a href="/remote-login?redirect_to=/admin/<%= _context.resourceConfig.pageType %>-revisions/<%= revision.id %>/preview" target="_blank" class="btn-text has-icon">
200
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
201
+ <path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
202
+ <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
203
+ </svg>
204
+
205
+ Preview
206
+ </a>
207
+ </div>
208
+ </td>
209
+ </tr>
210
+ <% }); %>
211
+ </tbody>
212
+ </table>
213
+ </div>
214
+ <% } %>
215
+
107
216
  <div>
108
217
  <h4 class="pb-4 heading-3 items-center gap-2 flex">
109
218
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4 text-raketa-primary">
@@ -167,4 +276,4 @@
167
276
  </tbody>
168
277
  </table>
169
278
  </div>
170
- </div>
279
+ </div>
@@ -1,5 +1,5 @@
1
1
  <div class="actions-toolbar justify-end">
2
- <a href="/remote-login?redirect_to=/<%= translation.translationLocale %>/admin/<%= _context.resourceConfig.pageType %>-revisions/<%= translation.revisionId %>/builder" target="_blank" class="btn-text has-icon">
2
+ <a href="/remote-login?redirect_to=/<%= translation.translationLocale %>/admin/<%= _context.resourceConfig.pageType %>-revisions/<%= translation.revisionId %>/builder" class="btn-text has-icon">
3
3
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
4
4
  <path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" />
5
5
  </svg>