diff --git a/tone-page-web/app/console/(with-menu)/web/blog/components/AddBlog.tsx b/tone-page-web/app/console/(with-menu)/web/blog/components/AddBlog.tsx index 438a9a6..563820b 100644 --- a/tone-page-web/app/console/(with-menu)/web/blog/components/AddBlog.tsx +++ b/tone-page-web/app/console/(with-menu)/web/blog/components/AddBlog.tsx @@ -1,10 +1,10 @@ 'use client' import { Button } from "@/components/ui/button"; -import { Checkbox } from "@/components/ui/checkbox"; import { Dialog, DialogContent, + DialogDescription, DialogFooter, DialogHeader, DialogTitle, @@ -65,6 +65,9 @@ export default function AddBlog({ children, onRefresh }: AddBlogProps) { 添加博客 + + 保存前请确认博客信息填写正确、权限配置合理 +
diff --git a/tone-page-web/app/console/(with-menu)/web/blog/components/BlogEdit.tsx b/tone-page-web/app/console/(with-menu)/web/blog/components/BlogEdit.tsx index 9768648..e1ceef9 100644 --- a/tone-page-web/app/console/(with-menu)/web/blog/components/BlogEdit.tsx +++ b/tone-page-web/app/console/(with-menu)/web/blog/components/BlogEdit.tsx @@ -4,6 +4,7 @@ import React, { useState } from "react" import { Dialog, DialogContent, + DialogDescription, DialogFooter, DialogHeader, DialogTitle, @@ -74,7 +75,10 @@ export default function BlogEdit({ id, children, onRefresh }: BlogEditProps) { - 添加博客 + 编辑博客 + + 保存前请确认博客信息填写正确、权限配置合理 + { blog && ( diff --git a/tone-page-web/app/console/(with-menu)/web/blog/components/SetPasswordDialog.tsx b/tone-page-web/app/console/(with-menu)/web/blog/components/SetPasswordDialog.tsx index 5e400a9..e12d101 100644 --- a/tone-page-web/app/console/(with-menu)/web/blog/components/SetPasswordDialog.tsx +++ b/tone-page-web/app/console/(with-menu)/web/blog/components/SetPasswordDialog.tsx @@ -14,6 +14,7 @@ import { import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { AdminApi } from "@/lib/api"; +import { base62 } from "@/lib/utils"; import React, { useEffect, useState } from "react"; import { toast } from "sonner"; @@ -45,6 +46,15 @@ export function SetPasswordDialog({ id, children }: SetPasswordDialogProps) { } }, [open]) + const handleCopyShareURL = () => { + if (!password) { + return toast.warning('请先填写新密码'); + } + const url = `${window.location.origin}/blog/${base62.encode(Buffer.from(id.replace(/-/g, ''), 'hex'))}?p=${password}`; + navigator.clipboard.writeText(url); + toast.success('分享链接复制成功,请点击保存按钮以提交新密码'); + } + return ( setOpen(v)}>
@@ -55,7 +65,7 @@ export function SetPasswordDialog({ id, children }: SetPasswordDialogProps) { 修改密码 - 通过密码访问受保护的文章,需开启“受密码保护”权限 + 通过密码访问受保护的文章,需开启“受密码保护”权限。注意复制URL需要填写完新密码后再点击
@@ -70,10 +80,17 @@ export function SetPasswordDialog({ id, children }: SetPasswordDialogProps) {
- - - - +
+
+ +
+
+ + + + +
+