@svadmin/ui 0.35.0 → 0.37.0
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/app.css +436 -66
- package/dist/components/AutoForm.svelte +33 -48
- package/dist/components/AutoTable.svelte +24 -29
- package/dist/components/ErrorPage.svelte +1 -1
- package/dist/components/Header.svelte +6 -6
- package/dist/components/Layout.svelte +8 -8
- package/dist/components/PageHeader.svelte +7 -9
- package/dist/components/ResourceOperationsPage.svelte +12 -14
- package/dist/components/SettingsPage.svelte +14 -14
- package/dist/components/ShowPage.svelte +9 -9
- package/dist/components/Sidebar.svelte +73 -115
- package/dist/components/SidebarItem.svelte +37 -32
- package/dist/components/TwoFactorAuthPage.svelte +1 -1
- package/dist/components/account/CompanyProfilePage.svelte +1 -1
- package/dist/components/account/GetStartedPage.svelte +1 -1
- package/dist/components/account/ImportMembersPage.svelte +1 -1
- package/dist/components/account/MembersStarterPage.svelte +1 -1
- package/dist/components/account/SecurityLogPage.svelte +29 -2
- package/dist/components/account/SettingsEnterprisePage.svelte +1 -1
- package/dist/components/account/SettingsPlainPage.svelte +1 -1
- package/dist/components/account/SettingsSidebarPage.svelte +1 -1
- package/dist/components/account/TeamMembersPage.svelte +1 -1
- package/dist/components/network/TeamCrewTablePage.svelte +35 -2
- package/dist/components/network/UserCardsNFTPage.svelte +1 -1
- package/dist/components/profile/PublicProfilePage.svelte +1 -1
- package/dist/components/ui/pagination/pagination-ellipsis.svelte +1 -1
- package/package.json +2 -2
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
</script>
|
|
45
45
|
|
|
46
|
-
<div class="space-y-6">
|
|
46
|
+
<div class="space-y-6" data-svadmin-content-page="account">
|
|
47
47
|
<div class="flex items-start justify-between gap-4">
|
|
48
48
|
<div>
|
|
49
49
|
<h2 class="text-xl font-semibold text-foreground">{t('account.securityLog')}</h2>
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
<!-- Log table -->
|
|
75
75
|
<Card.Card class="border-border/60">
|
|
76
76
|
<Card.CardContent class="p-0">
|
|
77
|
-
<div class="overflow-x-auto">
|
|
77
|
+
<div class="hidden overflow-x-auto md:block">
|
|
78
78
|
<table class="w-full">
|
|
79
79
|
<thead>
|
|
80
80
|
<tr class="border-b bg-muted/30">
|
|
@@ -103,6 +103,33 @@
|
|
|
103
103
|
</tbody>
|
|
104
104
|
</table>
|
|
105
105
|
</div>
|
|
106
|
+
<div class="divide-y md:hidden">
|
|
107
|
+
{#each filteredLogs as log (log.id)}
|
|
108
|
+
<div class="space-y-3 p-4">
|
|
109
|
+
<div class="flex items-start justify-between gap-3">
|
|
110
|
+
<div class="flex min-w-0 items-center gap-2">
|
|
111
|
+
<span class="inline-flex h-2 w-2 shrink-0 rounded-full {log.severity === 'critical' ? 'bg-red-500' : log.severity === 'warning' ? 'bg-amber-500' : 'bg-blue-500'}"></span>
|
|
112
|
+
<span class="truncate text-sm font-medium text-foreground">{log.eventLabel}</span>
|
|
113
|
+
</div>
|
|
114
|
+
<span class="shrink-0 text-xs text-muted-foreground">{log.time}</span>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="grid gap-2 text-xs text-muted-foreground">
|
|
117
|
+
<div class="flex items-center justify-between gap-3">
|
|
118
|
+
<span>{t('securityLog.ip')}</span>
|
|
119
|
+
<span class="font-mono text-foreground">{log.ip}</span>
|
|
120
|
+
</div>
|
|
121
|
+
<div class="flex items-center justify-between gap-3">
|
|
122
|
+
<span>{t('securityLog.device')}</span>
|
|
123
|
+
<span class="truncate text-foreground">{log.device}</span>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="flex items-center justify-between gap-3">
|
|
126
|
+
<span>{t('securityLog.location')}</span>
|
|
127
|
+
<span class="truncate text-foreground">{log.location}</span>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
{/each}
|
|
132
|
+
</div>
|
|
106
133
|
</Card.CardContent>
|
|
107
134
|
</Card.Card>
|
|
108
135
|
</div>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
|
-
<div class="space-y-6">
|
|
28
|
+
<div class="space-y-6" data-svadmin-content-page="account">
|
|
29
29
|
<div class="flex items-start justify-between gap-4">
|
|
30
30
|
<div>
|
|
31
31
|
<h2 class="text-xl font-semibold text-foreground">{t('account.settingsEnterprise')}</h2>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
</script>
|
|
24
24
|
|
|
25
|
-
<div class="space-y-6">
|
|
25
|
+
<div class="space-y-6" data-svadmin-content-page="account">
|
|
26
26
|
<div>
|
|
27
27
|
<h2 class="text-xl font-semibold text-foreground">{t('account.settingsPlain')}</h2>
|
|
28
28
|
<p class="mt-1 text-sm text-muted-foreground">{t('account.settingsPlainDescription')}</p>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
|
-
<div class="space-y-6">
|
|
24
|
+
<div class="space-y-6" data-svadmin-content-page="account">
|
|
25
25
|
<div>
|
|
26
26
|
<h2 class="text-xl font-semibold text-foreground">{t('account.settingsSidebar')}</h2>
|
|
27
27
|
<p class="mt-1 text-sm text-muted-foreground">{t('account.settingsSidebarDescription')}</p>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
const initials = (name: string) => name.split(' ').map(n => n[0]).join('').toUpperCase().slice(0, 2);
|
|
49
49
|
</script>
|
|
50
50
|
|
|
51
|
-
<div class="space-y-6">
|
|
51
|
+
<div class="space-y-6" data-svadmin-content-page="account">
|
|
52
52
|
<div class="flex items-start justify-between gap-4">
|
|
53
53
|
<div>
|
|
54
54
|
<h2 class="text-xl font-semibold text-foreground">{t('account.membersStarter')}</h2>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
const initials = (name: string) => name.split(' ').map(n => n[0]).join('').toUpperCase().slice(0, 2);
|
|
46
46
|
</script>
|
|
47
47
|
|
|
48
|
-
<div class="space-y-6">
|
|
48
|
+
<div class="space-y-6" data-svadmin-content-page="network">
|
|
49
49
|
<div class="flex items-start justify-between gap-4">
|
|
50
50
|
<div>
|
|
51
51
|
<h2 class="text-xl font-semibold text-foreground">{t('network.teamCrew')}</h2>
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
<!-- Table -->
|
|
70
70
|
<Card.Card class="border-border/60">
|
|
71
71
|
<Card.CardContent class="p-0">
|
|
72
|
-
<div class="overflow-x-auto">
|
|
72
|
+
<div class="hidden overflow-x-auto lg:block">
|
|
73
73
|
<table class="w-full">
|
|
74
74
|
<thead>
|
|
75
75
|
<tr class="border-b bg-muted/30">
|
|
@@ -117,6 +117,39 @@
|
|
|
117
117
|
</tbody>
|
|
118
118
|
</table>
|
|
119
119
|
</div>
|
|
120
|
+
<div class="divide-y lg:hidden">
|
|
121
|
+
{#each filtered as member (member.id)}
|
|
122
|
+
{@const sc = statusConfig[member.status]}
|
|
123
|
+
<div class="space-y-3 p-4">
|
|
124
|
+
<div class="flex items-start justify-between gap-3">
|
|
125
|
+
<div class="flex min-w-0 items-center gap-3">
|
|
126
|
+
<div class="relative shrink-0">
|
|
127
|
+
<div class="flex h-9 w-9 items-center justify-center rounded-full bg-primary/10 text-sm font-semibold text-primary">
|
|
128
|
+
{initials(member.name)}
|
|
129
|
+
</div>
|
|
130
|
+
<span class="absolute -bottom-0.5 -right-0.5 h-2.5 w-2.5 rounded-full {sc.dot} ring-2 ring-card"></span>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="min-w-0">
|
|
133
|
+
<p class="truncate text-sm font-medium text-foreground">{member.name}</p>
|
|
134
|
+
<p class="truncate text-xs text-muted-foreground">{member.email}</p>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
<Button variant="ghost" size="icon-sm" class="shrink-0"><MoreHorizontal class="h-4 w-4" /></Button>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="grid gap-2 text-xs text-muted-foreground sm:grid-cols-2">
|
|
140
|
+
<div class="min-w-0">
|
|
141
|
+
<span class="block font-medium text-foreground">{member.role}</span>
|
|
142
|
+
<span class="truncate">{member.department}</span>
|
|
143
|
+
</div>
|
|
144
|
+
<div class="flex items-center gap-1 {sc.color}">
|
|
145
|
+
<sc.icon class="h-3 w-3" />{sc.label}
|
|
146
|
+
</div>
|
|
147
|
+
<div>{t('publicProfile.projects')}: <span class="font-medium text-foreground">{member.projects}</span></div>
|
|
148
|
+
<div>{t('account.joined')}: <span class="font-medium text-foreground">{member.joinedAt}</span></div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
{/each}
|
|
152
|
+
</div>
|
|
120
153
|
</Card.CardContent>
|
|
121
154
|
</Card.Card>
|
|
122
155
|
</div>
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
}
|
|
52
52
|
</script>
|
|
53
53
|
|
|
54
|
-
<div class="space-y-6">
|
|
54
|
+
<div class="space-y-6" data-svadmin-content-page="network">
|
|
55
55
|
<div>
|
|
56
56
|
<h2 class="text-xl font-semibold text-foreground">{t('network.userCards')}</h2>
|
|
57
57
|
<p class="mt-1 text-sm text-muted-foreground">{t('network.userCardsDescription')}</p>
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
];
|
|
100
100
|
</script>
|
|
101
101
|
|
|
102
|
-
<div class="space-y-6">
|
|
102
|
+
<div class="space-y-6" data-svadmin-content-page="public-profile">
|
|
103
103
|
<!-- Cover + Profile Header -->
|
|
104
104
|
<Card.Card class="overflow-hidden border-border/60">
|
|
105
105
|
<div class="h-40 bg-gradient-to-r from-primary/25 via-primary/15 to-accent/20 relative">
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
let { class: className, ...restProps }: HTMLAttributes<HTMLSpanElement> = $props();
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
|
-
<span aria-hidden="true" data-slot="pagination-ellipsis" class={cn("flex size-
|
|
9
|
+
<span aria-hidden="true" data-slot="pagination-ellipsis" class={cn("flex size-8 items-center justify-center", className)} {...restProps}>
|
|
10
10
|
<Ellipsis class="size-4" />
|
|
11
11
|
<span class="sr-only">More pages</span>
|
|
12
12
|
</span>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svadmin/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "Pre-built admin UI components — AdminApp, AutoTable, AutoForm, Sidebar, Layout",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"./components/*": "./dist/components/*"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@svadmin/core": "^0.
|
|
36
|
+
"@svadmin/core": "^0.30.0",
|
|
37
37
|
"@tanstack/svelte-query": "^6.1.29",
|
|
38
38
|
"highlight.js": "^11.11.1",
|
|
39
39
|
"isomorphic-dompurify": "^3.15.0",
|