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