Feature/release cleanup (#597)
* Deselect all after bulk operations complete. * Implemented a way to trigger selection code on mobile. * When selection mode is active, make the clickable area the whole image. * Series detail shouldn't use gutters for card layout as it can cause skewing on mobile * Long press on card items to trigger the selection on mobile * Code cleanup * One more * Misread the code issue
This commit is contained in:
parent
5ceb74e210
commit
5e2606b0de
7 changed files with 54 additions and 25 deletions
|
@ -2,6 +2,8 @@ using System;
|
|||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using API.Extensions;
|
||||
using API.Middleware;
|
||||
using API.Services;
|
||||
|
@ -9,6 +11,7 @@ using API.Services.HostedServices;
|
|||
using API.SignalR;
|
||||
using Hangfire;
|
||||
using Hangfire.MemoryStorage;
|
||||
using Kavita.Common;
|
||||
using Kavita.Common.EnvironmentInfo;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
@ -109,7 +112,7 @@ namespace API
|
|||
.AllowAnyHeader()
|
||||
.AllowAnyMethod()
|
||||
.AllowCredentials() // For SignalR token query param
|
||||
.WithOrigins("http://localhost:4200")
|
||||
.WithOrigins("http://localhost:4200", $"http://{GetLocalIpAddress()}:4200")
|
||||
.WithExposedHeaders("Content-Disposition", "Pagination"));
|
||||
}
|
||||
|
||||
|
@ -164,6 +167,14 @@ namespace API
|
|||
Console.WriteLine("You may now close the application window.");
|
||||
}
|
||||
|
||||
private static string GetLocalIpAddress()
|
||||
{
|
||||
using var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 0);
|
||||
socket.Connect("8.8.8.8", 65530);
|
||||
if (socket.LocalEndPoint is IPEndPoint endPoint) return endPoint.Address.ToString();
|
||||
throw new KavitaException("No network adapters with an IPv4 address in the system!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue