better structure
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Image } from '@lume/shared/image';
|
||||
import { DEFAULT_AVATAR } from '@lume/stores/constants';
|
||||
import { Image } from '@shared/image';
|
||||
|
||||
import { DEFAULT_AVATAR } from '@stores/constants';
|
||||
|
||||
export default function ActiveAccount({ user }: { user: any }) {
|
||||
const userData = JSON.parse(user.metadata);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Image } from '@lume/shared/image';
|
||||
import { DEFAULT_AVATAR } from '@lume/stores/constants';
|
||||
import { Image } from '@shared/image';
|
||||
|
||||
import { DEFAULT_AVATAR } from '@stores/constants';
|
||||
|
||||
export default function InactiveAccount({ user }: { user: any }) {
|
||||
const userData = JSON.parse(user.metadata);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { usePageContext } from '@lume/utils/hooks/usePageContext';
|
||||
import { usePageContext } from '@utils/hooks/usePageContext';
|
||||
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import ArrowLeftIcon from '@lume/shared/icons/arrowLeft';
|
||||
import ArrowRightIcon from '@lume/shared/icons/arrowRight';
|
||||
import RefreshIcon from '@lume/shared/icons/refresh';
|
||||
import ArrowLeftIcon from '@icons/arrowLeft';
|
||||
import ArrowRightIcon from '@icons/arrowRight';
|
||||
import RefreshIcon from '@icons/refresh';
|
||||
|
||||
export default function AppHeader() {
|
||||
const goBack = () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createBlobFromFile } from '@lume/utils/createBlobFromFile';
|
||||
import { createBlobFromFile } from '@utils/createBlobFromFile';
|
||||
|
||||
import { open } from '@tauri-apps/api/dialog';
|
||||
import { Body, fetch } from '@tauri-apps/api/http';
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
import { Post } from '@lume/shared/composer/types/post';
|
||||
import { User } from '@lume/shared/composer/user';
|
||||
import CancelIcon from '@lume/shared/icons/cancel';
|
||||
import ChevronDownIcon from '@lume/shared/icons/chevronDown';
|
||||
import ChevronRightIcon from '@lume/shared/icons/chevronRight';
|
||||
import ComposeIcon from '@lume/shared/icons/compose';
|
||||
import { composerAtom } from '@lume/stores/composer';
|
||||
import { useActiveAccount } from '@lume/utils/hooks/useActiveAccount';
|
||||
import { Post } from '@shared/composer/types/post';
|
||||
import { User } from '@shared/composer/user';
|
||||
|
||||
import CancelIcon from '@icons/cancel';
|
||||
import ChevronDownIcon from '@icons/chevronDown';
|
||||
import ChevronRightIcon from '@icons/chevronRight';
|
||||
import ComposeIcon from '@icons/compose';
|
||||
|
||||
import { composerAtom } from '@stores/composer';
|
||||
|
||||
import { useActiveAccount } from '@utils/hooks/useActiveAccount';
|
||||
|
||||
import { Dialog, Transition } from '@headlessui/react';
|
||||
import { useAtom } from 'jotai';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Image } from '@lume/shared/image';
|
||||
import { DEFAULT_AVATAR, IMGPROXY_URL } from '@lume/stores/constants';
|
||||
import { Image } from '@shared/image';
|
||||
|
||||
import { DEFAULT_AVATAR, IMGPROXY_URL } from '@stores/constants';
|
||||
|
||||
export function User({ data }: { data: any }) {
|
||||
const metadata = JSON.parse(data.metadata);
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
import HeartBeatIcon from '@lume/shared/icons/heartbeat';
|
||||
import { RelayContext } from '@lume/shared/relayProvider';
|
||||
import { READONLY_RELAYS } from '@lume/stores/constants';
|
||||
import { hasNewerNoteAtom } from '@lume/stores/note';
|
||||
import { dateToUnix } from '@lume/utils/getDate';
|
||||
import { useActiveAccount } from '@lume/utils/hooks/useActiveAccount';
|
||||
import { createChat, createNote, updateAccount } from '@lume/utils/storage';
|
||||
import { getParentID, nip02ToArray } from '@lume/utils/transform';
|
||||
import { RelayContext } from '@shared/relayProvider';
|
||||
|
||||
import HeartBeatIcon from '@icons/heartbeat';
|
||||
|
||||
import { READONLY_RELAYS } from '@stores/constants';
|
||||
import { hasNewerNoteAtom } from '@stores/note';
|
||||
|
||||
import { dateToUnix } from '@utils/date';
|
||||
import { useActiveAccount } from '@utils/hooks/useActiveAccount';
|
||||
import { createChat, createNote, updateAccount } from '@utils/storage';
|
||||
import { getParentID, nip02ToArray } from '@utils/transform';
|
||||
|
||||
import { useSetAtom } from 'jotai';
|
||||
import { useContext, useRef } from 'react';
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import PlusIcon from '@lume/shared/icons/plus';
|
||||
import { channelContentAtom } from '@lume/stores/channel';
|
||||
import { chatContentAtom } from '@lume/stores/chat';
|
||||
import { noteContentAtom } from '@lume/stores/note';
|
||||
import { createBlobFromFile } from '@lume/utils/createBlobFromFile';
|
||||
import PlusIcon from '@icons/plus';
|
||||
|
||||
import { channelContentAtom } from '@stores/channel';
|
||||
import { chatContentAtom } from '@stores/chat';
|
||||
import { noteContentAtom } from '@stores/note';
|
||||
|
||||
import { createBlobFromFile } from '@utils/createBlobFromFile';
|
||||
|
||||
import { open } from '@tauri-apps/api/dialog';
|
||||
import { Body, fetch } from '@tauri-apps/api/http';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DEFAULT_AVATAR } from '@lume/stores/constants';
|
||||
import { DEFAULT_AVATAR } from '@stores/constants';
|
||||
|
||||
export function Image(props) {
|
||||
const addImageFallback = (event) => {
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import ActiveAccount from '@lume/shared/accounts/active';
|
||||
import InactiveAccount from '@lume/shared/accounts/inactive';
|
||||
import BellIcon from '@lume/shared/icons/bell';
|
||||
import PlusIcon from '@lume/shared/icons/plus';
|
||||
import { APP_VERSION } from '@lume/stores/constants';
|
||||
import { getAccounts, getActiveAccount } from '@lume/utils/storage';
|
||||
import ActiveAccount from '@shared/accounts/active';
|
||||
import InactiveAccount from '@shared/accounts/inactive';
|
||||
|
||||
import BellIcon from '@icons/bell';
|
||||
import PlusIcon from '@icons/plus';
|
||||
|
||||
import { APP_VERSION } from '@stores/constants';
|
||||
|
||||
import { getAccounts, getActiveAccount } from '@utils/storage';
|
||||
|
||||
import useSWR from 'swr';
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import ChannelsList from '@lume/app/channel/components/list';
|
||||
import ChatsList from '@lume/app/chat/components/list';
|
||||
import ActiveLink from '@lume/shared/activeLink';
|
||||
import { ComposerModal } from '@lume/shared/composer/modal';
|
||||
import EventCollector from '@lume/shared/eventCollector';
|
||||
import MyspaceIcon from '@lume/shared/icons/myspace';
|
||||
import NavArrowDownIcon from '@lume/shared/icons/navArrowDown';
|
||||
import ThreadsIcon from '@lume/shared/icons/threads';
|
||||
import WorldIcon from '@lume/shared/icons/world';
|
||||
import ChannelsList from '@app/channel/components/list';
|
||||
import ChatsList from '@app/chat/components/list';
|
||||
|
||||
import ActiveLink from '@shared/activeLink';
|
||||
import { ComposerModal } from '@shared/composer/modal';
|
||||
import EventCollector from '@shared/eventCollector';
|
||||
|
||||
import MyspaceIcon from '@icons/myspace';
|
||||
import NavArrowDownIcon from '@icons/navArrowDown';
|
||||
import ThreadsIcon from '@icons/threads';
|
||||
import WorldIcon from '@icons/world';
|
||||
|
||||
import { Disclosure } from '@headlessui/react';
|
||||
|
||||
@@ -24,14 +26,14 @@ export default function Navigation() {
|
||||
</div>
|
||||
<div className="flex flex-col text-zinc-400">
|
||||
<ActiveLink
|
||||
href="/app/daily"
|
||||
href="/app/radar"
|
||||
className="flex h-8 items-center gap-2.5 rounded-md px-2.5 text-[13px] font-semibold hover:text-zinc-200"
|
||||
activeClassName=""
|
||||
>
|
||||
<span className="inline-flex h-5 w-5 items-center justify-center rounded bg-zinc-900">
|
||||
<WorldIcon width={12} height={12} className="text-zinc-200" />
|
||||
</span>
|
||||
<span>Daily</span>
|
||||
<span>Radar</span>
|
||||
</ActiveLink>
|
||||
<ActiveLink
|
||||
href="/app/threads"
|
||||
@@ -44,14 +46,14 @@ export default function Navigation() {
|
||||
<span>Threads</span>
|
||||
</ActiveLink>
|
||||
<ActiveLink
|
||||
href="/app/myspace"
|
||||
href="/app/space"
|
||||
className="flex h-8 items-center gap-2.5 rounded-md px-2.5 text-[13px] font-semibold hover:text-zinc-200"
|
||||
activeClassName=""
|
||||
>
|
||||
<span className="inline-flex h-5 w-5 items-center justify-center rounded bg-zinc-900">
|
||||
<MyspaceIcon width={12} height={12} className="text-zinc-200" />
|
||||
</span>
|
||||
<span>MySpace</span>
|
||||
<span>Space</span>
|
||||
</ActiveLink>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useNetworkStatus } from '@lume/utils/hooks/useNetworkStatus';
|
||||
import { useNetworkStatus } from '@utils/hooks/useNetworkStatus';
|
||||
|
||||
export function NetworkStatusIndicator() {
|
||||
const isOnline = useNetworkStatus();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { RelayContext } from '@lume/shared/relaysProvider';
|
||||
import { UserFollow } from '@lume/shared/user/follow';
|
||||
import { READONLY_RELAYS } from '@lume/stores/constants';
|
||||
import { RelayContext } from '@shared/relaysProvider';
|
||||
import { UserFollow } from '@shared/user/follow';
|
||||
|
||||
import { READONLY_RELAYS } from '@stores/constants';
|
||||
|
||||
import destr from 'destr';
|
||||
import { Author } from 'nostr-relaypool';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { RelayContext } from '@lume/shared/relaysProvider';
|
||||
import { UserFollow } from '@lume/shared/user/follow';
|
||||
import { READONLY_RELAYS } from '@lume/stores/constants';
|
||||
import { RelayContext } from '@shared/relaysProvider';
|
||||
import { UserFollow } from '@shared/user/follow';
|
||||
|
||||
import { READONLY_RELAYS } from '@stores/constants';
|
||||
|
||||
import { Author } from 'nostr-relaypool';
|
||||
import { useContext, useEffect, useState } from 'react';
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { Image } from '@lume/shared/image';
|
||||
import { RelayContext } from '@lume/shared/relayProvider';
|
||||
import { DEFAULT_AVATAR, READONLY_RELAYS } from '@lume/stores/constants';
|
||||
import { shortenKey } from '@lume/utils/shortenKey';
|
||||
import { Image } from '@shared/image';
|
||||
import { RelayContext } from '@shared/relayProvider';
|
||||
|
||||
import { DEFAULT_AVATAR, READONLY_RELAYS } from '@stores/constants';
|
||||
|
||||
import { shortenKey } from '@utils/shortenKey';
|
||||
|
||||
import destr from 'destr';
|
||||
import { Author } from 'nostr-relaypool';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { NoteBase } from '@lume/shared/note/base';
|
||||
import { RelayContext } from '@lume/shared/relaysProvider';
|
||||
import { READONLY_RELAYS } from '@lume/stores/constants';
|
||||
import { NoteBase } from '@shared/note/base';
|
||||
import { RelayContext } from '@shared/relaysProvider';
|
||||
|
||||
import { READONLY_RELAYS } from '@stores/constants';
|
||||
|
||||
import { Author } from 'nostr-relaypool';
|
||||
import { useContext, useEffect, useState } from 'react';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FULL_RELAYS } from '@lume/stores/constants';
|
||||
import { FULL_RELAYS } from '@stores/constants';
|
||||
|
||||
import { RelayPool } from 'nostr-relaypool';
|
||||
import { createContext } from 'react';
|
||||
|
||||
Reference in New Issue
Block a user