mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Fixed the custom image issue on the login page Fixed the bug when clicking on the tab on the requests page it would switch to the wrong one Swagger is now back @ /swagger
This commit is contained in:
parent
e1ceb4c66e
commit
ccb1bd30d0
8 changed files with 45 additions and 18 deletions
|
@ -133,7 +133,7 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|||
}
|
||||
|
||||
Ctx.WriteLine("Starting Download");
|
||||
await DownloadAsync(download.Url, zipDir);
|
||||
await DownloadAsync(download.Url, zipDir, c);
|
||||
Ctx.WriteLine("Finished Download");
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -195,10 +195,15 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|||
}
|
||||
}
|
||||
|
||||
public static async Task DownloadAsync(string requestUri, string filename)
|
||||
public static async Task DownloadAsync(string requestUri, string filename, PerformContext ctx)
|
||||
{
|
||||
using (var client = new WebClient())
|
||||
{
|
||||
ctx.WriteProgressBar();
|
||||
client.DownloadProgressChanged += (s, e) =>
|
||||
{
|
||||
ctx.WriteProgressBar(e.ProgressPercentage);
|
||||
};
|
||||
await client.DownloadFileTaskAsync(requestUri, filename);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ include the remember me checkbox
|
|||
<div class="card card-container">
|
||||
<!-- <img class="profile-img-card" src="//lh3.googleusercontent.com/-6V8xOA6M7BA/AAAAAAAAAAI/AAAAAAAAAAA/rzlHcD0KYwo/photo.jpg?sz=120" alt="" /> -->
|
||||
<div *ngIf="!customizationSettings.logo"><img id="profile-img" class="profile-img-card" src="/images/ms-icon-150x150.png" /></div>
|
||||
<div *ngIf="customizationSettings.logo"><img id="profile-img" class="profile-img-custom" [src]="customizationSettings.logo" /></div>
|
||||
<div *ngIf="customizationSettings.logo"><img id="profile-img" class="center" [src]="customizationSettings.logo" /></div>
|
||||
<p id="profile-name" class="profile-name-card"></p>
|
||||
|
||||
<form class="form-signin" novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
|
||||
|
|
|
@ -23,6 +23,11 @@ landingDiv {
|
|||
background-size: cover;
|
||||
}
|
||||
|
||||
img.center {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
img.bg {
|
||||
/* Set rules to fill background */
|
||||
min-height: 100%;
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
<ul id="nav-tabs" class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a id="movieTabButton" aria-controls="home" role="tab" data-toggle="tab" (click)="selectTab()"><i class="fa fa-film"></i> Movies</a>
|
||||
<a id="movieTabButton" aria-controls="home" role="tab" data-toggle="tab" (click)="selectMovieTab()"><i class="fa fa-film"></i> Movies</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a id="tvTabButton" aria-controls="profile" role="tab" data-toggle="tab" (click)="selectTab()"><i class="fa fa-television"></i> TV Shows</a>
|
||||
<a id="tvTabButton" aria-controls="profile" role="tab" data-toggle="tab" (click)="selectTvTab()"><i class="fa fa-television"></i> TV Shows</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -8,9 +8,13 @@ export class RequestComponent {
|
|||
public showMovie = true;
|
||||
public showTv = false;
|
||||
|
||||
public selectTab() {
|
||||
this.showMovie = !this.showMovie;
|
||||
this.showTv = !this.showTv;
|
||||
public selectMovieTab() {
|
||||
this.showMovie = true;
|
||||
this.showTv = false;
|
||||
}
|
||||
|
||||
public selectTvTab() {
|
||||
this.showMovie = false;
|
||||
this.showTv = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<ul class="nav nav-tabs">
|
||||
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/About']"><i class="fa fa-question" aria-hidden="true"></i> About</a></li>
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Ombi']">Ombi</a></li>
|
||||
|
||||
<li class="dropdown" [routerLinkActive]="['active']">
|
||||
|
@ -22,14 +24,14 @@
|
|||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown" [routerLinkActive]="['active']">
|
||||
<li class="dropdown" [routerLinkActive]="['active']">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-television" aria-hidden="true"></i> TV <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Sonarr']" >Sonarr</a></li>
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Sonarr']">Sonarr</a></li>
|
||||
<li [routerLinkActive]="['active']"><a>More Coming Soon...</a></li>
|
||||
<!--<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/SickRage']" >SickRage</a></li>-->
|
||||
<!--<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/SickRage']">SickRage</a></li>-->
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
@ -62,12 +64,11 @@
|
|||
</li>
|
||||
|
||||
|
||||
<li class="dropdown" [routerLinkActive]="['active']">
|
||||
<li class="dropdown" [routerLinkActive]="['active']">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-tachometer" aria-hidden="true"></i> System <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/About']">About</a></li>
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Update']">Update</a></li>
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Logs']">Logs (Not available)</a></li>
|
||||
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/ScheduledJobs']">Scheduled Jobs (Not available)</a></li>
|
||||
|
|
|
@ -168,6 +168,7 @@ namespace Ombi
|
|||
app.UseAuthentication();
|
||||
|
||||
//ApiKeyMiddlewear(app, serviceProvider);
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace Ombi
|
|||
{
|
||||
Version = "v1",
|
||||
Title = "Ombi Api",
|
||||
Description = "The API for Ombi, most of these calls require an auth token that you can get from calling POST:\"/connect/token/\" with the body of: \n {\n\"username\":\"YOURUSERNAME\",\n\"password\":\"YOURPASSWORD\"\n} \n" +
|
||||
Description = "The API for Ombi, most of these calls require an auth token that you can get from calling POST:\"/api/v1/token\" with the body of: \n {\n\"username\":\"YOURUSERNAME\",\n\"password\":\"YOURPASSWORD\"\n} \n" +
|
||||
"You can then use the returned token in the JWT Token field e.g. \"Bearer Token123xxff\"",
|
||||
Contact = new Contact
|
||||
{
|
||||
|
@ -44,20 +44,31 @@ namespace Ombi
|
|||
{
|
||||
Console.WriteLine(e);
|
||||
}
|
||||
c.AddSecurityDefinition("Bearer", new ApiKeyScheme()
|
||||
c.AddSecurityDefinition("Bearer", new JwtBearer
|
||||
{
|
||||
Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
|
||||
Name = "Authorization",
|
||||
In = "header",
|
||||
Type = "apiKey"
|
||||
Type = "apiKey",
|
||||
});
|
||||
|
||||
c.AddSecurityDefinition("Authentication", new ApiKeyScheme());
|
||||
|
||||
c.OperationFilter<SwaggerOperationFilter>();
|
||||
c.DescribeAllParametersInCamelCase();
|
||||
});
|
||||
}
|
||||
|
||||
public class JwtBearer : SecurityScheme
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public string In { get; set; }
|
||||
|
||||
public JwtBearer()
|
||||
{
|
||||
this.Type = "bearer";
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddAppSettingsValues(this IServiceCollection services, IConfigurationRoot configuration)
|
||||
{
|
||||
services.Configure<ApplicationSettings>(configuration.GetSection("ApplicationSettings"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue