Fixed partner message reader
This commit is contained in:
@@ -61,6 +61,8 @@ import {
|
||||
NotificationStatus,
|
||||
} from '../../types';
|
||||
import { formatZAR } from '../../lib/formatters';
|
||||
import { MessageViewer } from '../notifications/MessageViewer';
|
||||
import { stripMarkdown } from '../../lib/markdownUtils';
|
||||
|
||||
interface EnrichedPartnerProject {
|
||||
project: Project;
|
||||
@@ -1321,7 +1323,7 @@ export function DashboardPage() {
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-xs text-slate-400 truncate mt-1">
|
||||
{msg.message}
|
||||
{stripMarkdown(msg.message)}
|
||||
</p>
|
||||
</div>
|
||||
</button>
|
||||
@@ -1393,7 +1395,7 @@ export function DashboardPage() {
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<p className="text-xs text-slate-300 mt-1 line-clamp-2">{msg.message}</p>
|
||||
<p className="text-xs text-slate-300 mt-1 line-clamp-2">{stripMarkdown(msg.message)}</p>
|
||||
</div>
|
||||
</div>
|
||||
<span className="text-xs text-slate-500 shrink-0">
|
||||
@@ -2120,11 +2122,11 @@ export function DashboardPage() {
|
||||
MODAL 3: MESSAGE READER (Clicking an Inbox item)
|
||||
===================================================================== */}
|
||||
{selectedNotification && (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-slate-950/80 backdrop-blur-md p-4">
|
||||
<div className="w-full max-w-lg rounded-2xl bg-[#0d1322] border border-white/10 shadow-2xl overflow-hidden">
|
||||
<div className="p-5 border-b border-white/[0.08] flex items-center justify-between">
|
||||
<div>
|
||||
<h3 className="text-base font-bold text-white">
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-slate-950/80 backdrop-blur-md p-4 animate-in fade-in duration-200">
|
||||
<div className="w-full max-w-2xl rounded-2xl bg-[#0d1322] border border-white/10 shadow-2xl overflow-hidden flex flex-col max-h-[90vh]">
|
||||
<div className="p-5 border-b border-white/[0.08] flex items-center justify-between bg-[#0b101d] shrink-0">
|
||||
<div className="min-w-0 pr-4">
|
||||
<h3 className="text-base font-bold text-white truncate">
|
||||
{selectedNotification.subject || 'Message'}
|
||||
</h3>
|
||||
<p className="text-[11px] text-slate-400 mt-0.5">
|
||||
@@ -2134,20 +2136,22 @@ export function DashboardPage() {
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setSelectedNotification(null)}
|
||||
className="p-1.5 rounded-lg text-slate-400 hover:text-white cursor-pointer"
|
||||
className="p-1.5 rounded-lg text-slate-400 hover:text-white cursor-pointer hover:bg-white/5 transition shrink-0"
|
||||
>
|
||||
<X className="w-4 h-4" />
|
||||
</button>
|
||||
</div>
|
||||
<div className="p-5 space-y-5">
|
||||
<p className="text-xs sm:text-sm text-slate-200 leading-relaxed whitespace-pre-wrap">
|
||||
{selectedNotification.message}
|
||||
</p>
|
||||
<div className="flex items-center justify-end gap-3 pt-3 border-t border-white/[0.08]">
|
||||
<div className="p-5 space-y-4 overflow-y-auto flex-1">
|
||||
<MessageViewer
|
||||
content={selectedNotification.message || ''}
|
||||
platform={selectedNotification.platform}
|
||||
subject={selectedNotification.subject}
|
||||
/>
|
||||
<div className="flex items-center justify-end gap-3 pt-3 border-t border-white/[0.08] shrink-0">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setSelectedNotification(null)}
|
||||
className="px-4 py-2 rounded-xl bg-slate-800 text-slate-300 text-xs font-semibold cursor-pointer"
|
||||
className="px-4 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-300 text-xs font-semibold cursor-pointer transition"
|
||||
>
|
||||
Close
|
||||
</button>
|
||||
@@ -2163,7 +2167,7 @@ export function DashboardPage() {
|
||||
setMessageSubject(subj.startsWith('Re:') ? subj : `Re: ${subj}`);
|
||||
setMessageBody('');
|
||||
}}
|
||||
className="px-4 py-2 rounded-xl bg-emerald-500 hover:bg-emerald-400 text-slate-950 font-semibold text-xs flex items-center gap-1.5 cursor-pointer"
|
||||
className="px-4 py-2 rounded-xl bg-emerald-500 hover:bg-emerald-400 text-slate-950 font-semibold text-xs flex items-center gap-1.5 cursor-pointer transition shadow-lg shadow-emerald-500/20"
|
||||
>
|
||||
<Send className="w-3.5 h-3.5" />
|
||||
<span>Reply</span>
|
||||
|
||||
Reference in New Issue
Block a user