diff --git a/src/app/components/Menu/MenuItemButton.tsx b/src/app/components/Menu/MenuItemButton.tsx index 76ff197396..4d93be5f9a 100644 --- a/src/app/components/Menu/MenuItemButton.tsx +++ b/src/app/components/Menu/MenuItemButton.tsx @@ -3,7 +3,6 @@ import { classNames } from "~/app/utils/index"; type Props = { children: React.ReactNode; - danger?: boolean; disabled?: boolean; onClick: () => void; title?: string; @@ -11,7 +10,6 @@ type Props = { function MenuItemButton({ children, - danger = false, disabled = false, onClick, title = "", @@ -21,10 +19,9 @@ function MenuItemButton({ {({ active }) => ( -

- {title} -

-

- {description} -

- - ); -} diff --git a/src/app/components/Tips/index.test.tsx b/src/app/components/Tips/index.test.tsx deleted file mode 100644 index 7c3ad24e94..0000000000 --- a/src/app/components/Tips/index.test.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import Tips from "@components/Tips"; -import { render, screen } from "@testing-library/react"; -import { I18nextProvider } from "react-i18next"; -import { MemoryRouter } from "react-router-dom"; -import i18n from "~/../tests/unit/helpers/i18n"; -import { TIPS } from "~/common/constants"; - -jest.mock("~/app/hooks/useTips", () => ({ - useTips: () => ({ - tips: Object.values(TIPS), - }), -})); - -describe("Tips", () => { - test("should have 3 tips", async () => { - render( - - - - - - ); - - expect(await screen.findByText("Alby Demo")).toBeInTheDocument(); - expect(await screen.findByText("Nostr")).toBeInTheDocument(); - }); -}); diff --git a/src/app/components/Tips/index.tsx b/src/app/components/Tips/index.tsx deleted file mode 100644 index 7c4dc70727..0000000000 --- a/src/app/components/Tips/index.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { useMemo } from "react"; -import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; -// import { useNavigate } from "react-router-dom"; -import TipCard from "~/app/components/TipCard"; -import { useAccount } from "~/app/context/AccountContext"; -import { useTips } from "~/app/hooks/useTips"; -import DemoTipCardIcon from "~/app/icons/DemoTipCardIcon"; -import MnemonicTipCardIcon from "~/app/icons/MnemonicTipCardIcon"; -import { classNames } from "~/app/utils"; -import { TIPS } from "~/common/constants"; - -export default function Tips() { - const { t } = useTranslation("translation", { - keyPrefix: "discover.tips", - }); - const accountContext = useAccount(); - const accountId = accountContext?.account?.id; - - const tipCardConfigs = useMemo( - () => - ({ - [TIPS.DEMO]: { - background: - "bg-white dark:bg-surface-02dp hover:bg-yellow-50 dark:hover:bg-yellow-900", - border: "border-yellow-500", - arrow: "text-yellow-500", - backgroundIcon: , - link: "https://getalby.com/demo", - }, - [TIPS.MNEMONIC]: { - background: - "bg-white dark:bg-surface-02dp hover:bg-purple-50 dark:hover:bg-purple-900", - border: "border-purple-500", - arrow: "text-purple-500", - backgroundIcon: , - link: `/accounts/${accountId}/nostr/setup`, - }, - }) as const, - [accountId] - ); - - // const navigate = useNavigate(); - - const { tips, closeTip } = useTips(); - - function hasTip(id: TIPS) { - return tips.includes(id); - } - - const tipElements = Object.values(TIPS) - .filter(hasTip) - .map((tip) => { - const config = tipCardConfigs[tip]; - const isExternal = config.link.startsWith("http"); - return ( - - { - closeTip(tip); - e.preventDefault(); - }} - title={t(`${tip}.title`)} - description={t(`${tip}.description`)} - className={classNames(config.background, config.border)} - arrowClassName={config.arrow} - backgroundIcon={config.backgroundIcon} - /> - - ); - }); - - return <>{tipElements}; -} diff --git a/src/app/components/UserMenu/index.tsx b/src/app/components/UserMenu/index.tsx index b1f40c2ceb..99475504a0 100644 --- a/src/app/components/UserMenu/index.tsx +++ b/src/app/components/UserMenu/index.tsx @@ -1,17 +1,17 @@ -import { - GearIcon, - LockIcon, - MagicWandIcon, - MenuIcon, - RocketIcon, - WalletIcon, -} from "@bitcoin-design/bitcoin-icons-react/filled"; +import { MenuIcon } from "@bitcoin-design/bitcoin-icons-react/filled"; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { useAccount } from "~/app/context/AccountContext"; -import { ConnectedSiteIcon, HelpIcon } from "~/app/icons"; +import { ConnectedSiteIcon } from "~/app/icons"; import utils from "~/common/lib/utils"; +import { + PopiconsBulbLine, + PopiconsCogLine, + PopiconsCommentLine, + PopiconsExpandLine, + PopiconsLockLine, +} from "@popicons/react"; import Menu from "../Menu"; export default function UserMenu() { @@ -42,43 +42,34 @@ export default function UserMenu() { return ( - +
{ - openOptions("discover"); + openOptions("wallet"); }} > - - {tCommon("discover")} + + {tCommon("full_screen")} { openOptions("publishers"); }} > - + {tCommon("connected_sites")} - { - openOptions("wallet"); - }} - > - - {tCommon("wallet")} - -
{ openOptions("settings"); }} > - + {tCommon("settings")} - + {tCommon("feedback")} + { utils.openUrl( @@ -96,12 +88,12 @@ export default function UserMenu() { ); }} > - + {tCommon("help")} - + - + {tCommon("actions.lock")}
diff --git a/src/app/hooks/useTips.ts b/src/app/hooks/useTips.ts deleted file mode 100644 index 96f33c38e2..0000000000 --- a/src/app/hooks/useTips.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { useSettings } from "~/app/context/SettingsContext"; -import { TIPS } from "~/common/constants"; - -const DEFAULT_TIPS = [TIPS.MNEMONIC]; - -export const filterTips = (closedTips: TIPS[]) => { - return DEFAULT_TIPS.filter((tip: TIPS) => { - if (closedTips.includes(tip)) return false; - - return true; - }); -}; - -export const useTips = () => { - const { settings, updateSetting } = useSettings(); - const tips = filterTips(settings.closedTips); - - const closeTip = (tip: TIPS) => { - updateSetting({ - closedTips: [...settings.closedTips, tip], - }); - }; - return { - tips, - closeTip, - }; -}; diff --git a/src/app/icons/ConnectedSiteIcon.tsx b/src/app/icons/ConnectedSiteIcon.tsx index cd57e8ac91..8feef93ecc 100644 --- a/src/app/icons/ConnectedSiteIcon.tsx +++ b/src/app/icons/ConnectedSiteIcon.tsx @@ -2,39 +2,35 @@ import { SVGProps } from "react"; const ConnectedSiteIcon = (props: SVGProps) => ( - - diff --git a/src/app/icons/DemoTipCardIcon.tsx b/src/app/icons/DemoTipCardIcon.tsx deleted file mode 100644 index 7b3042a6b5..0000000000 --- a/src/app/icons/DemoTipCardIcon.tsx +++ /dev/null @@ -1,22 +0,0 @@ -export default function DemoTipCardIcon() { - return ( - - - - - - - ); -} diff --git a/src/app/icons/MnemonicTipCardIcon.tsx b/src/app/icons/MnemonicTipCardIcon.tsx deleted file mode 100644 index 1787eeeda6..0000000000 --- a/src/app/icons/MnemonicTipCardIcon.tsx +++ /dev/null @@ -1,41 +0,0 @@ -export default function MnemonicTipCardIcon() { - return ( - - - - - - - - - - - ); -} diff --git a/src/app/router/Options/Options.tsx b/src/app/router/Options/Options.tsx index 2eabac9606..ab56d721a1 100644 --- a/src/app/router/Options/Options.tsx +++ b/src/app/router/Options/Options.tsx @@ -1,5 +1,6 @@ import Container from "@components/Container"; import Navbar from "@components/Navbar"; +import { PopiconsArrowUpLine } from "@popicons/react"; import Accounts from "@screens/Accounts"; import AccountDetail from "@screens/Accounts/Detail"; import ConfirmPayment from "@screens/ConfirmPayment"; @@ -31,7 +32,7 @@ import NewMnemonic from "~/app/screens/Accounts/GenerateMnemonic/new"; import ImportMnemonic from "~/app/screens/Accounts/ImportMnemonic"; import NostrSettings from "~/app/screens/Accounts/NostrSettings"; import NostrSetup from "~/app/screens/Accounts/NostrSetup/NostrSetup"; -import Discover from "~/app/screens/Discover"; + import LNURLRedeem from "~/app/screens/LNURLRedeem"; import OnChainReceive from "~/app/screens/OnChainReceive"; import ReceiveInvoice from "~/app/screens/ReceiveInvoice"; @@ -58,9 +59,6 @@ function Options() { } > } /> - - } /> - } /> } /> @@ -157,11 +155,14 @@ const Layout = () => { return (
- {tCommon("discover")} + {tCommon("wallet")} {tCommon("connected_sites")} - {tCommon("wallet")} + + {tCommon("discover")} + + diff --git a/src/app/screens/Discover/index.tsx b/src/app/screens/Discover/index.tsx deleted file mode 100644 index 1619904855..0000000000 --- a/src/app/screens/Discover/index.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import Container from "@components/Container"; -import { useTranslation } from "react-i18next"; -import Tips from "~/app/components/Tips"; -import { useTips } from "~/app/hooks/useTips"; - -import websites from "./websites.json"; - -function Discover() { - const { tips } = useTips(); - const { t } = useTranslation("translation"); - - return ( - - {tips.length > 0 && ( - <> -

- {t("discover.tips.title")} -

-

- {t("discover.tips.description")} -

-
- -
- - )} - -

- {t("discover.title")} -

- -

- {t("discover.description")} -

- -
- {websites.map(({ title, items }, index) => ( -
-

- {t(`discover.list.${title as "trading"}`)} -

- -
- {items.map(({ title, subtitle, logo, url }) => ( - -
-
- image - -
-

- {title} -

- -

- {subtitle} -

-
-
-
-
- ))} -
-
- ))} -
-
- ); -} - -export default Discover; diff --git a/src/app/screens/Discover/websites.json b/src/app/screens/Discover/websites.json deleted file mode 100644 index aedeb31296..0000000000 --- a/src/app/screens/Discover/websites.json +++ /dev/null @@ -1,259 +0,0 @@ -[ - { - "title": "entertainment", - "items": [ - { - "title": "CurioCaster", - "subtitle": "Podcast web player", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/curiocaster_thumbnail.png", - "url": "https://curiocaster.com" - }, - { - "title": "Music Side Project", - "subtitle": "Music web player", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/musicsideproject_thumbnail.png", - "url": "https://musicsideproject.com" - }, - { - "title": "Podverse", - "subtitle": "Podcast player with bitcoin payments", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/podverse_thumbnail.png", - "url": "https://podverse.fm" - }, - { - "title": "Stacker.News", - "subtitle": "Lightning powered Bitcoin news site", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/stacker-news_thumbnail.png", - "url": "https://stacker.news" - }, - { - "title": "Wavlake", - "subtitle": "Lightning powered music player", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/wavlake.png", - "url": "https://www.wavlake.com" - }, - { - "title": "Y'alls", - "subtitle": "Articles about the Lightning Network", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/yalls.png", - "url": "https://yalls.org" - } - ] - }, - { - "title": "shopping", - "items": [ - { - "title": "Bitrefill", - "subtitle": "Buy vouchers, refill your phone or pay your bills", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/bitrefill_thumbnail.svg", - "url": "https://www.bitrefill.com/?hl=en" - }, - { - "title": "BTC Map", - "subtitle": "Easily find places to spend sats anywhere on the planet", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/btcmap-logo.svg", - "url": "https://btcmap.org" - }, - { - "title": "Coincards", - "subtitle": "Shop for gift cards, mobile top-ups & prepaid vouchers", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/coincards.png", - "url": "https://coincards.com" - }, - { - "title": "Lightning Network Stores", - "subtitle": "Collection of stores and websites accepting bitcoin", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lightning-network-stores_thumbnail.png", - "url": "https://lightningnetworkstores.com" - } - ] - }, - { - "title": "nostr", - "items": [ - { - "title": "Astral", - "subtitle": "A Twitter-like client with chat and one-click payments", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/astral_thumbnail.png", - "url": "https://astral.ninja" - }, - { - "title": "Blogstack", - "subtitle": "A Medium-like blog sharing website", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/blockstack-logo.png", - "url": "https://blogstack.io" - }, - { - "title": "Blowater", - "subtitle": "A web chat client with delightful UX", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/blowater_thumbnail.png", - "url": "https://blowater.deno.dev" - }, - { - "title": "Broadcstr", - "subtitle": "Social media that you control and define the boundaries", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/broadcstr.png", - "url": "https://www.broadcstr.com" - }, - { - "title": "Habla", - "subtitle": "Bitcoin news at your fingertips", - "logo": "https://user-images.githubusercontent.com/100958893/237170839-a523ec2c-e9ad-43c9-a547-366e9de6f35b.png", - "url": "https://habla.news" - }, - { - "title": "Iris", - "subtitle": "Social networking app with tipping", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/iris-to.png", - "url": "https://iris.to" - }, - { - "title": "nostr.kiwi", - "subtitle": "Share notes and curate content in communities", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/nostrkiwi_thumbnail.png", - "url": "https://nostr.kiwi/" - }, - { - "title": "Notebin", - "subtitle": "An online note sharing web client", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/notebin-logo.png", - "url": "https://notebin.org" - }, - { - "title": "Primal", - "subtitle": "Lightning-fast UI for Nostr", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/primat-logo_fire-409917ad.svg", - "url": "https://primal.net" - }, - { - "title": "Snort", - "subtitle": "Fast nostr web client", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/snort_thumbnail.png", - "url": "https://snort.social" - }, - { - "title": "Satellite", - "subtitle": "Explore the Nostr Universe", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/satellite-earth.png", - "url": "https://satellite.earth" - }, - { - "title": "zapddit", - "subtitle": "A reddit-style nostr client", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/zapddit.svg", - "url": "https://zapddit.com" - } - ] - }, - { - "title": "trading", - "items": [ - { - "title": "LNMarkets", - "subtitle": "Instant Bitcoin derivatives trading", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lnmarkets.png", - "url": "https://lnmarkets.com" - } - ] - }, - { - "title": "gaming", - "items": [ - { - "title": "LNBlackJack", - "subtitle": "Play Blackjack with Bitcoin", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lnblackjack_thumbnail.png", - "url": "https://www.lnblackjack.com" - }, - { - "title": "Lightning Poker", - "subtitle": "Play Poker with Bitcoin", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lightning-poker_thumbnail.png", - "url": "https://lightning-poker.com" - }, - { - "title": "Lightning Roulette", - "subtitle": "Play Roulette with Bitcoin", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lightning-roulette_thumbnail.svg", - "url": "https://lightning-roulette.com" - }, - { - "title": "LNflip", - "subtitle": "Play coin flip matches against other players", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lnflip_thumbnail.png", - "url": "https://www.lnflip.com" - } - ] - }, - { - "title": "nodeManagement", - "items": [ - { - "title": "Amboss", - "subtitle": "Lightning Network node explorer", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/amboss-space_thumbnail.png", - "url": "https://amboss.space" - }, - { - "title": "LNnodeinsight.com", - "subtitle": "Develop your own data-driven Lightning Network insight", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lnnodeinsight_thumbnail.svg", - "url": "https://lnnodeinsight.com" - } - ] - }, - { - "title": "miscellaneous", - "items": [ - { - "title": "BOLT.FUN", - "subtitle": "A fun place for builders to learn about lightning", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/bolt-fun_thumbnail.svg", - "url": "https://makers.bolt.fun" - }, - { - "title": "Geyser", - "subtitle": "Crowdfunding projects with Bitcoin Lightning", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/geyser_thumbnail.png", - "url": "https://geyser.fund" - }, - { - "title": "Lightsats", - "subtitle": "Onboard people to bitcoin by sending them tips", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lightsats_thumbnail.png", - "url": "https://lightsats.com" - }, - { - "title": "LNCal.com", - "subtitle": "Get booked and paid in Bitcoin", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lncal_thumbnail.svg", - "url": "https://lncal.com" - }, - { - "title": "Sats for Likes", - "subtitle": "Earn sats for accomplishing tasks", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/sats4likes.png", - "url": "https://www.sats4likes.com" - }, - { - "title": "Vida", - "subtitle": "Earn sats anytime someone wants to connect and chat", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/vida_thumbnail.png", - "url": "https://vida.page" - }, - { - "title": "Vida Live", - "subtitle": "Host live podcasts and earn sats", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/vida_thumbnail.png", - "url": "https://vida.live" - }, - { - "title": "WebLN Experiments", - "subtitle": "A collection of Lightning web widgets", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/twentyuno.svg", - "url": "https://webln.twentyuno.net" - } - ] - } -] diff --git a/src/app/screens/Onboard/PinExtension/index.tsx b/src/app/screens/Onboard/PinExtension/index.tsx index fd63e64f25..754b0f24c6 100644 --- a/src/app/screens/Onboard/PinExtension/index.tsx +++ b/src/app/screens/Onboard/PinExtension/index.tsx @@ -9,7 +9,7 @@ export default function PinExtension() { }); const onNext = () => { - utils.redirectPage("options.html#/discover"); + utils.redirectPage("options.html#/wallet"); }; const theme = useTheme(); diff --git a/src/app/screens/Publishers/index.tsx b/src/app/screens/Publishers/index.tsx index 2d957a3421..8b3944e6da 100644 --- a/src/app/screens/Publishers/index.tsx +++ b/src/app/screens/Publishers/index.tsx @@ -3,7 +3,7 @@ import Loading from "@components/Loading"; import PublishersTable from "@components/PublishersTable"; import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link, useNavigate } from "react-router-dom"; +import { useNavigate } from "react-router-dom"; import Button from "~/app/components/Button"; import toast from "~/app/components/Toast"; import msg from "~/common/lib/msg"; @@ -67,9 +67,13 @@ function Publishers() { ) : ( <>

{t("no_info")}

- -