feat: official Postiz icon + strip HTML from post content display
Release APK / build (push) Has been cancelled
Release APK / build (push) Has been cancelled
- Replace icon.png with official Postiz logo (1024x1024, generated from upstream postiz.svg at gitroomhq/postiz-app) - Add lib/stripHtml.ts: converts <br>/<p> to newlines, strips all tags, decodes HTML entities - PostCard: use stripHtml on content before truncation and display - posts.tsx: use stripHtml for context menu preview and clipboard copy (API payloads keep original HTML for retry/reschedule) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
import { Swipeable } from "react-native-gesture-handler";
|
||||
import { useColors } from "@/hooks/useColors";
|
||||
import { PostizPost } from "@/context/PostizContext";
|
||||
import { stripHtml } from "@/lib/stripHtml";
|
||||
import { StatusBadge } from "./StatusBadge";
|
||||
|
||||
interface PostCardProps {
|
||||
@@ -118,10 +119,11 @@ export function PostCard({ post, onDelete, onLongPress, onReschedule }: PostCard
|
||||
: undefined;
|
||||
|
||||
const integrations = post.integrations ?? (post.integration ? [post.integration] : []);
|
||||
const plainContent = stripHtml(post.content);
|
||||
const truncatedContent =
|
||||
post.content.length > 140
|
||||
? post.content.slice(0, 140) + "…"
|
||||
: post.content;
|
||||
plainContent.length > 140
|
||||
? plainContent.slice(0, 140) + "…"
|
||||
: plainContent;
|
||||
|
||||
return (
|
||||
<Swipeable
|
||||
|
||||
Reference in New Issue
Block a user