mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-19 07:55:25 +02:00
improvements
This commit is contained in:
parent
1d89927046
commit
7cedb6ab94
@ -2,7 +2,13 @@ import {ReactElement} from "react"
|
||||
import {MdContentCopy} from "react-icons/md"
|
||||
import {Link as RouterLink} from "react-router-dom"
|
||||
|
||||
import {ListItemButton, ListItemIcon, ListItemSecondaryAction, ListItemText} from "@mui/material"
|
||||
import {
|
||||
ListItemButton,
|
||||
ListItemIcon,
|
||||
ListItemSecondaryAction,
|
||||
ListItemText,
|
||||
useTheme,
|
||||
} from "@mui/material"
|
||||
|
||||
import {AliasTypeIndicator} from "~/components"
|
||||
import {AliasList} from "~/server-types"
|
||||
@ -15,6 +21,8 @@ export interface AliasesListItemProps {
|
||||
const getAddress = (alias: AliasList): string => `${alias.local}@${alias.domain}`
|
||||
|
||||
export default function AliasesListItem({alias, onCopy}: AliasesListItemProps): ReactElement {
|
||||
const theme = useTheme()
|
||||
|
||||
const isInCopyAddressMode = onCopy !== undefined
|
||||
const address = getAddress(alias)
|
||||
|
||||
@ -36,7 +44,14 @@ export default function AliasesListItem({alias, onCopy}: AliasesListItemProps):
|
||||
<ListItemIcon>
|
||||
<AliasTypeIndicator type={alias.type} />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={address} />
|
||||
<ListItemText
|
||||
primary={
|
||||
<>
|
||||
<span>{alias.local}</span>
|
||||
<span style={{opacity: 0.5}}>@{alias.domain}</span>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
{isInCopyAddressMode && (
|
||||
<ListItemSecondaryAction>
|
||||
<MdContentCopy />
|
||||
|
@ -61,6 +61,7 @@ export default function EnterDecryptionPassword(): ReactElement {
|
||||
<PasswordField
|
||||
key="password"
|
||||
fullWidth
|
||||
autoFocus
|
||||
name="password"
|
||||
id="password"
|
||||
label={t("components.EnterDecryptionPassword.form.password.label")}
|
||||
|
Loading…
x
Reference in New Issue
Block a user