e.stopPropagation()}>
{locale === 'zh' ? '重命名' : 'Rename'}
setRenameDialog({ ...renameDialog, newName: e.target.value })}
onKeyDown={(e) => {
if (e.key === 'Enter') {
handleRename(renameDialog.asset, renameDialog.newName);
} else if (e.key === 'Escape') {
setRenameDialog(null);
}
}}
autoFocus
style={{
width: '100%',
padding: '8px',
backgroundColor: '#2d2d2d',
border: '1px solid #3e3e3e',
borderRadius: '4px',
color: '#cccccc',
fontSize: '13px'
}}
/>
setRenameDialog(null)}
style={{
padding: '6px 16px',
backgroundColor: '#3e3e3e',
border: 'none',
borderRadius: '4px',
color: '#cccccc',
cursor: 'pointer',
marginRight: '8px'
}}
>
{locale === 'zh' ? '取消' : 'Cancel'}
handleRename(renameDialog.asset, renameDialog.newName)}
style={{
padding: '6px 16px',
backgroundColor: '#0e639c',
border: 'none',
borderRadius: '4px',
color: '#ffffff',
cursor: 'pointer'
}}
>
{locale === 'zh' ? '确定' : 'OK'}