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

【右键菜单】支持自定义内容,主题切换按钮打开或者关闭 #2527

Open
wuyuhanzijin opened this issue Jun 25, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@wuyuhanzijin
Copy link

为什么提出这个新的特性改动
增加此特性可以使配置更具有可自定义性,我们可以设置需要的右键菜单,删除掉不想要的选项,比如“切换主题”,避免用户跳转到我们不想要的主题上,避免文章内容和主题的不兼容。

描述一下你推荐的解决方案
将右键菜单栏与顶栏配对,实现自定义

描述一下你考虑过的其它替代解决方案
暂时还没有,也许可以自行修改源码,但是对于大部分人可操作性不强

补充说明
[None]

@wuyuhanzijin wuyuhanzijin added the enhancement New feature or request label Jun 25, 2024
@tangly1024 tangly1024 changed the title 自定义右键菜单栏切换主题选项自定义打开或者关闭 【右键菜单】自定义主题选项打开或者关闭 Jun 28, 2024
@tangly1024 tangly1024 changed the title 【右键菜单】自定义主题选项打开或者关闭 【右键菜单】支持自定义内容,主题切换按钮打开或者关闭 Jun 28, 2024
@tangly1024
Copy link
Owner

关闭右键切换主题按钮可以通过 blog.config.js 关闭,

  CUSTOM_RIGHT_CLICK_CONTEXT_MENU_THEME_SWITCH:
    process.env.NEXT_PUBLIC_CUSTOM_RIGHT_CLICK_CONTEXT_MENU_THEME_SWITCH ||
    true, // 是否显示切换主题

在NOTION_CONFIG中添加一个 CUSTOM_RIGHT_CLICK_CONTEXT_MENU_THEME_SWITCH = false 即可关闭此项。

右键菜单和顶栏同步可能有些复杂,顶栏菜单支持二级,功能会更丰富一些,右键目前就保留这些功能,通过配置来开关即可

@tangly1024 tangly1024 added the good first issue Good for newcomers label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants