xiaoyifang / goldendict-ng

The Next Generation GoldenDict
https://xiaoyifang.github.io/goldendict-ng/
Other
1.64k stars 90 forks source link

After restarting the software, all localStorge data will be cleared. #1469

Open Leon406 opened 6 months ago

Leon406 commented 6 months ago

描述 bug

保存数据到localStorge后,不重启可以生效,重启软件后会被清空

复现 bug 的步骤

  1. F12 控制台输入 localStorage.setItem("cfg","test")
  2. 退出软件再打开

期望的结果

退出软件后,仍然能保存localStorage数据

相关的截图

写入后,不退出可以正常保存

image

但重启软件后,所有数据都清空了

image

系统和软件的版本

Goldendict-ng 23.12.07-HeavySnow.20231208.b0086d5c Qt 6.6.1 Visual C++ Compiler 192930153 windows winnt 10.0.22631 x86_64-little_endian-llp64 Flags:USE_XAPIAN MAKE_ZIM_SUPPORT USE_ICONV MAKE_CHINESE_CONVERSION_SUPPORT no_ffmpeg_player

github-actions[bot] commented 6 months ago

Bot detected the issue body's language is not English, translate it automatically.

Describe bug

After saving the data to localStorge, it will take effect without restarting. It will be cleared after restarting the software.

Steps to reproduce bug

  1. F12 console input localStorage.setItem("cfg","test")
  2. Exit the software and reopen it

Desired results

After exiting the software, localStorage data can still be saved.

Relevant screenshots

After writing, you can save normally without exiting.

image

But after restarting the software, all data was cleared.

image

System and software versions

Goldendict-ng 23.12.07-HeavySnow.20231208.b0086d5c Qt 6.6.1 Visual C++ Compiler 192930153 windows winnt 10.0.22631 x86_64-little_endian-llp64 Flags:USE_XAPIAN MAKE_ZIM_SUPPORT USE_ICONV MAKE_CHINESE_CONVERSION_SUPPORT no_ffmpeg_player

xiaoyifang commented 6 months ago

gd-ng用的webengine相当于是 隐私模式 的浏览方式。

应该不会持久保存相关信息

github-actions[bot] commented 6 months ago

Bot detected the issue body's language is not English, translate it automatically.

The webengine used by gd-ng is equivalent to the privacy mode browsing method.

Relevant information should not be persisted

Leon406 commented 6 months ago

image

https://doc.qt.io/qt-6/qtwebengine-features.html#local-storage

按照官方文档说明应该是支持的,看能否支持下

github-actions[bot] commented 6 months ago

Bot detected the issue body's language is not English, translate it automatically.

image

https://doc.qt.io/qt-6/qtwebengine-features.html#local-storage

According to the official documentation, it should be supported. Let’s see if it can be supported.

xiaoyifang commented 6 months ago

用在什么地方的?

如果确实有需要,后续可以开启看下

github-actions[bot] commented 6 months ago

Bot detected the issue body's language is not English, translate it automatically.

Where is it used?

If you really need it, you can open it and check it out later.

xiaoyifang commented 6 months ago

image

默认就是开启的,感觉还是跟隐私模式有关系。

github-actions[bot] commented 6 months ago

Bot detected the issue body's language is not English, translate it automatically.

image

It is turned on by default, and it feels like it has something to do with privacy mode.

Leon406 commented 6 months ago

用在什么地方的?

如果确实有需要,后续可以开启看下

js中的自定义功能开关和配置

目前是单独做了词条配置页面,方便普通用户按需配置功能特性,可以不修改js文件,重启软件或者清除缓存让配置生效

github-actions[bot] commented 6 months ago

Bot detected the issue body's language is not English, translate it automatically.

Where is it used?

If you really need it, you can open it and check it out later.

Custom function switches and configurations in js

At present, a separate entry configuration page is created to facilitate ordinary users to configure functions and features as needed. They can restart the software or clear the cache to make the configuration take effect without modifying the js file.