From 1352feca21fb80f792474538befaf4bc2a1cd4ad Mon Sep 17 00:00:00 2001 From: Jorik Schellekens Date: Wed, 16 Sep 2020 13:58:14 +0100 Subject: [PATCH] design nitpicks --- src/App.tsx | 4 ++++ src/components/Avatar.scss | 10 +++++++--- src/components/ClientTile.scss | 6 ++++-- src/components/HomeserverOptions.tsx | 14 ++++++-------- src/components/Input.tsx | 10 +++++----- src/components/InviteTile.scss | 8 +++++++- src/components/InviteTile.tsx | 4 ++-- src/components/RoomPreview.scss | 7 +++---- src/components/RoomPreview.tsx | 6 +++++- src/components/TextButton.scss | 6 +++++- src/components/Toggle.scss | 4 ++++ src/components/UserPreview.scss | 5 ++--- src/components/UserPreview.tsx | 6 +++++- src/pages/LinkRouter.tsx | 12 ++++++++++-- 14 files changed, 69 insertions(+), 33 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 46e5698..164190c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -36,8 +36,12 @@ const App: React.FC = () => { ); + // Some hacky uri decoding + location.href = decodeURIComponent(location.href); + const [hash, setHash] = useState(location.hash); + console.log(hash); useEffect(() => (window.onhashchange = () => setHash(location.hash)), []); if (hash) { diff --git a/src/components/Avatar.scss b/src/components/Avatar.scss index 7895a82..794064a 100644 --- a/src/components/Avatar.scss +++ b/src/components/Avatar.scss @@ -14,11 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -@import "../color-scheme"; +@import '../color-scheme'; .avatar { border-radius: 100%; border: 1px solid $borders; - height: 50px; - width: 50px; + height: 60px; + width: 60px; +} + +.avatarNoCrop { + border-radius: 0; } diff --git a/src/components/ClientTile.scss b/src/components/ClientTile.scss index 2beb41a..996c56f 100644 --- a/src/components/ClientTile.scss +++ b/src/components/ClientTile.scss @@ -45,12 +45,14 @@ limitations under the License. } p { - margin-right: 20px; + margin-right: 8px; text-align: left; } .button { - width: 50%; + height: 40px; + width: 130px; + margin-top: 16px; } } diff --git a/src/components/HomeserverOptions.tsx b/src/components/HomeserverOptions.tsx index 23a5a6e..ab30a3c 100644 --- a/src/components/HomeserverOptions.tsx +++ b/src/components/HomeserverOptions.tsx @@ -41,7 +41,8 @@ function validateURL(values: FormValues): Partial { try { string().url().parse(values.HSUrl); } catch { - errors.HSUrl = 'This must be a valid url'; + errors.HSUrl = + 'This must be a valid homeserver URL, starting with https://'; } return errors; } @@ -74,7 +75,7 @@ const HomeserverOptions: React.FC = ({ link }: IProps) => { muted={!values.HSUrl} type="text" name="HSUrl" - placeholder="https://example.com" + placeholder="Preferred homeserver URL" /> {values.HSUrl && !errors.HSUrl ? (