Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/npm taobao mirror and chinese prompts #359

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
da931de
fix: update logo assets and caching headers
blinko-space Dec 17, 2024
8a1372e
Merge branch 'main' of https://github.com/blinko-space/blinko
blinko-space Dec 17, 2024
54c521a
chore: update logo reference in README
blinko-space Dec 17, 2024
3de26b5
chore(release): 0.26.11 [skip ci]
semantic-release-bot Dec 17, 2024
17604c2
fix: add error logging in FileService writeFileSafe method
blinko-space Dec 17, 2024
bab1eef
chore(release): 0.26.12 [skip ci]
semantic-release-bot Dec 17, 2024
ef09306
feat: add user data deletion confirmation dialog and enhance translat…
blinko-space Dec 17, 2024
60c4a41
feat: add self-deletion prevention in user deletion logic
blinko-space Dec 17, 2024
f9d500c
fix: enhance sign-in component with theme-based logo and clean up imp…
blinko-space Dec 17, 2024
8a15732
Merge pull request #329 from blinko-space/dev
blinko-space Dec 17, 2024
8ea847a
chore(release): 0.27.0 [skip ci]
semantic-release-bot Dec 17, 2024
c86cd4e
fix: enhance file upload functionality and improve user feedback
blinko-space Dec 17, 2024
e38501a
fix: enhance user sign-out process and improve component structure 326
blinko-space Dec 17, 2024
cf7b057
fix: adjust button alignment in TipsDialog component
blinko-space Dec 17, 2024
4047c64
fix: remove bodyParser configuration from file upload route
blinko-space Dec 17, 2024
66f1cbe
fix: update icon paths in manifest.json for consistency
blinko-space Dec 17, 2024
817b921
Merge pull request #330 from blinko-space/dev
blinko-space Dec 17, 2024
0e6ff7a
chore(release): 0.27.1 [skip ci]
semantic-release-bot Dec 17, 2024
2320622
Merge branch 'main' into dev
blinko-space Dec 18, 2024
b2edb76
fix: disable dragging for image thumbnails in AttachmentRender compon…
blinko-space Dec 18, 2024
4183c9f
fix: update dialog store reference in DeleteIcon component #332
blinko-space Dec 18, 2024
dc41a44
fix: pwa refresh language lose
blinko-space Dec 18, 2024
5b69f2b
fix: enhance attachment management and sorting functionality
blinko-space Dec 18, 2024
91229c6
fix: improve BlinkoAiChat responsiveness and enhance file name handling
blinko-space Dec 18, 2024
6194067
fix: refactor sidebar state management and enhance resizing functiona…
blinko-space Dec 18, 2024
9de5e8e
fix: enhance layout components and improve user interaction
blinko-space Dec 18, 2024
5331ee6
Merge branch 'main' into dev
blinko-space Dec 18, 2024
8f8b7fc
Merge pull request #336 from blinko-space/dev
blinko-space Dec 18, 2024
05097ba
Merge branch 'main' into dev
blinko-space Dec 18, 2024
647c2ca
Merge branch 'dev' of https://github.com/blinko-space/blinko into dev
blinko-space Dec 18, 2024
d0b445e
chore(release): 0.27.2 [skip ci]
semantic-release-bot Dec 18, 2024
4eaf1c2
Merge pull request #337 from blinko-space/dev
blinko-space Dec 18, 2024
800cc73
feat: add music metadata functionality and Spotify integration
blinko-space Dec 18, 2024
251f2ff
fix: enhance user settings initialization and layout interaction
blinko-space Dec 19, 2024
1b00979
chore(release): 0.27.3 [skip ci]
semantic-release-bot Dec 19, 2024
c112df6
fix: add edit time functionality and enhance note management #242
blinko-space Dec 19, 2024
57620e2
fix: add edit time option to BlinkoRightClickMenu
blinko-space Dec 19, 2024
bb22518
Merge branches 'main' and 'main' of https://github.com/blinko-space/b…
blinko-space Dec 19, 2024
b8f7e52
chore(release): 0.27.4 [skip ci]
semantic-release-bot Dec 19, 2024
dbaa73e
fix: add AI writing feature and enhance localization
blinko-space Dec 19, 2024
4ee8fa4
Merge branch 'main' of https://github.com/blinko-space/blinko
blinko-space Dec 19, 2024
2f8b699
chore(release): 0.27.5 [skip ci]
semantic-release-bot Dec 19, 2024
69b475b
fix: remove unused components and utility functions
blinko-space Dec 19, 2024
0cf0f29
Merge branch 'main' of https://github.com/blinko-space/blinko
blinko-space Dec 19, 2024
798e68d
chore(release): 0.27.6 [skip ci]
semantic-release-bot Dec 19, 2024
d498892
fix: german translations
Dec 19, 2024
111d886
Merge pull request #347 from d-o-it/main
blinko-space Dec 20, 2024
7ba903d
chore(release): 0.27.7 [skip ci]
semantic-release-bot Dec 20, 2024
cda450a
feat: refactor resource page
blinko-space Dec 20, 2024
99003be
feat: enhance localization and improve resource context menu
blinko-space Dec 20, 2024
2bfb29c
fix: improve layout and accessibility in resources and layout components
blinko-space Dec 20, 2024
6572ebb
feat: enhance configuration and improve attachment handling
blinko-space Dec 20, 2024
a123c4c
Merge branch 'main' into refactor-resouce
blinko-space Dec 20, 2024
bad74dc
Merge pull request #351 from blinko-space/refactor-resouce
blinko-space Dec 20, 2024
1084a67
chore(release): 0.28.0 [skip ci]
semantic-release-bot Dec 20, 2024
169e3b3
fix: build issue
blinko-space Dec 21, 2024
e045cfe
Merge pull request #352 from blinko-space/refactor-resouce
blinko-space Dec 21, 2024
f06aa91
chore(release): 0.28.1 [skip ci]
semantic-release-bot Dec 21, 2024
14ca4b6
Merge branch 'main' into music
blinko-space Dec 21, 2024
838f26e
fix: update Chinese translations and enhance BlinkoMusicPlayer respon…
blinko-space Dec 21, 2024
4f89890
Merge pull request #354 from blinko-space/music
blinko-space Dec 21, 2024
2287f7b
chore(release): 0.29.0 [skip ci]
semantic-release-bot Dec 21, 2024
dc035ba
chore: fix vercel build error
blinko-space Dec 21, 2024
d9c5bd3
chore: remove unuse code
blinko-space Dec 21, 2024
115780c
chore: comment out demo app error response in file upload route
blinko-space Dec 21, 2024
fd9bf88
fix: add error handling for missing account information in DBJob plugin
blinko-space Dec 21, 2024
a985120
chore(release): 0.29.1 [skip ci]
semantic-release-bot Dec 21, 2024
5248a03
fix: enhance resource management and UI updates
blinko-space Dec 21, 2024
267960b
Merge branch 'main' of https://github.com/blinko-space/blinko
blinko-space Dec 21, 2024
a8489ad
chore(release): 0.29.2 [skip ci]
semantic-release-bot Dec 21, 2024
2b34bfa
fix: enhance ScrollArea component and update attachment router
blinko-space Dec 21, 2024
61225f5
Merge branch 'main' of https://github.com/blinko-space/blinko
blinko-space Dec 21, 2024
90f2076
chore(release): 0.29.3 [skip ci]
semantic-release-bot Dec 21, 2024
f6c3c54
fix: update LoadingPage and SendButton components for improved UI
blinko-space Dec 21, 2024
ff68a18
Merge branch 'main' of https://github.com/blinko-space/blinko
blinko-space Dec 21, 2024
d905c21
chore(release): 0.29.4 [skip ci]
semantic-release-bot Dec 21, 2024
54bdda8
Merge branch 'main' into feature/npm-taobao-mirror-and-chinese-prompt…
LiangWei88 Dec 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 148 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,151 @@
## [0.29.4](https://github.com/blinko-space/blinko/compare/v0.29.3...v0.29.4) (2024-12-21)


### Bug Fixes

* update LoadingPage and SendButton components for improved UI ([f6c3c54](https://github.com/blinko-space/blinko/commit/f6c3c54f4b9a4120cfc143f787a7cdc4b91beb7c))

## [0.29.3](https://github.com/blinko-space/blinko/compare/v0.29.2...v0.29.3) (2024-12-21)


### Bug Fixes

* enhance ScrollArea component and update attachment router ([2b34bfa](https://github.com/blinko-space/blinko/commit/2b34bfaa9c5f9813198670b7355392e2c02f1f4e))

## [0.29.2](https://github.com/blinko-space/blinko/compare/v0.29.1...v0.29.2) (2024-12-21)


### Bug Fixes

* enhance resource management and UI updates ([5248a03](https://github.com/blinko-space/blinko/commit/5248a03efbd39ea9636a5327a1b16da8289d3c91))

## [0.29.1](https://github.com/blinko-space/blinko/compare/v0.29.0...v0.29.1) (2024-12-21)


### Bug Fixes

* add error handling for missing account information in DBJob plugin ([fd9bf88](https://github.com/blinko-space/blinko/commit/fd9bf8850574c5f998050d31a9956bda1ef713a1))

# [0.29.0](https://github.com/blinko-space/blinko/compare/v0.28.1...v0.29.0) (2024-12-21)


### Bug Fixes

* update Chinese translations and enhance BlinkoMusicPlayer responsiveness ([838f26e](https://github.com/blinko-space/blinko/commit/838f26e6bba1b3c121ddc24093422d886b84c18c))


### Features

* add music metadata functionality and Spotify integration ([800cc73](https://github.com/blinko-space/blinko/commit/800cc73cee9f5c03b603975e2804964405409eef))

## [0.28.1](https://github.com/blinko-space/blinko/compare/v0.28.0...v0.28.1) (2024-12-21)


### Bug Fixes

* build issue ([169e3b3](https://github.com/blinko-space/blinko/commit/169e3b301fec927b505ad8bb46d33c6f83ec906d))

# [0.28.0](https://github.com/blinko-space/blinko/compare/v0.27.7...v0.28.0) (2024-12-20)


### Bug Fixes

* improve layout and accessibility in resources and layout components ([2bfb29c](https://github.com/blinko-space/blinko/commit/2bfb29c841c0c0b181f15c013b44dfb78c380c44))


### Features

* enhance configuration and improve attachment handling ([6572ebb](https://github.com/blinko-space/blinko/commit/6572ebb0e7c5255e51943eebc36bee96a16623d8))
* enhance localization and improve resource context menu ([99003be](https://github.com/blinko-space/blinko/commit/99003be617eb533f4ac8d769018d329d6755e0e2))
* refactor resource page ([cda450a](https://github.com/blinko-space/blinko/commit/cda450a89a96aca417ac2a98ebec69639189c233))

## [0.27.7](https://github.com/blinko-space/blinko/compare/v0.27.6...v0.27.7) (2024-12-20)


### Bug Fixes

* german translations ([d498892](https://github.com/blinko-space/blinko/commit/d4988929592998df4bd79d9e60eacd0e21093cde))

## [0.27.6](https://github.com/blinko-space/blinko/compare/v0.27.5...v0.27.6) (2024-12-19)


### Bug Fixes

* remove unused components and utility functions ([69b475b](https://github.com/blinko-space/blinko/commit/69b475b4c9d2754b5d4e1bc409dc85b761f5c307))

## [0.27.5](https://github.com/blinko-space/blinko/compare/v0.27.4...v0.27.5) (2024-12-19)


### Bug Fixes

* add AI writing feature and enhance localization ([dbaa73e](https://github.com/blinko-space/blinko/commit/dbaa73ef615f8f387db573417cf9c04465eeaeb6))

## [0.27.4](https://github.com/blinko-space/blinko/compare/v0.27.3...v0.27.4) (2024-12-19)


### Bug Fixes

* add edit time functionality and enhance note management [#242](https://github.com/blinko-space/blinko/issues/242) ([c112df6](https://github.com/blinko-space/blinko/commit/c112df6a149a2b31f3e9ff8273136585db763981))
* add edit time option to BlinkoRightClickMenu ([57620e2](https://github.com/blinko-space/blinko/commit/57620e2b1fa5a21e4245ea4c2636822752351089))

## [0.27.3](https://github.com/blinko-space/blinko/compare/v0.27.2...v0.27.3) (2024-12-19)


### Bug Fixes

* enhance user settings initialization and layout interaction ([251f2ff](https://github.com/blinko-space/blinko/commit/251f2ffd2a9e4b6c13235539932f1a77281374b9))

## [0.27.2](https://github.com/blinko-space/blinko/compare/v0.27.1...v0.27.2) (2024-12-18)


### Bug Fixes

* disable dragging for image thumbnails in AttachmentRender component [#331](https://github.com/blinko-space/blinko/issues/331) ([b2edb76](https://github.com/blinko-space/blinko/commit/b2edb7620770c4a2315f272df16ed83a4ceba85a))
* enhance attachment management and sorting functionality ([5b69f2b](https://github.com/blinko-space/blinko/commit/5b69f2b99f45c69165034c5d8132b9cea5656839))
* enhance layout components and improve user interaction ([9de5e8e](https://github.com/blinko-space/blinko/commit/9de5e8e8786d1fec3e6781467af9bb4a565333e4))
* improve BlinkoAiChat responsiveness and enhance file name handling ([91229c6](https://github.com/blinko-space/blinko/commit/91229c6addd1b4ca25547fe831a675f5b188642c))
* pwa refresh language lose ([dc41a44](https://github.com/blinko-space/blinko/commit/dc41a44883e5f4a0913c7b956fc911baa7351415))
* refactor sidebar state management and enhance resizing functionality ([6194067](https://github.com/blinko-space/blinko/commit/6194067d5de9f8ed95a2b850b747448d188ea539))
* update dialog store reference in DeleteIcon component [#332](https://github.com/blinko-space/blinko/issues/332) ([4183c9f](https://github.com/blinko-space/blinko/commit/4183c9f964c6e851a0c2331c4e78d79eea4421e8))

## [0.27.1](https://github.com/blinko-space/blinko/compare/v0.27.0...v0.27.1) (2024-12-17)


### Bug Fixes

* adjust button alignment in TipsDialog component ([cf7b057](https://github.com/blinko-space/blinko/commit/cf7b05752a9221291d4f96bf37afffcd02b38015))
* enhance file upload functionality and improve user feedback ([c86cd4e](https://github.com/blinko-space/blinko/commit/c86cd4e61c66cc5e419510c92ba7fac3ec40df5e))
* enhance user sign-out process and improve component structure 326 ([e38501a](https://github.com/blinko-space/blinko/commit/e38501a071ea9c5b952e6cfe6354cf7e170effea))
* remove bodyParser configuration from file upload route ([4047c64](https://github.com/blinko-space/blinko/commit/4047c64f68c41bb95b057e7a5a0ff1d8072c7808))
* update icon paths in manifest.json for consistency ([66f1cbe](https://github.com/blinko-space/blinko/commit/66f1cbe38146e2d21de7d828841f3e310cc20dec))

# [0.27.0](https://github.com/blinko-space/blinko/compare/v0.26.12...v0.27.0) (2024-12-17)


### Bug Fixes

* enhance sign-in component with theme-based logo and clean up imports ([f9d500c](https://github.com/blinko-space/blinko/commit/f9d500ce40ebd8a6d2608945e3dbfe8d123c89b6))


### Features

* add self-deletion prevention in user deletion logic ([60c4a41](https://github.com/blinko-space/blinko/commit/60c4a418164f0cc8e2eae32edad6a667f740a6df))
* add user data deletion confirmation dialog and enhance translation files ([ef09306](https://github.com/blinko-space/blinko/commit/ef0930618aefbefa461fd98f9d23095d39e3ae34))

## [0.26.12](https://github.com/blinko-space/blinko/compare/v0.26.11...v0.26.12) (2024-12-17)


### Bug Fixes

* add error logging in FileService writeFileSafe method ([17604c2](https://github.com/blinko-space/blinko/commit/17604c28f08e0e3f4ab426e074bbd8c812d6375f))

## [0.26.11](https://github.com/blinko-space/blinko/compare/v0.26.10...v0.26.11) (2024-12-17)


### Bug Fixes

* update logo assets and caching headers ([da931de](https://github.com/blinko-space/blinko/commit/da931debcc34f0bf50ed86934c6fa1c5ab0b5f7d))

## [0.26.10](https://github.com/blinko-space/blinko/compare/v0.26.9...v0.26.10) (2024-12-16)


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<img align='right' height='40px' src="./public/single-logo.svg" alt="Blinko" />
<img align='right' height='40px' src="./public/logo.svg" alt="Blinko" />

# Blinko - Open Source, Self-hosted

Expand Down
2 changes: 1 addition & 1 deletion app/api/file/[...filename]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const GET = async (req: NextRequest, { params }: any) => {


const sanitizedPath = fullPath.replace(/^[./\\]+/, '');
const filePath = path.join(process.cwd(), UPLOAD_FILE_PATH, sanitizedPath);
const filePath = path.join(UPLOAD_FILE_PATH, sanitizedPath);

try {
if (isImage(fullPath) && needThumbnail) {
Expand Down
2 changes: 1 addition & 1 deletion app/api/file/upload-by-url/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const POST = async (req: NextRequest, res: NextResponse) => {
const urlPath = new URL(url).pathname;
const originalName = path.basename(urlPath).replaceAll(" ", "_");
const extension = path.extname(originalName);

console.log({ originalName, extension })
const filePath = await FileService.uploadFile(buffer, originalName);

return NextResponse.json({
Expand Down
45 changes: 30 additions & 15 deletions app/api/file/upload/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,35 @@ export const POST = async (req: NextRequest, res: NextResponse) => {
if (!token) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
const formData = await req.formData();
const file = formData.getAll('file')[0]
if (!file) {
return NextResponse.json({ error: "No files received." }, { status: 400 });
}
if (process.env.IS_DEMO) {
return NextResponse.json({ error: "In Demo App" }, { status: 401 });

// if (process.env.IS_DEMO) {
// return NextResponse.json({ error: "In Demo App" }, { status: 401 });
// }

try {
const formData = await req.formData();
const file = formData.getAll('file')[0] as File;

if (!file) {
return NextResponse.json({ error: "No files received." }, { status: 400 });
}

const originalName = file.name.replaceAll(" ", "_");
const stream = file.stream();

const filePath = await FileService.uploadFileStream(stream, originalName, file.size);

return NextResponse.json({
Message: "Success",
status: 200,
...filePath,
type: file.type,
size: file.size
});

} catch (error) {
console.error('Upload error:', error);
return NextResponse.json({ error: "Upload failed" }, { status: 500 });
}
//@ts-ignore
const buffer = Buffer.from(await file.arrayBuffer());
//@ts-ignore
const originalName = (file.name).replaceAll(" ", "_");
const extension = path.extname(originalName);
const filePath = await FileService.uploadFile(buffer, originalName)
//@ts-ignore
return NextResponse.json({ Message: "Success", status: 200, ...filePath, type: file?.type ?? '', size: file?.size ?? 0 });
};

51 changes: 50 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,56 @@ const withPWA = require('next-pwa')({
module.exports = withPWA({
output: 'standalone',
transpilePackages: ['react-diff-view','highlight.js','remark-gfm','rehype-raw'],
webpack: (config, { isServer }) => {
async headers() {
return [
{
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
source: '/icons/(.*).(png|jpe?g|gif|svg|ico|webp)',
},
{
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
source: '/favicon.ico',
},
{
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
source: '/loading.mp4',
},
{
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
source: '/logo-light.png',
},
{
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
source: '/logo-dark.png',
},
];
},
webpack: (config, { dev,isServer }) => {
config.experiments = { ...config.experiments, topLevelAwait: true };
if (!isServer) {
config.resolve.fallback = {
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blinko",
"version": "0.26.10",
"version": "0.29.4",
"repository": "https://github.com/blinko-space/blinko.git",
"private": true,
"browser": {
Expand All @@ -24,6 +24,7 @@
"dev:https": "ngrok http 1111",
"build": "set NODE_ENV=production & next build",
"build:debug": "set DEBUG=* & next build",
"build:max": "set NODE_OPTIONS=--max-old-space-size=16384 & set DEBUG=* & next build",
"vercel-build": "prisma generate && prisma migrate deploy && prisma db seed && next build",
"start": "prisma migrate & prisma db seed & next start -p 1111",
"lint": "next lint",
Expand Down Expand Up @@ -53,6 +54,7 @@
"@nextui-org/theme": "^2.4.1",
"@prisma/client": "^5.21.1",
"@radix-ui/colors": "^3.0.0",
"@radix-ui/react-dialog": "^1.1.4",
"@tailwindcss/line-clamp": "^0.4.4",
"@tailwindcss/typography": "^0.5.15",
"@trpc/client": "11.0.0-rc.553",
Expand All @@ -62,6 +64,7 @@
"adm-zip": "^0.5.16",
"axios": "^1.7.7",
"canvas-confetti": "^1.9.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"copy-to-clipboard": "^3.3.3",
"cron": "^3.1.7",
Expand All @@ -85,6 +88,7 @@
"lexical": "0.17.1",
"lodash": "^4.17.21",
"lottie-react": "^2.4.0",
"lucide-react": "^0.468.0",
"mammoth": "^1.8.0",
"mantine-datatable": "^7.12.4",
"markdown-it": "^14.1.0",
Expand All @@ -96,6 +100,7 @@
"mobx": "^6.13.3",
"mobx-react-lite": "^4.0.7",
"motion": "^11.13.1",
"music-metadata": "^10.6.4",
"ncp": "^2.0.0",
"next": "14.2.10",
"next-auth": "^4.24.7",
Expand All @@ -116,6 +121,7 @@
"react-accessible-treeview": "^2.9.1",
"react-audio-visualize": "^1.2.0",
"react-audio-voice-recorder": "^2.2.0",
"react-beautiful-dnd-next": "^11.0.5",
"react-burger-menu": "^3.0.9",
"react-collapsed": "^4.1.2",
"react-dev-inspector": "^2.0.1",
Expand Down Expand Up @@ -143,7 +149,7 @@
"superjson": "^2.2.1",
"swagger-ui-react": "^5.17.14",
"swiper": "^11.1.14",
"tailwind-merge": "^1.13.0",
"tailwind-merge": "^1.14.0",
"trpc-to-openapi": "^2.0.2",
"typed-emitter": "^2.1.0",
"typeorm": "^0.3.20",
Expand Down Expand Up @@ -176,7 +182,7 @@
"prisma": "^5.21.1",
"semantic-release": "^24.2.0",
"tailwindcss": "^3.3.2",
"tailwindcss-animate": "^1.0.6",
"tailwindcss-animate": "^1.0.7",
"ts-node": "^10.9.2",
"typescript": "^5.1.6"
},
Expand Down
Loading
Loading