diff --git a/App/App.json b/App/App.json
index 8a127eb..606eb9c 100644
--- a/App/App.json
+++ b/App/App.json
@@ -1,5 +1,5 @@
{
- "VersionNumber": 20231016,
+ "VersionNumber": 20240104,
"AppName": "Baiyuanneko's Blog Generator",
"officialWebsite": "https://bbg.nekomoe.xyz",
"contributors": [
diff --git a/App/migrate_core.js b/App/migrate_core.js
index d5df1d5..5b36211 100644
--- a/App/migrate_core.js
+++ b/App/migrate_core.js
@@ -140,6 +140,19 @@ function addSupportForOptionsOfMarkdownRendering() {
blog["Markdown渲染配置"]["根据用户屏幕尺寸渲染图片尺寸"] = true;
}
+function addSupportForWalineAndDisqus() {
+ if (blog["全局评论设置"]["启用waline评论"] === undefined || blog["全局评论设置"]["启用waline评论"] === null) {
+ blog["全局评论设置"]["启用waline评论"] = false;
+ blog["全局评论设置"]["waline设置"] = new Object();
+ blog["全局评论设置"]["waline设置"]["serverurl"] = "";
+ }
+ if (blog["全局评论设置"]["启用disqus评论"] === undefined || blog["全局评论设置"]["启用disqus评论"] === null) {
+ blog["全局评论设置"]["启用disqus评论"] = false;
+ blog["全局评论设置"]["disqus设置"] = new Object();
+ blog["全局评论设置"]["disqus设置"]["shortname"] = "";
+ }
+}
+
function improveBackgroundImageSettings() {
if(blog["全局主题设置"]["是否使用背景图像"] && blog["全局主题设置"]["若使用背景图像,设置为"]["使用随机二次元图片作为背景图像(浅色背景)"]) {
// 如果之前版本中启用了“将网站背景设置为随机二次元图片”则将背景图片配置转换为“将某个url作为背景图像”,url自动填入之前所使用的默认二次元图片api地址
@@ -266,6 +279,10 @@ module.exports = function () {
addSupportForAdjustingLinkColor();
}
+ if (currentBlogVersion <= 20240103) {
+ addSupportForWalineAndDisqus();
+ }
+
check_third_party_theme_compatiblity();
updateBlogIndexHtml();
diff --git a/App/render_article_manager.js b/App/render_article_manager.js
index 85fd68b..f3c5ea7 100644
--- a/App/render_article_manager.js
+++ b/App/render_article_manager.js
@@ -66,17 +66,17 @@ module.exports = function () {
-
+
`);
if (blog["文章列表"][i]["是否加密"]){
- document.querySelector(`#article-item-${i} > span.encryption_related_func`).insertAdjacentHTML("beforeend",`
+ document.querySelector(`#encryption_related_func_${i}`).insertAdjacentHTML("beforeend",`
`);
} else {
- document.querySelector(`#article-item-${i} > span.encryption_related_func`).insertAdjacentHTML("beforeend",`
+ document.querySelector(`#encryption_related_func_${i}`).insertAdjacentHTML("beforeend",`
`);
}
diff --git a/App/render_blog_settings.js b/App/render_blog_settings.js
index fe4a83e..96a4d20 100644
--- a/App/render_blog_settings.js
+++ b/App/render_blog_settings.js
@@ -33,10 +33,12 @@ function render_comment_related(trigger_by_change = false){
}
if(current_selection === "valine"){
+ if(trigger_by_change){
+ document.getElementById("blog_settings_valine_appid").value = "";
+ document.getElementById("blog_settings_valine_appkey").value = "";
+ save_blog_settings();
+ }
show_specified_detail("valine");
- document.getElementById("blog_settings_valine_appid").value = "";
- document.getElementById("blog_settings_valine_appkey").value = "";
- save_blog_settings();
} else if(current_selection === "valine_with_public_apikey"){
let whether_confirm_to_use_valine_with_public_apikey;
if (trigger_by_change) {
diff --git a/App/render_markdown_editor.js b/App/render_markdown_editor.js
index 6d0e0f0..8dcb3f4 100644
--- a/App/render_markdown_editor.js
+++ b/App/render_markdown_editor.js
@@ -16,6 +16,7 @@ module.exports = function () {
var ai_task_list = new Object();
var is_cnt_article_encrypted = false;
var password_if_enabled_encryption_for_article = "";
+ let encrypted_orginal_content_if_encrypted;
if (path.indexOf("/data/articles/") !== -1) {
// article
@@ -30,6 +31,8 @@ module.exports = function () {
keyboard: false,
});
encryptionOptionsModal.show();
+ encrypted_orginal_content_if_encrypted = original_content;
+ original_content = "";
document.getElementById("encryptionOptionsModalBody").innerHTML = `