* 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
30 lines
747 B
TypeScript
30 lines
747 B
TypeScript
// Copyright 2017-2025 @polkadot/apps-routing authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { ApiPromise } from '@polkadot/api';
|
|
import type { Route, TFunction } from './types.js';
|
|
|
|
import Component from '@polkadot/app-staking-async';
|
|
|
|
function needsApiCheck (api: ApiPromise): boolean {
|
|
try {
|
|
return !!((api.tx.stakingAhClient) || (api.tx.staking && api.tx.stakingRcClient));
|
|
} catch {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
export default function create (t: TFunction): Route {
|
|
return {
|
|
Component,
|
|
display: {
|
|
needsApi: [],
|
|
needsApiCheck
|
|
},
|
|
group: 'network',
|
|
icon: 'certificate',
|
|
name: 'staking-async',
|
|
text: t('nav.staking-async', 'Staking Async', { ns: 'apps-routing' })
|
|
};
|
|
}
|