Better Themes, Stats, and bugfixes (#1740)
* Fixed a bug where when clicking on a series rating for first time, the rating wasn't populating in the modal. * Fixed a bug on Scroll mode with immersive mode, the bottom bar could clip with the book body. * Cleanup some uses of var * Refactored text as json into a type so I don't have to copy/paste everywhere * Theme styles now override the defaults and theme owners no longer need to maintain all the variables themselves. Themes can now override the color of the header on mobile devices via --theme-color and Kavita will now update both theme color as well as color scheme. * Fixed a bug where last active on user stats wasn't for the particular user. * Added a more accurate word count calculation and the ability to see the word counts year over year. * Added a new table for long term statistics, like number of files over the years. No views are present for this data, I will add them later.
This commit is contained in:
parent
84b7978587
commit
5613d1a954
39 changed files with 2234 additions and 103 deletions
|
|
@ -45,6 +45,7 @@ public sealed class DataContext : IdentityDbContext<AppUser, AppRole, int,
|
|||
public DbSet<SeriesRelation> SeriesRelation { get; set; }
|
||||
public DbSet<FolderPath> FolderPath { get; set; }
|
||||
public DbSet<Device> Device { get; set; }
|
||||
public DbSet<ServerStatistics> ServerStatistics { get; set; }
|
||||
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
|
|
|
|||
1743
API/Data/Migrations/20230111014852_YearlyStats.Designer.cs
generated
Normal file
1743
API/Data/Migrations/20230111014852_YearlyStats.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
39
API/Data/Migrations/20230111014852_YearlyStats.cs
Normal file
39
API/Data/Migrations/20230111014852_YearlyStats.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Data.Migrations
|
||||
{
|
||||
public partial class YearlyStats : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ServerStatistics",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Year = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
SeriesCount = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
VolumeCount = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
ChapterCount = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
FileCount = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
UserCount = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
GenreCount = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
PersonCount = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
TagCount = table.Column<long>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ServerStatistics", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ServerStatistics");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -949,6 +949,44 @@ namespace API.Data.Migrations
|
|||
b.ToTable("ServerSetting");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Entities.ServerStatistics", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ChapterCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("FileCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("GenreCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("PersonCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("SeriesCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("TagCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("UserCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("VolumeCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Year")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("ServerStatistics");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Entities.SiteTheme", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue