mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(core): remove attachment tooltip (#12467)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a tooltip to the delete icon for attachments, displaying a localized description when hovered. - **Documentation** - Updated English localization to include a tooltip label for deleting attachments. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -131,12 +131,18 @@ const AttachmentItem: React.FC<AttachmentItemProps> = ({
|
||||
<PersistedItem attachment={attachment} />
|
||||
) : null}
|
||||
<div className={attachmentOperation}>
|
||||
<CloseIcon
|
||||
data-testid="workspace-embedding-setting-attachment-delete-button"
|
||||
onClick={handleDelete}
|
||||
color={cssVarV2('icon/primary')}
|
||||
style={{ cursor: 'pointer' }}
|
||||
/>
|
||||
<Tooltip
|
||||
content={t[
|
||||
'com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.tooltip'
|
||||
]()}
|
||||
>
|
||||
<CloseIcon
|
||||
data-testid="workspace-embedding-setting-attachment-delete-button"
|
||||
onClick={handleDelete}
|
||||
color={cssVarV2('icon/primary')}
|
||||
style={{ cursor: 'pointer' }}
|
||||
/>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -6263,6 +6263,10 @@ export function useAFFiNEI18N(): {
|
||||
* `Attachment will be removed. AI will not continue to extract content from this attachment.`
|
||||
*/
|
||||
["com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.description"](): string;
|
||||
/**
|
||||
* `Delete File`
|
||||
*/
|
||||
["com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.tooltip"](): string;
|
||||
/**
|
||||
* `Sharing doc requires AFFiNE Cloud.`
|
||||
*/
|
||||
|
||||
@@ -1565,6 +1565,7 @@
|
||||
"com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.description": "The uploaded file will be embedded in the current workspace.",
|
||||
"com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.title": "Remove the attachment from embedding?",
|
||||
"com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.description": "Attachment will be removed. AI will not continue to extract content from this attachment.",
|
||||
"com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.tooltip": "Delete File",
|
||||
"com.affine.share-menu.EnableCloudDescription": "Sharing doc requires AFFiNE Cloud.",
|
||||
"com.affine.share-menu.ShareMode": "Share mode",
|
||||
"com.affine.share-menu.SharePage": "Share doc",
|
||||
|
||||
Reference in New Issue
Block a user