feat: show extension repo as tooltip for each repo (#1743)

This commit is contained in:
Vlad Stan 2023-06-15 16:08:24 +02:00 committed by GitHub
parent cd17b59a3a
commit 95281eba8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -301,6 +301,11 @@
{%raw%}{{ $t('repository') }}{%endraw%} {%raw%}{{ $t('repository') }}{%endraw%}
<br /> <br />
<small v-text="repoName"></small> <small v-text="repoName"></small>
<q-tooltip
><span
v-text="selectedExtensionRepos[repoName].repo"
></span
></q-tooltip>
</div> </div>
<div class="col-2"></div> <div class="col-2"></div>
</div> </div>
@ -542,7 +547,8 @@
this.selectedExtensionRepos = data.reduce((repos, release) => { this.selectedExtensionRepos = data.reduce((repos, release) => {
repos[release.source_repo] = repos[release.source_repo] || { repos[release.source_repo] = repos[release.source_repo] || {
releases: [], releases: [],
isInstalled: false isInstalled: false,
repo: release.repo
} }
release.inProgress = false release.inProgress = false
release.error = null release.error = null

View File

@ -25,6 +25,7 @@ class ExplicitRelease(BaseModel):
archive: str archive: str
hash: str hash: str
dependencies: List[str] = [] dependencies: List[str] = []
repo: Optional[str]
icon: Optional[str] icon: Optional[str]
short_description: Optional[str] short_description: Optional[str]
min_lnbits_version: Optional[str] min_lnbits_version: Optional[str]
@ -254,6 +255,7 @@ class ExtensionRelease(BaseModel):
html_url: Optional[str] = None html_url: Optional[str] = None
description: Optional[str] = None description: Optional[str] = None
warning: Optional[str] = None warning: Optional[str] = None
repo: Optional[str] = None
icon: Optional[str] = None icon: Optional[str] = None
@classmethod @classmethod
@ -267,7 +269,7 @@ class ExtensionRelease(BaseModel):
archive=r.zipball_url, archive=r.zipball_url,
source_repo=source_repo, source_repo=source_repo,
is_github_release=True, is_github_release=True,
# description=r.body, # bad for JSON repo=f"https://github.com/{source_repo}",
html_url=r.html_url, html_url=r.html_url,
) )
@ -286,6 +288,7 @@ class ExtensionRelease(BaseModel):
is_version_compatible=e.is_version_compatible(), is_version_compatible=e.is_version_compatible(),
warning=e.warning, warning=e.warning,
html_url=e.html_url, html_url=e.html_url,
repo=e.repo,
icon=e.icon, icon=e.icon,
) )