* Playthrough with top navigation * Sycky, but navigation works... * Adjust * grouping * It works, but is not great * Cleanups * Cleanups * hover color * Highlights * Highlights, part 2 * Background to body * Small adjustments (size, items) * Localize Modal/route switching * Remove light/full mode * Flatter single-entry menus * Adjustments for single-enrties (e.g. Kulupu) * Display NodeInfo * Misc * Content & Tabs sizing * Tab counters as bubbles * Alignment * Tabs styling * Adjust font color to defaults * Small tabs menu color adjustments * ... the previous, again, adjusted * Display Wiki/Github links * ar motions * Adjust Endpoints location * Ensure content grows to available height * Adjust tabs * Menu background adjustment * Adjust popup colors * Adjust highlights * Sligh breathing room * Adaptive header background * 2/3 * Adaptive is ok... for now. * Back to black... erm, gray * Lighten * Touchups. Stop playin, it is ok... * Sides readability * Cleanups. * Adjust. * Overall adjustments (theme). Fix Tag yellow. * Ok. Done. * Ship it.
55 lines
1.6 KiB
TypeScript
55 lines
1.6 KiB
TypeScript
// Copyright 2017-2020 @polkadot/apps authors & contributors
|
|
// This software may be modified and distributed under the terms
|
|
// of the Apache-2.0 license. See the LICENSE file for details.
|
|
|
|
import { BareProps as Props } from '@polkadot/react-components/types';
|
|
|
|
import React, { useMemo } from 'react';
|
|
import styled from 'styled-components';
|
|
import AccountSidebar from '@polkadot/app-accounts/Sidebar';
|
|
import { getSystemChainColor } from '@polkadot/apps-config/ui';
|
|
import { defaultColor } from '@polkadot/apps-config/ui/general';
|
|
import GlobalStyle from '@polkadot/react-components/styles';
|
|
import { useApi } from '@polkadot/react-hooks';
|
|
import Signer from '@polkadot/react-signer';
|
|
|
|
import ConnectingOverlay from './overlays/Connecting';
|
|
import Content from './Content';
|
|
import Menu from './Menu';
|
|
import WarmUp from './WarmUp';
|
|
|
|
export const PORTAL_ID = 'portals';
|
|
|
|
function Apps ({ className = '' }: Props): React.ReactElement<Props> {
|
|
const { systemChain, systemName } = useApi();
|
|
|
|
const uiHighlight = useMemo(
|
|
() => getSystemChainColor(systemChain, systemName),
|
|
[systemChain, systemName]
|
|
);
|
|
|
|
return (
|
|
<>
|
|
<GlobalStyle uiHighlight={defaultColor || uiHighlight} />
|
|
<div className={`apps--Wrapper theme--default ${className}`}>
|
|
<Menu />
|
|
<AccountSidebar>
|
|
<Signer>
|
|
<Content />
|
|
</Signer>
|
|
<ConnectingOverlay />
|
|
<div id={PORTAL_ID} />
|
|
</AccountSidebar>
|
|
</div>
|
|
<WarmUp />
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default React.memo(styled(Apps)`
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
`);
|