mirror of
https://github.com/hmaxnl/SharpRSS.git
synced 2025-01-18 21:04:21 +01:00
Small changes on models
This commit is contained in:
parent
13d5c207f5
commit
654e2ef364
|
@ -1,28 +1,10 @@
|
|||
using System;
|
||||
using SharpRss;
|
||||
using SharpRss.Models;
|
||||
using SharpRss.Models;
|
||||
using ToolQit;
|
||||
|
||||
namespace WebSharpRSS.Models
|
||||
{
|
||||
public class SyndicationItemData : SyndicationItemModel
|
||||
{
|
||||
public SyndicationItemData()
|
||||
{
|
||||
|
||||
}
|
||||
public static SyndicationItemData? FromModel(SyndicationItemModel model) => Utilities.ConvertFrom<SyndicationItemData, SyndicationItemModel>(model);
|
||||
private string? _faviconUrl;
|
||||
public string? FaviconUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Link == null || _faviconUrl != null) return _faviconUrl;
|
||||
_faviconUrl = string.Format(Caretaker.Settings["Paths"].GetString("FaviconResolveUrl"), new Uri(SyndicationManager.DecodeUrlFromBase64(EncodedSyndicationUrl)).Host);
|
||||
return _faviconUrl;
|
||||
}
|
||||
}
|
||||
|
||||
public string? Icon { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
<MudItem @onclick="@(() => Callback(feedItemData))">
|
||||
<MudPaper Height="250" Width="300" Class="px-2">
|
||||
<div style="justify-self: start;" class="d-flex align-center">
|
||||
@if (feedItemData.FaviconUrl != null)
|
||||
@if (feedItemData.SyndicationParent.ImageUrl != null)
|
||||
{
|
||||
<MudImage Src="@feedItemData.FaviconUrl" ObjectFit="ObjectFit.Contain"/>
|
||||
<MudImage Src="@feedItemData.SyndicationParent.ImageUrl" ObjectFit="ObjectFit.Contain" Width="32" Height="32"/>
|
||||
}
|
||||
<div class="d-inline pa-2 align-center" style="font-size: 16px;">
|
||||
@if (feedItemData.Title != null)
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
@if (FeedItem != null)
|
||||
{
|
||||
<div style="justify-self: start;" class="d-flex align-center">
|
||||
@if (FeedItem.FaviconUrl != null)
|
||||
@if (FeedItem.SyndicationParent.ImageUrl != null)
|
||||
{
|
||||
<MudImage Src="@FeedItem.FaviconUrl" ObjectFit="ObjectFit.Contain"/>
|
||||
<MudImage Src="@FeedItem.SyndicationParent.ImageUrl" ObjectFit="ObjectFit.Contain" Width="32" Height="32"/>
|
||||
}
|
||||
<div class="d-inline px-3 align-center" style="font-size: 30px;">
|
||||
@((MarkupString)(FeedItem?.Title ?? "This item doesn't contains a title!"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user