display full path in view if required

This commit is contained in:
Ell 2023-08-18 10:13:57 +02:00
parent babb0ea22f
commit f8bdde10a3
2 changed files with 9 additions and 1 deletions

View file

@ -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")

View file

@ -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;
}