Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new links to settings and better connection icon #419

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/ui/assets/premium.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/ui/pages/Overview/ConnectionHeader/ConnectionHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { useMutation, useQuery } from '@tanstack/react-query';
import SettingsIcon from 'jsx:src/ui/assets/filters.svg';
import GlobeIcon from 'jsx:src/ui/assets/globe.svg';
import { invariant } from 'src/shared/invariant';
import { PauseInjectionControl } from 'src/ui/components/PauseInjection';
import { PausedHeader, usePausedData } from 'src/ui/components/PauseInjection';
Expand Down Expand Up @@ -138,7 +138,7 @@ export function ConnectionHeader() {
}}
disabled={!tabData}
>
<SettingsIcon
<GlobeIcon
style={{
display: 'block',
width: 20,
Expand Down
62 changes: 61 additions & 1 deletion src/ui/pages/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ import { ViewSuspense } from 'src/ui/components/ViewSuspense';
import { accountPublicRPCPort } from 'src/ui/shared/channels';
import { HStack } from 'src/ui/ui-kit/HStack';
import { Media } from 'src/ui/ui-kit/Media';
import { SurfaceList } from 'src/ui/ui-kit/SurfaceList';
import { SurfaceItemAnchor, SurfaceList } from 'src/ui/ui-kit/SurfaceList';
import { Toggle } from 'src/ui/ui-kit/Toggle';
import { UIText } from 'src/ui/ui-kit/UIText';
import { VStack } from 'src/ui/ui-kit/VStack';
import WalletIcon from 'jsx:src/ui/assets/wallet.svg';
import LockIcon from 'jsx:src/ui/assets/lock.svg';
import GlobeIcon from 'jsx:src/ui/assets/globe.svg';
import SettingsIcon from 'jsx:src/ui/assets/settings.svg';
import QuestionIcon from 'jsx:src/ui/assets/question-hint.svg';
import RocketIcon from 'jsx:src/ui/assets/rocket-outline.svg';
import PremiumIcon from 'jsx:src/ui/assets/premium.svg';
import DarkModeLampIcon from 'jsx:src/ui/assets/dark-mode-lamp.svg';
import NetworksIcon from 'jsx:src/ui/assets/network.svg';
import SecurityIcon from 'jsx:src/ui/assets/security.svg';
Expand Down Expand Up @@ -126,6 +129,63 @@ function SettingsMain() {
},
{
key: 8,
pad: false,
style: { paddingInline: 0 },
component: (
<SurfaceItemAnchor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be shown only to non-premium wallets. However, it is not obvious how to check premium status in global menu related to all addresses.

href="http://zerion.io/premium"
target="_blank"
rel="noopener noreferrer"
>
<AngleRightRow kind="link">
<HStack gap={8} alignItems="center">
<PremiumIcon />
<UIText kind="body/regular">Zerion Premium</UIText>
</HStack>
</AngleRightRow>
</SurfaceItemAnchor>
),
},
{
key: 9,
pad: false,
style: { paddingInline: 0 },
component: (
<SurfaceItemAnchor
href="https://app.getbeamer.com/zerion/en?category=extension"
target="_blank"
rel="noopener noreferrer"
>
<AngleRightRow kind="link">
<HStack gap={8} alignItems="center">
<RocketIcon />
<UIText kind="body/regular">What's New</UIText>
</HStack>
</AngleRightRow>
</SurfaceItemAnchor>
),
},
{
key: 10,
pad: false,
style: { paddingInline: 0 },
component: (
<SurfaceItemAnchor
href="https://help.zerion.io/en/collections/5525626-zerion-extension"
target="_blank"
rel="noopener noreferrer"
>
<AngleRightRow kind="link">
<HStack gap={8} alignItems="center">
<QuestionIcon style={{ width: 24, height: 24 }} />
<UIText kind="body/regular">Help & Support</UIText>
</HStack>
</AngleRightRow>
</SurfaceItemAnchor>
),
},
{
key: 11,
onClick: async () => {
await logout.mutateAsync();
navigate('/login');
Expand Down
Loading