mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a1acbfde8 | ||
|
|
16ef8507b0 | ||
|
|
df5d4e336c | ||
|
|
ad2015329b | ||
|
|
4cc4bed785 | ||
|
|
6c506e6907 | ||
|
|
3b93257890 | ||
|
|
1104e2a074 |
+1
-1
@@ -34,4 +34,4 @@ S3_USE_SSL=true
|
|||||||
STORAGE_TYPE=local
|
STORAGE_TYPE=local
|
||||||
|
|
||||||
# Retention
|
# Retention
|
||||||
RETENTION_CRON="* * * * *"
|
RETENTION_CRON="* * * * *"
|
||||||
|
|||||||
+2
-2
@@ -26,5 +26,5 @@ keywords:
|
|||||||
- web-ui
|
- web-ui
|
||||||
- agent
|
- agent
|
||||||
license: Apache-2.0
|
license: Apache-2.0
|
||||||
version: 1.1.9-rc4
|
version: 1.1.9
|
||||||
date-released: "2026-01-06"
|
date-released: "2026-01-07"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "portabase",
|
"name": "portabase",
|
||||||
"version": "1.1.9-rc4",
|
"version": "1.1.9",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbopack -p 8887",
|
"dev": "next dev --turbopack -p 8887",
|
||||||
|
|||||||
Generated
-10
@@ -300,9 +300,6 @@ importers:
|
|||||||
framer-motion:
|
framer-motion:
|
||||||
specifier: ^12.24.7
|
specifier: ^12.24.7
|
||||||
version: 12.24.7(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
|
version: 12.24.7(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
|
||||||
husky:
|
|
||||||
specifier: ^9.1.7
|
|
||||||
version: 9.1.7
|
|
||||||
postcss:
|
postcss:
|
||||||
specifier: ^8.5.3
|
specifier: ^8.5.3
|
||||||
version: 8.5.6
|
version: 8.5.6
|
||||||
@@ -4704,11 +4701,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==}
|
resolution: {integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==}
|
||||||
engines: {node: '>= 6'}
|
engines: {node: '>= 6'}
|
||||||
|
|
||||||
husky@9.1.7:
|
|
||||||
resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==}
|
|
||||||
engines: {node: '>=18'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
ieee754@1.2.1:
|
ieee754@1.2.1:
|
||||||
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
|
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
|
||||||
|
|
||||||
@@ -11921,8 +11913,6 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
husky@9.1.7: {}
|
|
||||||
|
|
||||||
ieee754@1.2.1: {}
|
ieee754@1.2.1: {}
|
||||||
|
|
||||||
ignore@5.3.2: {}
|
ignore@5.3.2: {}
|
||||||
|
|||||||
@@ -9,17 +9,67 @@ if [ -z "$1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
VERSION=$1
|
VERSION=$1
|
||||||
|
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||||
|
|
||||||
|
if [ "$CURRENT_BRANCH" = "main" ]; then
|
||||||
|
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
echo "Error: On 'main' branch, only release tags (X.Y.Z) are allowed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$ ]]; then
|
||||||
|
echo "Error: On branch '$CURRENT_BRANCH', only RC tags matching X.Y.Z-rc.W are allowed (e.g., 1.0.0-rc.1)."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
CLEAN_VERSION=${VERSION#v}
|
CLEAN_VERSION=${VERSION#v}
|
||||||
CURRENT_DATE=$(date +%Y-%m-%d)
|
CURRENT_DATE=$(date +%Y-%m-%d)
|
||||||
|
|
||||||
echo "Preparing release $VERSION..."
|
echo "Preparing release $VERSION..."
|
||||||
|
|
||||||
echo "Updating package.json to version $CLEAN_VERSION..."
|
|
||||||
sed -i "s/\"version\": \".*\"/\"version\": \"$CLEAN_VERSION\"/" package.json
|
|
||||||
|
|
||||||
echo "Updating CITATION.cff..."
|
# package.json
|
||||||
sed -i "s/^version: .*/version: $CLEAN_VERSION/" CITATION.cff
|
if [ -f package.json ]; then
|
||||||
sed -i "s/^date-released: .*/date-released: \"$CURRENT_DATE\"/" CITATION.cff
|
echo "Updating package.json..."
|
||||||
|
if sed --version >/dev/null 2>&1; then
|
||||||
|
sed -i "s/\"version\": \".*\"/\"version\": \"$CLEAN_VERSION\"/" package.json
|
||||||
|
else
|
||||||
|
sed -i '' "s/\"version\": \".*\"/\"version\": \"$CLEAN_VERSION\"/" package.json
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# pyproject.toml
|
||||||
|
if [ -f pyproject.toml ]; then
|
||||||
|
echo "Updating pyproject.toml..."
|
||||||
|
if sed --version >/dev/null 2>&1; then
|
||||||
|
sed -i "s/^version = \".*\"/version = \"$CLEAN_VERSION\"/" pyproject.toml
|
||||||
|
else
|
||||||
|
sed -i '' "s/^version = \".*\"/version = \"$CLEAN_VERSION\"/" pyproject.toml
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Cargo.toml
|
||||||
|
if [ -f Cargo.toml ]; then
|
||||||
|
echo "Updating Cargo.toml..."
|
||||||
|
if sed --version >/dev/null 2>&1; then
|
||||||
|
sed -i "s/^version = \".*\"/version = \"$CLEAN_VERSION\"/" Cargo.toml
|
||||||
|
else
|
||||||
|
sed -i '' "s/^version = \".*\"/version = \"$CLEAN_VERSION\"/" Cargo.toml
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# CITATION.cff
|
||||||
|
if [ -f CITATION.cff ]; then
|
||||||
|
echo "Updating CITATION.cff..."
|
||||||
|
if sed --version >/dev/null 2>&1; then
|
||||||
|
sed -i "s/^version: .*/version: $CLEAN_VERSION/" CITATION.cff
|
||||||
|
sed -i "s/^date-released: .*/date-released: \"$CURRENT_DATE\"/" CITATION.cff
|
||||||
|
else
|
||||||
|
sed -i '' "s/^version: .*/version: $CLEAN_VERSION/" CITATION.cff
|
||||||
|
sed -i '' "s/^date-released: .*/date-released: \"$CURRENT_DATE\"/" CITATION.cff
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
git add .
|
git add .
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
import {Avatar, AvatarFallback, AvatarImage} from "@/components/ui/avatar";
|
||||||
import { UploadIcon } from "lucide-react";
|
import {UploadIcon} from "lucide-react";
|
||||||
import { toast } from "sonner";
|
import {toast} from "sonner";
|
||||||
import { uploadImageAction } from "@/features/upload/public/upload.action";
|
import {uploadImageAction} from "@/features/upload/public/upload.action";
|
||||||
import { useMutation } from "@tanstack/react-query";
|
import {useMutation} from "@tanstack/react-query";
|
||||||
import { updateImageUserAction } from "@/components/wrappers/dashboard/profile/actions/avatar.action";
|
import {updateImageUserAction} from "@/components/wrappers/dashboard/profile/actions/avatar.action";
|
||||||
import { useRouter } from "next/navigation";
|
import {useRouter} from "next/navigation";
|
||||||
import { User } from "@/db/schema/02_user";
|
import {User} from "@/db/schema/02_user";
|
||||||
import React, {ChangeEvent} from "react";
|
import React, {ChangeEvent} from "react";
|
||||||
|
|
||||||
export type AvatarWithUploadProps = {
|
export type AvatarWithUploadProps = {
|
||||||
@@ -55,12 +55,11 @@ export const AvatarWithUpload = (props: AvatarWithUploadProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative ">
|
<div className="relative ">
|
||||||
|
|
||||||
<Avatar className="w-24 h-24 lg:w-32 lg:h-32 border-4 border-muted/20">
|
<Avatar className="w-24 h-24 lg:w-32 lg:h-32 border-4 border-muted/20">
|
||||||
<AvatarImage src={user.image || undefined}/>
|
<AvatarImage className="object-cover" src={user.image || undefined}/>
|
||||||
<AvatarFallback className="text-3xl">{user.name.charAt(0)}</AvatarFallback>
|
<AvatarFallback className="text-3xl">{user.name.charAt(0)}</AvatarFallback>
|
||||||
</Avatar>
|
</Avatar>
|
||||||
|
|
||||||
@@ -75,7 +74,7 @@ export const AvatarWithUpload = (props: AvatarWithUploadProps) => {
|
|||||||
}}
|
}}
|
||||||
className="cursor-pointer absolute inset-0 flex justify-center items-center opacity-0 transition-opacity hover:opacity-100 hover:bg-gray-500 hover:bg-opacity-50 rounded-full w-24 h-24 lg:w-32 lg:h-32"
|
className="cursor-pointer absolute inset-0 flex justify-center items-center opacity-0 transition-opacity hover:opacity-100 hover:bg-gray-500 hover:bg-opacity-50 rounded-full w-24 h-24 lg:w-32 lg:h-32"
|
||||||
>
|
>
|
||||||
<UploadIcon className="w-12 h-12 lg:w-16 lg:h-16 text-primary" />
|
<UploadIcon className="w-12 h-12 lg:w-16 lg:h-16 text-primary"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {Setting} from "@/db/schema/01_setting";
|
|||||||
import * as drizzleDb from "@/db";
|
import * as drizzleDb from "@/db";
|
||||||
|
|
||||||
|
|
||||||
const privateS3ImageDir = "images/";
|
const imageDir = "images/";
|
||||||
|
|
||||||
|
|
||||||
export const uploadImageAction = userAction
|
export const uploadImageAction = userAction
|
||||||
@@ -39,10 +39,10 @@ export const uploadImageAction = userAction
|
|||||||
let result: void | UploadedObjectInfo;
|
let result: void | UploadedObjectInfo;
|
||||||
|
|
||||||
if (settings.storage === "local") {
|
if (settings.storage === "local") {
|
||||||
fileName = `${uuid}.${fileFormat}`;
|
fileName = `${imageDir}${uuid}.${fileFormat}`;
|
||||||
result = await uploadLocal(fileName, buffer);
|
result = await uploadLocal(fileName, buffer);
|
||||||
} else if (settings.storage === "s3") {
|
} else if (settings.storage === "s3") {
|
||||||
fileName = `${privateS3ImageDir}${uuid}.${fileFormat}`;
|
fileName = `${imageDir}${uuid}.${fileFormat}`;
|
||||||
result = await uploadS3Compatible(env.S3_BUCKET_NAME ?? "", fileName, buffer);
|
result = await uploadS3Compatible(env.S3_BUCKET_NAME ?? "", fileName, buffer);
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Unsupported storage type: ${settings.storage}`);
|
throw new Error(`Unsupported storage type: ${settings.storage}`);
|
||||||
@@ -54,7 +54,7 @@ export const uploadImageAction = userAction
|
|||||||
|
|
||||||
|
|
||||||
async function uploadLocal(fileName: string, buffer: any) {
|
async function uploadLocal(fileName: string, buffer: any) {
|
||||||
const localDir = "private/uploads/images/";
|
const localDir = "private/uploads/";
|
||||||
try {
|
try {
|
||||||
await mkdir(path.join(process.cwd(), localDir), {recursive: true});
|
await mkdir(path.join(process.cwd(), localDir), {recursive: true});
|
||||||
return await writeFile(path.join(process.cwd(), localDir + fileName), buffer);
|
return await writeFile(path.join(process.cwd(), localDir + fileName), buffer);
|
||||||
|
|||||||
Reference in New Issue
Block a user