Skip to content

Commit

Permalink
Update desktop layout
Browse files Browse the repository at this point in the history
  • Loading branch information
KuznetsovNikita committed Mar 5, 2024
1 parent 3da4051 commit 59a32f3
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 16 deletions.
28 changes: 15 additions & 13 deletions apps/desktop/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ const ThemeAndContent = () => {
);
};

const FullSizeWrapper = styled(Container)``;
const FullSizeWrapper = styled(Container)`
max-width: 800px;
`;

const Wrapper = styled.div`
box-sizing: border-box;
Expand Down Expand Up @@ -210,6 +212,8 @@ const SecondColumn = styled.div`
const FullSizeWrapperBounded = styled(FullSizeWrapper)`
max-height: 100%;
overflow: auto;
justify-content: center;
`;

export const Loader: FC = () => {
Expand Down Expand Up @@ -304,18 +308,16 @@ export const Content: FC<{

if (!activeWallet || location.pathname.startsWith(AppRoute.import)) {
return (
<FullSizeWrapperBounded>
<Suspense fallback={<Loading />}>
<InitializeContainer fullHeight={false}>
<Routes>
<Route
path={any(AppRoute.import)}
element={<ImportRouter listOfAuth={listOfAuth} />}
/>
<Route path="*" element={<Initialize />} />
</Routes>
</InitializeContainer>
</Suspense>
<FullSizeWrapperBounded className="full-size-wrapper">
<InitializeContainer fullHeight={false}>
<Routes>
<Route
path={any(AppRoute.import)}
element={<ImportRouter listOfAuth={listOfAuth} />}
/>
<Route path="*" element={<Initialize />} />
</Routes>
</InitializeContainer>
</FullSizeWrapperBounded>
);
}
Expand Down
2 changes: 2 additions & 0 deletions apps/desktop/src/electron/cookieStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export class CookieStore extends Store {
Record<string, Record<string, Record<string, Cookie>>>
>(this.key);

if (!result) return;

Object.keys(result).forEach(domain => {
Object.keys(result[domain]).forEach(path => {
Object.keys(result[domain][path]).forEach(name => {
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/src/electron/mainWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export abstract class MainWindow {
icon: icon,
width: 1150,
minWidth: 1100,
height: 700,
minHeight: 600,
height: 750,
minHeight: 700,
resizable: isDev,
autoHideMenuBar: process.platform != 'darwin',
webPreferences: {
Expand Down
6 changes: 6 additions & 0 deletions packages/uikit/src/components/create/Words.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,12 @@ const Inputs = styled.div`
@media (max-width: 768px) {
grid-template-rows: repeat(24, minmax(0, 1fr));
}
${p =>
p.theme.displayType === 'full-width' &&
css`
grid-template-rows: repeat(8, minmax(0, 1fr));
`}
`;

const seeIfValidWord = (word: string) => {
Expand Down
10 changes: 9 additions & 1 deletion packages/uikit/src/pages/import/Initialize.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FC, PropsWithChildren, useState } from 'react';
import { FC, PropsWithChildren, useState } from 'react';
import styled, { css } from 'styled-components';
import { CenterContainer } from '../../components/Layout';
import { H1 } from '../../components/Text';
Expand All @@ -17,6 +17,14 @@ const Block = styled.div<{ fullHeight: boolean }>`
box-sizing: border-box;
position: relative;
${p =>
p.theme.displayType === 'full-width' &&
css`
height: auto;
min-height: unset;
position: static;
`}
${props =>
props.fullHeight
? css`
Expand Down
2 changes: 2 additions & 0 deletions packages/uikit/src/styles/globalStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export const GlobalStyleCss = css`
.win32 #body::-webkit-scrollbar,
.linux #body::-webkit-scrollbar,
.win32 .full-size-wrapper::-webkit-scrollbar,
.linux .full-size-wrapper::-webkit-scrollbar,
.win32 .notification-overlay::-webkit-scrollbar,
.linux .notification-overlay::-webkit-scrollbar,
.win32 .dialog-content::-webkit-scrollbar,
Expand Down

0 comments on commit 59a32f3

Please sign in to comment.