Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iiz00 committed Jan 5, 2024
1 parent f7b952c commit 2a448ac
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 10 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,13 @@ If you like my plugin, I would appreciate it if you could buy me a cup of coffee
- better preview

## Changelog
- 1.4.1
- Improvement
- Added `show links in properties` in the settings
- Increased the maximum width of tooltip preview
- Fixed
- Fixed tooltip preview not being fixed correctly.
- Fixed error sometimes displayed in console.
- 1.4.0
- New experimental function
- Show backlink files
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-daily-note-outline",
"name": "Daily Note Outline",
"version": "1.4.0",
"version": "1.4.1",
"minAppVersion": "0.15.0",
"description": "Add a custom view which shows outline of multiple daily notes with headings, links, tags and list items",
"author": "iiz",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-daily-note-outline",
"version": "1.4.0",
"version": "1.4.1",
"description": "Add a custom view which shows outline of multiple daily notes with headings, links, tags and list items",
"main": "main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/constructDOM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ export function drawOutline( files: TFile[], info: FileInfo[], data: OutlineData
}
// 空行を除去
previewText2 = previewText2.replace(/\n$|\n(?=\n)/g,'');
setTooltip(outlineTitle, previewText2, {classes:['daily-note-preview']});
setTooltip(outlineTitle, previewText2, {classes:['DNO-preview']});

outlineTitle.dataset.tooltipPosition = this.settings.tooltipPreviewDirection;
outlineTitle.setAttribute('data-tooltip-delay','10');
Expand Down
5 changes: 4 additions & 1 deletion src/getOutline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function getFileInfo(files:TFile[]):Promise<FileInfo[]>{
const content = await this.app.vault.cachedRead(files[i]);
const lines = content.split("\n");

const backlinkFiles = (this.settings.getBacklinks) ? getBacklinkFilesDataview( this.app, files[i]): undefined;
const backlinkFiles = (this.settings.showBacklinks) ? getBacklinkFilesDataview( this.app, files[i]): undefined;

let info:FileInfo = {
date: getDateFromFile(files[i],GRANULARITY_LIST[this.activeGranularity]),
Expand Down Expand Up @@ -42,6 +42,9 @@ export async function getOutline(files:TFile[],info:FileInfo[]):Promise<OutlineD

// 空配列を指定
data[i]=[];
if (!cache){
continue;
}
// headings,links,tagsを抽出

// console.log('check headings',cache.hasOwnProperty("headings") );
Expand Down
12 changes: 12 additions & 0 deletions src/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,18 @@ export class DailyNoteOutlineSettingTab extends PluginSettingTab {
});
}

new Setting(containerEl)
.setName("Show links in properties")
.addToggle((toggle) => {
toggle
.setValue(this.plugin.settings.showPropertyLinks)
.onChange(async (value) => {
this.plugin.settings.showPropertyLinks = value;
this.display();
await this.plugin.saveSettings();
this.plugin.view.refreshView(false,true,true);
})
});
new Setting(containerEl)
.setName("Show backlink files")
.addToggle((toggle) => {
Expand Down
9 changes: 3 additions & 6 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,13 @@
}

/*ツールチッププレビュー*/
/* .daily-note-preview{
text-align: left;
animation: unset !important;
} */

.tooltip.DNO{
.DNO-preview{
text-align: left;
animation: unset !important;
max-width: 600px;
}


/*設定画面 settings*/
/*インデント用*/
.setting-indent{
Expand Down

0 comments on commit 2a448ac

Please sign in to comment.