Skip to content

Commit

Permalink
refs #4961 Fix clipboard icon
Browse files Browse the repository at this point in the history
  • Loading branch information
h3poteto committed Jun 13, 2024
1 parent 4990a1c commit ba57228
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"sign_in": "Sign in",
"authorize": "Authorize",
"authorization_url": "Normally, the browser will open automatically, but if it doesn't, please open the following URL in your browser and approve it.",
"copy_authorization_url": "Copy authorization URL",
"authorization_code": "Authorization Code",
"authorization_helper": "Please paste the authorization code from your browser",
"without_code_authorize": "Please approve Whalebird in your browser, and after you approve it please authorize",
Expand Down
12 changes: 9 additions & 3 deletions renderer/components/accounts/New.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { db } from '@/db'
import { FormattedMessage, useIntl } from 'react-intl'
import { Alert, Button, Dialog, DialogBody, DialogHeader, IconButton, Input, Spinner, Typography } from '@material-tailwind/react'
import { invoke } from '@/utils/invoke'
import { FaPaperclip } from 'react-icons/fa6'
import { FaClipboard, FaPaperclip } from 'react-icons/fa6'

type NewProps = {
opened: boolean
Expand Down Expand Up @@ -183,8 +183,14 @@ export default function New(props: NewProps) {
<span className="whitespace-nowrap overflow-x-auto w-11/12 p-1 bg-gray-200 dark:bg-gray-800 no-scroll">
{appData.url}
</span>
<IconButton size="sm" variant="text" color="blue" onClick={() => copyText(appData.url)}>
<FaPaperclip className="text-xl" />
<IconButton
size="sm"
variant="text"
color="blue"
title={formatMessage({ id: 'accounts.copy_authorization_url' })}
onClick={() => copyText(appData.url)}
>
<FaClipboard className="text-xl" />
</IconButton>
</div>
{appData.session_token ? (
Expand Down

0 comments on commit ba57228

Please sign in to comment.