|
|
|
|
|
|
|
|
import Category from '@/app/components/explore/category' |
|
|
import Category from '@/app/components/explore/category' |
|
|
import AppCard from '@/app/components/explore/app-card' |
|
|
import AppCard from '@/app/components/explore/app-card' |
|
|
import { fetchAppDetail, fetchAppList } from '@/service/explore' |
|
|
import { fetchAppDetail, fetchAppList } from '@/service/explore' |
|
|
import { importApp } from '@/service/apps' |
|
|
|
|
|
|
|
|
import { importDSL } from '@/service/apps' |
|
|
import { useTabSearchParams } from '@/hooks/use-tab-searchparams' |
|
|
import { useTabSearchParams } from '@/hooks/use-tab-searchparams' |
|
|
import CreateAppModal from '@/app/components/explore/create-app-modal' |
|
|
import CreateAppModal from '@/app/components/explore/create-app-modal' |
|
|
import AppTypeSelector from '@/app/components/app/type-selector' |
|
|
import AppTypeSelector from '@/app/components/app/type-selector' |
|
|
|
|
|
|
|
|
import { useAppContext } from '@/context/app-context' |
|
|
import { useAppContext } from '@/context/app-context' |
|
|
import { getRedirection } from '@/utils/app-redirection' |
|
|
import { getRedirection } from '@/utils/app-redirection' |
|
|
import Input from '@/app/components/base/input' |
|
|
import Input from '@/app/components/base/input' |
|
|
|
|
|
import { DSLImportMode } from '@/models/app' |
|
|
|
|
|
|
|
|
type AppsProps = { |
|
|
type AppsProps = { |
|
|
pageType?: PageType |
|
|
pageType?: PageType |
|
|
|
|
|
|
|
|
currApp?.app.id as string, |
|
|
currApp?.app.id as string, |
|
|
) |
|
|
) |
|
|
try { |
|
|
try { |
|
|
const app = await importApp({ |
|
|
|
|
|
data: export_data, |
|
|
|
|
|
|
|
|
const app = await importDSL({ |
|
|
|
|
|
mode: DSLImportMode.YAML_CONTENT, |
|
|
|
|
|
yaml_content: export_data, |
|
|
name, |
|
|
name, |
|
|
icon_type, |
|
|
icon_type, |
|
|
icon, |
|
|
icon, |