Skip to content

Commit 229aff7

Browse files
Merge pull request #2 from SimpleNotificationSystem/development
dashboard side bar and HTTPS_COOKIE changes
2 parents 6f20b1f + e7a0647 commit 229aff7

7 files changed

Lines changed: 19 additions & 15 deletions

File tree

.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ API_BASE_URL= # Notification service API URL
105105
WEBHOOK_HOST= # Webhook host for callbacks
106106
WEBHOOK_PORT=3002 # Dashboard webhook port
107107
DASHBOARD_PORT=3002 # Dashboard port
108-
BASE_PATH= # Configurable BASE_PATH to render the admin dashboard
108+
BASE_PATH= # Configurable BASE_PATH to render the admin dashboard
109+
HTTPS_COOKIE= # Controls the storage of session cookies in http and https mode. (If set false, then the cookies can be stored in http connection)
110+
109111

110112
# ============================================
111113
# PLUGIN SPECIFIC ENV VARIABLES (Partition variables + Plugin credentials)

dashboard/.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ NS_API_KEY= # notification service api key
77
API_BASE_URL= # notification service base url
88
WEBHOOK_HOST= # webhook host
99
WEBHOOK_PORT= # webhook port
10-
BASE_PATH= # Base path for Next.js app (e.g., /dashboard). Leave empty for root path.
10+
BASE_PATH= # Base path for Next.js app (e.g., /dashboard). Leave empty for root path.
11+
HTTPS_COOKIE= # Controls the storage of session cookies in http and https mode. (If set false, then the cookies can be stored in http connection)

dashboard/app/settings/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Button } from "@/components/ui/button";
99
import { useGlassmorphism } from "@/components/glassmorphism-provider";
1010
import { useTour } from "@/components/tour/tour-provider";
1111
import { RotateCcw } from "lucide-react";
12+
import packageJson from "../../package.json";
1213

1314
export default function SettingsPage() {
1415
const { enabled, setEnabled } = useGlassmorphism();
@@ -72,7 +73,7 @@ export default function SettingsPage() {
7273
<CardContent className="space-y-4">
7374
<div className="flex items-center justify-between">
7475
<span className="text-sm text-muted-foreground">Dashboard Version</span>
75-
<Badge variant="secondary">1.0.0</Badge>
76+
<Badge variant="secondary">{packageJson.version}</Badge>
7677
</div>
7778
<Separator />
7879
<div className="flex items-center justify-between">

dashboard/components/ui/sidebar.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { cn } from "@/lib/utils";
1010
import { useSidebarPin } from "@/components/sidebar-pin-provider";
1111
import { Button } from "@/components/ui/button";
1212
import { Input } from "@/components/ui/input";
13+
import { ScrollArea } from "@/components/ui/scroll-area";
1314
import { Separator } from "@/components/ui/separator";
1415
import {
1516
Sheet,
@@ -401,7 +402,7 @@ function SidebarFooter({ className, ...props }: React.ComponentProps<"div">) {
401402
<div
402403
data-slot="sidebar-footer"
403404
data-sidebar="footer"
404-
className={cn("flex flex-col gap-2 p-2", className)}
405+
className={cn("flex flex-col gap-2 border-t border-sidebar-border px-2 pt-4 pb-2", className)}
405406
{...props}
406407
/>
407408
);
@@ -423,15 +424,16 @@ function SidebarSeparator({
423424

424425
function SidebarContent({ className, ...props }: React.ComponentProps<"div">) {
425426
return (
426-
<div
427+
<ScrollArea
427428
data-slot="sidebar-content"
428429
data-sidebar="content"
429430
className={cn(
430-
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
431+
"min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden",
431432
className,
432433
)}
433-
{...props}
434-
/>
434+
>
435+
<div className="flex flex-col gap-2 pb-2" {...props} />
436+
</ScrollArea>
435437
);
436438
}
437439

dashboard/lib/session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export async function createSession(userId: string, username: string): Promise<v
8989
const cookieStore = await cookies();
9090
cookieStore.set(SESSION_COOKIE_NAME, token, {
9191
httpOnly: true,
92-
secure: process.env.NODE_ENV === "production",
92+
secure: process.env.HTTPS_COOKIE !== "false",
9393
sameSite: "lax",
9494
path: "/",
9595
maxAge: SESSION_EXPIRY_DAYS * 24 * 60 * 60,

dashboard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dashboard",
3-
"version": "0.1.0",
3+
"version": "1.2.0",
44
"private": true,
55
"scripts": {
66
"dev": "next dev -p 3002",

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{
22
"name": "simplens-core",
3-
"version": "1.0.0",
4-
"description": "Lightweight, backend notification service for sending EMAIL and WHATSAPP messages. It supports single and batch notifications, scheduled deliveries and webhook callbacks for final delivery status.",
3+
"version": "1.2.0",
4+
"private": true,
5+
"description": "Open-source plugin-based notification orchestration engine for developers who value control ",
56
"main": "dist/api/server.js",
67
"type": "module",
7-
"directories": {
8-
"doc": "docs"
9-
},
108
"scripts": {
119
"test": "vitest run",
1210
"test:watch": "vitest",

0 commit comments

Comments
 (0)