@shamar/adonis 0.1.2 → 0.1.4
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/README.md +94 -2
- package/assets/admin.css +1 -1
- package/assets/shamar-ui.js +290 -5
- package/dist/auth/ldap.d.ts +115 -0
- package/dist/auth/ldap.d.ts.map +1 -0
- package/dist/auth/ldap.js +275 -0
- package/dist/auth/ldap.js.map +1 -0
- package/dist/auth/masquerade.d.ts +31 -0
- package/dist/auth/masquerade.d.ts.map +1 -0
- package/dist/auth/masquerade.js +36 -0
- package/dist/auth/masquerade.js.map +1 -0
- package/dist/auth_login_view.d.ts +56 -0
- package/dist/auth_login_view.d.ts.map +1 -0
- package/dist/auth_login_view.js +56 -0
- package/dist/auth_login_view.js.map +1 -0
- package/dist/commands/commands.json +1 -0
- package/dist/commands/main.d.ts +4 -0
- package/dist/commands/main.js +36 -0
- package/dist/commands/publish_auth.d.ts +13 -0
- package/dist/commands/publish_auth.d.ts.map +1 -0
- package/dist/commands/publish_auth.js +26 -0
- package/dist/commands/publish_auth.js.map +1 -0
- package/dist/config.d.ts +59 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/configure.d.ts +16 -1
- package/dist/configure.d.ts.map +1 -1
- package/dist/configure.js +6 -0
- package/dist/configure.js.map +1 -1
- package/dist/context.d.ts +3 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/controllers/admin_controller.d.ts +1 -0
- package/dist/controllers/admin_controller.d.ts.map +1 -1
- package/dist/controllers/admin_controller.js +91 -9
- package/dist/controllers/admin_controller.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +2 -1
- package/dist/provider.js.map +1 -1
- package/dist/publish_auth.d.ts +45 -0
- package/dist/publish_auth.d.ts.map +1 -0
- package/dist/publish_auth.js +69 -0
- package/dist/publish_auth.js.map +1 -0
- package/dist/resources/api_key_resource.d.ts +4 -6
- package/dist/resources/api_key_resource.d.ts.map +1 -1
- package/dist/resources/api_key_resource.js +4 -16
- package/dist/resources/api_key_resource.js.map +1 -1
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +27 -5
- package/dist/routes.js.map +1 -1
- package/dist/shamar/auth.d.ts +13 -1
- package/dist/shamar/auth.d.ts.map +1 -1
- package/dist/shamar/auth.js +42 -5
- package/dist/shamar/auth.js.map +1 -1
- package/dist/shamar/list-query.d.ts +9 -0
- package/dist/shamar/list-query.d.ts.map +1 -1
- package/dist/shamar/list-query.js +29 -1
- package/dist/shamar/list-query.js.map +1 -1
- package/dist/shamar/relation-fields.d.ts +15 -0
- package/dist/shamar/relation-fields.d.ts.map +1 -1
- package/dist/shamar/relation-fields.js +25 -4
- package/dist/shamar/relation-fields.js.map +1 -1
- package/dist/shamar/relation-table.d.ts +37 -0
- package/dist/shamar/relation-table.d.ts.map +1 -0
- package/dist/shamar/relation-table.js +61 -0
- package/dist/shamar/relation-table.js.map +1 -0
- package/dist/shamar/view-context.d.ts +8 -0
- package/dist/shamar/view-context.d.ts.map +1 -1
- package/dist/shamar/view-context.js +1 -0
- package/dist/shamar/view-context.js.map +1 -1
- package/package.json +15 -6
- package/resources/views/shamar/partials/detail-entry.edge +7 -0
- package/resources/views/shamar/partials/field-relation-table.edge +309 -105
- package/resources/views/shamar/partials/list-row.edge +17 -4
- package/resources/views/shamar/partials/nav.edge +6 -1
- package/resources/views/shamar/partials/shell-open.edge +14 -0
- package/resources/views/shamar/partials/topbar.edge +3 -0
- package/resources/views/shamar/show.edge +59 -20
- package/stubs/views/auth/layout.edge +244 -0
- package/stubs/views/auth/login.edge +65 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>{{ title || branding.brandName || brandName || 'Sign in' }}</title>
|
|
7
|
+
@if(branding.fontPreconnect)
|
|
8
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
|
+
@endif
|
|
11
|
+
@if(branding.fontUrl)
|
|
12
|
+
<link rel="stylesheet" href="{{ branding.fontUrl }}" />
|
|
13
|
+
@endif
|
|
14
|
+
<style>
|
|
15
|
+
{{{ brandingCss }}}
|
|
16
|
+
|
|
17
|
+
:root {
|
|
18
|
+
--auth-bg: var(--color-shamar-shell, #f8fafc);
|
|
19
|
+
--auth-surface: var(--color-neutral-primary, #ffffff);
|
|
20
|
+
--auth-heading: var(--color-heading, #0f172a);
|
|
21
|
+
--auth-body: var(--color-body, #475569);
|
|
22
|
+
--auth-muted: var(--color-body-subtle, #64748b);
|
|
23
|
+
--auth-line: color-mix(in srgb, var(--color-default, #cbd5e1) 55%, transparent);
|
|
24
|
+
--auth-primary: var(--color-fg-brand, var(--color-primary-500, #f1511b));
|
|
25
|
+
--auth-primary-strong: var(--color-fg-brand-strong, var(--color-primary-700, #c94115));
|
|
26
|
+
--auth-primary-soft: var(--color-brand-soft, var(--color-primary-100, #fee9e2));
|
|
27
|
+
--auth-accent: var(--color-shamar-accent, #286291);
|
|
28
|
+
--auth-font: var(--shamar-font-family, ui-sans-serif, system-ui, sans-serif);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
* { box-sizing: border-box; }
|
|
32
|
+
|
|
33
|
+
html, body {
|
|
34
|
+
min-height: 100%;
|
|
35
|
+
margin: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
body {
|
|
39
|
+
font-family: var(--auth-font);
|
|
40
|
+
color: var(--auth-body);
|
|
41
|
+
background: var(--auth-bg);
|
|
42
|
+
-webkit-font-smoothing: antialiased;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.auth-shell {
|
|
46
|
+
position: relative;
|
|
47
|
+
min-height: 100vh;
|
|
48
|
+
display: grid;
|
|
49
|
+
place-items: center;
|
|
50
|
+
padding: clamp(1.5rem, 4vw, 3rem);
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.auth-atmosphere {
|
|
55
|
+
position: absolute;
|
|
56
|
+
inset: 0;
|
|
57
|
+
background:
|
|
58
|
+
radial-gradient(900px 520px at 8% 12%, color-mix(in srgb, var(--auth-primary) 18%, transparent), transparent 58%),
|
|
59
|
+
radial-gradient(780px 480px at 92% 86%, color-mix(in srgb, var(--auth-accent) 16%, transparent), transparent 55%),
|
|
60
|
+
var(--auth-bg);
|
|
61
|
+
animation: auth-drift 18s ease-in-out infinite alternate;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.auth-frame {
|
|
65
|
+
position: relative;
|
|
66
|
+
z-index: 1;
|
|
67
|
+
width: min(100%, 26rem);
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
gap: 1.75rem;
|
|
71
|
+
animation: auth-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.auth-brand {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
gap: 0.7rem;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.auth-brand__logo {
|
|
81
|
+
display: block;
|
|
82
|
+
max-height: 2.75rem;
|
|
83
|
+
width: auto;
|
|
84
|
+
object-fit: contain;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.auth-brand__name {
|
|
88
|
+
margin: 0;
|
|
89
|
+
font-family: var(--auth-font);
|
|
90
|
+
font-size: clamp(2rem, 5vw, 2.6rem);
|
|
91
|
+
font-weight: 700;
|
|
92
|
+
letter-spacing: -0.03em;
|
|
93
|
+
line-height: 1.08;
|
|
94
|
+
color: var(--auth-heading);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.auth-brand__tag {
|
|
98
|
+
margin: 0;
|
|
99
|
+
max-width: 22rem;
|
|
100
|
+
color: var(--auth-muted);
|
|
101
|
+
font-size: 1.02rem;
|
|
102
|
+
line-height: 1.45;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.auth-panel {
|
|
106
|
+
padding: 1.35rem 1.35rem 1.4rem;
|
|
107
|
+
border: 1px solid var(--auth-line);
|
|
108
|
+
border-radius: 0.85rem;
|
|
109
|
+
background: color-mix(in srgb, var(--auth-surface) 92%, transparent);
|
|
110
|
+
backdrop-filter: blur(8px);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.auth-alert {
|
|
114
|
+
margin: 0 0 1.1rem;
|
|
115
|
+
padding: 0.75rem 0.9rem;
|
|
116
|
+
border-left: 3px solid var(--auth-primary);
|
|
117
|
+
background: var(--auth-primary-soft);
|
|
118
|
+
color: var(--auth-primary-strong);
|
|
119
|
+
font-size: 0.92rem;
|
|
120
|
+
border-radius: 0 0.4rem 0.4rem 0;
|
|
121
|
+
animation: auth-rise 0.4s ease both;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.auth-form {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
gap: 1.1rem;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.auth-field {
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
gap: 0.4rem;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.auth-field label {
|
|
137
|
+
font-size: 0.82rem;
|
|
138
|
+
font-weight: 600;
|
|
139
|
+
letter-spacing: 0.01em;
|
|
140
|
+
color: var(--auth-heading);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.auth-field input {
|
|
144
|
+
width: 100%;
|
|
145
|
+
border: 1px solid var(--auth-line);
|
|
146
|
+
border-radius: 0.55rem;
|
|
147
|
+
background: var(--auth-surface);
|
|
148
|
+
color: var(--auth-heading);
|
|
149
|
+
font: inherit;
|
|
150
|
+
font-size: 1rem;
|
|
151
|
+
padding: 0.8rem 0.95rem;
|
|
152
|
+
outline: none;
|
|
153
|
+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.auth-field input::placeholder {
|
|
157
|
+
color: color-mix(in srgb, var(--auth-muted) 80%, transparent);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.auth-field input:focus {
|
|
161
|
+
border-color: color-mix(in srgb, var(--auth-primary) 70%, white);
|
|
162
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-primary) 22%, transparent);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.auth-submit {
|
|
166
|
+
margin-top: 0.25rem;
|
|
167
|
+
appearance: none;
|
|
168
|
+
border: 0;
|
|
169
|
+
border-radius: 0.55rem;
|
|
170
|
+
background: var(--auth-primary);
|
|
171
|
+
color: #fff;
|
|
172
|
+
font: inherit;
|
|
173
|
+
font-weight: 600;
|
|
174
|
+
font-size: 1rem;
|
|
175
|
+
padding: 0.9rem 1rem;
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.auth-submit:hover {
|
|
181
|
+
background: var(--auth-primary-strong);
|
|
182
|
+
filter: brightness(1.02);
|
|
183
|
+
transform: translateY(-1px);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.auth-submit:active {
|
|
187
|
+
transform: translateY(0);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.auth-hint {
|
|
191
|
+
margin: 1rem 0 0;
|
|
192
|
+
color: var(--auth-muted);
|
|
193
|
+
font-size: 0.82rem;
|
|
194
|
+
line-height: 1.4;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.auth-masquerade {
|
|
198
|
+
margin: 0.75rem 0 0;
|
|
199
|
+
padding: 0.55rem 0.75rem;
|
|
200
|
+
border-radius: 0.5rem;
|
|
201
|
+
border: 1px solid color-mix(in srgb, #b45309 35%, transparent);
|
|
202
|
+
background: color-mix(in srgb, #d97706 12%, transparent);
|
|
203
|
+
color: #92400e;
|
|
204
|
+
font-size: 0.8rem;
|
|
205
|
+
line-height: 1.4;
|
|
206
|
+
text-align: center;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.auth-footer {
|
|
210
|
+
margin: 0;
|
|
211
|
+
text-align: center;
|
|
212
|
+
color: var(--auth-muted);
|
|
213
|
+
font-size: 0.78rem;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@keyframes auth-drift {
|
|
217
|
+
from { transform: scale(1) translate3d(0, 0, 0); }
|
|
218
|
+
to { transform: scale(1.04) translate3d(-1%, 0.8%, 0); }
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@keyframes auth-rise {
|
|
222
|
+
from {
|
|
223
|
+
opacity: 0;
|
|
224
|
+
transform: translateY(10px);
|
|
225
|
+
}
|
|
226
|
+
to {
|
|
227
|
+
opacity: 1;
|
|
228
|
+
transform: translateY(0);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
</style>
|
|
232
|
+
</head>
|
|
233
|
+
<body>
|
|
234
|
+
<div class="auth-shell">
|
|
235
|
+
<div class="auth-atmosphere" aria-hidden="true"></div>
|
|
236
|
+
<div class="auth-frame">
|
|
237
|
+
{{{ await $slots.main() }}}
|
|
238
|
+
@if(branding.copyrightText)
|
|
239
|
+
<p class="auth-footer">{{ branding.copyrightText }}</p>
|
|
240
|
+
@endif
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
</body>
|
|
244
|
+
</html>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@layouts.auth({
|
|
2
|
+
title: (branding.brandName || brandName || 'Admin') + ' · Sign in',
|
|
3
|
+
branding,
|
|
4
|
+
brandingCss,
|
|
5
|
+
brandName: branding.brandName || brandName || 'Admin',
|
|
6
|
+
})
|
|
7
|
+
<header class="auth-brand">
|
|
8
|
+
@if(branding.logoUrl)
|
|
9
|
+
<img
|
|
10
|
+
class="auth-brand__logo"
|
|
11
|
+
src="{{ branding.logoUrl }}"
|
|
12
|
+
alt="{{ branding.brandName || brandName || 'Admin' }}"
|
|
13
|
+
/>
|
|
14
|
+
@else
|
|
15
|
+
<p class="auth-brand__name">{{ branding.brandName || brandName || 'Admin' }}</p>
|
|
16
|
+
@endif
|
|
17
|
+
@if(loginSubtitle)
|
|
18
|
+
<p class="auth-brand__tag">{{ loginSubtitle }}</p>
|
|
19
|
+
@endif
|
|
20
|
+
</header>
|
|
21
|
+
|
|
22
|
+
<div class="auth-panel">
|
|
23
|
+
@if(flashMessages.has('error'))
|
|
24
|
+
<p class="auth-alert" role="alert">{{ flashMessages.get('error') }}</p>
|
|
25
|
+
@end
|
|
26
|
+
|
|
27
|
+
<form method="POST" action="{{ route('session.store') }}" class="auth-form">
|
|
28
|
+
{{ csrfField() }}
|
|
29
|
+
|
|
30
|
+
<div class="auth-field">
|
|
31
|
+
<label for="email">{{ loginUsernameLabel }}</label>
|
|
32
|
+
<input
|
|
33
|
+
id="email"
|
|
34
|
+
type="{{ loginMode === 'local' ? 'email' : 'text' }}"
|
|
35
|
+
name="email"
|
|
36
|
+
autocomplete="username"
|
|
37
|
+
required
|
|
38
|
+
autofocus
|
|
39
|
+
placeholder="{{ loginUsernamePlaceholder }}"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="auth-field">
|
|
44
|
+
<label for="password">Password</label>
|
|
45
|
+
<input
|
|
46
|
+
id="password"
|
|
47
|
+
type="password"
|
|
48
|
+
name="password"
|
|
49
|
+
autocomplete="current-password"
|
|
50
|
+
required
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<button type="submit" class="auth-submit">Sign in</button>
|
|
55
|
+
</form>
|
|
56
|
+
|
|
57
|
+
@if(loginFooter)
|
|
58
|
+
<p class="auth-hint">{{ loginFooter }}</p>
|
|
59
|
+
@endif
|
|
60
|
+
|
|
61
|
+
@if(masqueradeEnabled)
|
|
62
|
+
<p class="auth-masquerade" role="note">Masquerade enabled (non-production).</p>
|
|
63
|
+
@endif
|
|
64
|
+
</div>
|
|
65
|
+
@end
|