fix(asset): comment composer shows real user from ZAMPP_DATA.ME, removes dead add-reviewer button
This commit is contained in:
parent
14d689aaf3
commit
a8a2061eec
1 changed files with 6 additions and 9 deletions
|
|
@ -155,8 +155,8 @@ function AssetDetail({ asset, onClose }) {
|
|||
: 'just now';
|
||||
return {
|
||||
id: row.id,
|
||||
who: row.author_name || 'You',
|
||||
avatar: row.author_initials || (row.author_name ? row.author_name.slice(0, 2).toUpperCase() : 'ZG'),
|
||||
who: row.author_name || window.ZAMPP_DATA?.ME?.name || 'You',
|
||||
avatar: row.author_initials || (row.author_name ? row.author_name.slice(0, 2).toUpperCase() : (window.ZAMPP_DATA?.ME?.initials || 'ZG')),
|
||||
time: msToTimecode(frameMs),
|
||||
frame_ms: frameMs,
|
||||
real,
|
||||
|
|
@ -528,16 +528,13 @@ function CommentsList({ comments, onSeek, onResolve, onDelete }) {
|
|||
}
|
||||
|
||||
function CommentComposer({ asset, currentMs, value, onChange, onSubmit }) {
|
||||
const me = window.ZAMPP_DATA?.ME;
|
||||
const myInitials = me?.initials || 'ZG';
|
||||
return (
|
||||
<div className="comment-composer">
|
||||
<div className="composer-head">
|
||||
<span style={{ fontWeight: 600, fontSize: 12 }}>Reviewers</span>
|
||||
<div className="avatar-stack">
|
||||
{["ZG"].map(function(a, i) {
|
||||
return <div key={i} className="avatar" style={{ background: avatarColor(a), width: 22, height: 22, fontSize: 10 }}>{a}</div>;
|
||||
})}
|
||||
<button className="add-reviewer"><Icon name="plus" size={11} /></button>
|
||||
</div>
|
||||
<div className="avatar" style={{ background: avatarColor(myInitials), width: 22, height: 22, fontSize: 10 }}>{myInitials}</div>
|
||||
<span style={{ fontSize: 12, color: 'var(--text-2)', fontWeight: 500 }}>{me?.name || 'You'}</span>
|
||||
</div>
|
||||
<div className="composer-tag">
|
||||
<span className="badge accent">@ {msToTimecode(currentMs)}</span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue