@edgedev/create-edge-app 1.0.63 → 1.1.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.
@@ -69,12 +69,6 @@ watch (user, async () => {
69
69
  const colorMode = useColorMode()
70
70
  onMounted(() => {
71
71
  colorMode.preference = 'system'
72
- // if (edgeGlobal.isDarkMode()) {
73
- // changeTheme('dark')
74
- // }
75
- // else {
76
- // changeTheme('light')
77
- // }
78
72
  })
79
73
  edgeFirebase.runFunction('edgeFirebase-initFirestore', {})
80
74
  edgeGlobal.edgeState.userRoles = [
@@ -116,11 +110,17 @@ const menuItems = [
116
110
  <Toaster />
117
111
  <div class="flex flex-col h-screen">
118
112
  <div class="flex h-full w-full">
119
- <SidebarProvider>
113
+ <edge-sidebar-provider
114
+ v-slot="sideBarProviderProps"
115
+ enable-nested-menu
116
+ collapsible="slack"
117
+ >
120
118
  <div class="h-full">
121
- <edge-side-menu
119
+ <edge-side-bar
122
120
  v-if="edgeFirebase.user.loggedIn"
123
121
  :menu-items="menuItems"
122
+ :collapsible="sideBarProviderProps.collapsible"
123
+ class="border-solid border-r"
124
124
  >
125
125
  <template #header>
126
126
  <SidebarMenu>
@@ -147,7 +147,10 @@ const menuItems = [
147
147
  </CardContent>
148
148
  </Card>
149
149
  </template>
150
- </edge-side-menu>
150
+ <template #nested-menu>
151
+ <slot name="nested-menu" />
152
+ </template>
153
+ </edge-side-bar>
151
154
  </div>
152
155
  <div class="grow h-full flex flex-col h-screen">
153
156
  <edge-menu
@@ -164,7 +167,7 @@ const menuItems = [
164
167
  </h1>
165
168
  </template>
166
169
  </edge-menu>
167
- <NuxtPage class="flex-1 flex flex-col overflow-y-auto p-3" keepalive />
170
+ <slot />
168
171
  <edge-menu
169
172
  v-if="edgeFirebase.user.loggedIn"
170
173
  type="footer"
@@ -178,7 +181,7 @@ const menuItems = [
178
181
  </template>
179
182
  </edge-menu>
180
183
  </div>
181
- </SidebarProvider>
184
+ </edge-sidebar-provider>
182
185
  </div>
183
186
  </div>
184
187
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgedev/create-edge-app",
3
- "version": "1.0.63",
3
+ "version": "1.1.1",
4
4
  "description": "Create Edge Starter App",
5
5
  "bin": {
6
6
  "create-edge-app": "./bin/cli.js"
@@ -40,33 +40,36 @@ const menuItems = [
40
40
  </script>
41
41
 
42
42
  <template>
43
- <div
44
- v-if="edgeGlobal.edgeState.organizationDocPath"
45
- >
46
- <div class="h-full p-0">
47
- <SidebarProvider class="min-h-full">
48
- <div class="h-full md:w-[180px]">
49
- <edge-side-menu
50
- :menu-items="menuItems"
51
- :settings-menu-items="isAdmin ? adminMenuItems : []"
52
- collapsible="submenu"
53
- class="bg-background text-foreground border-none w-[180px] absolute shadow-none"
54
- :show-settings-section="false"
55
- title="My Settings"
56
- settings-title="Organization Settings"
57
- group-label-classes="text-foreground/70"
58
- >
59
- <template #header>
60
- <h1 class="text-xl">
61
- Settings
62
- </h1>
63
- </template>
64
- </edge-side-menu>
65
- </div>
66
- <NuxtPage class="flex-1 flex flex-col overflow-y-auto p-3" keepalive />
67
- </SidebarProvider>
43
+ <NuxtLayout name="app">
44
+ <div
45
+ v-if="edgeGlobal.edgeState.organizationDocPath"
46
+ class="flex-1 flex flex-col overflow-y-auto p-3 pt-0"
47
+ >
48
+ <div class="h-full p-0">
49
+ <SidebarProvider class="min-h-full">
50
+ <div class="h-full md:w-[180px]">
51
+ <edge-side-bar
52
+ :menu-items="menuItems"
53
+ :settings-menu-items="isAdmin ? adminMenuItems : []"
54
+ collapsible="submenu"
55
+ class="bg-background text-foreground border-none w-[180px] absolute shadow-none"
56
+ :show-settings-section="false"
57
+ title="My Settings"
58
+ settings-title="Organization Settings"
59
+ group-label-classes="text-foreground/70"
60
+ >
61
+ <template #header>
62
+ <h1 class="text-xl">
63
+ Settings
64
+ </h1>
65
+ </template>
66
+ </edge-side-bar>
67
+ </div>
68
+ <NuxtPage class="flex-1 flex flex-col overflow-y-auto p-3" />
69
+ </SidebarProvider>
70
+ </div>
68
71
  </div>
69
- </div>
72
+ </NuxtLayout>
70
73
  </template>
71
74
 
72
75
  <style lang="scss">
@@ -71,90 +71,69 @@ onMounted(() => {
71
71
  </script>
72
72
 
73
73
  <template>
74
- <div
75
- v-if="edgeFirebase?.user?.loggedIn"
76
- >
77
- <edge-dashboard v-if="docId === ''" :filter="state.filter" :collection="collection" class="flex-1">
78
- <template #header-start>
79
- <LayoutDashboard class="mr-2" />
80
- <span class="capitalize">{{ collection }}</span>
81
- </template>
82
- <template #header-center>
83
- <div class="w-full px-6">
84
- <edge-shad-input
85
- v-model="state.filter"
86
- label=""
87
- name="filter"
88
- placeholder="Filter..."
89
- />
90
- </div>
91
- </template>
92
- <template #header-end="slotProps">
93
- <edge-shad-button class="uppercase bg-slate-600" :to="`/app/dashboard/${collection}/new`">
94
- Add {{ slotProps.title }}
95
- </edge-shad-button>
96
- </template>
97
- <template #list-item="slotProps">
98
- <edge-shad-button variant="text" class="cursor-pointer w-full flex justify-between slotProps.items-center py-2 gap-3" :to="`/app/dashboard/${collection}/${slotProps.item.docId}`">
99
- <div>
100
- <Avatar class="cursor-pointer p-0 h-8 w-8 mr-2">
101
- <FilePenLine class="h-5 w-5" />
102
- </Avatar>
74
+ <NuxtLayout name="app">
75
+ <div
76
+ v-if="edgeGlobal.edgeState.organizationDocPath"
77
+ class="flex-1 flex flex-col overflow-y-auto p-3 pt-0"
78
+ >
79
+ <edge-dashboard v-if="docId === ''" :filter="state.filter" :collection="collection" class="flex-1">
80
+ <template #header-start>
81
+ <LayoutDashboard class="mr-2" />
82
+ <span class="capitalize">{{ collection }}</span>
83
+ </template>
84
+ <template #header-center>
85
+ <div class="w-full px-6">
86
+ <edge-shad-input
87
+ v-model="state.filter"
88
+ label=""
89
+ name="filter"
90
+ placeholder="Filter..."
91
+ />
103
92
  </div>
104
- <div class="grow text-left">
105
- <div class="text-lg">
106
- {{ slotProps.item.name }}
93
+ </template>
94
+ <template #header-end="slotProps">
95
+ <edge-shad-button class="uppercase bg-slate-600" :to="`/app/dashboard/${collection}/new`">
96
+ Add {{ slotProps.title }}
97
+ </edge-shad-button>
98
+ </template>
99
+ <template #list-item="slotProps">
100
+ <edge-shad-button variant="text" class="cursor-pointer w-full flex justify-between slotProps.items-center py-2 gap-3" :to="`/app/dashboard/${collection}/${slotProps.item.docId}`">
101
+ <div>
102
+ <Avatar class="cursor-pointer p-0 h-8 w-8 mr-2">
103
+ <FilePenLine class="h-5 w-5" />
104
+ </Avatar>
107
105
  </div>
108
- </div>
109
- <div>
110
- <edge-shad-button
111
- size="icon"
112
- class="bg-slate-600 h-7 w-7"
113
- @click.stop="slotProps.deleteItem(slotProps.item.docId)"
114
- >
115
- <Trash class="h-5 w-5" />
116
- </edge-shad-button>
117
- </div>
118
- </edge-shad-button>
119
- <Separator class="dark:bg-slate-600" />
120
- </template>
121
- </edge-dashboard>
122
- <edge-editor
123
- v-else
124
- :collection="collection"
125
- :doc-id="docId"
126
- :schema="schemas[collection]"
127
- :new-doc-schema="state.newDocs[collection]"
128
- class="w-full max-w-7xl mx-auto flex-1"
129
- >
130
- <template #header-start="slotProps">
131
- <FilePenLine class="mr-2" />
132
- {{ slotProps.title }}
133
- </template>
134
- <template #header-end="slotProps">
135
- <edge-shad-button
136
- v-if="!slotProps.unsavedChanges"
137
- :to="`/app/dashboard/${collection}`"
138
- class="bg-red-700 uppercase h-8 hover:bg-slate-400 w-20"
139
- >
140
- Close
141
- </edge-shad-button>
142
- <edge-shad-button
143
- v-else
144
- :to="`/app/dashboard/${collection}`"
145
- class="bg-red-700 uppercase h-8 hover:bg-slate-400 w-20"
146
- >
147
- Cancel
148
- </edge-shad-button>
149
- <edge-shad-button
150
- type="submit"
151
- class="bg-slate-500 uppercase h-8 hover:bg-slate-400 w-20"
152
- >
153
- Save
154
- </edge-shad-button>
155
- </template>
156
- <template #footer="slotProps">
157
- <div class="flex w-full gap-1 items-center justify-end">
106
+ <div class="grow text-left">
107
+ <div class="text-lg">
108
+ {{ slotProps.item.name }}
109
+ </div>
110
+ </div>
111
+ <div>
112
+ <edge-shad-button
113
+ size="icon"
114
+ class="bg-slate-600 h-7 w-7"
115
+ @click.stop="slotProps.deleteItem(slotProps.item.docId)"
116
+ >
117
+ <Trash class="h-5 w-5" />
118
+ </edge-shad-button>
119
+ </div>
120
+ </edge-shad-button>
121
+ <Separator class="dark:bg-slate-600" />
122
+ </template>
123
+ </edge-dashboard>
124
+ <edge-editor
125
+ v-else
126
+ :collection="collection"
127
+ :doc-id="docId"
128
+ :schema="schemas[collection]"
129
+ :new-doc-schema="state.newDocs[collection]"
130
+ class="w-full max-w-7xl mx-auto flex-1"
131
+ >
132
+ <template #header-start="slotProps">
133
+ <FilePenLine class="mr-2" />
134
+ {{ slotProps.title }}
135
+ </template>
136
+ <template #header-end="slotProps">
158
137
  <edge-shad-button
159
138
  v-if="!slotProps.unsavedChanges"
160
139
  :to="`/app/dashboard/${collection}`"
@@ -169,15 +148,39 @@ onMounted(() => {
169
148
  >
170
149
  Cancel
171
150
  </edge-shad-button>
172
-
173
151
  <edge-shad-button
174
152
  type="submit"
175
153
  class="bg-slate-500 uppercase h-8 hover:bg-slate-400 w-20"
176
154
  >
177
155
  Save
178
156
  </edge-shad-button>
179
- </div>
180
- </template>
181
- </edge-editor>
182
- </div>
157
+ </template>
158
+ <template #footer="slotProps">
159
+ <div class="flex w-full gap-1 items-center justify-end">
160
+ <edge-shad-button
161
+ v-if="!slotProps.unsavedChanges"
162
+ :to="`/app/dashboard/${collection}`"
163
+ class="bg-red-700 uppercase h-8 hover:bg-slate-400 w-20"
164
+ >
165
+ Close
166
+ </edge-shad-button>
167
+ <edge-shad-button
168
+ v-else
169
+ :to="`/app/dashboard/${collection}`"
170
+ class="bg-red-700 uppercase h-8 hover:bg-slate-400 w-20"
171
+ >
172
+ Cancel
173
+ </edge-shad-button>
174
+
175
+ <edge-shad-button
176
+ type="submit"
177
+ class="bg-slate-500 uppercase h-8 hover:bg-slate-400 w-20"
178
+ >
179
+ Save
180
+ </edge-shad-button>
181
+ </div>
182
+ </template>
183
+ </edge-editor>
184
+ </div>
185
+ </NuxtLayout>
183
186
  </template>
@@ -2,15 +2,17 @@
2
2
  </script>
3
3
 
4
4
  <template>
5
- <div class="flex w-full h-full align-center items-center">
6
- <edge-auth type="login" class="p-8 mx-auto max-w-lg w-full h-full max-h-[540px] overflow-y-auto">
7
- <div class="grid gap-2 text-center">
8
- <h1 class="text-2xl font-bold">
9
- Login
10
- </h1>
11
- </div>
12
- </edge-auth>
13
- </div>
5
+ <NuxtLayout name="app">
6
+ <div class="flex w-full h-full align-center items-center">
7
+ <edge-auth type="login" class="p-8 mx-auto max-w-lg w-full h-full max-h-[540px] overflow-y-auto">
8
+ <div class="grid gap-2 text-center">
9
+ <h1 class="text-2xl font-bold">
10
+ Login
11
+ </h1>
12
+ </div>
13
+ </edge-auth>
14
+ </div>
15
+ </NuxtLayout>
14
16
  </template>
15
17
 
16
18
  <style lang="scss" scoped>
@@ -3,15 +3,17 @@ const config = useRuntimeConfig()
3
3
  </script>
4
4
 
5
5
  <template>
6
- <div class="flex w-full h-full align-center items-center">
7
- <edge-auth type="register" :registration-code="config.public.registrationCode" class="p-8 mx-auto max-w-lg w-full h-full max-h-[760px] overflow-y-auto">
8
- <div class="grid gap-2 text-center">
9
- <h1 class="text-2xl font-bold">
10
- Sign Up
11
- </h1>
12
- </div>
13
- </edge-auth>
14
- </div>
6
+ <NuxtLayout name="app">
7
+ <div class="flex w-full h-full align-center items-center">
8
+ <edge-auth type="register" :registration-code="config.public.registrationCode" class="p-8 mx-auto max-w-lg w-full h-full max-h-[760px] overflow-y-auto">
9
+ <div class="grid gap-2 text-center">
10
+ <h1 class="text-2xl font-bold">
11
+ Sign Up
12
+ </h1>
13
+ </div>
14
+ </edge-auth>
15
+ </div>
16
+ </NuxtLayout>
15
17
  </template>
16
18
 
17
19
  <style lang="scss" scoped>