-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from besscroft/dev
v0.7.2
- Loading branch information
Showing
27 changed files
with
537 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ PicImpact | |
|
||
### 如何部署 | ||
|
||
你可以点击下面的按钮来一键部署到 Vercel,然后将 `Build Command` 为 `pnpm run build:vercel`,也可以 Fork 项目后手动部署到任何支持的平台。 | ||
你可以点击下面的按钮来一键部署到 Vercel,然后将 `Build Command` 设置为 `pnpm run build:vercel`,也可以 Fork 项目后手动部署到任何支持的平台。 | ||
|
||
<a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fbesscroft%2FPicImpact&env=DATABASE_URL,AUTH_SECRET"><img src="https://vercel.com/button" alt="Deploy with Vercel"/></a> | ||
|
||
|
@@ -26,6 +26,8 @@ PicImpact | |
默认账号:`[email protected]`,默认密码:`666666`,**登录后请先去设置里面修改密码!** | ||
|
||
> 部署就是这么简单,只需要您准备一个干净的数据库就行! | ||
> 除了容器化部署方式外,其它的部署方式都需要执行 `pnpm run prisma:deploy` 来完成 prisma 迁移。 | ||
> 如果是 Vercel 部署,直接将 `Build Command` 设置为 `pnpm run build:vercel` 即可。 | ||
> | ||
> 不过,不支持 ALL Edge 运行时,毕竟 Vercel 就只给了 Edge 100M 内存,太小了...当然,Node.js 运行时是完美支持的~ | ||
|
@@ -42,7 +44,7 @@ docker run -d --name picimpact \ | |
``` | ||
|
||
```yaml | ||
version: '3' | ||
name: pic | ||
services: | ||
picimpact: | ||
image: besscroft/picimpact:latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import Masonry from '~/components/Masonry' | ||
import { fetchClientImagesListByLabel, fetchClientImagesPageTotalByLabel } from '~/server/lib/query' | ||
import { ImageHandleProps } from '~/types' | ||
|
||
export default function Label({ params }: { params: { tag: string } }) { | ||
const getData = async (pageNum: number, tag: string) => { | ||
'use server' | ||
return await fetchClientImagesListByLabel(pageNum, tag) | ||
} | ||
|
||
const getPageTotal = async (tag: string) => { | ||
'use server' | ||
return await fetchClientImagesPageTotalByLabel(tag) | ||
} | ||
|
||
const props: ImageHandleProps = { | ||
handle: getData, | ||
args: `getImages-client-label`, | ||
tag: `${decodeURIComponent(params.tag)}`, | ||
totalHandle: getPageTotal | ||
} | ||
|
||
return ( | ||
<Masonry {...props} /> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
'use client' | ||
|
||
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from '~/components/ui/Sheet' | ||
import { useButtonStore } from '~/app/providers/button-store-Providers' | ||
|
||
export default function ImageHelpSheet() { | ||
const { imageHelp, setImageHelp } = useButtonStore( | ||
(state) => state, | ||
) | ||
|
||
return ( | ||
<Sheet | ||
defaultOpen={false} | ||
open={imageHelp} | ||
onOpenChange={(open: boolean) => { | ||
if (!open) { | ||
setImageHelp(false) | ||
} | ||
}} | ||
modal={false} | ||
> | ||
<SheetContent side="left"> | ||
<SheetHeader> | ||
<SheetTitle>帮助</SheetTitle> | ||
<SheetDescription className="space-y-2"> | ||
<p> | ||
您在当前页面可以维护图片的数据。 | ||
</p> | ||
<p> | ||
您可以为每一张图片打上标签,但请注意不要用特殊字符。 | ||
为了兼容 SSR 场景,通过路由来获取的参数,如果有特殊字符可能会没法正确访问数据。 | ||
您可以通过点击图片标签,来访问所有包含该标签的图片。 | ||
</p> | ||
<p> | ||
注意,如果您将⌈图片⌋设置为⌈禁用状态⌋,那么未登录时无法以任何方式获取该图片的信息,但不影响通过链接访问图片,因为这个权限由存储方管理。 | ||
</p> | ||
</SheetDescription> | ||
</SheetHeader> | ||
</SheetContent> | ||
</Sheet> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.