mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-17 06:14:21 +01:00
Remove mutiny plus references
This commit is contained in:
committed by
Tony Giorgio
parent
625c0f6de7
commit
6e31400d23
@@ -19,7 +19,6 @@ const settingsRoutes = [
|
|||||||
"/connections",
|
"/connections",
|
||||||
"/currency",
|
"/currency",
|
||||||
"/emergencykit",
|
"/emergencykit",
|
||||||
"/plus",
|
|
||||||
"/restore",
|
"/restore",
|
||||||
"/servers",
|
"/servers",
|
||||||
"/nostrkeys"
|
"/nostrkeys"
|
||||||
@@ -62,10 +61,6 @@ test("visit each route", async ({ page }) => {
|
|||||||
|
|
||||||
checklist.set("/settings", true);
|
checklist.set("/settings", true);
|
||||||
|
|
||||||
// Mutiny+
|
|
||||||
await checkRoute(page, "/settings/plus", "Mutiny+", checklist);
|
|
||||||
await page.goBack();
|
|
||||||
|
|
||||||
// Lightning Channels
|
// Lightning Channels
|
||||||
await checkRoute(
|
await checkRoute(
|
||||||
page,
|
page,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { createAsync, useNavigate } from "@solidjs/router";
|
import { createAsync, useNavigate } from "@solidjs/router";
|
||||||
import { AtSign, Edit, Import } from "lucide-solid";
|
import { Edit, Import } from "lucide-solid";
|
||||||
import { createMemo, Show, Suspense } from "solid-js";
|
import { createMemo, Show, Suspense } from "solid-js";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -47,21 +47,6 @@ export function Profile() {
|
|||||||
return profile()?.deleted === true || profile()?.deleted === "true";
|
return profile()?.deleted === true || profile()?.deleted === "true";
|
||||||
});
|
});
|
||||||
|
|
||||||
const hasMutinyAddress = createMemo(() => {
|
|
||||||
if (profile()?.lud16) {
|
|
||||||
const hermes = import.meta.env.VITE_HERMES;
|
|
||||||
if (!hermes) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const hermesDomain = new URL(hermes).hostname;
|
|
||||||
const afterAt = profile()?.lud16!.split("@")[1];
|
|
||||||
if (afterAt && afterAt.includes(hermesDomain)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MutinyWalletGuard>
|
<MutinyWalletGuard>
|
||||||
<DefaultMain>
|
<DefaultMain>
|
||||||
@@ -89,26 +74,6 @@ export function Profile() {
|
|||||||
<NiceP>{i18n.t("profile.edit_profile")}</NiceP>
|
<NiceP>{i18n.t("profile.edit_profile")}</NiceP>
|
||||||
</div>
|
</div>
|
||||||
</ButtonCard>
|
</ButtonCard>
|
||||||
<Show
|
|
||||||
when={
|
|
||||||
!hasMutinyAddress() && import.meta.env.VITE_HERMES
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<ButtonCard
|
|
||||||
onClick={() =>
|
|
||||||
navigate("/settings/lightningaddress")
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<AtSign class="inline-block text-m-red" />
|
|
||||||
<NiceP>
|
|
||||||
{i18n.t(
|
|
||||||
"settings.lightning_address.create"
|
|
||||||
)}
|
|
||||||
</NiceP>
|
|
||||||
</div>
|
|
||||||
</ButtonCard>
|
|
||||||
</Show>
|
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={profile() && profile()?.deleted}>
|
<Show when={profile() && profile()?.deleted}>
|
||||||
<ButtonCard
|
<ButtonCard
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { A, useNavigate } from "@solidjs/router";
|
import { A } from "@solidjs/router";
|
||||||
import { AtSign } from "lucide-solid";
|
|
||||||
import {
|
import {
|
||||||
createResource,
|
createResource,
|
||||||
createSignal,
|
createSignal,
|
||||||
@@ -13,7 +12,6 @@ import party from "~/assets/party.gif";
|
|||||||
import {
|
import {
|
||||||
BackLink,
|
BackLink,
|
||||||
Button,
|
Button,
|
||||||
ButtonCard,
|
|
||||||
ConfirmDialog,
|
ConfirmDialog,
|
||||||
DefaultMain,
|
DefaultMain,
|
||||||
ExternalLink,
|
ExternalLink,
|
||||||
@@ -170,8 +168,6 @@ export function Plus() {
|
|||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
const [state, _actions] = useMegaStore();
|
const [state, _actions] = useMegaStore();
|
||||||
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MutinyWalletGuard>
|
<MutinyWalletGuard>
|
||||||
<DefaultMain>
|
<DefaultMain>
|
||||||
@@ -198,22 +194,6 @@ export function Plus() {
|
|||||||
{i18n.t("settings.plus.wallet_connection")}
|
{i18n.t("settings.plus.wallet_connection")}
|
||||||
</A>
|
</A>
|
||||||
</NiceP>
|
</NiceP>
|
||||||
<Show when={import.meta.env.VITE_HERMES}>
|
|
||||||
<ButtonCard
|
|
||||||
onClick={() =>
|
|
||||||
navigate("/settings/lightningaddress")
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<AtSign class="inline-block text-m-red" />
|
|
||||||
<NiceP>
|
|
||||||
{i18n.t(
|
|
||||||
"settings.lightning_address.create"
|
|
||||||
)}
|
|
||||||
</NiceP>
|
|
||||||
</div>
|
|
||||||
</ButtonCard>
|
|
||||||
</Show>
|
|
||||||
</Match>
|
</Match>
|
||||||
<Match when={!state.mutiny_plus}>
|
<Match when={!state.mutiny_plus}>
|
||||||
<NiceP>
|
<NiceP>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Capacitor } from "@capacitor/core";
|
|
||||||
import { A } from "@solidjs/router";
|
import { A } from "@solidjs/router";
|
||||||
import { ChevronRight } from "lucide-solid";
|
import { ChevronRight } from "lucide-solid";
|
||||||
import { For, Show } from "solid-js";
|
import { For, Show } from "solid-js";
|
||||||
@@ -8,7 +7,6 @@ import {
|
|||||||
DefaultMain,
|
DefaultMain,
|
||||||
ExternalLink,
|
ExternalLink,
|
||||||
LargeHeader,
|
LargeHeader,
|
||||||
MutinyPlusCta,
|
|
||||||
NavBar,
|
NavBar,
|
||||||
SettingsCard,
|
SettingsCard,
|
||||||
TinyText,
|
TinyText,
|
||||||
@@ -73,18 +71,11 @@ export function Settings() {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const COMMIT_HASH = import.meta.env.__COMMIT_HASH__;
|
const COMMIT_HASH = import.meta.env.__COMMIT_HASH__;
|
||||||
|
|
||||||
const selfHosted = state.settings?.selfhosted === "true";
|
|
||||||
|
|
||||||
const ios = Capacitor.getPlatform() === "ios";
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DefaultMain>
|
<DefaultMain>
|
||||||
<BackLink />
|
<BackLink />
|
||||||
<LargeHeader>{i18n.t("settings.header")}</LargeHeader>
|
<LargeHeader>{i18n.t("settings.header")}</LargeHeader>
|
||||||
<VStack biggap>
|
<VStack biggap>
|
||||||
<Show when={state.mutiny_plus || (!selfHosted && !ios)}>
|
|
||||||
<MutinyPlusCta />
|
|
||||||
</Show>
|
|
||||||
<SettingsLinkList
|
<SettingsLinkList
|
||||||
header={i18n.t("settings.general")}
|
header={i18n.t("settings.general")}
|
||||||
links={[
|
links={[
|
||||||
|
|||||||
Reference in New Issue
Block a user