Started laying out the entities
This commit is contained in:
parent
32ee60e1de
commit
fa9508c6b7
3 changed files with 59 additions and 0 deletions
45
API/Entities/Annotation.cs
Normal file
45
API/Entities/Annotation.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using API.Entities.Enums;
|
||||
using API.Entities.Interfaces;
|
||||
|
||||
namespace API.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an annotation in the Epub reader
|
||||
/// </summary>
|
||||
public class Annotation : IEntityDate
|
||||
{
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// Starting point of the Highlight
|
||||
/// </summary>
|
||||
public required string XPath { get; set; }
|
||||
/// <summary>
|
||||
/// Ending point of the Hightlight. Can be the same as <see cref="XPath"/>
|
||||
/// </summary>
|
||||
public string EndingXPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The text selected.
|
||||
/// </summary>
|
||||
public string SelectedText { get; set; }
|
||||
/// <summary>
|
||||
/// The number of characters selected
|
||||
/// </summary>
|
||||
public int HighlightCount { get; set; }
|
||||
|
||||
public HightlightColor HightlightColor { get; set; }
|
||||
|
||||
public required int SeriesId { get; set; }
|
||||
public required int VolumeId { get; set; }
|
||||
public required int ChapterId { get; set; }
|
||||
public Chapter Chapter { get; set; }
|
||||
|
||||
public required int AppUserId { get; set; }
|
||||
public AppUser AppUser { get; set; }
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime CreatedUtc { get; set; }
|
||||
public DateTime LastModified { get; set; }
|
||||
public DateTime LastModifiedUtc { get; set; }
|
||||
}
|
11
API/Entities/Enums/HightlightColor.cs
Normal file
11
API/Entities/Enums/HightlightColor.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
namespace API.Entities.Enums;
|
||||
|
||||
/// <summary>
|
||||
/// Color of the highlight
|
||||
/// </summary>
|
||||
/// <remarks>Color may not match exactly due to theming</remarks>
|
||||
public enum HightlightColor
|
||||
{
|
||||
Blue = 1,
|
||||
Green = 2,
|
||||
}
|
|
@ -1106,6 +1106,9 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
if (highlight.parentNode != null) {
|
||||
highlight.parentNode.replaceChild(componentRef.location.nativeElement, highlight);
|
||||
}
|
||||
|
||||
// TODO: Load the highlight instance with information from the Annotation
|
||||
//componentRef.instance.highlightClasses =
|
||||
//componentRef.instance.cdRef.markForCheck();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue