mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08: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} />
|
<PersistedItem attachment={attachment} />
|
||||||
) : null}
|
) : null}
|
||||||
<div className={attachmentOperation}>
|
<div className={attachmentOperation}>
|
||||||
<CloseIcon
|
<Tooltip
|
||||||
data-testid="workspace-embedding-setting-attachment-delete-button"
|
content={t[
|
||||||
onClick={handleDelete}
|
'com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.tooltip'
|
||||||
color={cssVarV2('icon/primary')}
|
]()}
|
||||||
style={{ cursor: 'pointer' }}
|
>
|
||||||
/>
|
<CloseIcon
|
||||||
|
data-testid="workspace-embedding-setting-attachment-delete-button"
|
||||||
|
onClick={handleDelete}
|
||||||
|
color={cssVarV2('icon/primary')}
|
||||||
|
style={{ cursor: 'pointer' }}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6263,6 +6263,10 @@ export function useAFFiNEI18N(): {
|
|||||||
* `Attachment will be removed. AI will not continue to extract content from this attachment.`
|
* `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;
|
["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.`
|
* `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.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.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.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.EnableCloudDescription": "Sharing doc requires AFFiNE Cloud.",
|
||||||
"com.affine.share-menu.ShareMode": "Share mode",
|
"com.affine.share-menu.ShareMode": "Share mode",
|
||||||
"com.affine.share-menu.SharePage": "Share doc",
|
"com.affine.share-menu.SharePage": "Share doc",
|
||||||
|
|||||||
Reference in New Issue
Block a user