mirror of
https://github.com/nathonius/obsidian-github-link.git
synced 2026-07-22 09:20:25 +00:00
parent
568b4d4335
commit
2d9dba0d43
2 changed files with 10 additions and 4 deletions
|
|
@ -98,17 +98,18 @@ function createIssueSection(config: TagConfig, parsedUrl: ParsedUrl, container:
|
|||
}
|
||||
setIssueIcon(config.icon, IssueStatus.Open);
|
||||
const issueContainer = createSpan({
|
||||
cls: "github-link-inline-issue-title",
|
||||
text: `${parsedUrl.issue}`,
|
||||
cls: "github-link-inline-issue-title-section",
|
||||
});
|
||||
issueContainer.createSpan({ text: `#${parsedUrl.issue}`, cls: "github-link-inline-issue-number" });
|
||||
config.sections.push(issueContainer);
|
||||
if (parsedUrl.org && parsedUrl.repo) {
|
||||
getIssue(parsedUrl.org, parsedUrl.repo, parsedUrl.issue)
|
||||
.then((issue) => {
|
||||
if (issue.title) {
|
||||
const title = createSpan({ text: issue.title, cls: "github-link-inline-issue-title" });
|
||||
issueContainer.prepend(title);
|
||||
const status = getIssueStatus(issue);
|
||||
setIssueIcon(config.icon, status);
|
||||
issueContainer.setText(issue.title);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
|||
|
|
@ -278,14 +278,19 @@ body.theme-dark {
|
|||
|
||||
.github-link-inline-pr-title,
|
||||
.github-link-inline-issue-title,
|
||||
.github-link-inline-issue-title-section,
|
||||
.github-link-inline-file {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-wrap: nowrap;
|
||||
line-height: var(--line-height-normal);
|
||||
}
|
||||
.github-link-inline-issue-number {
|
||||
color: var(--gh-color-fg-muted);
|
||||
}
|
||||
|
||||
.github-link-inline-file {
|
||||
.github-link-inline-file,
|
||||
.github-link-inline-issue-title-section {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue