limit homserver to not cover the whole loginview input with the string. (#2307)
This commit is contained in:
@@ -82,7 +82,12 @@ export const LoginPage: FC = () => {
|
|||||||
},
|
},
|
||||||
[login, location, history, homeserver, setClient],
|
[login, location, history, homeserver, setClient],
|
||||||
);
|
);
|
||||||
|
// we need to limit the length of the homserver name to not cover the whole loginview input with the string.
|
||||||
|
let shortendHomeserverName = Config.defaultServerName()?.slice(0, 25);
|
||||||
|
shortendHomeserverName =
|
||||||
|
shortendHomeserverName?.length !== Config.defaultServerName()?.length
|
||||||
|
? shortendHomeserverName + "..."
|
||||||
|
: shortendHomeserverName;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
@@ -102,7 +107,7 @@ export const LoginPage: FC = () => {
|
|||||||
autoCorrect="off"
|
autoCorrect="off"
|
||||||
autoCapitalize="none"
|
autoCapitalize="none"
|
||||||
prefix="@"
|
prefix="@"
|
||||||
suffix={`:${Config.defaultServerName()}`}
|
suffix={`:${shortendHomeserverName}`}
|
||||||
data-testid="login_username"
|
data-testid="login_username"
|
||||||
/>
|
/>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
|
|||||||
Reference in New Issue
Block a user