mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 13:10:30 +08:00
fix missing card background and format code
This commit is contained in:
parent
c46a26192a
commit
1285a07623
@ -118,18 +118,19 @@ const App: React.FC = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const navigateMap = {
|
const navigateMap = {
|
||||||
sysproxy: "sysproxy",
|
sysproxy: 'sysproxy',
|
||||||
tun: "tun",
|
tun: 'tun',
|
||||||
profile: "profiles",
|
profile: 'profiles',
|
||||||
proxy: "proxies",
|
proxy: 'proxies',
|
||||||
mihomo: "mihomo",
|
mihomo: 'mihomo',
|
||||||
connection: "connections",
|
connection: 'connections',
|
||||||
dns: "dns",
|
dns: 'dns',
|
||||||
sniff: "sniffer",
|
sniff: 'sniffer',
|
||||||
log: "logs",
|
log: 'logs',
|
||||||
rule: "rules",
|
rule: 'rules',
|
||||||
resource: "resources",
|
resource: 'resources',
|
||||||
override: "override"
|
override: 'override',
|
||||||
|
substore: 'substore'
|
||||||
}
|
}
|
||||||
|
|
||||||
const componentMap = {
|
const componentMap = {
|
||||||
|
|||||||
@ -177,7 +177,9 @@ const ConnCard: React.FC = () => {
|
|||||||
<>
|
<>
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
@ -224,7 +226,9 @@ const ConnCard: React.FC = () => {
|
|||||||
) : (
|
) : (
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
@ -43,7 +43,9 @@ const DNSCard: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
@ -32,7 +32,9 @@ const LogCard: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
@ -56,7 +56,9 @@ const MihomoCoreCard: React.FC = () => {
|
|||||||
{mihomoCoreCardStatus === 'col-span-2' ? (
|
{mihomoCoreCardStatus === 'col-span-2' ? (
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody>
|
<CardBody>
|
||||||
@ -105,7 +107,9 @@ const MihomoCoreCard: React.FC = () => {
|
|||||||
) : (
|
) : (
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
@ -34,7 +34,9 @@ const OverrideCard: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
@ -61,7 +61,9 @@ const ProfileCard: React.FC = () => {
|
|||||||
{profileCardStatus === 'col-span-2' ? (
|
{profileCardStatus === 'col-span-2' ? (
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1">
|
<CardBody className="pb-1">
|
||||||
@ -150,7 +152,9 @@ const ProfileCard: React.FC = () => {
|
|||||||
) : (
|
) : (
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
@ -36,7 +36,9 @@ const ProxyCard: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
@ -33,7 +33,9 @@ const ResourceCard: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
@ -35,7 +35,9 @@ const RuleCard: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
@ -44,7 +44,9 @@ const SniffCard: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Button, Card, CardBody, CardFooter } from '@nextui-org/react'
|
import { Button, Card, CardBody, CardFooter } from '@nextui-org/react'
|
||||||
import { useLocation, useNavigate } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { useSortable } from '@dnd-kit/sortable'
|
import { useSortable } from '@dnd-kit/sortable'
|
||||||
import { CSS } from '@dnd-kit/utilities'
|
import { CSS } from '@dnd-kit/utilities'
|
||||||
import SubStoreIcon from '../base/substore-icon'
|
import SubStoreIcon from '../base/substore-icon'
|
||||||
@ -7,7 +7,6 @@ import { useAppConfig } from '@renderer/hooks/use-app-config'
|
|||||||
const SubStoreCard: React.FC = () => {
|
const SubStoreCard: React.FC = () => {
|
||||||
const { appConfig } = useAppConfig()
|
const { appConfig } = useAppConfig()
|
||||||
const { substoreCardStatus = 'col-span-1', useSubStore = true } = appConfig || {}
|
const { substoreCardStatus = 'col-span-1', useSubStore = true } = appConfig || {}
|
||||||
const navigate = useNavigate()
|
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
const match = location.pathname.includes('/substore')
|
const match = location.pathname.includes('/substore')
|
||||||
const {
|
const {
|
||||||
@ -32,13 +31,14 @@ const SubStoreCard: React.FC = () => {
|
|||||||
className={`${substoreCardStatus} ${!useSubStore ? 'hidden' : ''}`}
|
className={`${substoreCardStatus} ${!useSubStore ? 'hidden' : ''}`}
|
||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
fullWidth
|
fullWidth
|
||||||
className={`${match ? 'bg-primary' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
isPressable
|
|
||||||
onPress={() => navigate('/substore')}
|
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
<div ref={setNodeRef} {...attributes} {...listeners} className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<Button
|
<Button
|
||||||
isIconOnly
|
isIconOnly
|
||||||
className="bg-transparent pointer-events-none"
|
className="bg-transparent pointer-events-none"
|
||||||
|
|||||||
@ -47,7 +47,9 @@ const SysproxySwitcher: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
@ -84,7 +84,9 @@ const TunSwitcher: React.FC = () => {
|
|||||||
|
|
||||||
<Card
|
<Card
|
||||||
fullWidth
|
fullWidth
|
||||||
ref={setNodeRef} {...attributes} {...listeners}
|
ref={setNodeRef}
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
className={`${match ? 'bg-primary' : 'hover:bg-primary/30'} ${isDragging ? 'scale-[0.97] tap-highlight-transparent' : ''}`}
|
||||||
>
|
>
|
||||||
<CardBody className="pb-1 pt-0 px-0">
|
<CardBody className="pb-1 pt-0 px-0">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user