@raketa-cloud/admin 0.0.100 → 0.0.103
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/dist/application.css +3804 -0
- package/package.json +7 -2
- package/src/views/articles/_shared/history_table.ejs +3 -3
- package/src/views/articles/show.ejs +2 -2
- package/src/views/events/_shared/history_table.ejs +2 -2
- package/src/views/events/show.ejs +2 -2
- package/src/views/pages/_shared/history_table.ejs +2 -2
- package/src/views/pages/show.ejs +18 -18
- package/babel.config.js +0 -6
- package/bin/tailwind +0 -2
- package/jest.config.js +0 -22
- package/tailwind.config.js +0 -40
- package/tsconfig.json +0 -15
- package/tsconfig.lint.json +0 -8
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raketa-cloud/admin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.103",
|
|
4
4
|
"main": "src/index.js",
|
|
5
|
+
"files": [
|
|
6
|
+
"src/",
|
|
7
|
+
"dist/"
|
|
8
|
+
],
|
|
5
9
|
"scripts": {
|
|
6
10
|
"dev": "npx tailwindcss -i ./src/styles/application.css -o ../../apps/admin/static/application.css --watch",
|
|
7
|
-
"test": "jest --coverage --coverageReporters=html --coverageReporters=\"text-summary\""
|
|
11
|
+
"test": "jest --coverage --coverageReporters=html --coverageReporters=\"text-summary\"",
|
|
12
|
+
"prepare": "npx tailwindcss -i ./src/styles/application.css -o ./dist/application.css"
|
|
8
13
|
},
|
|
9
14
|
"devDependencies": {
|
|
10
15
|
"@babel/core": "7.24.7",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% const maxVersion = history.getMaxVersion(changes); %>
|
|
2
2
|
|
|
3
|
-
<div class="history-table-wrapper">
|
|
3
|
+
<div class="mb-4 history-table-wrapper">
|
|
4
4
|
<table class="data-grid">
|
|
5
5
|
<thead>
|
|
6
6
|
<tr>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<div class="body-3 text-raketa-foreground/50">
|
|
35
35
|
<div class="flex items-center gap-1" title="<%= change.operatorMeta.name %>">
|
|
36
36
|
<% if (change.operatorMeta.avatar) { %>
|
|
37
|
-
<img src="<%= change.operatorMeta.avatar %>" class="size-4
|
|
37
|
+
<img src="<%= change.operatorMeta.avatar %>" class="rounded-full size-4">
|
|
38
38
|
<% } %>
|
|
39
39
|
|
|
40
40
|
<%= change.operatorMeta.name %>
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
<% if (!skipPagination) { %>
|
|
66
66
|
<%- pagination(changes.pagination, _context) %>
|
|
67
67
|
<% } %>
|
|
68
|
-
</div>
|
|
68
|
+
</div>
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
</div>
|
|
209
209
|
<% } %>
|
|
210
210
|
|
|
211
|
-
<div>
|
|
211
|
+
<div class="mb-4">
|
|
212
212
|
<h4 class="pb-4 heading-3 items-center gap-2 flex">
|
|
213
213
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4 text-raketa-primary">
|
|
214
214
|
<path d="M3.375 3C2.339 3 1.5 3.84 1.5 4.875v.75c0 1.036.84 1.875 1.875 1.875h17.25c1.035 0 1.875-.84 1.875-1.875v-.75C22.5 3.839 21.66 3 20.625 3H3.375Z" />
|
|
@@ -231,4 +231,4 @@
|
|
|
231
231
|
Full page history
|
|
232
232
|
</a>
|
|
233
233
|
</div>
|
|
234
|
-
</div>
|
|
234
|
+
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% const maxVersion = history.getMaxVersion(changes); %>
|
|
2
2
|
|
|
3
|
-
<div class="history-table-wrapper">
|
|
3
|
+
<div class="history-table-wrapper mb-4">
|
|
4
4
|
<table class="data-grid">
|
|
5
5
|
<thead>
|
|
6
6
|
<tr>
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
<% if (!skipPagination) { %>
|
|
66
66
|
<%- pagination(changes.pagination, _context) %>
|
|
67
67
|
<% } %>
|
|
68
|
-
</div>
|
|
68
|
+
</div>
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
</div>
|
|
209
209
|
<% } %>
|
|
210
210
|
|
|
211
|
-
<div>
|
|
211
|
+
<div class="mb-4">
|
|
212
212
|
<h4 class="pb-4 heading-3 items-center gap-2 flex">
|
|
213
213
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4 text-raketa-primary">
|
|
214
214
|
<path d="M3.375 3C2.339 3 1.5 3.84 1.5 4.875v.75c0 1.036.84 1.875 1.875 1.875h17.25c1.035 0 1.875-.84 1.875-1.875v-.75C22.5 3.839 21.66 3 20.625 3H3.375Z" />
|
|
@@ -231,4 +231,4 @@
|
|
|
231
231
|
Full page history
|
|
232
232
|
</a>
|
|
233
233
|
</div>
|
|
234
|
-
</div>
|
|
234
|
+
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% const maxVersion = history.getMaxVersion(changes); %>
|
|
2
2
|
|
|
3
|
-
<div class="history-table-wrapper">
|
|
3
|
+
<div class="history-table-wrapper mb-4">
|
|
4
4
|
<table class="data-grid">
|
|
5
5
|
<thead>
|
|
6
6
|
<tr>
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
<% if (!skipPagination) { %>
|
|
66
66
|
<%- pagination(changes.pagination, _context) %>
|
|
67
67
|
<% } %>
|
|
68
|
-
</div>
|
|
68
|
+
</div>
|
package/src/views/pages/show.ejs
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
<% Object.keys(_context.locales).forEach(key => { %>
|
|
17
17
|
<% const { name, _code, flag} = _context.locales[key] %>
|
|
18
18
|
<% if (key === _context.locale) { %>
|
|
19
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="
|
|
19
|
+
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="border rounded-full size-6 dark:border-neutral-700" />
|
|
20
20
|
<% } else if (resource.translations[key]) { %>
|
|
21
21
|
<a href="<%= `/${key}/${_context.resourceConfig.pageTypePlural}/${resource.translations[key].id}` %>">
|
|
22
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="
|
|
22
|
+
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="border rounded-full size-6 dark:border-neutral-700" />
|
|
23
23
|
</a>
|
|
24
24
|
<% } else { %>
|
|
25
25
|
<a href="<%= `/${_context.locale}/${_context.resourceConfig.pageTypePlural}/${resource.id}/translations/new?target_locale=${key}` %>">
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<% }); %>
|
|
30
30
|
|
|
31
31
|
<% if (canBeTranslated) { %>
|
|
32
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.pageTypePlural}/${resource.id}/translations/new` %>" class="btn-text
|
|
32
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.pageTypePlural}/${resource.id}/translations/new` %>" class="ml-2 btn-text">
|
|
33
33
|
Translate
|
|
34
34
|
</a>
|
|
35
35
|
<% } %>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
<% if (openedRevisions.length) { %>
|
|
52
52
|
<div class="pb-8">
|
|
53
|
-
<h4 class="
|
|
53
|
+
<h4 class="flex items-center gap-2 pb-4 heading-3">
|
|
54
54
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4 text-raketa-primary">
|
|
55
55
|
<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" />
|
|
56
56
|
<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" />
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
<tbody>
|
|
73
73
|
<% openedRevisions.forEach((revision, idx)=> { %>
|
|
74
74
|
<tr class="border-b border-mono-25">
|
|
75
|
-
<td class="py-4 pl-2
|
|
76
|
-
<div class="flex gap-1
|
|
75
|
+
<td class="w-1/2 py-4 pl-2">
|
|
76
|
+
<div class="flex items-center gap-1">
|
|
77
77
|
<% if (revision.meta && revision.meta.locked) { %>
|
|
78
78
|
<div title="<%= revision.meta.lockMessage %>">
|
|
79
79
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-4">
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
<div class="body-3 text-raketa-foreground/50">
|
|
91
91
|
<div class="flex items-center gap-1" title="<%= revision.meta.operatorMeta.name %>">
|
|
92
92
|
<% if (revision.meta.operatorMeta.avatar) { %>
|
|
93
|
-
<img src="<%= revision.meta.operatorMeta.avatar %>" class="size-4
|
|
93
|
+
<img src="<%= revision.meta.operatorMeta.avatar %>" class="rounded-full size-4">
|
|
94
94
|
<% } %>
|
|
95
95
|
<%= revision.meta.operatorMeta.name %>
|
|
96
96
|
</div>
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
|
|
122
122
|
<% if (scheduledRevisions.length) { %>
|
|
123
123
|
<div class="pb-8">
|
|
124
|
-
<h4 class="
|
|
124
|
+
<h4 class="flex items-center gap-2 pb-4 heading-3">
|
|
125
125
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4 text-raketa-primary">
|
|
126
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
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" />
|
|
@@ -144,8 +144,8 @@
|
|
|
144
144
|
<tbody>
|
|
145
145
|
<% scheduledRevisions.forEach((revision, idx)=> { %>
|
|
146
146
|
<tr class="border-b border-mono-25">
|
|
147
|
-
<td class="py-4 pl-2
|
|
148
|
-
<div class="flex gap-1
|
|
147
|
+
<td class="w-1/2 py-4 pl-2">
|
|
148
|
+
<div class="flex items-center gap-1">
|
|
149
149
|
<%= revision.title %>
|
|
150
150
|
</div>
|
|
151
151
|
</td>
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
<div class="body-3 text-raketa-foreground/50">
|
|
155
155
|
<div class="flex items-center gap-1" title="<%= revision.meta.operatorMeta.name %>">
|
|
156
156
|
<% if (revision.meta.operatorMeta.avatar) { %>
|
|
157
|
-
<img src="<%= revision.meta.operatorMeta.avatar %>" class="size-4
|
|
157
|
+
<img src="<%= revision.meta.operatorMeta.avatar %>" class="rounded-full size-4">
|
|
158
158
|
<% } %>
|
|
159
159
|
<%= revision.meta.operatorMeta.name %>
|
|
160
160
|
</div>
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
<div class="body-3 text-raketa-foreground/50">
|
|
166
166
|
<div class="flex items-center gap-1" title="<%= revision.schedule.operatorMeta.name %>">
|
|
167
167
|
<% if (revision.schedule.operatorMeta.avatar) { %>
|
|
168
|
-
<img src="<%= revision.schedule.operatorMeta.avatar %>" class="size-4
|
|
168
|
+
<img src="<%= revision.schedule.operatorMeta.avatar %>" class="rounded-full size-4">
|
|
169
169
|
<% } %>
|
|
170
170
|
<%= revision.schedule.operatorMeta.name %>
|
|
171
171
|
</div>
|
|
@@ -187,8 +187,8 @@
|
|
|
187
187
|
</td>
|
|
188
188
|
|
|
189
189
|
<td class="whitespace-nowrap">
|
|
190
|
-
<div class="actions-toolbar
|
|
191
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.pageType}_revisions/${revision.id}/cancel_schedules` %>" method="post" class="inline-flex gap-2
|
|
190
|
+
<div class="justify-end actions-toolbar">
|
|
191
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.pageType}_revisions/${revision.id}/cancel_schedules` %>" method="post" class="inline-flex items-center gap-2">
|
|
192
192
|
<%- f.submit('Remove schedule', { class: 'btn-text' }) %>
|
|
193
193
|
</form>
|
|
194
194
|
|
|
@@ -209,8 +209,8 @@
|
|
|
209
209
|
</div>
|
|
210
210
|
<% } %>
|
|
211
211
|
|
|
212
|
-
<div>
|
|
213
|
-
<h4 class="
|
|
212
|
+
<div class="mb-4">
|
|
213
|
+
<h4 class="flex items-center gap-2 pb-4 heading-3">
|
|
214
214
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4 text-raketa-primary">
|
|
215
215
|
<path d="M3.375 3C2.339 3 1.5 3.84 1.5 4.875v.75c0 1.036.84 1.875 1.875 1.875h17.25c1.035 0 1.875-.84 1.875-1.875v-.75C22.5 3.839 21.66 3 20.625 3H3.375Z" />
|
|
216
216
|
<path fill-rule="evenodd" d="m3.087 9 .54 9.176A3 3 0 0 0 6.62 21h10.757a3 3 0 0 0 2.995-2.824L20.913 9H3.087Zm6.163 3.75A.75.75 0 0 1 10 12h4a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1-.75-.75Z" clip-rule="evenodd" />
|
|
@@ -228,8 +228,8 @@
|
|
|
228
228
|
toolbarPath: './_shared/_history_toolbar.ejs'
|
|
229
229
|
}) %>
|
|
230
230
|
|
|
231
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.pageTypePlural}/${resource.id}/history` %>" class="
|
|
231
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.pageTypePlural}/${resource.id}/history` %>" class="ml-2 btn-text">
|
|
232
232
|
Full page history
|
|
233
233
|
</a>
|
|
234
234
|
</div>
|
|
235
|
-
</div>
|
|
235
|
+
</div>
|
package/babel.config.js
DELETED
package/bin/tailwind
DELETED
package/jest.config.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** @type {import('jest').Config} */
|
|
2
|
-
const config = {
|
|
3
|
-
collectCoverageFrom: [
|
|
4
|
-
"**/*.{js,jsx}",
|
|
5
|
-
"!**/*.config.js",
|
|
6
|
-
"!**/node_modules/**",
|
|
7
|
-
"!**/vendor/**",
|
|
8
|
-
"!**/cloud/**",
|
|
9
|
-
"!**/coverage/**",
|
|
10
|
-
"!**/tests/support/**",
|
|
11
|
-
],
|
|
12
|
-
coverageThreshold: {
|
|
13
|
-
global: {
|
|
14
|
-
branches: 72,
|
|
15
|
-
functions: 75,
|
|
16
|
-
lines: 78,
|
|
17
|
-
statements: 78,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
module.exports = config;
|
package/tailwind.config.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/** @type {import('tailwindcss').Config} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
content: ["./src/**/*.{html,js,ejs}", "../../apps/**/*.{html,js,ejs}"],
|
|
4
|
-
darkMode: 'selector',
|
|
5
|
-
theme: {
|
|
6
|
-
extend: {
|
|
7
|
-
colors: {
|
|
8
|
-
raketa: {
|
|
9
|
-
background: ({ opacityValue = 1 }) =>
|
|
10
|
-
`rgba(var(--background), ${opacityValue})`,
|
|
11
|
-
foreground: ({ opacityValue = 1 }) =>
|
|
12
|
-
`rgba(var(--foreground), ${opacityValue})`,
|
|
13
|
-
primary: ({ opacityValue = 1 }) =>
|
|
14
|
-
`rgba(var(--primary), ${opacityValue})`,
|
|
15
|
-
"primary-light": ({ opacityValue = 1 }) =>
|
|
16
|
-
`rgba(var(--primary-light), ${opacityValue})`,
|
|
17
|
-
"primary-dark": ({ opacityValue = 1 }) =>
|
|
18
|
-
`rgba(var(--primary-dark), ${opacityValue})`,
|
|
19
|
-
},
|
|
20
|
-
"mono-purple": {
|
|
21
|
-
25: "#F0F0F8",
|
|
22
|
-
100: "#9D9DD2",
|
|
23
|
-
300: "#6E6EB2",
|
|
24
|
-
},
|
|
25
|
-
mono: {
|
|
26
|
-
25: "#EAEAEA",
|
|
27
|
-
50: "#D0D1D2",
|
|
28
|
-
100: "#F6F6F6",
|
|
29
|
-
200: "#B7B7B7",
|
|
30
|
-
300: "#737373",
|
|
31
|
-
800: "#33333C",
|
|
32
|
-
850: "#232324",
|
|
33
|
-
900: "#1A1A1A",
|
|
34
|
-
950: "#1C1C1E",
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
plugins: [require("@tailwindcss/typography"), require("@tailwindcss/forms")],
|
|
40
|
-
};
|
package/tsconfig.json
DELETED