chore: migrate fe 250723

This commit is contained in:
tecvan
2025-07-23 22:09:52 +08:00
parent 3b546369d8
commit 67d9687fb8
264 changed files with 19646 additions and 8816 deletions

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import cls from 'classnames';
@@ -21,8 +21,6 @@ import { type explore } from '@coze-studio/api-schema';
import { I18n } from '@coze-arch/i18n';
import { Avatar, Space, Tag, Toast, Tooltip } from '@coze-arch/coze-design';
import { cozeBaseUrl } from '@/const/url';
import { PluginAuthMode, type AuthMode } from '../type';
import { CardInfo } from '../components/info';
import { CardContainer, CardSkeletonContainer } from '../components/container';
@@ -40,13 +38,7 @@ export type PluginCardProps = ProductInfo & {
};
export const PluginCard: FC<PluginCardProps> = props => (
<CardContainer
className={styles.plugin}
shadowMode="default"
onClick={() => {
console.log('CardContainer...');
}}
>
<CardContainer className={styles.plugin} shadowMode="default">
<div className={styles['plugin-wrapper']}>
<PluginCardBody {...props} />
@@ -65,15 +57,6 @@ export const PluginCard: FC<PluginCardProps> = props => (
{I18n.t('plugin_store_install')}
</CardButton>
) : null}
<CardButton
onClick={() => {
window.open(
`${cozeBaseUrl}/store/plugin/${props.meta_info?.id}?from=plugin_card`,
);
}}
>
{I18n.t('plugin_usage_limits_modal_view_details')}
</CardButton>
</Space>
</div>
</CardContainer>
@@ -129,7 +112,6 @@ const PluginCardBody: FC<PluginCardProps> = props => {
userInfo: props.meta_info?.user_info,
authMode: props.plugin_extra.auth_mode,
renderCardTag,
descClassName: styles.description,
}}
/>
</div>

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC, useState } from 'react';
import cls from 'classnames';
@@ -48,13 +48,7 @@ const PATH_MAP: Partial<
export const TemplateCard: FC<TemplateCardProps> = props => {
const [visible, setVisible] = useState(false);
return (
<CardContainer
className={styles.template}
shadowMode="default"
onClick={() => {
console.log('Template Click Card');
}}
>
<CardContainer className={styles.template} shadowMode="default">
<div className={styles['template-wrapper']}>
<TempCardBody
{...{
@@ -112,7 +106,6 @@ const DuplicateModal: FC<{
const [title, setTitle] = useState(defaultTitle);
const { spaces } = useSpaceList();
const spaceId = spaces?.[0]?.id;
console.log('title', title, spaces);
return (
<Modal
type="modal"

View File

@@ -13,10 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import { useRequest } from 'ahooks';
import { type ProductInfo } from '@coze-studio/api-schema/marketplace';
import { I18n } from '@coze-arch/i18n';
import { IconCozIllusError } from '@coze-arch/coze-design/illustrations';
import { EmptyState } from '@coze-arch/coze-design';
@@ -25,7 +26,7 @@ import styles from './index.module.less';
export const PageList: FC<{
title: string;
renderCard: (cardData: unknown) => React.ReactNode;
renderCard: (cardData: ProductInfo) => React.ReactNode;
renderCardSkeleton: () => React.ReactNode;
getDataList: () => Promise<unknown[]>;
}> = ({ title, renderCard, getDataList, renderCardSkeleton }) => {
@@ -38,7 +39,6 @@ export const PageList: FC<{
const dataList = await getDataList();
return dataList;
});
console.log('data:', { cardList, loading, error });
return (
<div className={styles['explore-list-container']}>
<h2 className="leading-[72px] text-[20px] m-[0] pl-[24px] pr-[24px]">
@@ -59,7 +59,7 @@ export const PageList: FC<{
<div className="grid grid-cols-3 auto-rows-min gap-[20px] [@media(min-width:1600px)]:grid-cols-4 pl-[24px] pr-[24px]">
{loading
? new Array(20).fill(0).map((_, index) => renderCardSkeleton?.())
: cardList?.map(item => renderCard(item))}
: cardList?.map(item => renderCard(item as ProductInfo))}
</div>
)}
</div>

View File

@@ -13,9 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNavigate } from 'react-router-dom';
import { SubMenuItem } from '@coze-community/components';
import { I18n } from '@coze-arch/i18n';
import {
IconCozTemplate,
@@ -24,7 +25,6 @@ import {
IconCozPluginFill,
} from '@coze-arch/coze-design/icons';
import { Space } from '@coze-arch/coze-design';
import { SubMenuItem } from '@coze-community/components';
import { useExploreRoute } from '../../hooks/use-explore-route';
@@ -53,9 +53,6 @@ export const ExploreSubMenu = () => {
const menuConfig = getMenuConfig();
return (
<Space spacing={4} vertical>
<p className="text-[14px] w-full text-left font-medium coz-fg-secondary ">
{I18n.t('menu_title_personal_space')}
</p>
{menuConfig.map(item => (
<SubMenuItem
{...item}