Skip to content

Commit

Permalink
fix(ui/sidebar): incorrectly increasing pv count in sidebar (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqcode committed Jan 30, 2024
1 parent 37e0091 commit 942aaf6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ui/artalk-sidebar/src/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function initArtalk() {
site: bootParams.site,
darkMode: bootParams.darkMode,
useBackendConf: true,
pvAdd: false,
remoteConfModifier: (conf) => {
conf.noComment = `<div class="atk-sidebar-no-content">No Content</div>` // TODO i18n t('noComment')
conf.flatMode = true
Expand Down
2 changes: 1 addition & 1 deletion ui/artalk/src/plugins/stat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const PvCountWidget: ArtalkPlugin = (ctx: ContextApi) => {
pageKey: conf.pageKey,
countEl: conf.countEl,
pvEl: conf.pvEl,
pvAdd: true,
pvAdd: (typeof ctx.conf.pvAdd === 'boolean' ? ctx.conf.pvAdd : true),
})
})
}
Expand Down
1 change: 1 addition & 0 deletions ui/artalk/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export interface ArtalkConfig {
listUnreadHighlight?: boolean
scrollRelativeTo?: () => HTMLElement
immediateFetch?: boolean
pvAdd?: boolean
}

/**
Expand Down

0 comments on commit 942aaf6

Please sign in to comment.