@plutocms/supabase 0.1.1 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.0](https://github.com/plutocms/supabase/compare/v0.1.2...v0.2.0) (2026-09-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * make admin account views responsive ([#35](https://github.com/plutocms/supabase/issues/35)) ([cfa5bf0](https://github.com/plutocms/supabase/commit/cfa5bf0b902e0180272eb40d0d170589442ea179))
9
+
10
+ ## [0.1.2](https://github.com/plutocms/supabase/compare/v0.1.1...v0.1.2) (2026-09-08)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * type layerSchemas runtime config as Record<string, string> ([0ad5a8a](https://github.com/plutocms/supabase/commit/0ad5a8a42751e33c87e0c733df8344616e3706e0))
16
+
3
17
  ## [0.1.1](https://github.com/plutocms/supabase/compare/v0.1.0...v0.1.1) (2026-09-03)
4
18
 
5
19
 
@@ -5,6 +5,11 @@ import { domainFromUrl } from '#imports'
5
5
  const host = useRequestURL().host
6
6
 
7
7
  const route = useRoute()
8
+ const isSidebarOpen = useState<boolean>('pluto-admin-sidebar-open', () => false)
9
+
10
+ function openSidebar() {
11
+ isSidebarOpen.value = true
12
+ }
8
13
 
9
14
  const { isLoggedIn, user, logout } = await useAuth()
10
15
 
@@ -81,8 +86,20 @@ defineShortcuts(extractShortcuts(items.value))
81
86
 
82
87
  <template>
83
88
  <PlutoNavbarAdmin>
84
- <div class="flex h-full items-stretch justify-between px-4">
85
- <div class="flex items-center gap-x-3">
89
+ <div
90
+ class="flex h-full min-w-0 items-stretch justify-between gap-1 px-2 lg:px-4"
91
+ >
92
+ <div class="flex min-w-0 items-center gap-x-1 lg:gap-x-3">
93
+ <UButton
94
+ class="lg:hidden"
95
+ icon="lucide:menu"
96
+ color="neutral"
97
+ variant="ghost"
98
+ aria-label="Open navigation"
99
+ square
100
+ @click="openSidebar"
101
+ />
102
+
86
103
  <div class="h-full shrink-0 py-1">
87
104
  <NuxtLink
88
105
  title="Go to dashboard home"
@@ -96,8 +113,8 @@ defineShortcuts(extractShortcuts(items.value))
96
113
  </NuxtLink>
97
114
  </div>
98
115
 
99
- <div class="h-full">
100
- <ul class="flex h-full items-center text-sm">
116
+ <div class="min-w-0 h-full overflow-hidden">
117
+ <ul class="flex h-full min-w-0 items-center text-sm">
101
118
  <NavbarAdminActionButton
102
119
  :show="route.path.startsWith('/admin')"
103
120
  :title="`Visit ${domainFromUrl(maybeDevUrl)}`"
@@ -129,7 +146,7 @@ defineShortcuts(extractShortcuts(items.value))
129
146
  </div>
130
147
  </div>
131
148
 
132
- <div class="flex items-center gap-3">
149
+ <div class="flex shrink-0 items-center gap-1 lg:gap-3">
133
150
  <ColorModeButton />
134
151
 
135
152
  <div class="h-full">
@@ -140,7 +157,11 @@ defineShortcuts(extractShortcuts(items.value))
140
157
  }"
141
158
  :modal="false"
142
159
  >
143
- <button class="group h-full py-1">
160
+ <button
161
+ class="group h-full py-1"
162
+ aria-label="Open user menu"
163
+ type="button"
164
+ >
144
165
  <div
145
166
  class="flex h-full items-center gap-x-2 rounded-sm rounded-l-xl pr-2 pl-0.5 group-hover:bg-white/20"
146
167
  >
@@ -156,7 +177,7 @@ defineShortcuts(extractShortcuts(items.value))
156
177
  />
157
178
 
158
179
  <span
159
- class="light:text-zinc-800 text-sm font-bold dark:text-white"
180
+ class="light:text-zinc-800 hidden text-sm font-bold dark:text-white lg:inline"
160
181
  >
161
182
  {{ user?.display_name.split(' ')[0] || 'User' }}
162
183
  </span>
@@ -9,8 +9,8 @@ useHead({
9
9
  </script>
10
10
 
11
11
  <template>
12
- <div class="grid h-full place-items-center">
13
- <UCard class="w-100">
12
+ <div class="grid min-h-dvh place-items-center p-4">
13
+ <UCard class="w-full max-w-100">
14
14
  <div class="space-y-6 py-10">
15
15
  <div class="text-center space-y-4">
16
16
  <hgroup class="flex flex-col gap-y-1">
@@ -22,8 +22,8 @@ async function submitForm() {
22
22
  </script>
23
23
 
24
24
  <template>
25
- <div class="grid h-full place-items-center">
26
- <UCard class="w-100">
25
+ <div class="grid min-h-dvh place-items-center p-4">
26
+ <UCard class="w-full max-w-100">
27
27
  <div v-if="isEmailSent" class="space-y-6 py-10">
28
28
  <div class="text-center space-y-4">
29
29
  <hgroup class="flex flex-col gap-y-1">
@@ -68,9 +68,16 @@ async function submitForm() {
68
68
  />
69
69
  </UFormField>
70
70
 
71
- <div class="flex items-center justify-between gap-x-4">
71
+ <div
72
+ class="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-x-4"
73
+ >
72
74
  <UFormField>
73
- <UButton :loading="isSubmitting" type="submit" icon="lucide:send">
75
+ <UButton
76
+ :loading="isSubmitting"
77
+ type="submit"
78
+ icon="lucide:send"
79
+ class="w-full justify-center sm:w-auto"
80
+ >
74
81
  Send Reset Link
75
82
  </UButton>
76
83
  </UFormField>
@@ -25,8 +25,8 @@ function submitForm() {
25
25
  </script>
26
26
 
27
27
  <template>
28
- <div class="grid h-full place-items-center">
29
- <UCard class="w-100">
28
+ <div class="grid min-h-dvh place-items-center p-4">
29
+ <UCard class="w-full max-w-100">
30
30
  <form @submit.prevent="submitForm">
31
31
  <div class="flex flex-col gap-y-6">
32
32
  <h1 class="text-3xl font-bold">Login</h1>
@@ -49,12 +49,15 @@ function submitForm() {
49
49
  />
50
50
  </UFormField>
51
51
 
52
- <div class="flex items-center justify-between gap-x-4">
52
+ <div
53
+ class="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-x-4"
54
+ >
53
55
  <UFormField>
54
56
  <UButton
55
57
  :loading="isSubmitting"
56
58
  type="submit"
57
59
  icon="lucide:log-in"
60
+ class="w-full justify-center sm:w-auto"
58
61
  >
59
62
  Login
60
63
  </UButton>
@@ -67,7 +70,9 @@ function submitForm() {
67
70
  </UFormField>
68
71
  </div>
69
72
 
70
- <div class="flex items-center justify-between">
73
+ <div
74
+ class="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between"
75
+ >
71
76
  <UButton
72
77
  variant="link"
73
78
  icon="lucide:arrow-left"
@@ -68,8 +68,8 @@ async function submitForm() {
68
68
  </script>
69
69
 
70
70
  <template>
71
- <div class="grid h-full place-items-center">
72
- <UCard class="w-100">
71
+ <div class="grid min-h-dvh place-items-center p-4">
72
+ <UCard class="w-full max-w-120">
73
73
  <div v-if="isEmailVerificationMessageVisible" class="space-y-6 py-10">
74
74
  <div class="text-center space-y-4">
75
75
  <hgroup class="flex flex-col gap-y-1">
@@ -118,7 +118,7 @@ async function submitForm() {
118
118
  />
119
119
  </UFormField>
120
120
 
121
- <div class="flex gap-x-4">
121
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
122
122
  <UFormField label="Username" required>
123
123
  <UInput
124
124
  v-model="form.username"
@@ -159,7 +159,9 @@ async function submitForm() {
159
159
  />
160
160
  </UFormField>
161
161
 
162
- <div class="flex items-center justify-between gap-x-4">
162
+ <div
163
+ class="flex flex-col-reverse gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-x-4"
164
+ >
163
165
  <UFormField>
164
166
  <UButton
165
167
  to="/admin/login"
@@ -176,6 +178,7 @@ async function submitForm() {
176
178
  :disabled="isSubmitting || !passwordMatch"
177
179
  :loading="isSubmitting"
178
180
  type="submit"
181
+ class="w-full justify-center sm:w-auto"
179
182
  >
180
183
  Create account
181
184
  </UButton>
@@ -48,8 +48,8 @@ async function submitForm() {
48
48
  </script>
49
49
 
50
50
  <template>
51
- <div class="grid h-full place-items-center">
52
- <UCard class="w-100">
51
+ <div class="grid min-h-dvh place-items-center p-4">
52
+ <UCard class="w-full max-w-100">
53
53
  <div v-if="isPasswordUpdated" class="space-y-6 py-10">
54
54
  <div class="text-center space-y-4">
55
55
  <hgroup class="flex flex-col gap-y-1">
@@ -109,13 +109,16 @@ async function submitForm() {
109
109
  />
110
110
  </UFormField>
111
111
 
112
- <div class="flex items-center justify-between gap-x-4">
112
+ <div
113
+ class="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-x-4"
114
+ >
113
115
  <UFormField>
114
116
  <UButton
115
117
  :loading="isSubmitting"
116
118
  :disabled="!passwordMatch"
117
119
  type="submit"
118
120
  icon="lucide:lock-keyhole"
121
+ class="w-full justify-center sm:w-auto"
119
122
  >
120
123
  Update Password
121
124
  </UButton>
@@ -68,12 +68,16 @@ async function submitForm() {
68
68
 
69
69
  <template>
70
70
  <AdminView>
71
- <h1 class="text-4xl font-bold">Settings</h1>
71
+ <h1 class="text-3xl font-bold lg:text-4xl">Settings</h1>
72
72
 
73
73
  <UCard>
74
74
  <UForm :schema="schema" :state="form" @submit="submitForm">
75
75
  <div class="flex flex-col gap-y-6">
76
- <UFormField label="Website Title" name="website_title" class="w-1/2">
76
+ <UFormField
77
+ label="Website Title"
78
+ name="website_title"
79
+ class="w-full lg:w-1/2"
80
+ >
77
81
  <UInput
78
82
  v-model="form.website_title"
79
83
  placeholder="e.g. My Website"
@@ -83,7 +87,7 @@ async function submitForm() {
83
87
  <UFormField
84
88
  label="Website Description"
85
89
  name="website_description"
86
- class="w-1/2"
90
+ class="w-full lg:w-1/2"
87
91
  >
88
92
  <UInput
89
93
  v-model="form.website_description"
@@ -91,7 +95,11 @@ async function submitForm() {
91
95
  />
92
96
  </UFormField>
93
97
 
94
- <UFormField label="Website URL" name="website_url" class="w-1/2">
98
+ <UFormField
99
+ label="Website URL"
100
+ name="website_url"
101
+ class="w-full lg:w-1/2"
102
+ >
95
103
  <UInput
96
104
  v-model="form.website_url"
97
105
  type="url"
@@ -99,12 +107,13 @@ async function submitForm() {
99
107
  />
100
108
  </UFormField>
101
109
 
102
- <div>
110
+ <div class="flex">
103
111
  <UButton
104
112
  :loading="isSubmitting"
105
113
  :disabled="isSubmitting"
106
114
  type="submit"
107
115
  icon="lucide:save"
116
+ class="w-full justify-center sm:w-auto"
108
117
  >
109
118
  Save
110
119
  </UButton>
@@ -123,8 +123,8 @@ function handleStepChange(step: number) {
123
123
 
124
124
  <template>
125
125
  <UApp>
126
- <div class="flex justify-center items-center h-screen">
127
- <UCard class="w-125">
126
+ <div class="flex min-h-dvh items-center justify-center p-4">
127
+ <UCard class="w-full max-w-125">
128
128
  <div class="flex flex-col gap-y-8">
129
129
  <UStepper ref="stepper" v-model="currentStep" :items="items" linear />
130
130
 
@@ -205,7 +205,7 @@ function handleStepChange(step: number) {
205
205
  </p>
206
206
 
207
207
  <div>
208
- <UPopover :content="{ side: 'right' }" arrow>
208
+ <UPopover :content="{ side: 'bottom' }" arrow>
209
209
  <UButton
210
210
  icon="lucide:lightbulb"
211
211
  label="Technical details"
@@ -284,13 +284,14 @@ function handleStepChange(step: number) {
284
284
  </div>
285
285
 
286
286
  <div class="flex justify-end">
287
- <div>
287
+ <div class="w-full sm:w-auto">
288
288
  <UButton
289
289
  v-if="stepper?.hasNext"
290
290
  :form="currentStepId"
291
291
  :loading="currentLoading"
292
292
  leading-icon="lucide:check"
293
293
  type="submit"
294
+ class="w-full justify-center sm:w-auto"
294
295
  >
295
296
  {{ currentStepSubmitLabel }}
296
297
  </UButton>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plutocms/supabase",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.2.0",
5
5
  "trustedDependencies": [
6
6
  "@parcel/watcher",
7
7
  "@plutocms/pluto",
@@ -32,13 +32,14 @@
32
32
  "lint": "eslint .",
33
33
  "lint:fix": "eslint . --fix && prettier --write .",
34
34
  "typecheck": "nuxi typecheck",
35
+ "test": "vitest run",
35
36
  "supabase-types": "bun ./scripts/supabase-typegen.ts"
36
37
  },
37
38
  "dependencies": {
38
39
  "@nuxt/ui": "^4.9.0",
39
40
  "@nuxtjs/supabase": "^2.0.9",
40
- "@plutocms/pluto": "^0.1.0",
41
- "@plutocms/utils": "^0.1.0",
41
+ "@plutocms/pluto": "^0.3.0",
42
+ "@plutocms/utils": "^0.2.0",
42
43
  "postgres": "^3.4.9",
43
44
  "supabase": "^2.109.1",
44
45
  "yup": "1.7.1"
@@ -52,6 +53,7 @@
52
53
  "nuxt": "^4.4.2",
53
54
  "prettier": "^3.9.4",
54
55
  "tailwindcss": "^4.3.2",
56
+ "vitest": "^5.0.0",
55
57
  "vue": "^3.5.39",
56
58
  "vue-router": "^5.1.0",
57
59
  "vue-tsc": "^3.3.7"
@@ -8,7 +8,7 @@ export default defineNitroPlugin(async () => {
8
8
  }
9
9
 
10
10
  const config = useRuntimeConfig()
11
- const layerSchemas = config.plutoLayerSchemas ?? {}
11
+ const layerSchemas: Record<string, string> = config.plutoLayerSchemas ?? {}
12
12
 
13
13
  const layerNames = Object.keys(layerSchemas)
14
14