mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-20 04:26:53 +00:00
Use the stars
This commit is contained in:
4 files changed
+14
-2
No files matched your search
+3
@@ -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>
|
||||
|
||||
+9
-2
@@ -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: () => {
|
||||
|
||||
Reference in new issue
Block a user