- translate remaining public views and page-model strings (titles, messages, relation names) - Urdu stopword list for word-frequency stats (replaces Persian list) - error pages: drop list of alternative Ganjoor services Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using RMuseum.Models.Diwan.ViewModels;
|
|
|
|
namespace DiwanRazor.Pages
|
|
{
|
|
public class _CommentPartialModel : PageModel
|
|
{
|
|
public DiwanCommentSummaryViewModel Comment { get; set; }
|
|
public string Error { get; set; }
|
|
|
|
/// <summary>
|
|
/// set (alongside Error) when Error is the "sanitizing had to drop real text" case -
|
|
/// the plain text that would remain, so client JS can diff it against what the user
|
|
/// actually typed and show them exactly what got dropped. Null/empty for any other error.
|
|
/// </summary>
|
|
public string SanitizerRemainingText { get; set; }
|
|
public DiwanCommentSummaryViewModel InReplyTo { get; set; }
|
|
public bool LoggedIn { get; set; }
|
|
public string DivSuffix { get; set; }
|
|
public int PoemId { get; set; }
|
|
public string Wrote
|
|
{
|
|
get
|
|
{
|
|
return InReplyTo == null ? "لکھا" : "جواب دیا";
|
|
}
|
|
}
|
|
public bool Bookmarked { get; set; }
|
|
public _CommentPartialModel GetCommentModel(DiwanCommentSummaryViewModel comment)
|
|
{
|
|
return new _CommentPartialModel()
|
|
{
|
|
Comment = comment,
|
|
Error = "",
|
|
InReplyTo = Comment,
|
|
LoggedIn = LoggedIn,
|
|
DivSuffix = DivSuffix,
|
|
PoemId = PoemId,
|
|
Bookmarked = Bookmarked,
|
|
};
|
|
}
|
|
|
|
}
|
|
}
|