diff --git a/.blinko/files/pic01.png b/.blinko/files/pic01.png
deleted file mode 100644
index 0b56278..0000000
Binary files a/.blinko/files/pic01.png and /dev/null differ
diff --git a/.blinko/files/pic02.png b/.blinko/files/pic02.png
deleted file mode 100644
index 0de9150..0000000
Binary files a/.blinko/files/pic02.png and /dev/null differ
diff --git a/.blinko/files/pic03.png b/.blinko/files/pic03.png
deleted file mode 100644
index 00c5d9e..0000000
Binary files a/.blinko/files/pic03.png and /dev/null differ
diff --git a/.blinko/files/pic04.png b/.blinko/files/pic04.png
deleted file mode 100644
index 7796fa8..0000000
Binary files a/.blinko/files/pic04.png and /dev/null differ
diff --git a/.blinko/files/pic06.png b/.blinko/files/pic06.png
deleted file mode 100644
index c0ba876..0000000
Binary files a/.blinko/files/pic06.png and /dev/null differ
diff --git a/.blinko/files/story.txt b/.blinko/files/story.txt
deleted file mode 100644
index e69de29..0000000
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/build-and-push-release-image.yml
similarity index 97%
rename from .github/workflows/docker-image.yml
rename to .github/workflows/build-and-push-release-image.yml
index f5020cb..b962dcd 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/build-and-push-release-image.yml
@@ -1,4 +1,4 @@
-name: Build and Push Docker Image
+name: Build and Push Release Docker Image
on:
push:
diff --git a/.github/workflows/build-and-push-test-image.yml b/.github/workflows/build-and-push-test-image.yml
new file mode 100644
index 0000000..31ad259
--- /dev/null
+++ b/.github/workflows/build-and-push-test-image.yml
@@ -0,0 +1,62 @@
+name: Build and Push Test Docker Image
+
+on:
+ push:
+ branches: [main]
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ packages: write
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Extract build args
+ run: |
+ echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
+
+
+ - name: Log in to Docker Hub
+ uses: docker/login-action@v3
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+
+ - name: Login to GitHub Container Registry
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ github.token }}
+
+ - name: Set up Docker Buildx
+ id: buildx
+ uses: docker/setup-buildx-action@v3
+ with:
+ install: true
+ version: v0.9.1
+
+ - name: Docker meta
+ id: meta
+ uses: docker/metadata-action@v5
+ with:
+ images: |
+ blinkospace/blinko
+ ghcr.io/blinko-space/blinko
+ tags: |
+ type=raw,value=${{ env.VERSION }}
+ flavor: |
+ latest=false
+
+ - name: Build and Push
+ id: docker_build
+ uses: docker/build-push-action@v6
+ with:
+ context: ./
+ file: Dockerfile
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
diff --git a/.gitignore b/.gitignore
index 3106dcc..8e2f878 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,4 +17,7 @@ yarn.lock
public/robots.txt
public/sitemap*
public/assets
+.blinko/faiss/*
+.blinko/pgdump/*
+.blinko/files/*
dump.sql
\ No newline at end of file
diff --git a/next-env.d.ts b/next-env.d.ts
index 7b88d7d..725dd6f 100644
--- a/next-env.d.ts
+++ b/next-env.d.ts
@@ -1,5 +1,6 @@
///
///
///
+
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
diff --git a/next.config.js b/next.config.js
index 354b72a..e9dff5f 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,3 +1,4 @@
+const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
transpilePackages: ['@mdxeditor/editor', 'react-diff-view'],
webpack: (config, { isServer }) => {
@@ -10,9 +11,10 @@ module.exports = {
}
return config;
},
- reactStrictMode: true,
+ outputFileTracing: true,
+ reactStrictMode: isProduction? true : false,
swcMinify:false,
eslint: {
ignoreDuringBuilds: true,
},
-}
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index b1cd694..d95472c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "blinko",
- "version": "0.0.3",
+ "version": "0.0.4",
"private": true,
"browser": {
"fs": false,
@@ -20,7 +20,7 @@
"db-reset": "prisma migrate dev reset",
"dev": "next dev -p 1111",
"build": "set NODE_ENV=production & next build",
- "start": "next start -p 1111",
+ "start": "prisma migrate & prisma db seed & next start -p 1111",
"lint": "next lint",
"analyze": "ANALYZE=true next build",
"postinstall": "pnpm generate"
@@ -49,6 +49,7 @@
"@types/mime-types": "^2.1.4",
"adm-zip": "^0.5.16",
"axios": "^1.7.7",
+ "canvas-confetti": "^1.9.3",
"clsx": "^2.1.1",
"cron": "^3.1.7",
"dataloader": "^2.2.2",
@@ -102,6 +103,7 @@
"remark-gfm": "^4.0.0",
"superjson": "^2.2.1",
"swagger-ui-react": "^5.17.14",
+ "swiper": "^11.1.14",
"tailwind-merge": "^1.13.0",
"trpc-to-openapi": "^2.0.2",
"typed-emitter": "^2.1.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ed2e150..cd6749d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -80,6 +80,9 @@ importers:
axios:
specifier: ^1.7.7
version: 1.7.7
+ canvas-confetti:
+ specifier: ^1.9.3
+ version: 1.9.3
clsx:
specifier: ^2.1.1
version: 2.1.1
@@ -239,6 +242,9 @@ importers:
swagger-ui-react:
specifier: ^5.17.14
version: 5.17.14(@types/react@18.2.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ swiper:
+ specifier: ^11.1.14
+ version: 11.1.14
tailwind-merge:
specifier: ^1.13.0
version: 1.14.0
@@ -3328,6 +3334,9 @@ packages:
caniuse-lite@1.0.30001669:
resolution: {integrity: sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==}
+ canvas-confetti@1.9.3:
+ resolution: {integrity: sha512-rFfTURMvmVEX1gyXFgn5QMn81bYk70qa0HLzcIOSVEyl57n6o9ItHeBtUSWdvKAPY0xlvBHno4/v3QPrT83q9g==}
+
ccount@2.0.1:
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
@@ -6472,6 +6481,10 @@ packages:
react: '>=16.8.0 <19'
react-dom: '>=16.8.0 <19'
+ swiper@11.1.14:
+ resolution: {integrity: sha512-VbQLQXC04io6AoAjIUWuZwW4MSYozkcP9KjLdrsG/00Q/yiwvhz9RQyt0nHXV10hi9NVnDNy1/wv7Dzq1lkOCQ==}
+ engines: {node: '>= 4.7.0'}
+
tabbable@6.2.0:
resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==}
@@ -11315,6 +11328,8 @@ snapshots:
caniuse-lite@1.0.30001669: {}
+ canvas-confetti@1.9.3: {}
+
ccount@2.0.1: {}
chalk@2.4.2:
@@ -14827,6 +14842,8 @@ snapshots:
- '@types/react'
- debug
+ swiper@11.1.14: {}
+
tabbable@6.2.0: {}
tailwind-merge@1.14.0: {}
diff --git a/prisma/migrations/20241027072348_0_0_3/migration.sql b/prisma/migrations/20241027072348_0_0_3/migration.sql
new file mode 100644
index 0000000..46f9ec6
--- /dev/null
+++ b/prisma/migrations/20241027072348_0_0_3/migration.sql
@@ -0,0 +1,2 @@
+-- AlterTable
+ALTER TABLE "notes" ADD COLUMN "isReviewed" BOOLEAN NOT NULL DEFAULT false;
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 23544e0..bef6e62 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -48,6 +48,7 @@ model notes {
isRecycle Boolean @default(false)
isShare Boolean @default(false)
isTop Boolean @default(false)
+ isReviewed Boolean @default(false)
sharePassword String @default("") @db.VarChar
metadata Json? @db.Json
users Int @default(0)
diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json
index 547d99a..e253869 100644
--- a/public/locales/en/translation.json
+++ b/public/locales/en/translation.json
@@ -87,5 +87,9 @@
"every-half-year": "Every half year",
"import": "Import",
"impoort-from-bko": "Import from .bko",
- "not-a-bko-file": "not a bko file"
+ "not-a-bko-file": "not a bko file",
+ "convert-to-note": "Convert to Note",
+ "convert-to-blinko": "Convert to Blinko",
+ "reviewed": "Reviewed",
+ "congratulations-youve-reviewed-everything-today": "you've reviewed everything today."
}
diff --git a/public/locales/zh/translation.json b/public/locales/zh/translation.json
index d3740f0..5f9c5d5 100644
--- a/public/locales/zh/translation.json
+++ b/public/locales/zh/translation.json
@@ -86,5 +86,9 @@
"every-day": "每天",
"import": "导入",
"impoort-from-bko": "从.bko文件导入",
- "not-a-bko-file": "不是 bko 文件"
+ "not-a-bko-file": "不是 bko 文件",
+ "convert-to-note": "转换为笔记",
+ "convert-to-blinko": "转换为闪念",
+ "reviewed": "已回顾",
+ "congratulations-youve-reviewed-everything-today": "恭喜你,今天你已经回顾了所有内容"
}
diff --git a/src/components/BlinkoRightClickMenu/index.tsx b/src/components/BlinkoRightClickMenu/index.tsx
index 6569cb1..b8f92e0 100644
--- a/src/components/BlinkoRightClickMenu/index.tsx
+++ b/src/components/BlinkoRightClickMenu/index.tsx
@@ -12,14 +12,15 @@ import { DialogStore } from "@/store/module/Dialog";
import { BlinkoEditor } from "../BlinkoEditor";
import { useEffect, useState } from "react";
import { NoteType } from "@/server/types";
+import { reaction } from "mobx";
export const BlinkoRightClickMenu = observer(() => {
const { t } = useTranslation();
const blinko = RootStore.Get(BlinkoStore)
- const [forceUpdate, setForceUpdate] = useState(0)
const store = RootStore.Local(() => ({
editorHeight: 90,
editBlinko() {
+ console.log(123)
RootStore.Get(DialogStore).setData({
size: '2xl',
isOpen: true,
@@ -28,13 +29,8 @@ export const BlinkoRightClickMenu = observer(() => {
})
},
}))
- useEffect(() => {
- setForceUpdate(forceUpdate + 1)
- }, [blinko.curSelectedNote])
return