Skip to content

Commit

Permalink
docs: 更新前台编辑按钮相关文档
Browse files Browse the repository at this point in the history
  • Loading branch information
Mereithhh committed May 5, 2023
1 parent b97289b commit bff5ded
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions docs/features/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ redirectFrom: /feature/basic/article.html

<!-- more -->

## 快速编辑文章
默认情况下,如果你登录了后台,那么前台的文章标题旁边会出现编辑按钮,你可以点击这个按钮快速跳转到后台编辑此文章。

![](https://pic.mereith.com/img/a6438e873dcbd601d23bdbf1a7fad74f.clipboard-2023-05-06.webp)

如想关闭此功能,可在后台的 `系统设置/站点配置/布局设置` 中关闭。

## 创建新文章

你可以点击 `新建文章` 按钮创建新文章。
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ VanBlog 可以配置一系列的站点配置项,可在 `站点管理/系统设
| 是否显示 RSS 按钮 | 开启 | 默认开启,关闭后所有位置会隐藏 RSS 按钮 |
| 前台点击链接时的默认行为 | 在当前页面跳转 | 默认在当前页面跳转,会影响除了导航栏之外的大部分链接 |
| 是否显示文章内容过时提醒 | 显示 | 默认显示,关闭后文章页面不会显示内容过期提醒。 |
| 是否在前台展示编辑按钮 | 显示 | 默认开启,关闭后登录后台时,前台将不再显示编辑按钮。 |

![布局设置](https://pic.mereith.com/img/9b8e93fe3d452298373382371ee50e00.clipboard-2022-11-06.png)
![布局设置](https://pic.mereith.com/img/ea8f567f74f4364bbbeffca9c365de2b.clipboard-2023-05-06.webp)
2 changes: 1 addition & 1 deletion packages/admin/src/components/SiteInfoForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export default function (props: {
/>
<ProFormSelect
name={'showEditButton'}
label="是否在登录后台时,在前台展示编辑按钮"
label="是否在前台展示编辑按钮"
placeholder={'显示'}
valueEnum={{
true: '显示',
Expand Down
1 change: 1 addition & 0 deletions packages/website/utils/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const checkLogin = () => {
return true;
if (typeof window === "undefined") return false;
return !!localStorage?.getItem("token");
};

0 comments on commit bff5ded

Please sign in to comment.