forked from Archives/Athou_commafeed
add @/ prefix for absolute imports
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
import { Box, Button, Container, Group, Text, Title } from "@mantine/core"
|
||||
import { TbRefresh } from "react-icons/tb"
|
||||
import { tss } from "tss"
|
||||
import { tss } from "@/tss"
|
||||
import { PageTitle } from "./PageTitle"
|
||||
|
||||
const useStyles = tss.create(({ theme }) => ({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Center, Container, RingProgress, Text, useMantineTheme } from "@mantine/core"
|
||||
import { useAppLoading } from "hooks/useAppLoading"
|
||||
import { useAppLoading } from "@/hooks/useAppLoading"
|
||||
import { PageTitle } from "./PageTitle"
|
||||
|
||||
export function LoadingPage() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Center, Title } from "@mantine/core"
|
||||
import { Logo } from "components/Logo"
|
||||
import { Logo } from "@/components/Logo"
|
||||
|
||||
export function PageTitle() {
|
||||
return (
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { msg } from "@lingui/core/macro"
|
||||
import { Anchor, Box, Center, Container, Divider, Group, Image, Space, Title, useMantineColorScheme } from "@mantine/core"
|
||||
import { client } from "app/client"
|
||||
import { redirectToApiDocumentation, redirectToLogin, redirectToRegistration, redirectToRootCategory } from "app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "app/store"
|
||||
import welcomePageDark from "assets/welcome_page_dark.png"
|
||||
import welcomePageLight from "assets/welcome_page_light.png"
|
||||
import { ActionButton } from "components/ActionButton"
|
||||
import { useBrowserExtension } from "hooks/useBrowserExtension"
|
||||
import { useMobile } from "hooks/useMobile"
|
||||
import { useAsyncCallback } from "react-async-hook"
|
||||
import { SiGithub, SiX } from "react-icons/si"
|
||||
import { TbClock, TbKey, TbMoon, TbSettings, TbSun, TbUserPlus } from "react-icons/tb"
|
||||
import { client } from "@/app/client"
|
||||
import { redirectToApiDocumentation, redirectToLogin, redirectToRegistration, redirectToRootCategory } from "@/app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "@/app/store"
|
||||
import welcomePageDark from "@/assets/welcome_page_dark.png"
|
||||
import welcomePageLight from "@/assets/welcome_page_light.png"
|
||||
import { ActionButton } from "@/components/ActionButton"
|
||||
import { useBrowserExtension } from "@/hooks/useBrowserExtension"
|
||||
import { useMobile } from "@/hooks/useMobile"
|
||||
import { PageTitle } from "./PageTitle"
|
||||
|
||||
const iconSize = 18
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
import { ActionIcon, Box, Code, Container, Group, Table, Text, Title, useMantineTheme } from "@mantine/core"
|
||||
import { closeAllModals, openConfirmModal, openModal } from "@mantine/modals"
|
||||
import { client, errorToStrings } from "app/client"
|
||||
import type { UserModel } from "app/types"
|
||||
import { Alert } from "components/Alert"
|
||||
import { UserEdit } from "components/admin/UserEdit"
|
||||
import { Loader } from "components/Loader"
|
||||
import { RelativeDate } from "components/RelativeDate"
|
||||
import type { ReactNode } from "react"
|
||||
import { useAsync, useAsyncCallback } from "react-async-hook"
|
||||
import { TbCheck, TbPencil, TbPlus, TbTrash, TbX } from "react-icons/tb"
|
||||
import { client, errorToStrings } from "@/app/client"
|
||||
import type { UserModel } from "@/app/types"
|
||||
import { Alert } from "@/components/Alert"
|
||||
import { UserEdit } from "@/components/admin/UserEdit"
|
||||
import { Loader } from "@/components/Loader"
|
||||
import { RelativeDate } from "@/components/RelativeDate"
|
||||
|
||||
function BooleanIcon({ value }: { value: boolean }) {
|
||||
return value ? <TbCheck size={18} /> : <TbX size={18} />
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Accordion, Box } from "@mantine/core"
|
||||
import { client } from "app/client"
|
||||
import { Loader } from "components/Loader"
|
||||
import { Gauge } from "components/metrics/Gauge"
|
||||
import { Meter } from "components/metrics/Meter"
|
||||
import { MetricAccordionItem } from "components/metrics/MetricAccordionItem"
|
||||
import { useEffect } from "react"
|
||||
import { useAsync } from "react-async-hook"
|
||||
import { client } from "@/app/client"
|
||||
import { Loader } from "@/components/Loader"
|
||||
import { Gauge } from "@/components/metrics/Gauge"
|
||||
import { Meter } from "@/components/metrics/Meter"
|
||||
import { MetricAccordionItem } from "@/components/metrics/MetricAccordionItem"
|
||||
|
||||
const shownMeters: Record<string, string> = {
|
||||
"com.commafeed.backend.feed.FeedRefreshEngine.refill": "Feed queue refill rate",
|
||||
|
||||
@@ -2,16 +2,16 @@ import { msg } from "@lingui/core/macro"
|
||||
import { useLingui } from "@lingui/react"
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
import { Anchor, Box, Container, List, NativeSelect, SimpleGrid, Title } from "@mantine/core"
|
||||
import { Constants } from "app/constants"
|
||||
import { redirectToApiDocumentation } from "app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "app/store"
|
||||
import { CategorySelect } from "components/content/add/CategorySelect"
|
||||
import { KeyboardShortcutsHelp } from "components/KeyboardShortcutsHelp"
|
||||
import { useBrowserExtension } from "hooks/useBrowserExtension"
|
||||
import type React from "react"
|
||||
import { useState } from "react"
|
||||
import { TbHelp, TbKeyboard, TbPuzzle, TbRocket } from "react-icons/tb"
|
||||
import { tss } from "tss"
|
||||
import { Constants } from "@/app/constants"
|
||||
import { redirectToApiDocumentation } from "@/app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "@/app/store"
|
||||
import { CategorySelect } from "@/components/content/add/CategorySelect"
|
||||
import { KeyboardShortcutsHelp } from "@/components/KeyboardShortcutsHelp"
|
||||
import { useBrowserExtension } from "@/hooks/useBrowserExtension"
|
||||
import { tss } from "@/tss"
|
||||
|
||||
const useStyles = tss.create(() => ({
|
||||
sectionTitle: {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
import { Container, Tabs } from "@mantine/core"
|
||||
import { AddCategory } from "components/content/add/AddCategory"
|
||||
import { ImportOpml } from "components/content/add/ImportOpml"
|
||||
import { Subscribe } from "components/content/add/Subscribe"
|
||||
import { TbFileImport, TbFolderPlus, TbRss } from "react-icons/tb"
|
||||
import { AddCategory } from "@/components/content/add/AddCategory"
|
||||
import { ImportOpml } from "@/components/content/add/ImportOpml"
|
||||
import { Subscribe } from "@/components/content/add/Subscribe"
|
||||
|
||||
export function AddPage() {
|
||||
return (
|
||||
|
||||
@@ -4,20 +4,20 @@ import { Trans } from "@lingui/react/macro"
|
||||
import { Anchor, Box, Button, Code, Container, Divider, Group, Input, NumberInput, Stack, Text, TextInput, Title } from "@mantine/core"
|
||||
import { useForm } from "@mantine/form"
|
||||
import { openConfirmModal } from "@mantine/modals"
|
||||
import { client, errorToStrings } from "app/client"
|
||||
import { Constants } from "app/constants"
|
||||
import { redirectToRootCategory, redirectToSelectedSource } from "app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "app/store"
|
||||
import { reloadTree } from "app/tree/thunks"
|
||||
import type { Category, CategoryModificationRequest } from "app/types"
|
||||
import { flattenCategoryTree } from "app/utils"
|
||||
import { Alert } from "components/Alert"
|
||||
import { CategorySelect } from "components/content/add/CategorySelect"
|
||||
import { Loader } from "components/Loader"
|
||||
import { useEffect } from "react"
|
||||
import { useAsync, useAsyncCallback } from "react-async-hook"
|
||||
import { TbDeviceFloppy, TbTrash } from "react-icons/tb"
|
||||
import { useParams } from "react-router-dom"
|
||||
import { client, errorToStrings } from "@/app/client"
|
||||
import { Constants } from "@/app/constants"
|
||||
import { redirectToRootCategory, redirectToSelectedSource } from "@/app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "@/app/store"
|
||||
import { reloadTree } from "@/app/tree/thunks"
|
||||
import type { Category, CategoryModificationRequest } from "@/app/types"
|
||||
import { flattenCategoryTree } from "@/app/utils"
|
||||
import { Alert } from "@/components/Alert"
|
||||
import { CategorySelect } from "@/components/content/add/CategorySelect"
|
||||
import { Loader } from "@/components/Loader"
|
||||
|
||||
export function CategoryDetailsPage() {
|
||||
const { id = Constants.categories.all.id } = useParams()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
import { Anchor, Box, Code, Container, Group, List, Title } from "@mantine/core"
|
||||
import { Constants } from "app/constants"
|
||||
import { TbBrandGithub, TbBrandPaypal, TbCoinBitcoin, TbHeartFilled } from "react-icons/tb"
|
||||
import { Constants } from "@/app/constants"
|
||||
|
||||
const iconSize = 24
|
||||
|
||||
|
||||
@@ -2,19 +2,19 @@ import { Trans } from "@lingui/react/macro"
|
||||
import { Anchor, Box, Button, Code, Container, Divider, Group, Input, NumberInput, Stack, Text, TextInput, Title } from "@mantine/core"
|
||||
import { useForm } from "@mantine/form"
|
||||
import { openConfirmModal } from "@mantine/modals"
|
||||
import { client, errorToStrings } from "app/client"
|
||||
import { redirectToRootCategory, redirectToSelectedSource } from "app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "app/store"
|
||||
import { reloadTree } from "app/tree/thunks"
|
||||
import type { FeedModificationRequest } from "app/types"
|
||||
import { Alert } from "components/Alert"
|
||||
import { CategorySelect } from "components/content/add/CategorySelect"
|
||||
import { Loader } from "components/Loader"
|
||||
import { RelativeDate } from "components/RelativeDate"
|
||||
import { useEffect } from "react"
|
||||
import { useAsync, useAsyncCallback } from "react-async-hook"
|
||||
import { TbDeviceFloppy, TbTrash } from "react-icons/tb"
|
||||
import { useParams } from "react-router-dom"
|
||||
import { client, errorToStrings } from "@/app/client"
|
||||
import { redirectToRootCategory, redirectToSelectedSource } from "@/app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "@/app/store"
|
||||
import { reloadTree } from "@/app/tree/thunks"
|
||||
import type { FeedModificationRequest } from "@/app/types"
|
||||
import { Alert } from "@/components/Alert"
|
||||
import { CategorySelect } from "@/components/content/add/CategorySelect"
|
||||
import { Loader } from "@/components/Loader"
|
||||
import { RelativeDate } from "@/components/RelativeDate"
|
||||
|
||||
function FilteringExpressionDescription() {
|
||||
const example = <Code>url.contains('youtube') or (author eq 'athou' and title.contains('github'))</Code>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
import { ActionIcon, Box, Center, Divider, Group, Title, useMantineTheme } from "@mantine/core"
|
||||
import { useViewportSize } from "@mantine/hooks"
|
||||
import { Constants } from "app/constants"
|
||||
import type { EntrySourceType } from "app/entries/slice"
|
||||
import { loadEntries } from "app/entries/thunks"
|
||||
import { redirectToCategoryDetails, redirectToFeedDetails, redirectToTagDetails } from "app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "app/store"
|
||||
import { flattenCategoryTree } from "app/utils"
|
||||
import { FeedEntries } from "components/content/FeedEntries"
|
||||
import { useEffect } from "react"
|
||||
import { TbEdit } from "react-icons/tb"
|
||||
import { useLocation, useParams } from "react-router-dom"
|
||||
import { tss } from "tss"
|
||||
import { Constants } from "@/app/constants"
|
||||
import type { EntrySourceType } from "@/app/entries/slice"
|
||||
import { loadEntries } from "@/app/entries/thunks"
|
||||
import { redirectToCategoryDetails, redirectToFeedDetails, redirectToTagDetails } from "@/app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "@/app/store"
|
||||
import { flattenCategoryTree } from "@/app/utils"
|
||||
import { FeedEntries } from "@/components/content/FeedEntries"
|
||||
import { tss } from "@/tss"
|
||||
|
||||
function NoSubscriptionHelp() {
|
||||
return (
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
import { msg } from "@lingui/core/macro"
|
||||
import { ActionIcon, AppShell, Box, Center, Group, ScrollArea, Title, useMantineTheme } from "@mantine/core"
|
||||
import { Constants } from "app/constants"
|
||||
import { redirectToAdd, redirectToRootCategory } from "app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "app/store"
|
||||
import { setMobileMenuOpen } from "app/tree/slice"
|
||||
import { reloadTree } from "app/tree/thunks"
|
||||
import { setSidebarWidth } from "app/user/slice"
|
||||
import { reloadProfile, reloadSettings, reloadTags } from "app/user/thunks"
|
||||
import { ActionButton } from "components/ActionButton"
|
||||
import { AnnouncementDialog } from "components/AnnouncementDialog"
|
||||
import { Loader } from "components/Loader"
|
||||
import { Logo } from "components/Logo"
|
||||
import { MarkAllAsReadConfirmationDialog } from "components/MarkAllAsReadConfirmationDialog"
|
||||
import { OnDesktop } from "components/responsive/OnDesktop"
|
||||
import { OnMobile } from "components/responsive/OnMobile"
|
||||
import { useAppLoading } from "hooks/useAppLoading"
|
||||
import { useBrowserExtension } from "hooks/useBrowserExtension"
|
||||
import { useMobile } from "hooks/useMobile"
|
||||
import { useWebSocket } from "hooks/useWebSocket"
|
||||
import { LoadingPage } from "pages/LoadingPage"
|
||||
import { type ReactNode, type RefObject, Suspense, useEffect, useRef } from "react"
|
||||
import Draggable from "react-draggable"
|
||||
import { TbMenu2, TbPlus, TbX } from "react-icons/tb"
|
||||
import { Outlet } from "react-router-dom"
|
||||
import { useSwipeable } from "react-swipeable"
|
||||
import { tss } from "tss"
|
||||
import { Constants } from "@/app/constants"
|
||||
import { redirectToAdd, redirectToRootCategory } from "@/app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "@/app/store"
|
||||
import { setMobileMenuOpen } from "@/app/tree/slice"
|
||||
import { reloadTree } from "@/app/tree/thunks"
|
||||
import { setSidebarWidth } from "@/app/user/slice"
|
||||
import { reloadProfile, reloadSettings, reloadTags } from "@/app/user/thunks"
|
||||
import { ActionButton } from "@/components/ActionButton"
|
||||
import { AnnouncementDialog } from "@/components/AnnouncementDialog"
|
||||
import { Loader } from "@/components/Loader"
|
||||
import { Logo } from "@/components/Logo"
|
||||
import { MarkAllAsReadConfirmationDialog } from "@/components/MarkAllAsReadConfirmationDialog"
|
||||
import { OnDesktop } from "@/components/responsive/OnDesktop"
|
||||
import { OnMobile } from "@/components/responsive/OnMobile"
|
||||
import { useAppLoading } from "@/hooks/useAppLoading"
|
||||
import { useBrowserExtension } from "@/hooks/useBrowserExtension"
|
||||
import { useMobile } from "@/hooks/useMobile"
|
||||
import { useWebSocket } from "@/hooks/useWebSocket"
|
||||
import { LoadingPage } from "@/pages/LoadingPage"
|
||||
import { tss } from "@/tss"
|
||||
|
||||
interface LayoutProps {
|
||||
sidebar: ReactNode
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
import { Container, Tabs } from "@mantine/core"
|
||||
import { CustomCodeSettings } from "components/settings/CustomCodeSettings"
|
||||
import { DisplaySettings } from "components/settings/DisplaySettings"
|
||||
import { ProfileSettings } from "components/settings/ProfileSettings"
|
||||
import { TbCode, TbPhoto, TbUser } from "react-icons/tb"
|
||||
import { CustomCodeSettings } from "@/components/settings/CustomCodeSettings"
|
||||
import { DisplaySettings } from "@/components/settings/DisplaySettings"
|
||||
import { ProfileSettings } from "@/components/settings/ProfileSettings"
|
||||
|
||||
export function SettingsPage() {
|
||||
return (
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
|
||||
import { Anchor, Box, Button, Container, Group, Input, Stack, Title } from "@mantine/core"
|
||||
import { Constants } from "app/constants"
|
||||
import { redirectToSelectedSource } from "app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "app/store"
|
||||
import { useParams } from "react-router-dom"
|
||||
import { Constants } from "@/app/constants"
|
||||
import { redirectToSelectedSource } from "@/app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "@/app/store"
|
||||
|
||||
export function TagDetailsPage() {
|
||||
const { id = Constants.categories.all.id } = useParams()
|
||||
|
||||
@@ -3,14 +3,14 @@ import { useLingui } from "@lingui/react"
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
import { Anchor, Box, Button, Center, Container, Group, Paper, PasswordInput, Stack, TextInput, Title } from "@mantine/core"
|
||||
import { useForm } from "@mantine/form"
|
||||
import { client, errorToStrings } from "app/client"
|
||||
import { redirectToRootCategory } from "app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "app/store"
|
||||
import type { LoginRequest } from "app/types"
|
||||
import { Alert } from "components/Alert"
|
||||
import { PageTitle } from "pages/PageTitle"
|
||||
import { useAsyncCallback } from "react-async-hook"
|
||||
import { Link } from "react-router-dom"
|
||||
import { client, errorToStrings } from "@/app/client"
|
||||
import { redirectToRootCategory } from "@/app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "@/app/store"
|
||||
import type { LoginRequest } from "@/app/types"
|
||||
import { Alert } from "@/components/Alert"
|
||||
import { PageTitle } from "@/pages/PageTitle"
|
||||
|
||||
export function LoginPage() {
|
||||
const serverInfos = useAppSelector(state => state.server.serverInfos)
|
||||
|
||||
@@ -3,13 +3,13 @@ import { useLingui } from "@lingui/react"
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
import { Anchor, Box, Button, Center, Container, Group, Paper, Stack, TextInput, Title } from "@mantine/core"
|
||||
import { useForm } from "@mantine/form"
|
||||
import { client, errorToStrings } from "app/client"
|
||||
import type { PasswordResetRequest } from "app/types"
|
||||
import { Alert } from "components/Alert"
|
||||
import { PageTitle } from "pages/PageTitle"
|
||||
import { useState } from "react"
|
||||
import { useAsyncCallback } from "react-async-hook"
|
||||
import { Link } from "react-router-dom"
|
||||
import { client, errorToStrings } from "@/app/client"
|
||||
import type { PasswordResetRequest } from "@/app/types"
|
||||
import { Alert } from "@/components/Alert"
|
||||
import { PageTitle } from "@/pages/PageTitle"
|
||||
|
||||
export function PasswordRecoveryPage() {
|
||||
const [message, setMessage] = useState("")
|
||||
|
||||
@@ -3,14 +3,14 @@ import { useLingui } from "@lingui/react"
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
import { Anchor, Box, Button, Center, Container, Group, Paper, PasswordInput, Stack, TextInput, Title } from "@mantine/core"
|
||||
import { useForm } from "@mantine/form"
|
||||
import { client, errorToStrings } from "app/client"
|
||||
import { redirectToRootCategory } from "app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "app/store"
|
||||
import type { RegistrationRequest } from "app/types"
|
||||
import { Alert } from "components/Alert"
|
||||
import { PageTitle } from "pages/PageTitle"
|
||||
import { useAsyncCallback } from "react-async-hook"
|
||||
import { Link } from "react-router-dom"
|
||||
import { client, errorToStrings } from "@/app/client"
|
||||
import { redirectToRootCategory } from "@/app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "@/app/store"
|
||||
import type { RegistrationRequest } from "@/app/types"
|
||||
import { Alert } from "@/components/Alert"
|
||||
import { PageTitle } from "@/pages/PageTitle"
|
||||
|
||||
export function RegistrationPage() {
|
||||
const serverInfos = useAppSelector(state => state.server.serverInfos)
|
||||
|
||||
Reference in New Issue
Block a user