Skip to content

A local-first personal finance app

Make password login page more mobile responsive (#4266)

Matt Fiddaman0c1c8e6adb9c
diff --git a/packages/desktop-client/src/components/manager/subscribe/Login.tsx b/packages/desktop-client/src/components/manager/subscribe/Login.tsx
index 299c284002..336ce64de2 100644
--- a/packages/desktop-client/src/components/manager/subscribe/Login.tsx
+++ b/packages/desktop-client/src/components/manager/subscribe/Login.tsx
@@ -19,6 +19,7 @@ import { Link } from '../../common/Link';
import { Select } from '../../common/Select';
import { Text } from '../../common/Text';
import { View } from '../../common/View';
+import { useResponsive } from '../../responsive/ResponsiveProvider';
import { useAvailableLoginMethods, useLoginMethod } from '../../ServerContext';
import { useBootstrapped, Title } from './common';
@@ -28,6 +29,7 @@ function PasswordLogin({ setError, dispatch }) {
const [password, setPassword] = useState('');
const [loading, setLoading] = useState(false);
const { t } = useTranslation();
+ const { isNarrowWidth } = useResponsive();
async function onSubmitPassword() {
if (password === '' || loading) {
@@ -50,19 +52,25 @@ function PasswordLogin({ setError, dispatch }) {
}
return (
- <View style={{ flexDirection: 'row', marginTop: 5 }}>
+ <View
+ style={{
+ flexDirection: isNarrowWidth ? 'column' : 'row',
+ marginTop: 5,
+ gap: '1rem',
+ }}
+ >
<BigInput
autoFocus={true}
placeholder={t('Password')}
type="password"
onChangeValue={newValue => setPassword(newValue)}
- style={{ flex: 1, marginRight: 10 }}
+ style={{ flex: 1 }}
onEnter={onSubmitPassword}
/>
<ButtonWithLoading
variant="primary"
isLoading={loading}
- style={{ fontSize: 15, width: 170 }}
+ style={{ fontSize: 15, width: isNarrowWidth ? '100%' : 170 }}
onPress={onSubmitPassword}
>
<Trans>Sign in</Trans>
diff --git a/upcoming-release-notes/4266.md b/upcoming-release-notes/4266.md
new file mode 100644
index 0000000000..bc6b618908
--- /dev/null
+++ b/upcoming-release-notes/4266.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [matt-fidd]
+---
+
+Make password login page more mobile responsive