💄 style: Fix style
parent
8a9ed3282d
commit
6d5d21f256
File diff suppressed because one or more lines are too long
|
|
@ -7,7 +7,7 @@ import {
|
|||
type ModalProps,
|
||||
} from '@lobehub/ui';
|
||||
import { Button } from 'antd';
|
||||
import { useTheme, useThemeMode } from 'antd-style';
|
||||
import { useTheme } from 'antd-style';
|
||||
import isEqual from 'fast-deep-equal';
|
||||
import { Github, Heart } from 'lucide-react';
|
||||
import { memo } from 'react';
|
||||
|
|
@ -15,14 +15,7 @@ import { useTranslation } from 'react-i18next';
|
|||
import { Center, Flexbox } from 'react-layout-kit';
|
||||
|
||||
import VersionTag from '@/components/VersionTag';
|
||||
import {
|
||||
DISCORD_URL,
|
||||
GISCUS_REPO_ID,
|
||||
GITHUB_REPO_URL,
|
||||
REPO_NAME,
|
||||
SPONSOR_IMG,
|
||||
SPONSOR_URL,
|
||||
} from '@/const/url';
|
||||
import { DISCORD_URL, GISCUS_REPO_ID, GITHUB_REPO_URL, REPO_NAME, SPONSOR_URL } from '@/const/url';
|
||||
import { selectors, useAppStore } from '@/store';
|
||||
|
||||
export interface GiscusProps {
|
||||
|
|
@ -33,7 +26,6 @@ export interface GiscusProps {
|
|||
const Giscus = memo<GiscusProps>(({ open, onCancel }) => {
|
||||
const setting = useAppStore(selectors.currentSetting, isEqual);
|
||||
const theme = useTheme();
|
||||
const { isDarkMode } = useThemeMode();
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Modal
|
||||
|
|
@ -72,9 +64,6 @@ const Giscus = memo<GiscusProps>(({ open, onCancel }) => {
|
|||
<GradientButton icon={<Icon icon={Heart} />}>Sponsor</GradientButton>
|
||||
</a>
|
||||
</Flexbox>
|
||||
<a href={SPONSOR_URL} rel="noreferrer" target="_blank">
|
||||
<img alt={'sponsor'} src={`${SPONSOR_IMG}${isDarkMode ? '?themeMode=dark' : ''}`} />
|
||||
</a>
|
||||
</Center>
|
||||
<G
|
||||
lang={setting.i18n}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,12 @@ import { useTranslation } from 'react-i18next';
|
|||
import { Flexbox } from 'react-layout-kit';
|
||||
import useSWR from 'swr';
|
||||
|
||||
import { TagItem } from '@/components/PromptEditor/TagList';
|
||||
import { formatPrompt } from '@/components/PromptEditor/utils';
|
||||
import { selectors, useAppStore } from '@/store';
|
||||
import { getPrompt } from '@/store/api';
|
||||
|
||||
import { TagItem } from '../TagList';
|
||||
import { formatPrompt } from '../utils';
|
||||
|
||||
const ID = `[id$='2img_prompt'] textarea`;
|
||||
|
||||
const PromptPicker = memo(() => {
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ import { useResponsive } from 'antd-style';
|
|||
import isEqual from 'fast-deep-equal';
|
||||
import { memo, useRef } from 'react';
|
||||
|
||||
import { removePromptScrollHide } from '@/features/Content/removePromptScrollHide';
|
||||
import { useInject } from '@/hooks/useInject';
|
||||
import { selectors, useAppStore } from '@/store';
|
||||
import { type DivProps } from '@/types';
|
||||
|
||||
import SplitView from './SplitView';
|
||||
import { removePromptScrollHide } from './removePromptScrollHide';
|
||||
import { useStyles } from './style';
|
||||
|
||||
const Content = memo<DivProps>(({ className, ...props }) => {
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@ import isEqual from 'fast-deep-equal';
|
|||
import { ZoomIn, ZoomOut } from 'lucide-react';
|
||||
import { memo, useState } from 'react';
|
||||
|
||||
import { useStyles } from '@/features/ExtraNetworkSidebar/style';
|
||||
import { useCivitaiHelperFix } from '@/features/ExtraNetworkSidebar/useCivitaiHelperFix';
|
||||
import { useInjectExtraNetwork } from '@/features/ExtraNetworkSidebar/useInjectExtraNetwork';
|
||||
import { selectors, useAppStore } from '@/store';
|
||||
|
||||
import { useStyles } from './style';
|
||||
import { useCivitaiHelperFix } from './useCivitaiHelperFix';
|
||||
import { useInjectExtraNetwork } from './useInjectExtraNetwork';
|
||||
|
||||
const Inner = memo(() => {
|
||||
const txt2imgExtraNetworkSidebarReference = useInjectExtraNetwork('txt');
|
||||
const img2imgExtraNetworkSidebarReference = useInjectExtraNetwork('img');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { memo } from 'react';
|
||||
|
||||
import { useInjectPromptFormator } from '@/features/PromptFormator/useInjectPromptFormator';
|
||||
import { useInjectPromptFormator } from './useInjectPromptFormator';
|
||||
|
||||
const PromptFormator = memo(() => {
|
||||
useInjectPromptFormator('txt');
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import { useRef } from 'react';
|
||||
|
||||
import { createButton } from '@/features/PromptFormator/createButton';
|
||||
import { useInject } from '@/hooks/useInject';
|
||||
|
||||
import { createButton } from './createButton';
|
||||
|
||||
export const useInjectPromptFormator = (type: 'txt' | 'img') => {
|
||||
const ref = useRef<any>(createButton(type));
|
||||
useInject(ref, `#${type}2img_tools > div.form`, {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import { memo, useCallback, useMemo, useState } from 'react';
|
|||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { CustomLogo } from '@/components';
|
||||
import { SettingItemGroup } from '@/features/Setting/Form/types';
|
||||
import { type WebuiSetting, selectors, useAppStore } from '@/store';
|
||||
|
||||
import Footer from './Footer';
|
||||
|
|
@ -19,6 +18,7 @@ import {
|
|||
primaryColors,
|
||||
primaryColorsSwatches,
|
||||
} from './data';
|
||||
import { SettingItemGroup } from './types';
|
||||
|
||||
const SettingForm = memo(() => {
|
||||
const setting = useAppStore(selectors.currentSetting, isEqual);
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ import { Puzzle, TextCursorInput } from 'lucide-react';
|
|||
import { memo, useCallback, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import Footer from '@/features/Setting/Form/Footer';
|
||||
import { SettingItemGroup } from '@/features/Setting/Form/types';
|
||||
import { WebuiSetting, selectors, useAppStore } from '@/store';
|
||||
|
||||
import Footer from './Footer';
|
||||
import { SettingItemGroup } from './types';
|
||||
|
||||
const SettingForm = memo(() => {
|
||||
const setting = useAppStore(selectors.currentSetting, isEqual);
|
||||
const onSetSetting = useAppStore((st) => st.onSetSetting);
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ import { Layout, TextCursorInput } from 'lucide-react';
|
|||
import { memo, useCallback, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import Footer from '@/features/Setting/Form/Footer';
|
||||
import { SettingItemGroup } from '@/features/Setting/Form/types';
|
||||
import { WebuiSetting, selectors, useAppStore } from '@/store';
|
||||
|
||||
import Footer from './Footer';
|
||||
import { SettingItemGroup } from './types';
|
||||
|
||||
const SettingForm = memo(() => {
|
||||
const setting = useAppStore(selectors.currentSetting, isEqual);
|
||||
const onSetSetting = useAppStore((st) => st.onSetSetting);
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ import { PanelLeftClose, PanelRightClose } from 'lucide-react';
|
|||
import { memo, useCallback, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import Footer from '@/features/Setting/Form/Footer';
|
||||
import { SettingItemGroup } from '@/features/Setting/Form/types';
|
||||
import { type WebuiSetting, selectors, useAppStore } from '@/store';
|
||||
|
||||
import Footer from './Footer';
|
||||
import { SettingItemGroup } from './types';
|
||||
|
||||
const SettingForm = memo(() => {
|
||||
const setting = useAppStore(selectors.currentSetting, isEqual);
|
||||
const onSetSetting = useAppStore((st) => st.onSetSetting);
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@ import { memo } from 'react';
|
|||
import { useTranslation } from 'react-i18next';
|
||||
import { Flexbox } from 'react-layout-kit';
|
||||
|
||||
import { useStyles } from '@/features/Share/style';
|
||||
import { useGalleryObserver } from '@/hooks/useGalleryObserver';
|
||||
import { useObserver } from '@/hooks/useObserver';
|
||||
import InfoBox from '@/modules/ImageInfo/features/InfoBox';
|
||||
|
||||
import { useStyles } from './style';
|
||||
|
||||
export interface PreviewInnerProps {
|
||||
showAllImages?: boolean;
|
||||
showConfig?: boolean;
|
||||
|
|
|
|||
Loading…
Reference in New Issue