From dcc04bb10fa0285e6dffb00407af3839e26bdf04 Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Thu, 11 Apr 2024 11:16:45 +0200 Subject: [PATCH] limit homserver to not cover the whole loginview input with the string. (#2307) --- src/auth/LoginPage.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/auth/LoginPage.tsx b/src/auth/LoginPage.tsx index 188341a3..167d30b2 100644 --- a/src/auth/LoginPage.tsx +++ b/src/auth/LoginPage.tsx @@ -82,7 +82,12 @@ export const LoginPage: FC = () => { }, [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 ( <>