* feat: initialized staking-next page * feat: enhance staking-next page with dynamic tabs and translation support * feat: enabled payouts page for staking-next * feat: enabled pools page for staking-next * feat: enabled bags page for staking-next * fix: build errors * chore: added translation files * refactor: relay and system staking page * feat: enabled overview page for staking-next * feat: enabled actions page for staking-next * feat: enabled targets page for staking-next * feat: enabled query page for staking-next * feat: add Command Center component and integrate with Relay Staking Page * feat: limit event display to a maximum of 5 and adjust styling in Command Center * feat: display more info for relay command center * chore: added translations * refactor: relay section for command center * feat: storage fetch for ah api * feat: integrate Command Center into StakingApp routing * feat: add AssetHubSection component and update RelaySection styling * chore: added translation * feat: implement API check for staking-next route * feat: enhance AssetHubSection with detailed multiblock and staking summaries * chore: added translations * chore: delete folder * chore: added folders * feat: update layout and styling in CommandCenter components * feat: improve layout of relay chain and events summary in AssetHubSection * feat: add Slashes component to StakingApp and update TypeScript paths * feat: enhance CommandCenter with relay and para endpoints integration * feat: refactor CommandCenter to integrate relay and para endpoints with improved state management * feat: enhance AssetHubSection and RelaySection with API connection indicators * feat: enhance CommandCenter and RelaySection with children prop and dropdown for API selection * feat: improve API disconnection handling and reset state in CommandCenter * feat: improve command center API handling and enhance relay section styling * feat: add translations for Active Validators and All Validators in locale files * feat: update route path for targets to all-validators in StakingApp * feat: update README with details on Asset Hub migration and staking workflow changes * feat: update staking-related API references to use assetHubStakingClient and improve UI components * feat: rename stakign-next to staking-async * fix: pallets and events renaming * feat: enhance AssetHub and Relay sections with URL and relay chain support * fix: avoid duplication of events
70 lines
1.5 KiB
TypeScript
70 lines
1.5 KiB
TypeScript
// Copyright 2017-2025 @polkadot/app-staking-async authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { AppProps as Props } from '@polkadot/react-components/types';
|
|
|
|
import React from 'react';
|
|
|
|
import { styled } from '@polkadot/react-components';
|
|
import { useApi } from '@polkadot/react-hooks';
|
|
|
|
import StakingRelayApp from './Relay/index.js';
|
|
import StakingSystemApp from './System/index.js';
|
|
|
|
function StakingApp ({ basePath, className = '', onStatusChange }: Props): React.ReactElement<Props> {
|
|
const { api } = useApi();
|
|
|
|
return (
|
|
<StyledMain className={`${className} staking--App`}>
|
|
{api?.tx?.stakingAhClient
|
|
? (
|
|
<StakingRelayApp
|
|
basePath={basePath}
|
|
onStatusChange={onStatusChange}
|
|
/>
|
|
)
|
|
: (
|
|
<StakingSystemApp
|
|
basePath={basePath}
|
|
onStatusChange={onStatusChange}
|
|
/>
|
|
)
|
|
}
|
|
</StyledMain>
|
|
);
|
|
}
|
|
|
|
const StyledMain = styled.main`
|
|
.staking--Chart {
|
|
margin-top: 1.5rem;
|
|
|
|
h1 {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.ui--Spinner {
|
|
margin: 2.5rem auto;
|
|
}
|
|
}
|
|
|
|
.staking--optionsBar {
|
|
margin: 0.5rem 0 1rem;
|
|
text-align: center;
|
|
white-space: normal;
|
|
|
|
.staking--buttonToggle {
|
|
display: inline-block;
|
|
margin-right: 1rem;
|
|
margin-top: 0.5rem;
|
|
}
|
|
}
|
|
|
|
.ui--Expander.stakeOver {
|
|
.ui--Expander-summary {
|
|
color: var(--color-error);
|
|
}
|
|
}
|
|
`;
|
|
|
|
export default React.memo(StakingApp);
|