diff --git a/src/view.ts b/src/view.ts index d7711cc..95c6837 100644 --- a/src/view.ts +++ b/src/view.ts @@ -19,7 +19,9 @@ export class JSPView extends ItemView { for (let shared of this.plugin.settings.shared) { let file = this.plugin.app.vault.getAbstractFileByPath(shared.path) as TFile; let div = content.createDiv({cls: "just-share-please-shared-item"}); - div.createSpan({cls: "just-share-please-shared-name", text: removeExtension(shared.path)}); + div.createSpan({cls: "just-share-please-shared-name", text: removeExtension(shared.path).split(/[/\\]/g).pop()}); + if (file?.path.match(/[/\\]/)) + div.createSpan({cls: "just-share-please-shared-path", text: removeExtension(file.path)}); new ButtonComponent(div) .setClass("clickable-icon") .setTooltip("Copy JSP link") diff --git a/styles.css b/styles.css index f7b5435..5d8c9c8 100644 --- a/styles.css +++ b/styles.css @@ -14,6 +14,12 @@ padding-bottom: 5px; } +.just-share-please-shared-path { + display: block; + padding-bottom: 5px; + font-size: 13px; +} + .just-share-please-shared-item { margin-bottom: 20px; }