spine-framework-portal 0.2.8 → 0.2.9

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.
@@ -9,6 +9,8 @@
9
9
 
10
10
  import * as React from "react"
11
11
  import { PlusIcon, Ticket, BookOpen, GraduationCap, MessageSquare, HelpCircle, Settings, Layout } from "lucide-react"
12
+ import { useAppPath } from "@core/hooks/useAppPath"
13
+ import { useNavigate } from "react-router-dom"
12
14
  import {
13
15
  Sidebar,
14
16
  SidebarContent,
@@ -24,51 +26,30 @@ import {
24
26
  } from "@core/components/ui/sidebar"
25
27
  import { Button } from "@core/components/ui/button"
26
28
 
27
- const navItems = [
28
- {
29
- title: "Tickets",
30
- url: "/portal/tickets",
31
- icon: Ticket,
32
- },
33
- {
34
- title: "Knowledge Base",
35
- url: "/portal/kb",
36
- icon: BookOpen,
37
- },
38
- {
39
- title: "Courses",
40
- url: "/portal/courses",
41
- icon: GraduationCap,
42
- },
43
- {
44
- title: "Community",
45
- url: "/portal/community",
46
- icon: MessageSquare,
47
- },
48
- ]
29
+ export function PortalSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
30
+ const appPath = useAppPath()
31
+ const navigate = useNavigate()
49
32
 
50
- const supportItems = [
51
- {
52
- title: "Help Center",
53
- url: "/portal/help",
54
- icon: HelpCircle,
55
- },
56
- {
57
- title: "Settings",
58
- url: "/portal/settings",
59
- icon: Settings,
60
- },
61
- ]
33
+ const navItems = [
34
+ { title: "Tickets", url: appPath('/tickets'), icon: Ticket },
35
+ { title: "Knowledge Base", url: appPath('/kb'), icon: BookOpen },
36
+ { title: "Courses", url: appPath('/courses'), icon: GraduationCap },
37
+ { title: "Community", url: appPath('/community'), icon: MessageSquare },
38
+ ]
39
+
40
+ const supportItems = [
41
+ { title: "Help Center", url: appPath('/help'), icon: HelpCircle },
42
+ { title: "Settings", url: appPath('/settings'), icon: Settings },
43
+ ]
62
44
 
63
- export function PortalSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
64
45
  return (
65
46
  <Sidebar {...props}>
66
47
  <SidebarHeader>
67
48
  {/* Brand Header */}
68
49
  <SidebarMenu>
69
50
  <SidebarMenuItem>
70
- <SidebarMenuButton size="lg" asChild>
71
- <a href="/portal">
51
+ <SidebarMenuButton size="lg" onClick={() => navigate(appPath('/'))}>
52
+ <a href={appPath('/')}>
72
53
  <div className="flex aspect-square size-8 items-center justify-center rounded-lg bg-primary text-primary-foreground">
73
54
  <span className="text-sm font-bold">P</span>
74
55
  </div>
package/manifest.json CHANGED
@@ -2,62 +2,28 @@
2
2
  "name": "Portal",
3
3
  "slug": "portal",
4
4
  "description": "Self-service portal for customers to access tickets, knowledge base, courses, and community",
5
- "version": "0.2.8",
5
+ "version": "0.2.9",
6
6
  "app_type": "full",
7
+ "route_prefix": "/portal",
7
8
  "required_roles": ["member"],
8
9
  "routes": [
9
- "/portal",
10
- "/portal/tickets",
11
- "/portal/tickets/:id",
12
- "/portal/kb",
13
- "/portal/courses",
14
- "/portal/community",
15
- "/portal/marketplace",
16
- "/portal/team"
10
+ "/",
11
+ "/tickets",
12
+ "/tickets/:id",
13
+ "/kb",
14
+ "/courses",
15
+ "/community",
16
+ "/marketplace",
17
+ "/team"
17
18
  ],
18
19
  "nav_items": [
19
- {
20
- "title": "Home",
21
- "path": "/portal",
22
- "icon": "Home",
23
- "order": 1
24
- },
25
- {
26
- "title": "Tickets",
27
- "path": "/portal/tickets",
28
- "icon": "Ticket",
29
- "order": 2
30
- },
31
- {
32
- "title": "Knowledge Base",
33
- "path": "/portal/kb",
34
- "icon": "BookOpen",
35
- "order": 3
36
- },
37
- {
38
- "title": "Courses",
39
- "path": "/portal/courses",
40
- "icon": "GraduationCap",
41
- "order": 4
42
- },
43
- {
44
- "title": "Community",
45
- "path": "/portal/community",
46
- "icon": "Users",
47
- "order": 5
48
- },
49
- {
50
- "title": "Marketplace",
51
- "path": "/portal/marketplace",
52
- "icon": "Store",
53
- "order": 6
54
- },
55
- {
56
- "title": "Team",
57
- "path": "/portal/team",
58
- "icon": "UserPlus",
59
- "order": 7
60
- }
20
+ { "title": "Home", "path": "/", "icon": "Home", "order": 1 },
21
+ { "title": "Tickets", "path": "/tickets", "icon": "Ticket", "order": 2 },
22
+ { "title": "Knowledge Base", "path": "/kb", "icon": "BookOpen", "order": 3 },
23
+ { "title": "Courses", "path": "/courses", "icon": "GraduationCap", "order": 4 },
24
+ { "title": "Community", "path": "/community", "icon": "Users", "order": 5 },
25
+ { "title": "Marketplace", "path": "/marketplace","icon": "Store", "order": 6 },
26
+ { "title": "Team", "path": "/team", "icon": "UserPlus", "order": 7 }
61
27
  ],
62
28
  "features": ["tickets", "kb", "courses", "community", "marketplace"],
63
29
  "dependencies": ["items", "threads", "messages"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-framework-portal",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "private": false,
5
5
  "description": "Customer Portal — self-service portal app for Spine Framework",
6
6
  "type": "module",