Skip to content

Commit

Permalink
update version 0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shenjinglei committed Mar 7, 2024
1 parent 6f0fdd8 commit cf88ac0
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 25 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGE LOG

## 0.4.2/2024-02-27

- [v0.4.0 ... v0.4.1](https://github.com/shenjinglei/siyuan-plugin-graph-enhance/compare/v0.4.1...v0.4.2)

- adjust the icon
- add showing and hiding dailynote

## 0.4.1/2023-12-19

- [v0.4.0 ... v0.4.1](https://github.com/shenjinglei/siyuan-plugin-graph-enhance/compare/v0.4.0...v0.4.1)
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "graph-enhance",
"author": "shenjinglei",
"url": "https://github.com/shenjinglei/siyuan-plugin-graph-enhance",
"version": "0.4.1",
"version": "0.4.2",
"minAppVersion": "2.10.13",
"backends": ["all"],
"frontends": ["all"],
Expand Down
2 changes: 1 addition & 1 deletion src/dock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function initDock() {
const dockHtml = `<div class="fn__flex-1 fn__flex-column">
<div class="block__icons">
<div class="block__logo">
<svg><use xlink:href="#iconGraphEnhance"></use></svg>
<svg class="block__logoicon"><use xlink:href="#iconGraphEnhance"></use></svg>
${i18n.pluginName}
</div>
<span class="fn__flex-1 fn__space"></span>
Expand Down
9 changes: 2 additions & 7 deletions src/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,8 @@ export function initRawGraph(nodes: SiyuanNode[], edges: SiyuanEdge[]) {
}

function dailynoteNodeInit() {
if (getSetting("dailynoteExcluded") === "true") {
nodes.filter(x => /^\d{4}-\d{2}-\d{2}$/.test(x.label))
.forEach(x => rawGraph.removeNode(x.id));
} else {
nodes.filter(x => /^\d{4}-\d{2}-\d{2}$/.test(x.label))
.forEach(x => rawGraph.node(x.id).dailynote = true);
}
nodes.filter(x => /^\d{4}-\d{2}-\d{2}$/.test(x.label))
.forEach(x => rawGraph.node(x.id).dailynote = true);
}

function cutEdgeInit() {
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"settingAlgNS": "network-simplex",
"settingAlgTT": "tight-tree",
"settingAlgLP": "longest-path",
"settingDailynoteExcluded": "Exclude Dailynote",
"settingDailynoteExcluded": "Exclude note in daily note",
"yes": "yes",
"no": "no",

Expand Down
2 changes: 1 addition & 1 deletion src/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"settingAlgNS": "网络简单",
"settingAlgTT": "紧密树",
"settingAlgLP": "最长路径",
"settingDailynoteExcluded": "是否排除Dailynote",
"settingDailynoteExcluded": "是否排除daily note中的文档",
"yes": "",
"no": "",

Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default class GraphEnhancePlugin extends Plugin {
Object.assign({
rankdir: "LR",
ranker: "network-simplex",
dailynoteExcluded: "false",
nodesMaximum: "200",
neighborDepth: "2",
autoFollow: "true",
Expand Down
13 changes: 0 additions & 13 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export function settingInit() {
{
rankdir: directionElement.value,
ranker: algorithmElement.value,
dailynoteExcluded: dailynoteExcludedElement.value,
nodesMaximum: nodesMaximumElement.value,
neighborDepth: neighborDepthElement.value,
autoFollow: autoFollowElement.value,
Expand Down Expand Up @@ -75,18 +74,6 @@ export function settingInit() {
},
});

const dailynoteExcludedElement = document.createElement("select");
dailynoteExcludedElement.id = "dailynoteExcluded";
dailynoteExcludedElement.add(new Option(i18n.yes, "true"));
dailynoteExcludedElement.add(new Option(i18n.no, "false"));
plugin.setting.addItem({
title: i18n.settingDailynoteExcluded,
createActionElement: () => {
dailynoteExcludedElement.value = plugin.data[STORAGE_NAME].dailynoteExcluded;
return dailynoteExcludedElement;
},
});

const autoFollowElement = document.createElement("select");
autoFollowElement.id = "autoFollow";
autoFollowElement.add(new Option(i18n.yes, "true"));
Expand Down

0 comments on commit cf88ac0

Please sign in to comment.