feat: Preferences view layout on mobile has been updated, and can be dismissed by swiping from the right

This commit is contained in:
Aman Harwara
2023-05-17 19:42:08 +05:30
parent 7b44224314
commit e5c580deab
18 changed files with 114 additions and 79 deletions

View File

@@ -77,7 +77,7 @@ const Privacy: FunctionComponent<Props> = ({ application }: Props) => {
<PreferencesSegment>
<Title>Privacy</Title>
<div>
<div className="flex items-center justify-between">
<div className="flex justify-between gap-2 md:items-center">
<div className="flex flex-col">
<Subtitle>Session user agent logging</Subtitle>
<Text>
@@ -87,7 +87,7 @@ const Privacy: FunctionComponent<Props> = ({ application }: Props) => {
</Text>
</div>
{isLoading ? (
<Spinner className="ml-2 flex-shrink-0" />
<Spinner className="h-5 w-5 flex-shrink-0" />
) : (
<Switch
onChange={toggleSessionLogging}

View File

@@ -91,14 +91,12 @@ const TwoFactorAuthView: FunctionComponent<Props> = ({ auth, application }) => {
<>
<PreferencesGroup>
<PreferencesSegment>
<div className="flex flex-row items-center">
<div className="flex flex-row gap-2 md:items-center">
<div className="flex flex-grow flex-col">
<TwoFactorTitle auth={auth} />
<TwoFactorDescription auth={auth} />
</div>
<div className="flex min-w-15 flex-col items-center justify-center">
<TwoFactorSwitch auth={auth} />
</div>
<TwoFactorSwitch auth={auth} />
</div>
</PreferencesSegment>