Compare commits

..
Author SHA1 Message Date
Matthew Russell a688041b4c chore: upgrade to 1.0.1 2024-02-09 12:20:30 -08:00
Matthew Russell 50e6052427 chore: update snap to 1.0.0 2024-02-09 12:19:17 -08:00
8 changed files with 52 additions and 20 deletions

No files matched your search

+13 -6
View File
@@ -1,20 +1,27 @@
import { TinyScroll } from '@vegaprotocol/ui-toolkit';
import { useEffect } from 'react';
import { titlefy } from '@vegaprotocol/utils';
import { ErrorBoundary } from '../../components/error-boundary';
import { FeesContainer } from '../../components/fees-container';
import { useT } from '../../lib/use-t';
import { usePageTitle } from '../../lib/hooks/use-page-title';
import { usePageTitleStore } from '../../stores';
export const Fees = () => {
const t = useT();
const title = t('Fees');
usePageTitle(title);
const { updateTitle } = usePageTitleStore((store) => ({
updateTitle: store.updateTitle,
}));
useEffect(() => {
updateTitle(titlefy([title]));
}, [updateTitle, title]);
return (
<ErrorBoundary feature="fees">
<TinyScroll className="p-4 max-h-full overflow-auto">
<h1 className="md:px-4 pb-4 text-2xl">{title}</h1>
<div className="container p-4 mx-auto">
<h1 className="px-4 pb-4 text-2xl">{title}</h1>
<FeesContainer />
</TinyScroll>
</div>
</ErrorBoundary>
);
};
@@ -1,3 +1,5 @@
import React, { useEffect } from 'react';
import { titlefy } from '@vegaprotocol/utils';
import {
LocalStoragePersistTabs as Tabs,
Tab,
@@ -5,6 +7,7 @@ import {
} from '@vegaprotocol/ui-toolkit';
import { OpenMarkets } from './open-markets';
import { Proposed } from './proposed';
import { usePageTitleStore } from '../../stores';
import { Closed } from './closed';
import {
DApp,
@@ -14,14 +17,19 @@ import {
import { useT } from '../../lib/use-t';
import { ErrorBoundary } from '../../components/error-boundary';
import { MarketsSettings } from './markets-settings';
import { usePageTitle } from '../../lib/hooks/use-page-title';
export const MarketsPage = () => {
const t = useT();
const { updateTitle } = usePageTitleStore((store) => ({
updateTitle: store.updateTitle,
}));
const governanceLink = useLinks(DApp.Governance);
const externalLink = governanceLink(TOKEN_NEW_MARKET_PROPOSAL);
usePageTitle(t('Markets'));
useEffect(() => {
updateTitle(titlefy([t('Markets')]));
}, [updateTitle, t]);
return (
<div className="h-full pt-0.5 pb-3 px-1.5">
@@ -1,8 +1,10 @@
import { useEffect } from 'react';
import type { ReactNode } from 'react';
import { LayoutPriority } from 'allotment';
import { titlefy } from '@vegaprotocol/utils';
import { useIncompleteWithdrawals } from '@vegaprotocol/withdraws';
import { Tab, LocalStoragePersistTabs as Tabs } from '@vegaprotocol/ui-toolkit';
import { usePageTitleStore } from '../../stores';
import {
AccountsContainer,
AccountsSettings,
@@ -39,7 +41,6 @@ import { WithdrawalsMenu } from '../../components/withdrawals-menu';
import { useGetCurrentRouteId } from '../../lib/hooks/use-get-current-route-id';
import { useT } from '../../lib/use-t';
import { ErrorBoundary } from '../../components/error-boundary';
import { usePageTitle } from '../../lib/hooks/use-page-title';
const WithdrawalsIndicator = () => {
const { ready } = useIncompleteWithdrawals();
@@ -68,7 +69,14 @@ const SidebarViewInitializer = () => {
export const Portfolio = () => {
const t = useT();
usePageTitle(t('Portfolio'));
const { updateTitle } = usePageTitleStore((store) => ({
updateTitle: store.updateTitle,
}));
useEffect(() => {
updateTitle(titlefy([t('Portfolio')]));
}, [updateTitle, t]);
const [sizes, handleOnLayoutChange] = usePaneLayout({ id: 'portfolio' });
const wrapperClasses = 'p-0.5 h-full max-h-full flex flex-col';
+11 -5
View File
@@ -1,18 +1,24 @@
import { TinyScroll } from '@vegaprotocol/ui-toolkit';
import { useEffect } from 'react';
import { titlefy } from '@vegaprotocol/utils';
import { useT } from '../../lib/use-t';
import { RewardsContainer } from '../../components/rewards-container';
import { usePageTitleStore } from '../../stores';
import { ErrorBoundary } from '../../components/error-boundary';
import { usePageTitle } from '../../lib/hooks/use-page-title';
import { TinyScroll } from '@vegaprotocol/ui-toolkit';
export const Rewards = () => {
const t = useT();
const title = t('Rewards');
usePageTitle(title);
const { updateTitle } = usePageTitleStore((store) => ({
updateTitle: store.updateTitle,
}));
useEffect(() => {
updateTitle(titlefy([title]));
}, [updateTitle, title]);
return (
<ErrorBoundary feature="rewards">
<TinyScroll className="p-4 max-h-full overflow-auto">
<h1 className="md:px-4 pb-4 text-2xl">{title}</h1>
<h1 className="px-4 pb-4 text-2xl">{title}</h1>
<RewardsContainer />
</TinyScroll>
</ErrorBoundary>
@@ -4,6 +4,7 @@ import {
ExternalLink,
Intent,
NotificationBanner,
SHORT,
} from '@vegaprotocol/ui-toolkit';
import type { StoredNextProtocolUpgradeData } from '../lib';
import {
@@ -69,7 +70,7 @@ export const ProtocolUpgradeInProgressNotification = () => {
if (!upgradeInProgress) return null;
return (
<NotificationBanner intent={Intent.Danger}>
<NotificationBanner intent={Intent.Danger} className={SHORT}>
<div className="uppercase">
{t('The network is being upgraded to {{vegaReleaseTag}}', {
vegaReleaseTag,
@@ -4,6 +4,8 @@ import { Intent } from '../../utils/intent';
import { Icon, VegaIcon, VegaIconNames } from '../icon';
import type { HTMLAttributes } from 'react';
export const SHORT = '!px-1 !py-1 min-h-fit';
interface NotificationBannerProps {
intent?: Intent;
children?: React.ReactNode;
@@ -21,7 +23,7 @@ export const NotificationBanner = ({
return (
<div
className={classNames(
'flex items-center border-b pl-3 pr-2',
'flex items-center border-b px-2',
'text-xs leading-tight font-normal',
{
'bg-vega-light-100 dark:bg-vega-dark-100 ': intent === Intent.None,
@@ -1,4 +1,4 @@
import { NotificationBanner } from '../notification-banner';
import { NotificationBanner, SHORT } from '../notification-banner';
import { Intent } from '../../utils/intent';
import { TradingButton } from '../trading-button';
import { useT } from '../../use-t';
@@ -23,7 +23,7 @@ export const ViewingAsBanner = ({
}: ViewingAsBannerProps) => {
const t = useT();
return (
<NotificationBanner>
<NotificationBanner intent={Intent.None} className={SHORT}>
<div className="flex items-baseline justify-between">
<span data-testid="view-banner">
{t('Viewing as Vega user: {{pubKey}}', {
+1 -1
View File
@@ -41,7 +41,7 @@ const ethereumRequest = <T>(args: RequestArguments): Promise<T> => {
export const LOCAL_SNAP_ID = 'local:http://localhost:8080';
export const DEFAULT_SNAP_ID = 'npm:@vegaprotocol/snap';
export const DEFAULT_SNAP_VERSION = '0.3.1';
export const DEFAULT_SNAP_VERSION = '1.0.1';
type GetSnapsResponse = Record<string, Snap>;