simplify Copied xxx => Copied to clipboard

pull/1306/head
Audric Ackermann 5 years ago
parent e008dbd0d5
commit 9d4dff611f
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -1616,14 +1616,6 @@
"noContactsForGroup": { "noContactsForGroup": {
"message": "You don't have any contacts to start a group with." "message": "You don't have any contacts to start a group with."
}, },
"copiedPublicKey": {
"message": "Session ID copied",
"description": "A toast message telling the user that the key was copied"
},
"copiedChatId": {
"message": "Copied chat ID",
"description": "A toast message telling the user that the key was copied"
},
"copyMessage": { "copyMessage": {
"message": "Copy message text", "message": "Copy message text",
"description": "Button action that the user can click to copy their public keys" "description": "Button action that the user can click to copy their public keys"
@ -1720,13 +1712,8 @@
"message": "Please enter an open group URL", "message": "Please enter an open group URL",
"description": "Error message when no server url entered" "description": "Error message when no server url entered"
}, },
"copiedMnemonic": { "copiedToClipboard": {
"message": "Recovery phrase copied successfully", "message": "Copied to clipboard"
"description": "A toast message telling the user that the mnemonic seed was copied"
},
"copiedSessionID": {
"message": "Copied Session ID to clipboard",
"description": "A toast message telling the user that their Session ID was copied"
}, },
"passwordViewTitle": { "passwordViewTitle": {
"message": "Type In Your Password", "message": "Type In Your Password",

@ -2310,14 +2310,12 @@
copyPublicKey() { copyPublicKey() {
clipboard.writeText(this.id); clipboard.writeText(this.id);
const copiedMessage = this.isGroup() const copiedMessage = i18n('copiedToClipboard');
? i18n('copiedChatId')
: i18n('copiedPublicKey');
window.pushToast({ window.pushToast({
title: copiedMessage, title: copiedMessage,
type: 'success', type: 'success',
id: 'copiedPublicKey', id: 'copiedToClipboard',
}); });
}, },

@ -935,9 +935,9 @@
} }
window.pushToast({ window.pushToast({
title: i18n('copiedPublicKey'), title: i18n('copiedToClipboard'),
type: 'success', type: 'success',
id: 'copiedPublicKey', id: 'copiedToClipboard',
}); });
}, },

@ -14,7 +14,7 @@ import { Colors, LocalizerType } from '../types/Util';
import { import {
getBlockMenuItem, getBlockMenuItem,
getClearNicknameMenuItem, getClearNicknameMenuItem,
getCopyIdMenuItem, getCopyMenuItem,
getDeleteContactMenuItem, getDeleteContactMenuItem,
getDeleteMessagesMenuItem, getDeleteMessagesMenuItem,
getInviteContactMenuItem, getInviteContactMenuItem,
@ -210,7 +210,7 @@ export class ConversationListItem extends React.PureComponent<Props> {
onClearNickname, onClearNickname,
i18n i18n
)} )}
{getCopyIdMenuItem( {getCopyMenuItem(
isPublic, isPublic,
isRss, isRss,
type === 'group', type === 'group',

@ -305,9 +305,9 @@ export class EditProfileDialog extends React.Component<Props, State> {
window.clipboard.writeText(sessionID); window.clipboard.writeText(sessionID);
window.pushToast({ window.pushToast({
title: window.i18n('copiedSessionID'), title: window.i18n('copiedToClipboard'),
type: 'success', type: 'success',
id: 'copiedSessionID', id: 'copiedToClipboard',
}); });
} }

@ -304,7 +304,7 @@ export class ConversationHeader extends React.Component<Props> {
return ( return (
<ContextMenu id={triggerId}> <ContextMenu id={triggerId}>
{this.renderPublicMenuItems()} {this.renderPublicMenuItems()}
{Menu.getCopyIdMenuItem( {Menu.getCopyMenuItem(
isPublic, isPublic,
isRss, isRss,
isGroup, isGroup,

@ -213,7 +213,7 @@ export class SessionSeedModal extends React.Component<Props, State> {
window.clipboard.writeText(seed); window.clipboard.writeText(seed);
window.pushToast({ window.pushToast({
title: window.i18n('copiedMnemonic'), title: window.i18n('copiedToClipboard'),
type: 'success', type: 'success',
id: 'copySeedToast', id: 'copySeedToast',
}); });

Loading…
Cancel
Save