Use the stars

This commit is contained in:
shamoon committed 2026-11-18 10:02:46 -08:00
1 parent 6cffa8cb91
commit a5aa92519b
4 files changed
+14 -2

No files matched your search

@@ -10,6 +10,9 @@
<a class="btn btn-outline-secondary d-flex align-items-center" [href]="repoUrl" target="_blank" rel="noopener noreferrer"
title="Star Paperless-ngx on GitHub" i18n-title>
<pngx-bs-icon name="github" class="me-1 d-flex" width="12" height="12"></pngx-bs-icon><span class="small" i18n>Star</span>
@if (stars() !== null) {
<div class="text-muted small ms-1">{{ stars() | number }}</div>
}
</a>
</div>
<button type="button" class="btn-close m-0" aria-label="Close" i18n-aria-label (click)="close()"></button>
@@ -1,4 +1,4 @@
import { NgTemplateOutlet } from '@angular/common'
import { DecimalPipe, NgTemplateOutlet } from '@angular/common'
import { Component, inject, signal } from '@angular/core'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { first } from 'rxjs'
@@ -38,7 +38,12 @@ export function prepareReleaseHtml(html: string): string {
selector: 'pngx-release-notes-dialog',
templateUrl: './release-notes-dialog.component.html',
styleUrls: ['./release-notes-dialog.component.scss'],
imports: [BootstrapIconComponent, CustomDatePipe, NgTemplateOutlet],
imports: [
BootstrapIconComponent,
CustomDatePipe,
NgTemplateOutlet,
DecimalPipe,
],
})
export class ReleaseNotesDialogComponent {
readonly activeModal = inject(NgbActiveModal)
@@ -47,6 +52,7 @@ export class ReleaseNotesDialogComponent {
readonly since = signal<string | null>(null)
readonly releases = signal<AppRelease[] | null>(null)
readonly stars = signal<number | null>(null)
readonly loading = signal(false)
readonly version: string = this.settingsService.get(SETTINGS_KEYS.VERSION)
@@ -81,6 +87,7 @@ export class ReleaseNotesDialogComponent {
body_html: prepareReleaseHtml(release.body_html),
}))
)
this.stars.set(notes.stars ?? null)
this.loading.set(false)
},
error: () => {
@@ -19,6 +19,7 @@ export interface AppRelease {
export interface AppReleaseNotes {
version: string
releases: AppRelease[]
stars: number | null
}
@Injectable({