Skip to content

Commit

Permalink
refactor to update_available
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon committed Apr 2, 2022
1 parent 08e88a5 commit 9261d04
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ <h6 class="sidebar-heading px-3 mt-auto pt-4 mb-1 text-muted">
<li class="nav-item mt-2">
<div class="px-3 py-2 text-muted small d-flex align-items-center flex-wrap">
<div class="me-3">{{ versionString }}</div>
<div *ngIf="appRemoteVersion?.greater_than_current" class="version-check">
<div *ngIf="appRemoteVersion?.update_available" class="version-check">
<ng-template #updatePopContent>
<span class="small">Paperless-ngx v{{ appRemoteVersion.version }} <ng-container i18n>is available.</ng-container><br/><ng-container i18n>Click to view.</ng-container></span>
</ng-template>
Expand Down
2 changes: 1 addition & 1 deletion src-ui/src/app/services/rest/remote-version.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { environment } from 'src/environments/environment'

export interface AppRemoteVersion {
version: string
greater_than_current: boolean
update_available: boolean
}

@Injectable({
Expand Down
2 changes: 1 addition & 1 deletion src/documents/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,6 @@ def get(self, request, format=None):
return Response(
{
"version": remote_version,
"greater_than_current": is_greater,
"update_available": is_greater,
},
)

0 comments on commit 9261d04

Please sign in to comment.