Skip to content

Commit

Permalink
feat: app zoom out on small screens (#2708)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnthecat authored Nov 21, 2024
1 parent 424cd63 commit b7d4f38
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import logo from './assets/logo.svg';

export const ElectronSplashScreen = () => {
return (
<div className="flex h-screen w-screen items-center justify-center duration-500 animate-in fade-in">
<div className="flex h-full w-screen items-center justify-center duration-500 animate-in fade-in">
<img src={logo} />
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const WebSplashScreen = () => {
}, []);

return (
<div className="flex h-screen w-full items-center justify-center p-4 font-manrope duration-500 animate-in fade-in">
<div className="flex h-full w-full items-center justify-center p-4 font-manrope duration-500 animate-in fade-in">
<div className="fixed -top-[1100px] left-[50%] h-[1140px] w-[1140px] -translate-x-[50%] rounded-full bg-[#FF57E4] blur-[215px]" />
<div className="z-10 flex flex-col items-center gap-[86px]">
<div className="flex items-center gap-[88px]">
Expand Down
9 changes: 9 additions & 0 deletions src/renderer/app/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,24 @@

html, body {
width: 100%;
max-height: 100%;
height: 100%;
overflow: hidden;
transition: max-height 0.5s ease-in-out;
}

body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

@media (max-aspect-ratio: 32 / 25) and (width < 1024px) {
html, body {
max-height: 800px;
}
}


/* Scrollbar for Firefox */
* {
scrollbar-width: thin;
Expand Down
5 changes: 3 additions & 2 deletions src/renderer/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">

<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- This tag commented on purpose - that's the way to "support" mobile devices-->
<!-- <meta name="viewport" content="width=device-width, initial-scale=1" />-->
<meta name="theme-color" content="#7b29ff" />
<meta name="title" content="Nova Spektr" />
<meta name="description" content="Enterprise desktop wallet for Polkadot supporting multisigs, staking, light clients and more" />
Expand All @@ -38,6 +39,6 @@
<title>Nova Spektr</title>
</head>
<body>
<div id="app" class="text-body"></div>
<div id="app" class="text-body h-full overflow-hidden"></div>
</body>
</html>
2 changes: 1 addition & 1 deletion src/renderer/features/app-shell/components/AppShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const AppShell = memo(() => {
const headerNodes = useSlot(navigationHeaderSlot);

return (
<div className="flex h-screen animate-in fade-in">
<div className="flex h-full animate-in fade-in">
<aside className="flex w-[240px] shrink-0 flex-col gap-y-6 border-r border-r-container-border bg-left-navigation-menu-background p-4">
{headerNodes}
<Navigation />
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/pages/Onboarding/Welcome/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const Welcome = () => {
}, []);

return (
<div className="flex h-screen w-full animate-in fade-in">
<div className="flex h-full w-full animate-in fade-in">
<div className="flex h-full w-[512px] flex-col p-10">
<TitleText className="mb-8">{t('onboarding.welcome.title')}</TitleText>

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/shared/ui/FallbackScreen/FallbackScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const FallbackScreen = () => {
const { t } = useI18n();

return (
<main className="flex h-screen flex-col items-center justify-center gap-4 bg-cover">
<main className="flex h-full flex-col items-center justify-center gap-4 bg-cover">
<Icon as="img" name="computer" size={172} />
<BodyText className="text-text-tertiary">{t('fallbackScreen.message')}</BodyText>
<Button onClick={() => window.location.reload()}>{t('fallbackScreen.reloadButton')}</Button>
Expand Down

0 comments on commit b7d4f38

Please sign in to comment.