diff --git a/.env.example b/.env.example index 3e76d4b..a931036 100644 --- a/.env.example +++ b/.env.example @@ -1,18 +1,18 @@ # Environnement -NODE_ENV=production +NODE_ENV=development # Base de données -DATABASE_URL=postgresql://devuser:changeme@db:5432/devdb?schema=public +DATABASE_URL=postgresql://devuser:changeme@localhost:5432/devdb?schema=public # Projet PROJECT_NAME="Portabase" PROJECT_DESCRIPTION="Portabase is a powerful database manager" -PROJECT_URL=http://app.portabase.io +PROJECT_URL=http://localhost:8887 PROJECT_SECRET= # SMTP (email) SMTP_HOST= -SMTP_PORT=587 +SMTP_PORT= SMTP_USER= SMTP_PASSWORD= SMTP_FROM= @@ -23,14 +23,14 @@ AUTH_GOOGLE_SECRET= AUTH_GOOGLE_METHOD= # S3 -S3_ENDPOINT=http://app.s3.portabase.io +S3_ENDPOINT= S3_ACCESS_KEY= S3_SECRET_KEY= -S3_BUCKET_NAME=portabase -S3_PORT=9000 -S3_USE_SSL=true +S3_BUCKET_NAME= +S3_PORT= +S3_USE_SSL= -# Storage Type (s3, local) +# Storage type (local, S3) STORAGE_TYPE=local # Retention diff --git a/docker-compose.yml b/docker-compose.yml index a444beb..dac5796 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: db: image: postgres:16-alpine ports: - - "5433:5432" + - "5432:5432" volumes: - postgres-data:/var/lib/postgresql/data environment: diff --git a/src/components/wrappers/common/connection-circle.tsx b/src/components/wrappers/common/connection-circle.tsx deleted file mode 100644 index f30b3a3..0000000 --- a/src/components/wrappers/common/connection-circle.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import {cn} from "@/lib/utils"; - -export type ConnectionCircleProps = { - date?: Date | null; -}; - -export const ConnectionCircle = ({date}: ConnectionCircleProps) => { - let style = "bg-gray-300 border-gray-400"; - - if (date instanceof Date && !isNaN(date.getTime())) { - const now = Date.now(); - const timestamp = date.getTime(); - const interval_seconds = (now - timestamp) / 1000; - - if (interval_seconds < 55) { - style = "bg-green-400 border-green-600"; - } else if (interval_seconds <= 60) { - style = "bg-orange-400 border-orange-600"; - } else { - style = "bg-red-400 border-red-600"; - } - } else { - console.warn("Invalid date passed to ConnectionCircle:", date); - } - - return
; -}; diff --git a/src/components/wrappers/common/connection-indicator.tsx b/src/components/wrappers/common/connection-indicator.tsx new file mode 100644 index 0000000..8812932 --- /dev/null +++ b/src/components/wrappers/common/connection-indicator.tsx @@ -0,0 +1,46 @@ +import {cn} from "@/lib/utils"; + +export type ConnectionIndicatorProps = { + date?: Date | null; +}; + +export const ConnectionIndicator = ({date}: ConnectionIndicatorProps) => { + let style = "bg-gray-300"; + + if (date instanceof Date && !isNaN(date.getTime())) { + const intervalSeconds = (Date.now() - date.getTime()) / 1000; + + if (intervalSeconds < 55) { + style = "bg-green-500"; + } else if (intervalSeconds <= 60) { + style = "bg-orange-400"; + } else { + style = "bg-red-500"; + } + } + + return ( +