8000 #267 同步摸鱼派评论移植到实用功能tab页 by gakkiyomi · Pull Request #268 · bolo-blog/bolo-solo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

#267 同步摸鱼派评论移植到实用功能tab页 #268

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

Merged
merged 1 commit into from
May 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
8000 Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ public void showAdminFunctions(final RequestContext context) {
dataModel.put(Common.BOLO_VERSION, SoloServletListener.BOLO_VERSION);
// 链滴域名设定
dataModel.put("hacpaiDomain", Global.HACPAI_DOMAIN);
dataModel.put("fishpiDomain", Global.FISH_PI_DOMAIN);
dataModel.put(Common.B3LOG_ENABLED, PluginUtil.b3logPluginEnabled());
dataModel.put(Common.FISHPI_ENABLED, PluginUtil.fishpiPluginEnabled());
fireFreeMarkerActionEvent(templateName, dataModel);
Expand Down Expand Up @@ -277,6 +278,8 @@ public void showAdminPreferenceFunction(final RequestContext context) {

// 链滴域名设定
dataModel.put("hacpaiDomain", Global.HACPAI_DOMAIN);
// 摸鱼派域名设定
dataModel.put("fishpiDomain", Global.FISH_PI_DOMAIN);
dataModel.put(Common.B3LOG_ENABLED, PluginUtil.b3logPluginEnabled());
dataModel.put(Common.FISHPI_ENABLED, PluginUtil.fishpiPluginEnabled());
// 用户体验改进计划
Expand Down
187 changes: 129 additions & 58 deletions src/main/java/org/b3log/solo/service/DataModelService.java

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/main/resources/lang_en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ others6Label=Importing, please do not perform other operations!
others7Label=Please select a file first!
others8Label=<p><b>The second step, select the type of backup file</b></p><br><button id=\"cnblogs\">Import articles from the blog garden backup file</button><p style=\" margin-top: 5px\">You can import the xml file backed up from the blog garden to the Pineapple Blog. Some articles may skip importing due to the length. </p><button id=\"markdown\" style=\"margin-top: 10px\">Markdown zip import article</button><p style=\"margin-top: 5px\">Can pack multiple .md articles into zip import to pineapple blog, support Hexo/jekyll format files; support import Hexo files exported from the <a href=\"#tools/others/data\">data export</a> tab. </p><br><p><b>The article import function may have data risks, please use it with caution. </b></p>
others9Label=You can manually pull the comments in the article from the Liandi community to an article in the local blog. <br>Each comment can only be synced once. If you want to import comments twice, please delete the comments imported for the first time. <br>If there are too many comments, it may take a long time. Please don\u2019t click the sync button multiple times. <br>
others91Label=You can manually pull the comments in the article from the FishPi community to an article in the local blog. <br>If there are too many comments, it may take a long time. Please don\u2019t click the sync button multiple times. <br>
others10Label=1. Enter the link number of the article:
others11Label=2. Select local articles:
others12Label=3. Fill in the value of the \"symphony\" option in your cookie in the Liandi community
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ others6Label=\u6B63\u5728\u5BFC\u5165\u4E2D\uFF0C\u8BF7\u4E0D\u8981\u8FDB\u884C\
others7Label=\u8BF7\u5148\u9009\u62E9\u6587\u4EF6\uFF01
others8Label=<p><b>\u7B2C\u4E8C\u6B65\uFF0C\u9009\u62E9\u5907\u4EFD\u6587\u4EF6\u7684\u7C7B\u578B</b></p><br><button id=\"cnblogs\">\u4ECE\u535A\u5BA2\u56ED\u5907\u4EFD\u6587\u4EF6\u5BFC\u5165\u6587\u7AE0</button><p style=\"margin-top: 5px\">\u53EF\u5C06\u4ECE\u535A\u5BA2\u56ED\u5907\u4EFD\u7684 xml \u6587\u4EF6\u5BFC\u5165\u81F3\u83E0\u841D\u535A\u5BA2\uFF0C\u90E8\u5206\u6587\u7AE0\u53EF\u80FD\u4F1A\u7531\u4E8E\u957F\u5EA6\u539F\u56E0\u8DF3\u8FC7\u5BFC\u5165\u3002</p><button id=\"markdown\" style=\"margin-top: 10px\">Markdown zip \u5BFC\u5165\u6587\u7AE0</button><p style=\"margin-top: 5px\">\u53EF\u5C06\u591A\u7BC7 .md \u6587\u7AE0\u6253\u5305\u6210 zip \u5BFC\u5165\u81F3\u83E0\u841D\u535A\u5BA2\uFF0C\u652F\u6301 Hexo/jekyll \u683C\u5F0F\u6587\u4EF6\uFF1B\u652F\u6301\u4ECE<a href=\"#tools/others/data\">\u6570\u636E\u5BFC\u51FA</a>\u9009\u9879\u5361\u4E2D\u5BFC\u51FA\u7684 Hexo \u6587\u4EF6\u5BFC\u5165\u3002</p><br><p><b>\u6587\u7AE0\u5BFC\u5165\u529F\u80FD\u53EF\u80FD\u5B58\u5728\u6570\u636E\u98CE\u9669\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528\u3002</b></p>
others9Label=\u4F60\u53EF\u4EE5\u624B\u52A8\u4ECE\u94FE\u6EF4\u793E\u533A\u62C9\u53D6\u6587\u7AE0\u4E2D\u7684\u8BC4\u8BBA\u5230\u672C\u5730\u535A\u5BA2\u7684\u67D0\u7BC7\u6587\u7AE0\u4E2D\u3002<br>\u6BCF\u6761\u8BC4\u8BBA\u53EA\u80FD\u540C\u6B65\u4E00\u6B21\uFF0C\u5982\u8981\u5C06\u8BC4\u8BBA\u5BFC\u5165\u4E24\u6B21\uFF0C\u8BF7\u5148\u5220\u9664\u7B2C\u4E00\u6B21\u5BFC\u5165\u7684\u8BC4\u8BBA\u3002<br>\u5982\u679C\u8BC4\u8BBA\u8FC7\u591A\uFF0C\u53EF\u80FD\u9700\u8981\u8F83\u957F\u65F6\u95F4\uFF0C\u8BF7\u4E0D\u8981\u591A\u6B21\u70B9\u51FB\u540C\u6B65\u6309\u94AE\uFF0C\u7A0D\u5B89\u52FF\u8E81\u3002<br>
others91Label=\u4f60\u53ef\u4ee5\u624b\u52a8\u4ece\u6478\u9c7c\u6d3e\u793e\u533a\u62c9\u53d6\u6587\u7ae0\u4e2d\u7684\u8bc4\u8bba\u5230\u672c\u5730\u535a\u5ba2\u7684\u67d0\u7bc7\u6587\u7ae0\u4e2d\u3002<br>\u652f\u6301\u589e\u91cf\u540c\u6b65<br>\u5982\u679c\u8bc4\u8bba\u8fc7\u591a\uff0c\u53ef\u80fd\u9700\u8981\u8f83\u957f\u65f6\u95f4\uff0c\u8bf7\u4e0d\u8981\u591a\u6b21\u70b9\u51fb\u540c\u6b65\u6309\u94ae\uff0c\u7a0d\u5b89\u52ff\u8e81\u3002<br>
others10Label=1. \u8F93\u5165\u94FE\u6EF4\u6587\u7AE0\u53F7\uFF1A
others11Label=2. \u9009\u62E9\u672C\u5730\u6587\u7AE0\uFF1A
others12Label=3. \u586B\u5165\u60A8\u5728\u94FE\u6EF4\u793E\u533A\u7684 Cookie \u4E2D \"symphony\" \u9009\u9879\u7684\u503C
Expand Down
9 changes: 0 additions & 9 deletions src/main/webapp/admin/admin-article.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,6 @@
<input id="viewPwd" type="text" style="width: 156px" />
</div>
</div>
<div class="fn__flex">
<div class="fn__flex fn__flex-1" style="align-items: center">
<label for="permalink" class="permalink__label" style="margin-bottom: 0">摸鱼派帖子ID:</label>
<input id="fishpi_article" class="fn__flex-1" type="text" style="margin: 0 12px 0 6px;" />
</div>
<div class="fn__right viewpwd__panel">
<button id="syncComment" style="width: 156px">同步评论</button>
</div>
</div>
<div>
<span class="signs">
<label>${sign1Label}</label>
Expand Down
78 changes: 58 additions & 20 deletions src/main/webapp/admin/admin-others.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<a href="#tools/others/tag">${clearDataLabel}</a>
</div>
</li>
<#if b3logEnabled>
<#if b3logEnabled || fishpiEnabled>
<li>
<div id="tabOthers_commentSync">
<a href="#tools/others/commentSync">${syncLabel}</a>
Expand Down Expand Up @@ -145,23 +145,6 @@
${others8Label}
</div>
<div id="tabOthersPanel_commentSync" class="fn__none form">
<br>
${others9Label}
<br><br>
<b>${others10Label}</b><br>
https://${hacpaiDomain}/article/ <input id="remoteArticleID" type="text" style="width: 200px">
<br>
<b>${others11Label}</b>
<br>
<select id="localArticleList">
</select>
<br><br>
<b>${others12Label}</b>
<br>
${others13Label}
<br>
<input id="symphony" type="text">
<br><br>
<script type="text/javascript">
$.ajax({
url: Label.servePath + '/article/commentSync/getList',
Expand All @@ -172,11 +155,16 @@
for(i = 0; i < data.length; i++) {
let oId = data[i].oId;
let title = data[i].title;
<#if b3logEnabled>
$("#localArticleList").append("<option value=\"" + oId + "\">" + title + "</option>");
</#if>
<#if fishpiEnabled>
$("#localArticleList2").append("<option value=\"" + oId + "\">" + title + "</option>");
</#if>
}
}
});

<#if b3logEnabled>
function commentSync() {
let locale = $("#localArticleList").val();
let remote = $("#remoteArticleID").val();
Expand All @@ -190,8 +178,58 @@
}
});
}
</#if>
<#if fishpiEnabled>
function commentFishpiSync() {
let locale = $("#localArticleList2").val();
let remote = $("#remoteArticleID2").val();
$.ajax({
url: Label.servePath + '/article/fishpi/commentSync/' + locale + '/' + remote,
type: 'GET',
async: false,
success: function(res) {
alert(res.msg);
}
});
}
</#if>
</script>
<button >
<#if b3logEnabled>
<br>
${others9Label}
<br>
<b>${others10Label}</b><br>
https://${hacpaiDomain}/article/ <input id="remoteArticleID" type="text" style="width: 200px">
<br>
<b>${others11Label}</b>
<br>
<select id="localArticleList">
</select>
<br><br>
<b>${others12Label}</b>
<br>
${others13Label}
<br>
<input id="symphony" type="text">
<br><br>
<button >
</#if>
<#if fishpiEnabled>
<br><br>
<br>
${others91Label}
<br>
<b>${others10Label}</b><br>
https://${fishpiDomain}/article/ <input id="remoteArticleID2" type="text" style="width: 200px">
<br>
<b>${others11Label}</b>
<br>
<select id="localArticleList2">
</select>
<br><br>
<button
</#if>

</div>
</div>
${plugins}
1 change: 1 addition & 0 deletions src/main/webapp/common-template/label.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
version: "${version}",
showCodeBlockLn: ${showCodeBlockLn},
hacpaiDomain: "${hacpaiDomain}",
fishpiDomain: "${fishpiDomain}",
}
Util.init()
</script>
Loading
Loading
0