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

[Bug] Style conflict in dark mode #21

Closed
wibus-wee opened this issue Jul 5, 2023 · 5 comments
Closed

[Bug] Style conflict in dark mode #21

wibus-wee opened this issue Jul 5, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@wibus-wee
Copy link
Member

wibus-wee commented Jul 5, 2023

Origin message: https://t.me/Icalinguapp/19467

分析

这个是我编写 CSS 的时候犯的一点小错误,但是现在看我也并不知道如何解决这个问题。

首先是似乎在切换模式的时候,没有 className 的变化,而是 element.style 进行了变化,但是这部分是可以被自定义的,也就是说我没有办法使用 === 来判断目前是什么状态。

还有一个解决办法就是直接读取 config.yaml,但是这个又有一个问题,有人可能是自定义的 config.yaml 路径,我也没有办法直接像读取 addon.js 路径来获取到 config.yaml 的目录。虽然写死也是可以的,但是这会直接禁止掉自定义配合文件的用户使用

@wibus-wee wibus-wee added the bug Something isn't working label Jul 5, 2023
@wibus-wee wibus-wee self-assigned this Jul 5, 2023
@wibus-wee wibus-wee changed the title [Bug] Dark display [Bug] Style conflict in dark mode Jul 5, 2023
@dmlgzs
Copy link

dmlgzs commented Jul 5, 2023

await require('electron').ipcRenderer.invoke('getSettings')

这个可以获取配置
忘记了 electron 隔离了

@wibus-wee
Copy link
Member Author

其实能用 😂 (忘记有这个东西了)

@dmlgzs
Copy link

dmlgzs commented Jul 5, 2023

其实能用 😂 (忘记有这个东西了)

另外打开图片可以用

require('electron').ipcRenderer.send('openImage', url)

wibus-wee added a commit that referenced this issue Jul 5, 2023
@wibus-wee
Copy link
Member Author

另外打开图片可以用

require('electron').ipcRenderer.send('openImage', url)

🆒 thanks!

@wibus-wee
Copy link
Member Author

不过我后面应该会重写一个查看器(直接把 tg 的 copy 过来)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants