Skip to content

Commit

Permalink
auto connect toggle in manage tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Bulat committed Mar 5, 2024
1 parent 9e7d9fc commit 6eb24d7
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/library/Page/Wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export const Wrapper = styled.div`

export const PageContentWrapper = styled.div`
margin-top: 0.5rem;
max-width: 1100px;
max-width: 750px;
width: 100%;
> h2 {
color: var(--text-color-secondary);
color: var(--text-color-primary);
margin-bottom: 0.6rem;
}
`;
6 changes: 0 additions & 6 deletions src/library/Settings/Wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@

import styled from 'styled-components';

export const SettingsWrapper = styled.div`
margin-top: 0.5rem;
max-width: 750px;
width: 100%;
`;

export const SettingsHeaderWrapper = styled.div`
width: 100%;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2024 @rossbulat/console authors & contributors
// SPDX-License-Identifier: GPL-3.0-only

import { AutoConnectWrapper } from './Wrappers';
import { AutoConnectWrapper } from './Connect/Wrappers';
import { Switch } from 'library/Switch';
import { useTabs } from 'contexts/Tabs';

Expand Down
3 changes: 0 additions & 3 deletions src/screens/Default/Connect/Wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const AutoConnectWrapper = styled.div`
align-items: center;
margin-top: 0.45rem;
padding: 0 0.2rem;
max-width: 750px;
width: 100%;
> h4 {
Expand All @@ -20,7 +19,6 @@ export const AutoConnectWrapper = styled.div`
`;

export const SearchChainWrapper = styled.div`
max-width: 750px;
width: 100%;
`;

Expand All @@ -30,7 +28,6 @@ export const ChainListWrapper = styled.div`
display: flex;
flex-direction: column;
margin-top: 0.5rem;
max-width: 750px;
width: 100%;
> h4 {
Expand Down
7 changes: 4 additions & 3 deletions src/screens/Default/Connect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
// SPDX-License-Identifier: GPL-3.0-only

import { ChainList } from './ChainList';
import { AutoConnect } from './AutoConnect';
import { AutoConnect } from '../AutoConnect';
import { SearchChain } from './SearchChain';
import { PageContentWrapper } from 'library/Page/Wrapper';

export const Connect = () => (
<>
<PageContentWrapper>
<AutoConnect />
<SearchChain />
<ChainList />
</>
</PageContentWrapper>
);
15 changes: 9 additions & 6 deletions src/screens/Default/ManageTab/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
// Copyright 2024 @rossbulat/console authors & contributors
// SPDX-License-Identifier: GPL-3.0-only

import {
SettingsHeaderWrapper,
SettingsWrapper,
} from 'library/Settings/Wrappers';
import { SettingsHeaderWrapper } from 'library/Settings/Wrappers';
import { RenameTab } from './RenameTab';
import { PageContentWrapper } from 'library/Page/Wrapper';
import { AutoConnect } from '../AutoConnect';

export const ManageTab = () => (
<SettingsWrapper>
<PageContentWrapper>
<SettingsHeaderWrapper>
<h2>Manage Tab</h2>
<div>
<AutoConnect />
</div>
</SettingsHeaderWrapper>

<RenameTab />
</SettingsWrapper>
</PageContentWrapper>
);
6 changes: 3 additions & 3 deletions src/screens/Settings/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// Copyright 2024 @rossbulat/console authors & contributors
// SPDX-License-Identifier: GPL-3.0-only

import { SettingsWrapper } from 'library/Settings/Wrappers';
import { TagSettings } from './TagSettings';
import { useSection } from 'library/Page/provider';
import { TabSettings } from './TabSettings';
import { PageContentWrapper } from 'library/Page/Wrapper';

export const Settings = () => {
const { activeSection } = useSection();

return (
<SettingsWrapper>
<PageContentWrapper>
{activeSection === 0 && <TabSettings />}
{activeSection === 1 && <TagSettings />}
</SettingsWrapper>
</PageContentWrapper>
);
};

0 comments on commit 6eb24d7

Please sign in to comment.