Skip to content

Commit

Permalink
fix: 主题切换按钮样式问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Higurashi-kagome committed Feb 17, 2024
1 parent db476f3 commit a5f195d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/content/modules/content-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ function addThemeBtn() {
try {
$('.readerControls_item.theme').css('display', 'none')
$('.theme_switcher').css('display', 'flex')
const selector = '.readerControls_item.white,.readerControls_item.dark'
$(selector).css('width', 'max-content')
$('.theme-switch-left').hide()
event.stopPropagation()
} catch (error) {
Swal.fire({
Expand Down
4 changes: 2 additions & 2 deletions src/popup/modules/popup-shelf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function initShelfTab() {
/* 绑定书架 tab 按钮点击事件 */
$('#shelfBtn').on('click', async function () {
console.log('call: #shelfBtn.onclick')
const res = await popupApi.shelfForPopup()
/* const res = await popupApi.shelfForPopup()
let shelfData = res.shelfData
// 从背景页获取数据无效
if (Object.keys(shelfData).length === 0 || shelfData.errMsg) {
Expand All @@ -44,7 +44,7 @@ async function initShelfTab() {
console.log('call: #shelfBtn.onclick var shelfData\n', shelfData)
// eslint-disable-next-line no-use-before-define
createShelf(shelfData)
createSearchInput()
createSearchInput() */
}).on('click', tabClickEvent).hide()
initShelfReload()
}
Expand Down
4 changes: 2 additions & 2 deletions src/popup/page/popup-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export const Popup: FC<IProps> = () => {
</TabBtnContainer>
<NoteTabContent/>
<TabContent for='shelfBtn' id='shelf'>
<a>...</a>
<a>请在读书页使用</a>
</TabContent>
</div>
);
}

createRoot(document.getElementById('popup-container')!).render(<Popup/>);
createRoot(document.getElementById('popup-container')!).render(<Popup/>);
Binary file modified wereader.zip
Binary file not shown.

0 comments on commit a5f195d

Please sign in to comment.