Skip to content

Commit

Permalink
render html and display title
Browse files Browse the repository at this point in the history
  • Loading branch information
zaknesler committed May 23, 2024
1 parent 9b6e4a4 commit d465d64
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions ui/src/components/entry/entry-item.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable solid/no-innerhtml */

import { A, AnchorProps, useMatch } from '@solidjs/router';
import { createQuery } from '@tanstack/solid-query';
import { cx } from 'class-variance-authority';
Expand Down Expand Up @@ -54,7 +56,7 @@ export const EntryItem: Component<EntryItemProps> = props => {
)}
{...rest}
>
<h4 class="text-pretty text-base/5 md:text-sm xl:text-base/5">{local.entry.title}</h4>
<h4 class="text-pretty text-base/5 md:text-sm xl:text-base/5" innerHTML={local.entry.title} />

<small
class={cx(
Expand All @@ -73,7 +75,7 @@ export const EntryItem: Component<EntryItemProps> = props => {

{!filter.params.feed_uuid && (
<>
<span class="truncate break-all font-medium">{feed()?.title}</span>
<span class="truncate break-all font-medium">{feed()?.title_display || feed()?.title}</span>
{!!getDate() && <span class="opacity-50">&ndash;</span>}
</>
)}
Expand Down
5 changes: 4 additions & 1 deletion ui/src/components/entry/entry-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export const EntryView: ParentComponent<EntryViewProps> = props => {
)}

<article class="flex flex-col gap-4">
<h1 class="text-balance text-xl font-bold text-gray-800 lg:text-2xl dark:text-gray-100">{local.entry.title}</h1>
<h1
class="text-balance text-xl font-bold text-gray-800 lg:text-2xl dark:text-gray-100"
innerHTML={local.entry.title}
/>

{!!getDate() && <div class="text-sm text-gray-500 dark:text-gray-400">{formatDateTime(getDate()!)}</div>}

Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/feed/feed-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const FeedInfo: Component<FeedInfoProps> = props => {

<Match when={feed.isSuccess}>
<div class="flex w-full items-start justify-between">
<FeedHeader title={feed.data?.title} subtitle={feed.data?.url_feed} />
<FeedHeader title={feed.data?.title_display || feed.data?.title} subtitle={feed.data?.url_feed} />

<MenuFeed
uuid={props.uuid}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/feed/feed-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const FeedItem: Component<FeedItemProps> = props => {
return (
<BaseFeedItem
href={getPath().concat(filter.getQueryString())}
title={props.feed.title}
title={props.feed.title_display || props.feed.title}
open={open()}
active={isActive()}
setOpen={setOpen}
Expand Down

0 comments on commit d465d64

Please sign in to comment.