Skip to content

Commit

Permalink
optimize render pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
baiyuanneko committed Dec 7, 2024
1 parent 020ef62 commit bd9f585
Show file tree
Hide file tree
Showing 21 changed files with 235 additions and 249 deletions.
66 changes: 0 additions & 66 deletions App/article_manager.html

This file was deleted.

2 changes: 1 addition & 1 deletion App/edit_article.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ module.exports = function (filename, i) {
dialog.showErrorBox("无法打开文章文件(ERR_CANNOT_OPEN_ARTICLE_FILE)", `文章文件打开失败。\n请确保文章文件存在,并且你有足够的权限访问。\n以下是错误日志,请将此信息报告给开发者:\n\n${error}`);
} */
// 这里先检测一下文章是否需要验证密码解密
window.location.href=`./markdown_editor.html?rootdir=${rootDir}&path=/data/articles/${filename}`;
window.open(`./markdown_editor.html?rootdir=${rootDir}&path=/data/articles/${filename}`);
};
3 changes: 1 addition & 2 deletions App/edit_article_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ module.exports = function (i) {
document.getElementById("meta_article_title").value = xssStrict(blog["文章列表"][i]["文章标题"]);
document.getElementById("meta_article_filename").value = xssStrict(blog["文章列表"][i]["文件名"]);

const tooltipTriggerList = document.querySelectorAll("[data-bs-toggle=\"tooltip\"]");
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
tooltip_load();

loadIME("#meta_article_title");
loadIME("#meta_article_description");
Expand Down
2 changes: 1 addition & 1 deletion App/edit_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ const dialog = require("@electron/remote").dialog;
const shell = require("@electron/remote").shell;

module.exports = function (filename) {
window.location.href=`./markdown_editor.html?rootdir=${rootDir}&path=/data/pages/${filename}`;
window.open(`./markdown_editor.html?rootdir=${rootDir}&path=/data/pages/${filename}`);
};
15 changes: 6 additions & 9 deletions App/gotoFx.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@

function goto_article_manager () {
window.location.href = `./article_manager.html?rootdir=${rootDir}`;
}

function goto_manage_index () {
window.location.href = `./manage.html?rootdir=${rootDir}`;
currentPage = "article_manager";
init_ui();
}

function goto_page_manager () {
window.location.href = `./page_manager.html?rootdir=${rootDir}`;
currentPage = "page_manager";
init_ui();
}

function goto_blog_settings () {
window.location.href = `./blog_settings.html?rootdir=${rootDir}`;
currentPage = "blog_settings";
init_ui();
}

module.exports.goto_article_manager = goto_article_manager;

module.exports.goto_manage_index = goto_manage_index;

module.exports.goto_blog_settings = goto_blog_settings;

module.exports.goto_page_manager = goto_page_manager;
81 changes: 79 additions & 2 deletions App/blog_settings.html → App/manage.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,86 @@
</head>

<body>

<style id="uniform">

</style>
<style id="custom_ui"></style>

<div id="loading" class="text-center" style="font-size: 200%;">
<br />
<br />
<br />
Loading...
</div>
<div id="root" style="display:none;"></div>
<style id="uniform"></style>
<style id="custom_ui"></style>
<div class="modal fade" tabindex="-1" id="edit_article_meta_dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="edit_article_meta_dialog_title"><i class="fa fa-edit"></i> 修改文章元信息</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="article_meta_content">
</div>
<div class="modal-footer" id="edit_article_meta_dialog_footer">
</div>
</div>
</div>
</div>

<div class="modal fade" tabindex="-1" id="encryptionOptionsModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="encrypt_options_title"><i class="fa fa-edit"></i> 加密选项</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="encryptionOptionsModalBody">
</div>
<div class="modal-footer" id="encrypt_options_dialog_footer">
</div>
</div>
</div>
</div>


<div class="modal fade" tabindex="-1" id="edit_page_meta_dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="edit_page_meta_dialog_title"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="page_meta_content">





</div>
<div class="modal-footer" id="edit_page_meta_dialog_footer">
</div>
</div>
</div>
</div>

<div class="modal fade" tabindex="-1" id="edit_friend_book_dialog">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="edit_friend_book_dialog_title"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div id="friend_book_content">




</div>
</div>
</div>
</div>

<div class="modal fade" tabindex="-1" id="download_online_theme_dialog">
<div class="modal-dialog">
Expand Down Expand Up @@ -74,10 +145,16 @@ <h5 class="modal-title"></h5>
</div>
</div>




<script src="../node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="../node_modules/ipinyinjs/dict/pinyin_dict_notone.js"></script>
<script src="../node_modules/ipinyinjs/pinyinUtil.js"></script>
<script src="../node_modules/ipinyinjs/simple-input-method/simple-input-method.js"></script>
<script>
var currentPage = "article_manager";
</script>
<script src="./manage.js"></script>
</body>

Expand Down
Loading

0 comments on commit bd9f585

Please sign in to comment.