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';
|
: 'just now';
|
||||||
return {
|
return {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
who: row.author_name || 'You',
|
who: row.author_name || window.ZAMPP_DATA?.ME?.name || 'You',
|
||||||
avatar: row.author_initials || (row.author_name ? row.author_name.slice(0, 2).toUpperCase() : 'ZG'),
|
avatar: row.author_initials || (row.author_name ? row.author_name.slice(0, 2).toUpperCase() : (window.ZAMPP_DATA?.ME?.initials || 'ZG')),
|
||||||
time: msToTimecode(frameMs),
|
time: msToTimecode(frameMs),
|
||||||
frame_ms: frameMs,
|
frame_ms: frameMs,
|
||||||
real,
|
real,
|
||||||
|
|
@ -528,16 +528,13 @@ function CommentsList({ comments, onSeek, onResolve, onDelete }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function CommentComposer({ asset, currentMs, value, onChange, onSubmit }) {
|
function CommentComposer({ asset, currentMs, value, onChange, onSubmit }) {
|
||||||
|
const me = window.ZAMPP_DATA?.ME;
|
||||||
|
const myInitials = me?.initials || 'ZG';
|
||||||
return (
|
return (
|
||||||
<div className="comment-composer">
|
<div className="comment-composer">
|
||||||
<div className="composer-head">
|
<div className="composer-head">
|
||||||
<span style={{ fontWeight: 600, fontSize: 12 }}>Reviewers</span>
|
<div className="avatar" style={{ background: avatarColor(myInitials), width: 22, height: 22, fontSize: 10 }}>{myInitials}</div>
|
||||||
<div className="avatar-stack">
|
<span style={{ fontSize: 12, color: 'var(--text-2)', fontWeight: 500 }}>{me?.name || 'You'}</span>
|
||||||
{["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>
|
</div>
|
||||||
<div className="composer-tag">
|
<div className="composer-tag">
|
||||||
<span className="badge accent">@ {msToTimecode(currentMs)}</span>
|
<span className="badge accent">@ {msToTimecode(currentMs)}</span>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue