forked from coracle/caravel
Switch to absolute imports
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
"@tailwindcss/vite": "^4.2.1",
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
"@tanstack/solid-query": "^5.90.23",
|
"@tanstack/solid-query": "^5.90.23",
|
||||||
"@types/qrcode": "^1.5.6",
|
"@types/qrcode": "^1.5.6",
|
||||||
|
"@welshman/lib": "^0.8.9",
|
||||||
"applesauce-accounts": "^5.1.0",
|
"applesauce-accounts": "^5.1.0",
|
||||||
"applesauce-common": "^5.1.0",
|
"applesauce-common": "^5.1.0",
|
||||||
"applesauce-core": "^5.1.0",
|
"applesauce-core": "^5.1.0",
|
||||||
@@ -263,12 +264,16 @@
|
|||||||
|
|
||||||
"@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="],
|
"@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="],
|
||||||
|
|
||||||
|
"@types/events": ["@types/events@3.0.3", "", {}, "sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g=="],
|
||||||
|
|
||||||
"@types/node": ["@types/node@24.10.13", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-oH72nZRfDv9lADUBSo104Aq7gPHpQZc4BTx38r9xf9pg5LfP6EzSyH2n7qFmmxRQXh7YlUXODcYsg6PuTDSxGg=="],
|
"@types/node": ["@types/node@24.10.13", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-oH72nZRfDv9lADUBSo104Aq7gPHpQZc4BTx38r9xf9pg5LfP6EzSyH2n7qFmmxRQXh7YlUXODcYsg6PuTDSxGg=="],
|
||||||
|
|
||||||
"@types/offscreencanvas": ["@types/offscreencanvas@2019.7.3", "", {}, "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A=="],
|
"@types/offscreencanvas": ["@types/offscreencanvas@2019.7.3", "", {}, "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A=="],
|
||||||
|
|
||||||
"@types/qrcode": ["@types/qrcode@1.5.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw=="],
|
"@types/qrcode": ["@types/qrcode@1.5.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw=="],
|
||||||
|
|
||||||
|
"@welshman/lib": ["@welshman/lib@0.8.9", "", { "dependencies": { "@scure/base": "^1.1.6", "@types/events": "^3.0.3", "events": "^3.3.0" } }, "sha512-Gk9MXaJNuLL9EguP2RnoaGaQy6x0BrneZfj9gL5t6ZNIF+1g+maJssKDbCRjdDPeuNQbRhh7AlSGSQUJuhkq6Q=="],
|
||||||
|
|
||||||
"@yr/monotone-cubic-spline": ["@yr/monotone-cubic-spline@1.0.3", "", {}, "sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA=="],
|
"@yr/monotone-cubic-spline": ["@yr/monotone-cubic-spline@1.0.3", "", {}, "sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA=="],
|
||||||
|
|
||||||
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||||
@@ -341,6 +346,8 @@
|
|||||||
|
|
||||||
"escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
|
"escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
|
||||||
|
|
||||||
|
"events": ["events@3.3.0", "", {}, "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="],
|
||||||
|
|
||||||
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
|
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
|
||||||
|
|
||||||
"fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
|
"fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"@tailwindcss/vite": "^4.2.1",
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
"@tanstack/solid-query": "^5.90.23",
|
"@tanstack/solid-query": "^5.90.23",
|
||||||
"@types/qrcode": "^1.5.6",
|
"@types/qrcode": "^1.5.6",
|
||||||
|
"@welshman/lib": "^0.8.9",
|
||||||
"applesauce-accounts": "^5.1.0",
|
"applesauce-accounts": "^5.1.0",
|
||||||
"applesauce-common": "^5.1.0",
|
"applesauce-common": "^5.1.0",
|
||||||
"applesauce-core": "^5.1.0",
|
"applesauce-core": "^5.1.0",
|
||||||
|
|||||||
+13
-13
@@ -1,19 +1,19 @@
|
|||||||
import { createEffect, Show } from "solid-js"
|
import { createEffect, Show } from "solid-js"
|
||||||
import { Router, Route, useLocation, useNavigate } from "@solidjs/router"
|
import { Router, Route, useLocation, useNavigate } from "@solidjs/router"
|
||||||
import type { Component } from "solid-js"
|
import type { Component } from "solid-js"
|
||||||
import AppShell from "./components/AppShell"
|
import AppShell from "@/components/AppShell"
|
||||||
import Home from "./pages/Home"
|
import Home from "@/pages/Home"
|
||||||
import RelayList from "./pages/relays/RelayList"
|
import RelayList from "@/pages/relays/RelayList"
|
||||||
import RelayNew from "./pages/relays/RelayNew"
|
import RelayNew from "@/pages/relays/RelayNew"
|
||||||
import RelayDetail from "./pages/relays/RelayDetail"
|
import RelayDetail from "@/pages/relays/RelayDetail"
|
||||||
import RelayEdit from "./pages/relays/RelayEdit"
|
import RelayEdit from "@/pages/relays/RelayEdit"
|
||||||
import Account from "./pages/Account"
|
import Account from "@/pages/Account"
|
||||||
import AdminTenantList from "./pages/admin/AdminTenantList"
|
import AdminTenantList from "@/pages/admin/AdminTenantList"
|
||||||
import AdminTenantDetail from "./pages/admin/AdminTenantDetail"
|
import AdminTenantDetail from "@/pages/admin/AdminTenantDetail"
|
||||||
import AdminRelayList from "./pages/admin/AdminRelayList"
|
import AdminRelayList from "@/pages/admin/AdminRelayList"
|
||||||
import AdminRelayDetail from "./pages/admin/AdminRelayDetail"
|
import AdminRelayDetail from "@/pages/admin/AdminRelayDetail"
|
||||||
import AdminRelayEdit from "./pages/admin/AdminRelayEdit"
|
import AdminRelayEdit from "@/pages/admin/AdminRelayEdit"
|
||||||
import { identity } from "./lib/hooks"
|
import { identity } from "@/lib/state"
|
||||||
|
|
||||||
function Layout(props: { children?: any }) {
|
function Layout(props: { children?: any }) {
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { A, useLocation } from "@solidjs/router"
|
import { A, useLocation } from "@solidjs/router"
|
||||||
import { createEffect, createMemo, createSignal, For, onCleanup, Show } from "solid-js"
|
import { createEffect, createMemo, createSignal, For, onCleanup, Show } from "solid-js"
|
||||||
import Fuse from "fuse.js"
|
import Fuse from "fuse.js"
|
||||||
import { account, eventStore, identity, primeProfiles, useProfilePicture, useTenantRelays, type Relay } from "../lib/hooks"
|
import { primeProfiles, useProfilePicture, useTenantRelays, type Relay } from "@/lib/hooks"
|
||||||
import serverIcon from "../assets/server.svg"
|
import { account, eventStore, identity } from "@/lib/state"
|
||||||
import Modal from "./Modal"
|
import serverIcon from "@/assets/server.svg"
|
||||||
|
import Modal from "@/components/Modal"
|
||||||
|
|
||||||
type Profile = {
|
type Profile = {
|
||||||
name?: string
|
name?: string
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { Show } from "solid-js"
|
import { Show } from "solid-js"
|
||||||
import { A } from "@solidjs/router"
|
import { A } from "@solidjs/router"
|
||||||
import { PLATFORM_NAME, useProfilePicture, account } from "../lib/hooks"
|
import { useProfilePicture } from "@/lib/hooks"
|
||||||
|
import { PLATFORM_NAME, account } from "@/lib/state"
|
||||||
|
|
||||||
export default function Navbar() {
|
export default function Navbar() {
|
||||||
const picture = useProfilePicture(() => account()?.pubkey)
|
const picture = useProfilePicture(() => account()?.pubkey)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { A } from "@solidjs/router"
|
import { A } from "@solidjs/router"
|
||||||
import { For } from "solid-js"
|
import { For } from "solid-js"
|
||||||
import { RELAY_PLANS, type RelayPlanId } from "../lib/relayPlans"
|
import { RELAY_PLANS, type RelayPlanId } from "@/lib/relayPlans"
|
||||||
|
|
||||||
function CheckIcon() {
|
function CheckIcon() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { A } from "@solidjs/router"
|
import { A } from "@solidjs/router"
|
||||||
import { Show, createEffect, createSignal, onCleanup } from "solid-js"
|
import { Show, createEffect, createSignal, onCleanup } from "solid-js"
|
||||||
import type { Relay } from "../lib/api"
|
import type { Relay } from "@/lib/api"
|
||||||
import menuDotsIcon from "../assets/menu-dots-2.svg"
|
import menuDotsIcon from "@/assets/menu-dots-2.svg"
|
||||||
import Modal from "./Modal"
|
import Modal from "@/components/Modal"
|
||||||
import PricingTable from "./PricingTable"
|
import PricingTable from "@/components/PricingTable"
|
||||||
import { RELAY_PLAN_IDS, type RelayPlanId } from "../lib/relayPlans"
|
import { RELAY_PLAN_IDS, type RelayPlanId } from "@/lib/relayPlans"
|
||||||
|
|
||||||
function Field(props: { label: string; children: any }) {
|
function Field(props: { label: string; children: any }) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { createEffect, createSignal } from "solid-js"
|
import { createEffect, createSignal } from "solid-js"
|
||||||
import type { Relay } from "../lib/hooks"
|
import type { Relay } from "@/lib/hooks"
|
||||||
import { slugify } from "../lib/slugify"
|
import { slugify } from "@/lib/slugify"
|
||||||
|
|
||||||
export type RelayFormValues = {
|
export type RelayFormValues = {
|
||||||
info_name: string
|
info_name: string
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Show } from "solid-js"
|
import { Show } from "solid-js"
|
||||||
import LoadingState from "./LoadingState"
|
import LoadingState from "@/components/LoadingState"
|
||||||
|
|
||||||
type ResourceStateProps = {
|
type ResourceStateProps = {
|
||||||
loading: boolean
|
loading: boolean
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/* @refresh reload */
|
/* @refresh reload */
|
||||||
import { render } from "solid-js/web"
|
import { render } from "solid-js/web"
|
||||||
import "./index.css"
|
import "./index.css"
|
||||||
import App from "./App"
|
import App from "@/App"
|
||||||
import { PLATFORM_NAME } from "./lib/hooks"
|
import { PLATFORM_NAME } from "@/lib/state"
|
||||||
|
|
||||||
const root = document.getElementById("root")!
|
const root = document.getElementById("root")!
|
||||||
|
|
||||||
|
|||||||
+28
-28
@@ -1,4 +1,4 @@
|
|||||||
import { account } from "./hooks"
|
import { account } from "@/lib/state"
|
||||||
|
|
||||||
const API_URL = import.meta.env.VITE_API_URL
|
const API_URL = import.meta.env.VITE_API_URL
|
||||||
|
|
||||||
@@ -51,33 +51,6 @@ export type Relay = {
|
|||||||
push_enabled: number
|
push_enabled: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Tenant = {
|
|
||||||
pubkey: string
|
|
||||||
nwc_url: string
|
|
||||||
created_at: number
|
|
||||||
billing_anchor: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Invoice = {
|
|
||||||
id: string
|
|
||||||
tenant: string
|
|
||||||
status: string
|
|
||||||
created_at: number
|
|
||||||
attempted_at: number
|
|
||||||
error: string
|
|
||||||
closed_at: number
|
|
||||||
sent_at: number
|
|
||||||
paid_at: number
|
|
||||||
bolt11: string
|
|
||||||
period_start: number
|
|
||||||
period_end: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Identity = {
|
|
||||||
pubkey: string
|
|
||||||
is_admin: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CreateRelayInput = {
|
export type CreateRelayInput = {
|
||||||
tenant?: string
|
tenant?: string
|
||||||
subdomain: string
|
subdomain: string
|
||||||
@@ -109,6 +82,33 @@ export type UpdateRelayInput = {
|
|||||||
push_enabled?: number
|
push_enabled?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type Tenant = {
|
||||||
|
pubkey: string
|
||||||
|
nwc_url: string
|
||||||
|
created_at: number
|
||||||
|
billing_anchor: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type Invoice = {
|
||||||
|
id: string
|
||||||
|
tenant: string
|
||||||
|
status: string
|
||||||
|
created_at: number
|
||||||
|
attempted_at: number
|
||||||
|
error: string
|
||||||
|
closed_at: number
|
||||||
|
sent_at: number
|
||||||
|
paid_at: number
|
||||||
|
bolt11: string
|
||||||
|
period_start: number
|
||||||
|
period_end: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type Identity = {
|
||||||
|
pubkey: string
|
||||||
|
is_admin: boolean
|
||||||
|
}
|
||||||
|
|
||||||
export async function makeAuth(): Promise<string | undefined> {
|
export async function makeAuth(): Promise<string | undefined> {
|
||||||
const current = account()
|
const current = account()
|
||||||
if (!current) return undefined
|
if (!current) return undefined
|
||||||
|
|||||||
@@ -19,23 +19,8 @@ import {
|
|||||||
type Relay,
|
type Relay,
|
||||||
type Tenant,
|
type Tenant,
|
||||||
type UpdateRelayInput,
|
type UpdateRelayInput,
|
||||||
} from "./api"
|
} from "@/lib/api"
|
||||||
import { account, eventStore, pool } from "./state"
|
import { account, eventStore, pool } from "@/lib/state"
|
||||||
|
|
||||||
export {
|
|
||||||
PLATFORM_NAME,
|
|
||||||
accountManager,
|
|
||||||
account,
|
|
||||||
setAccount,
|
|
||||||
identity,
|
|
||||||
refetchIdentity,
|
|
||||||
setIdentity,
|
|
||||||
eventStore,
|
|
||||||
pool,
|
|
||||||
type EventSigner,
|
|
||||||
type SignedEvent,
|
|
||||||
type UnsignedEvent,
|
|
||||||
} from "./state"
|
|
||||||
|
|
||||||
export function useProfilePicture(pubkey: () => string | undefined) {
|
export function useProfilePicture(pubkey: () => string | undefined) {
|
||||||
const [picture, setPicture] = createSignal<string | undefined>()
|
const [picture, setPicture] = createSignal<string | undefined>()
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { EventStore } from "applesauce-core"
|
|||||||
import { createEventLoaderForStore } from "applesauce-loaders/loaders"
|
import { createEventLoaderForStore } from "applesauce-loaders/loaders"
|
||||||
import { RelayPool } from "applesauce-relay"
|
import { RelayPool } from "applesauce-relay"
|
||||||
import { NostrConnectSigner } from "applesauce-signers"
|
import { NostrConnectSigner } from "applesauce-signers"
|
||||||
import { getIdentity } from "./api"
|
import { getIdentity } from "@/lib/api"
|
||||||
|
|
||||||
export type UnsignedEvent = {
|
export type UnsignedEvent = {
|
||||||
kind: number
|
kind: number
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { createEffect, createMemo, createSignal, For, Show } from "solid-js"
|
import { createEffect, createMemo, createSignal, For, Show } from "solid-js"
|
||||||
import PageContainer from "../components/PageContainer"
|
import PageContainer from "@/components/PageContainer"
|
||||||
import LoadingState from "../components/LoadingState"
|
import LoadingState from "@/components/LoadingState"
|
||||||
import useMinLoading from "../components/useMinLoading"
|
import useMinLoading from "@/components/useMinLoading"
|
||||||
import { updateActiveTenantBilling, useTenant, useTenantInvoices } from "../lib/hooks"
|
import { updateActiveTenantBilling, useTenant, useTenantInvoices } from "@/lib/hooks"
|
||||||
|
|
||||||
export default function Account() {
|
export default function Account() {
|
||||||
const [tenant, { refetch: refetchTenant }] = useTenant()
|
const [tenant, { refetch: refetchTenant }] = useTenant()
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import { A, useNavigate } from "@solidjs/router"
|
import { A, useNavigate } from "@solidjs/router"
|
||||||
import { createSignal } from "solid-js"
|
import { createSignal } from "solid-js"
|
||||||
import CheckIcon from "../components/CheckIcon"
|
import CheckIcon from "@/components/CheckIcon"
|
||||||
import ExternalLinkIcon from "../components/ExternalLinkIcon"
|
import ExternalLinkIcon from "@/components/ExternalLinkIcon"
|
||||||
import PricingTable from "../components/PricingTable"
|
import PricingTable from "@/components/PricingTable"
|
||||||
import RelayForm, { type RelayFormValues } from "../components/RelayForm"
|
import RelayForm, { type RelayFormValues } from "@/components/RelayForm"
|
||||||
import Modal from "../components/Modal"
|
import Modal from "@/components/Modal"
|
||||||
import Login from "../views/Login"
|
import Login from "@/views/Login"
|
||||||
import { account, createRelayForActiveTenant } from "../lib/hooks"
|
import { createRelayForActiveTenant } from "@/lib/hooks"
|
||||||
import { slugify } from "../lib/slugify"
|
import { account } from "@/lib/state"
|
||||||
|
import { slugify } from "@/lib/slugify"
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { useParams } from "@solidjs/router"
|
import { useParams } from "@solidjs/router"
|
||||||
import { createSignal, Show } from "solid-js"
|
import { createSignal, Show } from "solid-js"
|
||||||
import BackLink from "../../components/BackLink"
|
import BackLink from "@/components/BackLink"
|
||||||
import PageContainer from "../../components/PageContainer"
|
import PageContainer from "@/components/PageContainer"
|
||||||
import RelayDetailCard from "../../components/RelayDetailCard"
|
import RelayDetailCard from "@/components/RelayDetailCard"
|
||||||
import ResourceState from "../../components/ResourceState"
|
import ResourceState from "@/components/ResourceState"
|
||||||
import useMinLoading from "../../components/useMinLoading"
|
import useMinLoading from "@/components/useMinLoading"
|
||||||
import { deactivateRelayById, updateRelayById, useRelay, type Relay } from "../../lib/hooks"
|
import { deactivateRelayById, updateRelayById, useRelay, type Relay } from "@/lib/hooks"
|
||||||
|
|
||||||
export default function AdminRelayDetail() {
|
export default function AdminRelayDetail() {
|
||||||
const params = useParams()
|
const params = useParams()
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { useNavigate, useParams } from "@solidjs/router"
|
import { useNavigate, useParams } from "@solidjs/router"
|
||||||
import { Show, createSignal } from "solid-js"
|
import { Show, createSignal } from "solid-js"
|
||||||
import RelayForm, { type RelayFormValues } from "../../components/RelayForm"
|
import RelayForm, { type RelayFormValues } from "@/components/RelayForm"
|
||||||
import { slugify } from "../../lib/slugify"
|
import { slugify } from "@/lib/slugify"
|
||||||
import BackLink from "../../components/BackLink"
|
import BackLink from "@/components/BackLink"
|
||||||
import PageContainer from "../../components/PageContainer"
|
import PageContainer from "@/components/PageContainer"
|
||||||
import ResourceState from "../../components/ResourceState"
|
import ResourceState from "@/components/ResourceState"
|
||||||
import useMinLoading from "../../components/useMinLoading"
|
import useMinLoading from "@/components/useMinLoading"
|
||||||
import { updateRelayById, useRelay } from "../../lib/hooks"
|
import { updateRelayById, useRelay } from "@/lib/hooks"
|
||||||
|
|
||||||
export default function AdminRelayEdit() {
|
export default function AdminRelayEdit() {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { A } from "@solidjs/router"
|
import { A } from "@solidjs/router"
|
||||||
import Fuse from "fuse.js"
|
import Fuse from "fuse.js"
|
||||||
import { createMemo, createSignal, For, Show } from "solid-js"
|
import { createMemo, createSignal, For, Show } from "solid-js"
|
||||||
import PageContainer from "../../components/PageContainer"
|
import PageContainer from "@/components/PageContainer"
|
||||||
import ResourceState from "../../components/ResourceState"
|
import ResourceState from "@/components/ResourceState"
|
||||||
import useMinLoading from "../../components/useMinLoading"
|
import useMinLoading from "@/components/useMinLoading"
|
||||||
import { useAdminRelays } from "../../lib/hooks"
|
import { useAdminRelays } from "@/lib/hooks"
|
||||||
|
|
||||||
export default function AdminRelayList() {
|
export default function AdminRelayList() {
|
||||||
const [query, setQuery] = createSignal("")
|
const [query, setQuery] = createSignal("")
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { useParams, A } from "@solidjs/router"
|
import { useParams, A } from "@solidjs/router"
|
||||||
import { For, Show } from "solid-js"
|
import { For, Show } from "solid-js"
|
||||||
import BackLink from "../../components/BackLink"
|
import BackLink from "@/components/BackLink"
|
||||||
import PageContainer from "../../components/PageContainer"
|
import PageContainer from "@/components/PageContainer"
|
||||||
import ResourceState from "../../components/ResourceState"
|
import ResourceState from "@/components/ResourceState"
|
||||||
import useMinLoading from "../../components/useMinLoading"
|
import useMinLoading from "@/components/useMinLoading"
|
||||||
import { useAdminTenant, useAdminTenantRelays } from "../../lib/hooks"
|
import { useAdminTenant, useAdminTenantRelays } from "@/lib/hooks"
|
||||||
|
|
||||||
export default function AdminTenantDetail() {
|
export default function AdminTenantDetail() {
|
||||||
const params = useParams()
|
const params = useParams()
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ import { A } from "@solidjs/router"
|
|||||||
import Fuse from "fuse.js"
|
import Fuse from "fuse.js"
|
||||||
import { createEffect, createMemo, createSignal, For, onCleanup, Show } from "solid-js"
|
import { createEffect, createMemo, createSignal, For, onCleanup, Show } from "solid-js"
|
||||||
import { getProfilePicture } from "applesauce-core/helpers/profile"
|
import { getProfilePicture } from "applesauce-core/helpers/profile"
|
||||||
import PageContainer from "../../components/PageContainer"
|
import PageContainer from "@/components/PageContainer"
|
||||||
import ResourceState from "../../components/ResourceState"
|
import ResourceState from "@/components/ResourceState"
|
||||||
import useMinLoading from "../../components/useMinLoading"
|
import useMinLoading from "@/components/useMinLoading"
|
||||||
import { eventStore, primeProfiles, useAdminTenants } from "../../lib/hooks"
|
import { primeProfiles, useAdminTenants } from "@/lib/hooks"
|
||||||
|
import { eventStore } from "@/lib/state"
|
||||||
|
|
||||||
function shortenPubkey(pubkey: string) {
|
function shortenPubkey(pubkey: string) {
|
||||||
if (pubkey.length <= 16) return pubkey
|
if (pubkey.length <= 16) return pubkey
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { useParams } from "@solidjs/router"
|
import { useParams } from "@solidjs/router"
|
||||||
import { createMemo, createResource, createSignal, Show } from "solid-js"
|
import { createMemo, createResource, createSignal, Show } from "solid-js"
|
||||||
import type { RelayPlanId } from "../../lib/relayPlans"
|
import type { RelayPlanId } from "@/lib/relayPlans"
|
||||||
import BackLink from "../../components/BackLink"
|
import BackLink from "@/components/BackLink"
|
||||||
import PageContainer from "../../components/PageContainer"
|
import PageContainer from "@/components/PageContainer"
|
||||||
import RelayDetailCard from "../../components/RelayDetailCard"
|
import RelayDetailCard from "@/components/RelayDetailCard"
|
||||||
import ResourceState from "../../components/ResourceState"
|
import ResourceState from "@/components/ResourceState"
|
||||||
import useMinLoading from "../../components/useMinLoading"
|
import useMinLoading from "@/components/useMinLoading"
|
||||||
import { deactivateRelayById, getRelayMembers, updateRelayById, updateRelayPlanById, useRelay, type Relay } from "../../lib/hooks"
|
import { deactivateRelayById, getRelayMembers, updateRelayById, updateRelayPlanById, useRelay, type Relay } from "@/lib/hooks"
|
||||||
|
|
||||||
export default function RelayDetail() {
|
export default function RelayDetail() {
|
||||||
const params = useParams()
|
const params = useParams()
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { useNavigate, useParams } from "@solidjs/router"
|
import { useNavigate, useParams } from "@solidjs/router"
|
||||||
import { Show, createSignal } from "solid-js"
|
import { Show, createSignal } from "solid-js"
|
||||||
import RelayForm, { type RelayFormValues } from "../../components/RelayForm"
|
import RelayForm, { type RelayFormValues } from "@/components/RelayForm"
|
||||||
import { slugify } from "../../lib/slugify"
|
import { slugify } from "@/lib/slugify"
|
||||||
import BackLink from "../../components/BackLink"
|
import BackLink from "@/components/BackLink"
|
||||||
import PageContainer from "../../components/PageContainer"
|
import PageContainer from "@/components/PageContainer"
|
||||||
import ResourceState from "../../components/ResourceState"
|
import ResourceState from "@/components/ResourceState"
|
||||||
import useMinLoading from "../../components/useMinLoading"
|
import useMinLoading from "@/components/useMinLoading"
|
||||||
import { updateRelayById, useRelay } from "../../lib/hooks"
|
import { updateRelayById, useRelay } from "@/lib/hooks"
|
||||||
|
|
||||||
export default function RelayEdit() {
|
export default function RelayEdit() {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { A } from "@solidjs/router"
|
import { A } from "@solidjs/router"
|
||||||
import Fuse from "fuse.js"
|
import Fuse from "fuse.js"
|
||||||
import { createMemo, createSignal, For, Show } from "solid-js"
|
import { createMemo, createSignal, For, Show } from "solid-js"
|
||||||
import PageContainer from "../../components/PageContainer"
|
import PageContainer from "@/components/PageContainer"
|
||||||
import ResourceState from "../../components/ResourceState"
|
import ResourceState from "@/components/ResourceState"
|
||||||
import useMinLoading from "../../components/useMinLoading"
|
import useMinLoading from "@/components/useMinLoading"
|
||||||
import { useTenantRelays } from "../../lib/hooks"
|
import { useTenantRelays } from "@/lib/hooks"
|
||||||
|
|
||||||
export default function RelayList() {
|
export default function RelayList() {
|
||||||
const [relays] = useTenantRelays()
|
const [relays] = useTenantRelays()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Show, createSignal } from "solid-js"
|
import { Show, createSignal } from "solid-js"
|
||||||
import { useNavigate } from "@solidjs/router"
|
import { useNavigate } from "@solidjs/router"
|
||||||
import { slugify } from "../../lib/slugify"
|
import { slugify } from "@/lib/slugify"
|
||||||
import { createRelayForActiveTenant } from "../../lib/hooks"
|
import { createRelayForActiveTenant } from "@/lib/hooks"
|
||||||
|
|
||||||
const PLANS = [
|
const PLANS = [
|
||||||
{ id: "free", label: "Free", price: 0, members: "Up to 10", blossom: false, livekit: false },
|
{ id: "free", label: "Free", price: 0, members: "Up to 10", blossom: false, livekit: false },
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { ExtensionAccount, NostrConnectAccount, PasswordAccount, PrivateKeyAccou
|
|||||||
import { PasswordSigner } from "applesauce-signers"
|
import { PasswordSigner } from "applesauce-signers"
|
||||||
import QrScanner from "qr-scanner"
|
import QrScanner from "qr-scanner"
|
||||||
import QRCode from "qrcode"
|
import QRCode from "qrcode"
|
||||||
import { accountManager, identity, PLATFORM_NAME } from "../lib/hooks"
|
import { accountManager, identity, PLATFORM_NAME } from "@/lib/state"
|
||||||
|
|
||||||
const NIP46_RELAYS = ['wss://bucket.coracle.social', 'wss://ephemeral.snowflare.cc']
|
const NIP46_RELAYS = ['wss://bucket.coracle.social', 'wss://ephemeral.snowflare.cc']
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,10 @@
|
|||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"jsxImportSource": "solid-js",
|
"jsxImportSource": "solid-js",
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["src/*"]
|
||||||
|
},
|
||||||
|
|
||||||
/* Linting */
|
/* Linting */
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import solid from 'vite-plugin-solid'
|
import solid from 'vite-plugin-solid'
|
||||||
import tailwindcss from '@tailwindcss/vite'
|
import tailwindcss from '@tailwindcss/vite'
|
||||||
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [tailwindcss(), solid()],
|
plugins: [tailwindcss(), solid()],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user