@raketa-cloud/admin 1.6.0 → 1.6.1

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.
@@ -2111,6 +2111,11 @@ select {
2111
2111
  line-height: 1.25rem;
2112
2112
  }
2113
2113
 
2114
+ .text-xs {
2115
+ font-size: 0.75rem;
2116
+ line-height: 1rem;
2117
+ }
2118
+
2114
2119
  .font-bold {
2115
2120
  font-weight: 700;
2116
2121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-cloud/admin",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "main": "src/index.js",
5
5
  "files": [
6
6
  "src/",
@@ -64,24 +64,27 @@
64
64
  <div class="my-4">
65
65
  <% _context.layout.sidebar.forEach((menu, idx) => { %>
66
66
  <% if (menu.submenus) { %>
67
+ <% const pathMatchesMenuItem = menu.submenus.some(item => _context.path.includes(item.link)) %>
67
68
 
68
69
  <div class="relative group-[.expanded]:hidden group/item">
69
- <div class="aspect-square w-full flex items-center justify-center group-hover/item:bg-raketa-primary">
70
- <div class="size-6 opacity-100 group-[.expanded]:opacity-50 text-raketa-primary group-hover/item:text-white">
70
+ <div title="<%= menu.label %>" class="aspect-square w-full flex items-center justify-center group-hover/item:bg-raketa-primary <%= pathMatchesMenuItem ? "bg-raketa-primary" : ""%>">
71
+ <div class="size-6 opacity-100 group-[.expanded]:opacity-50 text-raketa-primary group-hover/item:text-white <%= pathMatchesMenuItem ? "text-white" : ""%>">
71
72
  <%- atob(menu.icon) %>
72
73
  </div>
73
74
  </div>
74
75
 
75
76
  <div class="absolute z-50 top-0 left-[64px] w-[250px] border-l bg-[#F7F7FC] shadow-lg hidden group-hover/item:block">
76
77
  <% menu.submenus.forEach(submenu => { %>
77
- <a href="<%= `/${_context.locale}${submenu.link}` %>" class="block py-3 px-4 body-2 text-raketa-foreground/50 hover:text-raketa-foreground transition-all ease-in-out duration-300"><%= submenu.label %></a>
78
+ <a href="<%= `/${_context.locale}${submenu.link}` %>" title="<%= submenu.label %>" class="block py-3 px-4 body-2 <%= _context.path.includes(submenu.link) ? "text-raketa-foreground" : "text-raketa-foreground/50 hover:text-raketa-foreground transition-all ease-in-out duration-300" %>"><%= submenu.label %></a>
78
79
  <% }) %>
79
80
  </div>
80
81
  </div>
81
82
 
82
83
  <div class="hidden group-[.expanded]:block group/item">
83
- <details class="unstyled-details">
84
- <summary class="relative flex items-center gap-3 px-5 py-4 text-raketa-primary cursor-pointer transition-all duration-300 ease-in-out">
84
+ <details class="unstyled-details" <%= menu.submenus.some(submenu =>
85
+ _context.path.includes(submenu.link))
86
+ ? "open" : ''%>>
87
+ <summary title="<%= menu.label %>" class="relative flex items-center gap-3 px-5 py-4 text-raketa-primary cursor-pointer transition-all duration-300 ease-in-out">
85
88
  <div class="size-6 opacity-100 group-[.expanded]:opacity-50">
86
89
  <%- atob(menu.icon) %>
87
90
  </div>
@@ -95,16 +98,23 @@
95
98
 
96
99
  <div class="pl-12 py-4 bg-raketa-background/50 group-[.expanded]:block hidden">
97
100
  <% menu.submenus.forEach(submenu => { %>
98
- <a href="<%= `/${_context.locale}${submenu.link}` %>" class="block py-2 body-2 text-raketa-foreground/50 hover:text-raketa-foreground transition-all ease-in-out duration-300"><%= submenu.label %></a>
101
+ <a href="<%= `/${_context.locale}${submenu.link}` %>" title="<%= submenu.label %>" class="block py-2 body-2 <%= _context.path.includes(submenu.link) ? "text-raketa-foreground" : "text-raketa-foreground/50 hover:text-raketa-foreground transition-all ease-in-out duration-300" %>"><%= submenu.label %></a>
99
102
  <% }) %>
100
103
  </div>
101
104
  </details>
102
105
  </div>
103
106
 
104
107
  <% } else { %>
105
-
106
- <div class="group/item">
107
- <a href="<%= `/${_context.locale}${menu.link}` %>" title="<%= menu.label %>" class="relative flex items-center gap-3 px-5 py-4 text-raketa-primary hover:bg-raketa-primary hover:text-white group-[.is-active]/item:bg-raketa-primary group-[.is-active]/item:text-white">
108
+ <%
109
+ const menuLink = menu.link.replace('/', '');
110
+ const directMatch = _context.path.includes(`/${_context.locale}/${menuLink}`);
111
+ const singularMenuLink = menuLink.endsWith('s') ? menuLink.slice(0, -1) : menuLink;
112
+ const revisionMatch = _context.path.includes(`/${_context.locale}/${singularMenuLink}_revision`);
113
+ const pathMatchesMenuItem = directMatch || revisionMatch;
114
+ %>
115
+
116
+ <div class="group/item <%= pathMatchesMenuItem ? 'is-active' : '' %>">
117
+ <a href="<%= `/${_context.locale}${menu.link}` %>" title="<%= menu.label %>" class="relative flex items-center gap-3 px-5 py-4 <%= pathMatchesMenuItem ? 'bg-raketa-primary text-white' : 'text-raketa-primary hover:bg-raketa-primary hover:text-white' %> group-[.is-active]/item:bg-raketa-primary group-[.is-active]/item:text-white">
108
118
  <div class="size-6 opacity-100 group-[.expanded]:opacity-50">
109
119
  <%- atob(menu.icon) %>
110
120
  </div>
@@ -300,4 +310,4 @@
300
310
  </script>
301
311
  </body>
302
312
 
303
- </html>
313
+ </html>
@@ -50,9 +50,9 @@
50
50
  </td>
51
51
 
52
52
  <td class="py-4 pl-2">
53
- <div class="flex items-center gap-2">
53
+ <div class="flex flex-col gap-2">
54
54
  <%= history.changeReason(change) %>
55
- </div>
55
+ <%- !skipPagination && change.description ? `<p class="text-xs opacity-60">${change.description}</p>` : '' %> </div>
56
56
  </td>
57
57
 
58
58
  <td>