mirror of
https://github.com/Ellpeck/ObsidianJustSharePlease.git
synced 2024-11-26 20:28:34 +01:00
display full path in view if required
This commit is contained in:
parent
babb0ea22f
commit
f8bdde10a3
2 changed files with 9 additions and 1 deletions
|
@ -19,7 +19,9 @@ export class JSPView extends ItemView {
|
||||||
for (let shared of this.plugin.settings.shared) {
|
for (let shared of this.plugin.settings.shared) {
|
||||||
let file = this.plugin.app.vault.getAbstractFileByPath(shared.path) as TFile;
|
let file = this.plugin.app.vault.getAbstractFileByPath(shared.path) as TFile;
|
||||||
let div = content.createDiv({cls: "just-share-please-shared-item"});
|
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)
|
new ButtonComponent(div)
|
||||||
.setClass("clickable-icon")
|
.setClass("clickable-icon")
|
||||||
.setTooltip("Copy JSP link")
|
.setTooltip("Copy JSP link")
|
||||||
|
|
|
@ -14,6 +14,12 @@
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.just-share-please-shared-path {
|
||||||
|
display: block;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
.just-share-please-shared-item {
|
.just-share-please-shared-item {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue