nitro-web 0.0.24 → 0.0.26
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.
|
@@ -16,13 +16,14 @@ export type SidebarProps = {
|
|
|
16
16
|
Logo?: React.FC<{ width?: string, height?: string }>;
|
|
17
17
|
menu?: { name: string; to: string; Icon: React.FC<{ className?: string }> }[]
|
|
18
18
|
links?: { name: string; to: string; initial: string }[]
|
|
19
|
+
version?: string
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
function classNames(...classes: string[]) {
|
|
22
23
|
return classes.filter(Boolean).join(' ')
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
export function Sidebar({ Logo, menu, links }: SidebarProps) {
|
|
26
|
+
export function Sidebar({ Logo, menu, links, version }: SidebarProps) {
|
|
26
27
|
const [sidebarOpen, setSidebarOpen] = useState(false)
|
|
27
28
|
return (
|
|
28
29
|
<>
|
|
@@ -45,14 +46,14 @@ export function Sidebar({ Logo, menu, links }: SidebarProps) {
|
|
|
45
46
|
</button>
|
|
46
47
|
</div>
|
|
47
48
|
</TransitionChild>
|
|
48
|
-
<SidebarContents Logo={Logo} menu={menu} links={links} />
|
|
49
|
+
<SidebarContents Logo={Logo} menu={menu} links={links} version={version} />
|
|
49
50
|
</DialogPanel>
|
|
50
51
|
</div>
|
|
51
52
|
</Dialog>
|
|
52
53
|
|
|
53
54
|
{/* Static sidebar for desktop */}
|
|
54
55
|
<div className={`hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:flex-col ${sidebarWidth}`}>
|
|
55
|
-
<SidebarContents Logo={Logo} menu={menu} links={links} />
|
|
56
|
+
<SidebarContents Logo={Logo} menu={menu} links={links} version={version} />
|
|
56
57
|
</div>
|
|
57
58
|
|
|
58
59
|
{/* mobile sidebar closed */}
|
|
@@ -71,7 +72,7 @@ export function Sidebar({ Logo, menu, links }: SidebarProps) {
|
|
|
71
72
|
)
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
function SidebarContents ({ Logo, menu, links }: SidebarProps) {
|
|
75
|
+
function SidebarContents ({ Logo, menu, links, version }: SidebarProps) {
|
|
75
76
|
const location = useLocation()
|
|
76
77
|
const [store] = useTracked()
|
|
77
78
|
const user = store.user
|
|
@@ -97,10 +98,11 @@ function SidebarContents ({ Logo, menu, links }: SidebarProps) {
|
|
|
97
98
|
return (
|
|
98
99
|
<div className="flex grow flex-col gap-y-8 overflow-y-auto bg-white py-5 px-10 lg:border-r lg:border-gray-200">
|
|
99
100
|
{Logo && (
|
|
100
|
-
<div className="flex h-16 shrink-0 items-center">
|
|
101
|
+
<div className="flex h-16 shrink-0 items-center gap-2 justify-bedtween">
|
|
101
102
|
<Link to="/">
|
|
102
103
|
<Logo width="70" height={undefined} />
|
|
103
104
|
</Link>
|
|
105
|
+
<span className="text-[9px] text-gray-900 font-semibold mt-4">{version}</span>
|
|
104
106
|
</div>
|
|
105
107
|
)}
|
|
106
108
|
<nav className="flex flex-1 flex-col">
|
|
@@ -169,7 +171,7 @@ function SidebarContents ({ Logo, menu, links }: SidebarProps) {
|
|
|
169
171
|
className="flex items-center gap-x-4 px-6 py-3 text-sm/6 font-semibold text-gray-900 hover:bg-gray-50"
|
|
170
172
|
>
|
|
171
173
|
<img alt="" src={avatarImg} className="size-8 rounded-full bg-gray-50" />
|
|
172
|
-
<span aria-hidden="true" class="truncate1">{user?.name || 'Guest'}</span>
|
|
174
|
+
<span aria-hidden="true" class="truncate1 flex-1">{user?.name || 'Guest'}</span>
|
|
173
175
|
</Link>
|
|
174
176
|
</li>
|
|
175
177
|
</ul>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"repository": "github:boycce/nitro-web",
|
|
5
5
|
"homepage": "https://boycce.github.io/nitro-web/",
|
|
6
6
|
"description": "Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind 🚀",
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"nodemailer-mailgun-transport": "^2.0.2",
|
|
46
46
|
"nunjucks": "^3.2.2",
|
|
47
47
|
"passport": "^0.4.1",
|
|
48
|
-
"passport-local": "^1.0.0"
|
|
48
|
+
"passport-local": "^1.0.0",
|
|
49
|
+
"sort-route-addresses-nodeps": "0.0.4"
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {
|
|
51
52
|
"@stripe/stripe-js": "^1.34.0",
|
|
@@ -6,7 +6,7 @@ import { CSSInterpolation } from '@emotion/serialize'
|
|
|
6
6
|
|
|
7
7
|
declare global {
|
|
8
8
|
/** Webpack injected config variables */
|
|
9
|
-
const
|
|
9
|
+
const INJECTED_CONFIG: Record<string, string|boolean|object>
|
|
10
10
|
const ISDEMO: boolean
|
|
11
11
|
/** Webpack svg loader */
|
|
12
12
|
module '*.svg' {
|