Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

Stat Polish (#1775)

Joe Milazzocad897015cb2
diff --git a/API/Services/BookService.cs b/API/Services/BookService.cs
index e6cae0bd7..20fa4b261 100644
--- a/API/Services/BookService.cs
+++ b/API/Services/BookService.cs
@@ -731,7 +731,7 @@ public class BookService : IBookService
if (mappings.ContainsKey(CleanContentKeys(key))) return key;
// Fallback to searching for key (bad epub metadata)
- var correctedKey = book.Content.Html.Keys.SingleOrDefault(s => s.EndsWith(key));
+ var correctedKey = book.Content.Html.Keys.FirstOrDefault(s => s.EndsWith(key));
if (!string.IsNullOrEmpty(correctedKey))
{
key = correctedKey;
diff --git a/API/Services/StatisticService.cs b/API/Services/StatisticService.cs
index e6ace9403..510652cb5 100644
--- a/API/Services/StatisticService.cs
+++ b/API/Services/StatisticService.cs
@@ -63,19 +63,6 @@ public class StatisticService : IStatisticService
.Where(p => libraryIds.Contains(p.LibraryId))
.SumAsync(p => p.PagesRead);
- // var ids = await _context.AppUserProgresses
- // .Where(p => p.AppUserId == userId)
- // .Where(p => libraryIds.Contains(p.LibraryId))
- // .Where(p => p.PagesRead > 0)
- // .Select(p => new {p.ChapterId, p.SeriesId})
- // .ToListAsync();
-
- //var chapterIds = ids.Select(id => id.ChapterId);
-
- // var timeSpentReading = await _context.Chapter
- // .Where(c => chapterIds.Contains(c.Id))
- // .SumAsync(c => c.AvgHoursToRead);
-
var timeSpentReading = await TimeSpentReadingForUsersAsync(new List<int>() {userId}, libraryIds);
var totalWordsRead = (long) Math.Round(await _context.AppUserProgresses
@@ -364,12 +351,12 @@ public class StatisticService : IStatisticService
if (days > 0)
{
var date = DateTime.Now.AddDays(days * -1);
- query = query.Where(x => x.appUserProgresses.LastModified >= date && x.appUserProgresses.Created >= date);
+ query = query.Where(x => x.appUserProgresses.LastModified >= date);
}
var results = await query.GroupBy(x => new
{
- Day = x.appUserProgresses.Created.Date,
+ Day = x.appUserProgresses.LastModified.Date,
x.series.Format
})
.Select(g => new PagesReadOnADayCount<DateTime>
@@ -389,7 +376,25 @@ public class StatisticService : IStatisticService
if (results.Any(d => d.Value == date)) continue;
results.Add(new PagesReadOnADayCount<DateTime>()
{
- Format = MangaFormat.Unknown,
+ Format = MangaFormat.Archive,
+ Value = date,
+ Count = 0
+ });
+ results.Add(new PagesReadOnADayCount<DateTime>()
+ {
+ Format = MangaFormat.Epub,
+ Value = date,
+ Count = 0
+ });
+ results.Add(new PagesReadOnADayCount<DateTime>()
+ {
+ Format = MangaFormat.Pdf,
+ Value = date,
+ Count = 0
+ });
+ results.Add(new PagesReadOnADayCount<DateTime>()
+ {
+ Format = MangaFormat.Image,
Value = date,
Count = 0
});
diff --git a/Kavita.Common/Configuration.cs b/Kavita.Common/Configuration.cs
index 0302372d6..0d507559d 100644
--- a/Kavita.Common/Configuration.cs
+++ b/Kavita.Common/Configuration.cs
@@ -1,6 +1,5 @@
using System;
using System.IO;
-using System.Linq;
using System.Text.Json;
using Kavita.Common.EnvironmentInfo;
using Microsoft.Extensions.Hosting;
diff --git a/README.md b/README.md
index acaaf9bcc..4f2883829 100644
--- a/README.md
+++ b/README.md
@@ -97,6 +97,10 @@ We would like to extend a big thank you to [<img src="/Logo/hosting-sponsor.png"
We would like to extend a big thank you to [Huntr](https://huntr.dev/repos/kareadita/kavita) who has worked with Kavita in reporting security vulnerabilities. If you are interested in
being paid to help secure Kavita, please give them a try.
+## PikaPods
+If you are looking to try your hand at self-hosting but lack the machine, [PikaPods](https://www.pikapods.com/pods?run=kavita) is a great service that
+allows you to easily spin up a server. 20% of app revenues are contributed back to Kavita via OpenCollective.
+
### License
* [GNU GPL v3](http://www.gnu.org/licenses/gpl.html)
diff --git a/UI/Web/src/app/app.component.scss b/UI/Web/src/app/app.component.scss
index 8a7519cbf..f36dbb0c3 100644
--- a/UI/Web/src/app/app.component.scss
+++ b/UI/Web/src/app/app.component.scss
@@ -21,6 +21,7 @@
.content-wrapper {
padding: 0 5px 0;
overflow: hidden;
+ height: calc(100vh - 56px);
&.closed {
overflow: auto;
diff --git a/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.html b/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.html
index ad6b3ec16..d9b9be720 100644
--- a/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.html
+++ b/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.html
@@ -1,16 +1,17 @@
-<div class="row g-0 mb-2">
- <h4>Day Breakdown</h4>
-</div>
+<div class="dashboard-card-content">
+ <div class="row g-0 mb-2">
+ <h4>Day Breakdown</h4>
+ </div>
-<ngx-charts-bar-vertical
- class="dark"
- [view]="view"
- [results]="dayBreakdown$ | async"
- [xAxis]="true"
- [yAxis]="true"
- [legend]="showLegend"
- [showXAxisLabel]="true"
- [showYAxisLabel]="true"
- xAxisLabel="Day of Week"
- yAxisLabel="Reading Events">
-</ngx-charts-bar-vertical>
\ No newline at end of file
+ <ngx-charts-bar-vertical
+ class="dark"
+ [results]="dayBreakdown$ | async"
+ [xAxis]="true"
+ [yAxis]="true"
+ [legend]="showLegend"
+ [showXAxisLabel]="true"
+ [showYAxisLabel]="true"
+ xAxisLabel="Day of Week"
+ yAxisLabel="Reading Events">
+ </ngx-charts-bar-vertical>
+</div>
\ No newline at end of file
diff --git a/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.scss b/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.scss
index eb069bb88..3612c7c82 100644
--- a/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.scss
+++ b/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.scss
@@ -1,3 +1,11 @@
::ng-deep .dark .ngx-charts text {
fill: #a0aabe;
+}
+
+.dashboard-card-content {
+ width: 100%;
+ height: 242px;
+ display: flex;
+ flex-flow: column;
+ box-sizing: border-box;
}
\ No newline at end of file
diff --git a/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.ts b/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.ts
index 8146632a5..24cd0a583 100644
--- a/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.ts
+++ b/UI/Web/src/app/statistics/_components/day-breakdown/day-breakdown.component.ts
@@ -16,7 +16,7 @@ export class DayBreakdownComponent implements OnDestroy {
private readonly onDestroy = new Subject<void>();
- view: [number, number] = [700, 400];
+ view: [number, number] = [0,0];
gradient: boolean = true;
showLegend: boolean = true;
showLabels: boolean = true;
diff --git a/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.html b/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.html
index 355da31d2..ee45b0319 100644
--- a/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.html
+++ b/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.html
@@ -1,71 +1,74 @@
-<div class="row g-0 mb-2">
- <div class="col-8">
- <h4><span>Format</span>
- <i class="fa fa-info-circle ms-1" aria-hidden="true" placement="right" [ngbTooltip]="tooltip" role="button" tabindex="0"></i>
- </h4>
+<div class="dashboard-card-content">
+ <div class="row g-0 mb-2">
+ <div class="col-8">
+ <h4><span>Format</span>
+ <i class="fa fa-info-circle ms-1" aria-hidden="true" placement="right" [ngbTooltip]="tooltip" role="button" tabindex="0"></i>
+ </h4>
+ </div>
+ <div class="col-4">
+ <form>
+ <div class="form-check form-switch mt-2">
+ <input id="pub-file-breakdown-viz" type="checkbox" class="form-check-input" [formControl]="formControl" role="switch">
+ <label for="pub-file-breakdown-viz" class="form-check-label">{{formControl.value ? 'Vizualization' : 'Data Table' }}</label>
+ </div>
+ </form>
+ </div>
</div>
- <div class="col-4">
- <form>
- <div class="form-check form-switch mt-2">
- <input id="pub-file-breakdown-viz" type="checkbox" class="form-check-input" [formControl]="formControl" role="switch">
- <label for="pub-file-breakdown-viz" class="form-check-label">{{formControl.value ? 'Vizualization' : 'Data Table' }}</label>
- </div>
- </form>
- </div>
-</div>
-
-<ng-template #tooltip>Not Classified means Kavita has not scanned some files. This occurs on old files existing prior to v0.7. You may need to run a forced scan via Library settings modal.</ng-template>
-
-
-<ng-container *ngIf="files$ | async as files">
- <ng-container *ngIf="formControl.value; else tableLayout">
- <ngx-charts-advanced-pie-chart [results]="vizData2$ | async"></ngx-charts-advanced-pie-chart>
+
+ <ng-template #tooltip>Not Classified means Kavita has not scanned some files. This occurs on old files existing prior to v0.7. You may need to run a forced scan via Library settings modal.</ng-template>
+
+
+ <ng-container *ngIf="files$ | async as files">
+ <ng-container *ngIf="formControl.value; else tableLayout">
+ <ngx-charts-advanced-pie-chart [results]="vizData2$ | async"></ngx-charts-advanced-pie-chart>
+ </ng-container>
+ <ng-template #tableLayout>
+ <table class="table table-light table-striped table-hover table-sm scrollable">
+ <thead>
+ <tr>
+ <th scope="col" sortable="extension" (sort)="onSort($event)">
+ Extension
+ </th>
+ <th scope="col" sortable="format" (sort)="onSort($event)">
+ Format
+ </th>
+ <th scope="col" sortable="totalSize" (sort)="onSort($event)">
+ Total Size
+ </th>
+ <th scope="col" sortable="totalFiles" (sort)="onSort($event)">
+ Total Files
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr *ngFor="let item of files; let idx = index;">
+ <td id="adhoctask--{{idx}}">
+ {{item.extension || 'Not Classified'}}
+ </td>
+ <td>
+ {{item.format | mangaFormat}}
+ </td>
+ <td>
+ {{item.totalSize | bytes}}
+ </td>
+ <td>
+ {{item.totalFiles | number:'1.0-0'}}
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td>Total File Size:</td>
+ <td></td>
+ <td></td>
+ <td>{{((rawData$ | async)?.totalFileSize || 0) | bytes}}</td>
+ </tr>
+ </tfoot>
+ </table>
+ </ng-template>
</ng-container>
- <ng-template #tableLayout>
- <table class="table table-light table-striped table-hover table-sm scrollable">
- <thead>
- <tr>
- <th scope="col" sortable="extension" (sort)="onSort($event)">
- Extension
- </th>
- <th scope="col" sortable="format" (sort)="onSort($event)">
- Format
- </th>
- <th scope="col" sortable="totalSize" (sort)="onSort($event)">
- Total Size
- </th>
- <th scope="col" sortable="totalFiles" (sort)="onSort($event)">
- Total Files
- </th>
- </tr>
- </thead>
- <tbody>
- <tr *ngFor="let item of files; let idx = index;">
- <td id="adhoctask--{{idx}}">
- {{item.extension || 'Not Classified'}}
- </td>
- <td>
- {{item.format | mangaFormat}}
- </td>
- <td>
- {{item.totalSize | bytes}}
- </td>
- <td>
- {{item.totalFiles | number:'1.0-0'}}
- </td>
- </tr>
- </tbody>
- <tfoot>
- <tr>
- <td>Total File Size:</td>
- <td></td>
- <td></td>
- <td>{{((rawData$ | async)?.totalFileSize || 0) | bytes}}</td>
- </tr>
- </tfoot>
- </table>
- </ng-template>
-</ng-container>
-
+
+
+</div>
diff --git a/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.scss b/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.scss
index a77c2a308..dc37ca9e7 100644
--- a/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.scss
+++ b/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.scss
@@ -1,4 +1,12 @@
::ng-deep .advanced-pie-legend {
top: unset !important;
transform: unset !important;
+}
+
+.dashboard-card-content {
+ width: 100%;
+ height: 242px;
+ display: flex;
+ flex-flow: column;
+ box-sizing: border-box;
}
\ No newline at end of file
diff --git a/UI/Web/src/app/statistics/_components/publication-status-stats/publication-status-stats.component.html b/UI/Web/src/app/statistics/_components/publication-status-stats/publication-status-stats.component.html
index accf312f4..6c1b125a6 100644
--- a/UI/Web/src/app/statistics/_components/publication-status-stats/publication-status-stats.component.html
+++ b/UI/Web/src/app/statistics/_components/publication-status-stats/publication-status-stats.component.html
@@ -1,51 +1,54 @@
-<div class="row g-0 mb-2">
- <div class="col-8">
- <h4><span>Publication Status</span>
- </h4>
- </div>
- <div class="col-4">
- <form>
- <div class="form-check form-switch mt-2">
- <input id="pub-status-viz" type="checkbox" class="form-check-input" [formControl]="formControl" role="switch">
- <label for="pub-status-viz" class="form-check-label">{{formControl.value ? 'Vizualization' : 'Data Table' }}</label>
- </div>
- </form>
+<div class="dashboard-card-content">
+
+ <div class="row g-0 mb-2">
+ <div class="col-8">
+ <h4><span>Publication Status</span>
+ </h4>
+ </div>
+ <div class="col-4">
+ <form>
+ <div class="form-check form-switch mt-2">
+ <input id="pub-status-viz" type="checkbox" class="form-check-input" [formControl]="formControl" role="switch">
+ <label for="pub-status-viz" class="form-check-label">{{formControl.value ? 'Vizualization' : 'Data Table' }}</label>
+ </div>
+ </form>
+ </div>
</div>
-</div>
-<ng-container *ngIf="publicationStatues$ | async as statuses">
- <ng-container *ngIf="formControl.value; else tableLayout">
- <ngx-charts-advanced-pie-chart
- [results]="statuses"
- >
- </ngx-charts-advanced-pie-chart>
+ <ng-container *ngIf="publicationStatues$ | async as statuses">
+ <ng-container *ngIf="formControl.value; else tableLayout">
+ <ngx-charts-advanced-pie-chart
+ [results]="statuses"
+ >
+ </ngx-charts-advanced-pie-chart>
+ </ng-container>
+ <ng-template #tableLayout>
+ <table class="table table-light table-hover table-striped table-sm scrollable">
+ <thead>
+ <tr>
+ <th scope="col" sortable="name" (sort)="onSort($event)">
+ Year
+ </th>
+ <th scope="col" sortable="value" (sort)="onSort($event)">
+ Count
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr *ngFor="let item of statuses; let idx = index;">
+ <td id="adhoctask--{{idx}}">
+ {{item.name}}
+ </td>
+ <td>
+ {{item.value | number:'1.0-0'}}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </ng-template>
</ng-container>
- <ng-template #tableLayout>
- <table class="table table-light table-hover table-striped table-sm scrollable">
- <thead>
- <tr>
- <th scope="col" sortable="name" (sort)="onSort($event)">
- Year
- </th>
- <th scope="col" sortable="value" (sort)="onSort($event)">
- Count
- </th>
- </tr>
- </thead>
- <tbody>
- <tr *ngFor="let item of statuses; let idx = index;">
- <td id="adhoctask--{{idx}}">
- {{item.name}}
- </td>
- <td>
- {{item.value | number:'1.0-0'}}
- </td>
- </tr>
- </tbody>
- </table>
- </ng-template>
-</ng-container>
+</div>
diff --git a/UI/Web/src/app/statistics/_components/publication-status-stats/publication-status-stats.component.scss b/UI/Web/src/app/statistics/_components/publication-status-stats/publication-status-stats.component.scss
index 80c3bef2f..4237557be 100644
--- a/UI/Web/src/app/statistics/_components/publication-status-stats/publication-status-stats.component.scss
+++ b/UI/Web/src/app/statistics/_components/publication-status-stats/publication-status-stats.component.scss
@@ -1,3 +1,11 @@
::ng-deep .pie-label {
color: var(--body-text-color) !important;
+}
+
+.dashboard-card-content {
+ width: 100%;
+ height: 242px;
+ display: flex;
+ flex-flow: column;
+ box-sizing: border-box;
}
\ No newline at end of file
diff --git a/UI/Web/src/app/statistics/_components/read-by-day-and/read-by-day-and.component.html b/UI/Web/src/app/statistics/_components/read-by-day-and/read-by-day-and.component.html
deleted file mode 100644
index 7534b3a9d..000000000
--- a/UI/Web/src/app/statistics/_components/read-by-day-and/read-by-day-and.component.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<ng-container>
- <div class="row g-0 mb-2 align-items-center">
- <div class="col-4">
- <h4>Top Readers</h4>
- </div>
- <div class="col-8">
- <form [formGroup]="formGroup" class="d-inline-flex float-end">
- <div class="d-flex me-1" *ngIf="isAdmin">
- <label for="time-select-read-by-day" class="form-check-label"></label>
- <select id="time-select-read-by-day" class="form-select" formControlName="users"
- [class.is-invalid]="formGroup.get('users')?.invalid && formGroup.get('users')?.touched">
- <option [value]="0">All Users</option>
- <option *ngFor="let item of users$ | async" [value]="item.id">{{item.username}}</option>
- </select>
- </div>
- <div class="d-flex">
- <label for="time-select-top-reads" class="form-check-label"></label>
- <select id="time-select-top-reads" class="form-select" formControlName="days"
- [class.is-invalid]="formGroup.get('days')?.invalid && formGroup.get('days')?.touched">
- <option *ngFor="let item of timePeriods" [value]="item.value">{{item.title}}</option>
- </select>
- </div>
- </form>
- </div>
- </div>
- <div class="row g-0">
- <ng-container *ngIf="data$ | async as data">
- <ngx-charts-line-chart
- *ngIf="data.length > 0; else noData"
- class="dark"
- [legend]="true"
- legendTitle="Formats"
- [showXAxisLabel]="true"
- [showYAxisLabel]="true"
- [xAxis]="true"
- [yAxis]="true"
- [showGridLines]="false"
- [showRefLines]="true"
- [roundDomains]="true"
- [autoScale]="true"
- xAxisLabel="Time"
- yAxisLabel="Reading Activity"
- [timeline]="false"
- [results]="data"
- >
- </ngx-charts-line-chart>
- </ng-container>
- </div>
- <ng-template #noData>
- No Reading progress
- </ng-template>
-</ng-container>
\ No newline at end of file
diff --git a/UI/Web/src/app/statistics/_components/reading-activity/reading-activity.component.html b/UI/Web/src/app/statistics/_components/reading-activity/reading-activity.component.html
new file mode 100644
index 000000000..aef4f5868
--- /dev/null
+++ b/UI/Web/src/app/statistics/_components/reading-activity/reading-activity.component.html
@@ -0,0 +1,54 @@
+<ng-container>
+ <div class="dashboard-card-content">
+ <div class="row g-0 mb-2 align-items-center">
+ <div class="col-4">
+ <h4>Top Readers</h4>
+ </div>
+ <div class="col-8">
+ <form [formGroup]="formGroup" class="d-inline-flex float-end">
+ <div class="d-flex me-1" *ngIf="isAdmin && !individualUserMode">
+ <label for="time-select-read-by-day" class="form-check-label"></label>
+ <select id="time-select-read-by-day" class="form-select" formControlName="users"
+ [class.is-invalid]="formGroup.get('users')?.invalid && formGroup.get('users')?.touched">
+ <option [value]="0">All Users</option>
+ <option *ngFor="let item of users$ | async" [value]="item.id">{{item.username}}</option>
+ </select>
+ </div>
+ <div class="d-flex">
+ <label for="time-select-top-reads" class="form-check-label"></label>
+ <select id="time-select-top-reads" class="form-select" formControlName="days"
+ [class.is-invalid]="formGroup.get('days')?.invalid && formGroup.get('days')?.touched">
+ <option *ngFor="let item of timePeriods" [value]="item.value">{{item.title}}</option>
+ </select>
+ </div>
+ </form>
+ </div>
+ </div>
+ <div class="row g-0">
+ <ng-container *ngIf="data$ | async as data">
+ <ngx-charts-line-chart
+ *ngIf="data.length > 0; else noData"
+ class="dark"
+ [legend]="true"
+ legendTitle="Formats"
+ [showXAxisLabel]="true"
+ [showYAxisLabel]="true"
+ [xAxis]="true"
+ [yAxis]="true"
+ [showGridLines]="false"
+ [showRefLines]="true"
+ [roundDomains]="true"
+ [autoScale]="true"
+ xAxisLabel="Time"
+ yAxisLabel="Reading Activity"
+ [timeline]="false"
+ [results]="data"
+ >
+ </ngx-charts-line-chart>
+ </ng-container>
+ </div>
+ <ng-template #noData>
+ No Reading progress
+ </ng-template>
+ </div>
+</ng-container>
\ No newline at end of file
diff --git a/UI/Web/src/app/statistics/_components/read-by-day-and/read-by-day-and.component.scss b/UI/Web/src/app/statistics/_components/reading-activity/reading-activity.component.scss
similarity index 100%
rename from UI/Web/src/app/statistics/_components/read-by-day-and/read-by-day-and.component.scss
rename to UI/Web/src/app/statistics/_components/reading-activity/reading-activity.component.scss
diff --git a/UI/Web/src/app/statistics/_components/read-by-day-and/read-by-day-and.component.ts b/UI/Web/src/app/statistics/_components/reading-activity/reading-activity.component.ts
similarity index 91%
rename from UI/Web/src/app/statistics/_components/read-by-day-and/read-by-day-and.component.ts
rename to UI/Web/src/app/statistics/_components/reading-activity/reading-activity.component.ts
index 9bfcfc2a6..47cae059a 100644
--- a/UI/Web/src/app/statistics/_components/read-by-day-and/read-by-day-and.component.ts
+++ b/UI/Web/src/app/statistics/_components/reading-activity/reading-activity.component.ts
@@ -12,17 +12,18 @@ const options: Intl.DateTimeFormatOptions = { month: "short", day: "numeric" };
const mangaFormatPipe = new MangaFormatPipe();
@Component({
- selector: 'app-read-by-day-and',
- templateUrl: './read-by-day-and.component.html',
- styleUrls: ['./read-by-day-and.component.scss'],
+ selector: 'app-reading-activity',
+ templateUrl: './reading-activity.component.html',
+ styleUrls: ['./reading-activity.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
-export class ReadByDayAndComponent implements OnInit, OnDestroy {
+export class ReadingActivityComponent implements OnInit, OnDestroy {
/**
* Only show for one user
*/
@Input() userId: number = 0;
@Input() isAdmin: boolean = true;
+ @Input() individualUserMode: boolean = false;
view: [number, number] = [0, 400];
formGroup: FormGroup = new FormGroup({
diff --git a/UI/Web/src/app/statistics/_components/server-stats/server-stats.component.html b/UI/Web/src/app/statistics/_components/server-stats/server-stats.component.html
index ca28fc7a6..c10ab1a5b 100644
--- a/UI/Web/src/app/statistics/_components/server-stats/server-stats.component.html
+++ b/UI/Web/src/app/statistics/_components/server-stats/server-stats.component.html
@@ -92,26 +92,26 @@
</div>
<ng-container *ngIf="breakpoint$ | async as bp">
- <div class="row g-0 pt-2 pb-2" *ngIf="bp > Breakpoint.Mobile">
+ <div class="row g-0 pt-2 pb-2">
<app-top-readers></app-top-readers>
</div>
- <div class="row g-0 pt-4 pb-2" style="height: 242px" *ngIf="bp > Breakpoint.Mobile">
- <div class="col-md-6 col-sm-12">
+ <div class="row g-0 pt-4 pb-2">
+ <div class="col-lg-6 col-md-12 mb-md-5">
<app-file-breakdown-stats></app-file-breakdown-stats>
</div>
- <div class="col-md-6 col-sm-12">
+ <div class="col-lg-6 col-md-12">
<app-publication-status-stats></app-publication-status-stats>
</div>
</div>
- <div class="row g-0 pt-4 pb-2 " style="height: 242px" *ngIf="bp > Breakpoint.Mobile">
+ <div class="row g-0 pt-4 pb-2">
<div class="col-md-12 col-sm-12 mt-4 pt-2">
- <app-read-by-day-and [isAdmin]="true"></app-read-by-day-and>
+ <app-reading-activity [isAdmin]="true"></app-reading-activity>
</div>
</div>
- <div class="row g-0 pt-4 pb-2 " style="height: 242px" *ngIf="bp > Breakpoint.Mobile">
+ <div class="row g-0 pt-4 pb-2">
<div class="col-md-12 col-sm-12 mt-4 pt-2">
<app-day-breakdown></app-day-breakdown>
</div>
diff --git a/UI/Web/src/app/statistics/_components/server-stats/server-stats.component.scss b/UI/Web/src/app/statistics/_components/server-stats/server-stats.component.scss
index c59742f5a..f98cc003d 100644
--- a/UI/Web/src/app/statistics/_components/server-stats/server-stats.component.scss
+++ b/UI/Web/src/app/statistics/_components/server-stats/server-stats.component.scss
@@ -7,4 +7,5 @@
overflow-y: auto;
overflow-x: hidden;
align-items: start;
-}
\ No newline at end of file
+}
+
diff --git a/UI/Web/src/app/statistics/_components/user-stats/user-stats.component.html b/UI/Web/src/app/statistics/_components/user-stats/user-stats.component.html
index b7ac6291c..96b8ef0c8 100644
--- a/UI/Web/src/app/statistics/_components/user-stats/user-stats.component.html
+++ b/UI/Web/src/app/statistics/_components/user-stats/user-stats.component.html
@@ -9,7 +9,7 @@
<div class="row g-0 pt-4 pb-2 " style="height: 242px">
<div class="col-md-12 col-sm-12 mt-4 pt-2">
- <app-read-by-day-and [userId]="userId" [isAdmin]="(isAdmin$ | async) || false"></app-read-by-day-and>
+ <app-reading-activity [userId]="userId" [isAdmin]="(isAdmin$ | async) || false" [individualUserMode]="true"></app-reading-activity>
</div>
</div>
diff --git a/UI/Web/src/app/statistics/statistics.module.ts b/UI/Web/src/app/statistics/statistics.module.ts
index 54a7ea380..04ecbea08 100644
--- a/UI/Web/src/app/statistics/statistics.module.ts
+++ b/UI/Web/src/app/statistics/statistics.module.ts
@@ -14,7 +14,7 @@ import { MangaFormatStatsComponent } from './_components/manga-format-stats/mang
import { FileBreakdownStatsComponent } from './_components/file-breakdown-stats/file-breakdown-stats.component';
import { PipeModule } from '../pipe/pipe.module';
import { TopReadersComponent } from './_components/top-readers/top-readers.component';
-import { ReadByDayAndComponent } from './_components/read-by-day-and/read-by-day-and.component';
+import { ReadingActivityComponent } from './_components/reading-activity/reading-activity.component';
import { GenericListModalComponent } from './_components/_modals/generic-list-modal/generic-list-modal.component';
import { DayBreakdownComponent } from './_components/day-breakdown/day-breakdown.component';
import { DayOfWeekPipe } from './_pipes/day-of-week.pipe';
@@ -31,7 +31,7 @@ import { DayOfWeekPipe } from './_pipes/day-of-week.pipe';
MangaFormatStatsComponent,
FileBreakdownStatsComponent,
TopReadersComponent,
- ReadByDayAndComponent,
+ ReadingActivityComponent,
GenericListModalComponent,
DayBreakdownComponent,
DayOfWeekPipe