Skip to content

Commit

Permalink
Merge pull request #61 from mengshouer/main
Browse files Browse the repository at this point in the history
✨ feat: 新增是否移除话题上的头像
  • Loading branch information
dlzmoe authored Nov 4, 2024
2 parents 5319ab8 + 03275f6 commit 44bcafe
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ yarn build # 打包构建

> 关于自动构建 Release 包,需要修改 `package.json` 中的 `version` 版本号,并且在 `CHANGELOG.md` 中写入当前版本更新日志。
### CSP 问题

如果加载本地脚本出现 `Refused to load the script xxxxx` 可以使用 [Disable-CSP](https://github.com/lisonge/Disable-CSP) 临时把 CSP 禁用, 开发完成记得改回去。


## 更新日志

Expand Down
5 changes: 5 additions & 0 deletions src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
<MenuHiddenPlaceholder :sort="27" v-model="settingData.checked28" />
<!-- 是否禁用浏览帖子时 URL 更新楼层数 -->
<MenuDisableReplaceState :sort="28" v-model="settingData.checked29" />
<!-- 是否移除话题上的头像(减少网络请求) -->
<MenuRemovePostAvatar :sort="29" v-model="settingData.checked30" />
</div>
<div class="menu-body-item">
<!-- 自定义论坛 logo -->
Expand Down Expand Up @@ -192,6 +194,7 @@ import MenuDonotTopic from "./components/BasicSettings/MenuDonotTopic.vue";
import MenuAutoDark from "./components/BasicSettings/MenuAutoDark.vue";
import MenuHiddenPlaceholder from "./components/BasicSettings/MenuHiddenPlaceholder.vue";
import MenuDisableReplaceState from "./components/BasicSettings/MenuDisableReplaceState.vue";
import MenuRemovePostAvatar from "./components/BasicSettings/MenuRemovePostAvatar.vue";
// 自定义文字
import MenuOtherCss from "./components/CustomText/MenuOtherCss.vue";
Expand Down Expand Up @@ -293,6 +296,7 @@ export default {
MenuAutoDark,
MenuHiddenPlaceholder,
MenuDisableReplaceState,
MenuRemovePostAvatar,
},
data() {
return {
Expand Down Expand Up @@ -348,6 +352,7 @@ export default {
checked27: false,
checked28: false,
checked29: false,
checked30: false,
usertags: [],
gptdata: {
value1: false,
Expand Down
24 changes: 24 additions & 0 deletions src/components/BasicSettings/MenuRemovePostAvatar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<div class="item">
<div class="tit">{{ sort }}. 是否移除话题上的头像(减少网络请求)</div>
<input
type="checkbox"
:checked="modelValue"
@change="$emit('update:modelValue', $event.target.checked)"
/>
</div>
</template>

<script>
export default {
props: ["modelValue", "sort"],
emits: ["update:modelValue"],
created() {
if (this.modelValue) {
$("head").append(`<style>
.topic-list-data.posters{display:none!important}
</style>`);
}
},
};
</script>

0 comments on commit 44bcafe

Please sign in to comment.