mirror of https://github.com/Ombi-app/Ombi
Ombi will now tell you when there is an update available in the settings, clicking that will also provide you with the changelog and links to manually download the binaries.
Also removed references to the custom HTTP client implimentation and we now use the inbuilt IHttpClientFactory, this means we have removed the "Ignore Certificate Errors" option in Ombi as it's no longer needed.pull/4143/head
parent
b59a792fdf
commit
81f410d782
@ -0,0 +1,18 @@
|
||||
import { PlatformLocation, APP_BASE_HREF } from "@angular/common";
|
||||
import { Injectable, Inject } from "@angular/core";
|
||||
|
||||
import { HttpClient } from "@angular/common/http";
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
import { ServiceHelpers } from "./service.helpers";
|
||||
import { IUpdateModel } from "../interfaces";
|
||||
|
||||
@Injectable()
|
||||
export class UpdateService extends ServiceHelpers {
|
||||
constructor(http: HttpClient, @Inject(APP_BASE_HREF) href:string) {
|
||||
super(http, "/api/v1/Update/", href);
|
||||
}
|
||||
public checkForUpdate(): Observable<IUpdateModel> {
|
||||
return this.http.get<IUpdateModel>(`${this.url}`, {headers: this.headers});
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
|
||||
|
||||
<h1 mat-dialog-title><i class="fas fa-code-branch"></i> Latest Version: {{data.updateVersionString}}</h1>
|
||||
<mat-dialog-content>
|
||||
<div [innerHTML]="data.changeLogs">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="mat-table">
|
||||
<div class="mat-header-row">
|
||||
<div class="mat-header-cell">Binary</div>
|
||||
<div class="mat-header-cell">Download</div></div>
|
||||
<div *ngFor="let d of data.downloads" class="mat-row" >
|
||||
<div class="mat-cell">{{d.name}}</div>
|
||||
<div class="mat-cell"><a href="{{d.url}}">Download</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<small>Updated at {{data.updateDate | date}}</small>
|
||||
</mat-dialog-content>
|
||||
|
||||
|
||||
<div mat-dialog-actions class="right-buttons">
|
||||
<button mat-raised-button id="cancelButton" [mat-dialog-close]="" color="warn"><i class="fas fa-times"></i> Close</button>
|
||||
</div>
|
||||
|
@ -0,0 +1,40 @@
|
||||
.mat-table {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mat-row,
|
||||
.mat-header-row {
|
||||
display: flex;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
align-items: center;
|
||||
min-height: 48px;
|
||||
padding: 0 24px;
|
||||
}
|
||||
|
||||
.mat-cell,
|
||||
.mat-header-cell {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.small-middle-container{
|
||||
margin: auto;
|
||||
width: 85%;
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
:host ::ng-deep strong {
|
||||
color: #fff;
|
||||
background-color: #007bff;
|
||||
display: inline-block;
|
||||
padding: 0.25em 0.4em;
|
||||
font-size: 75%;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
border-radius: 0.25rem;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { Component, OnInit, Inject } from "@angular/core";
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
|
||||
import { IUpdateModel } from "../../interfaces";
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: "update-dialog.component.html",
|
||||
styleUrls: [ "update-dialog.component.scss" ]
|
||||
})
|
||||
export class UpdateDialogComponent {
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<UpdateDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: IUpdateModel
|
||||
) { }
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"OmbiDatabase": {
|
||||
"Type": "MySQL",
|
||||
"ConnectionString": "Server=192.168.68.118;Port=3306;Database=app.ombi.io;User=ombi"
|
||||
},
|
||||
"SettingsDatabase": {
|
||||
"Type": "MySQL",
|
||||
"ConnectionString": "Server=192.168.68.118;Port=3306;Database=app.ombi.io;User=ombi"
|
||||
},
|
||||
"ExternalDatabase": {
|
||||
"Type": "MySQL",
|
||||
"ConnectionString": "Server=192.168.68.118;Port=3306;Database=app.ombi.io;User=ombi"
|
||||
}
|
||||
}
|
Loading…
Reference in new issue