mirror of
https://github.com/langgenius/dify.git
synced 2026-05-11 23:18:39 +08:00
merge access and settings
This commit is contained in:
parent
64fec96a41
commit
c053549ece
@ -1,8 +0,0 @@
|
||||
import { AccessTab } from '@/features/deployments/detail/access-tab'
|
||||
|
||||
export default async function InstanceDetailAccessPage({ params }: {
|
||||
params: Promise<{ appInstanceId: string }>
|
||||
}) {
|
||||
const { appInstanceId } = await params
|
||||
return <AccessTab appInstanceId={appInstanceId} />
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
'use client'
|
||||
|
||||
import { AccessChannelsSection } from './access-tab/channels-section'
|
||||
import { DeveloperApiSection } from './access-tab/developer-api-section'
|
||||
import { AccessPermissionsSection } from './access-tab/permissions-section'
|
||||
|
||||
export function AccessTab({ appInstanceId }: {
|
||||
appInstanceId: string
|
||||
}) {
|
||||
return (
|
||||
<div className="flex w-full max-w-240 flex-col gap-5 p-6">
|
||||
<AccessPermissionsSection appInstanceId={appInstanceId} />
|
||||
<AccessChannelsSection appInstanceId={appInstanceId} />
|
||||
<DeveloperApiSection appInstanceId={appInstanceId} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -50,12 +50,6 @@ function VersionsIcon({ className }: TailwindNavIconProps) {
|
||||
function VersionsSelectedIcon({ className }: TailwindNavIconProps) {
|
||||
return <span aria-hidden className={cn('i-ri-stack-fill', className)} />
|
||||
}
|
||||
function AccessIcon({ className }: TailwindNavIconProps) {
|
||||
return <span aria-hidden className={cn('i-ri-plug-line', className)} />
|
||||
}
|
||||
function AccessSelectedIcon({ className }: TailwindNavIconProps) {
|
||||
return <span aria-hidden className={cn('i-ri-plug-fill', className)} />
|
||||
}
|
||||
function SettingsIcon({ className }: TailwindNavIconProps) {
|
||||
return <span aria-hidden className={cn('i-ri-settings-3-line', className)} />
|
||||
}
|
||||
@ -67,7 +61,6 @@ const TABS: TabDef[] = [
|
||||
{ key: 'overview', icon: OverviewIcon, selectedIcon: OverviewSelectedIcon },
|
||||
{ key: 'deploy', icon: DeployIcon, selectedIcon: DeploySelectedIcon },
|
||||
{ key: 'versions', icon: VersionsIcon, selectedIcon: VersionsSelectedIcon },
|
||||
{ key: 'access', icon: AccessIcon, selectedIcon: AccessSelectedIcon },
|
||||
{ key: 'settings', icon: SettingsIcon, selectedIcon: SettingsSelectedIcon },
|
||||
]
|
||||
|
||||
|
||||
@ -219,7 +219,7 @@ function AccessStatusSection({ appInstanceId }: {
|
||||
<Section
|
||||
title={t('overview.accessStatus')}
|
||||
action={(
|
||||
<Button nativeButton={false} size="small" variant="secondary" render={<Link href={`/deployments/${appInstanceId}/access`} />}>
|
||||
<Button nativeButton={false} size="small" variant="secondary" render={<Link href={`/deployments/${appInstanceId}/settings`} />}>
|
||||
{t('overview.configureAccess')}
|
||||
<span className="i-ri-arrow-right-up-line size-3.5" />
|
||||
</Button>
|
||||
|
||||
@ -17,6 +17,9 @@ import { useTranslation } from 'react-i18next'
|
||||
import { useRouter } from '@/next/navigation'
|
||||
import { consoleQuery } from '@/service/client'
|
||||
import { deployedRows } from '../utils'
|
||||
import { AccessChannelsSection } from './access-tab/channels-section'
|
||||
import { DeveloperApiSection } from './access-tab/developer-api-section'
|
||||
import { AccessPermissionsSection } from './access-tab/permissions-section'
|
||||
|
||||
type SettingsFormProps = {
|
||||
app: AppInstanceBasicInfo
|
||||
@ -276,7 +279,10 @@ export function SettingsTab({ appInstanceId }: {
|
||||
appInstanceId: string
|
||||
}) {
|
||||
return (
|
||||
<div className="flex max-w-160 flex-col gap-5 p-6">
|
||||
<div className="flex w-full max-w-240 flex-col gap-5 p-6">
|
||||
<AccessPermissionsSection appInstanceId={appInstanceId} />
|
||||
<AccessChannelsSection appInstanceId={appInstanceId} />
|
||||
<DeveloperApiSection appInstanceId={appInstanceId} />
|
||||
<SettingsFormSection appInstanceId={appInstanceId} />
|
||||
<DeleteInstanceControlSection appInstanceId={appInstanceId} />
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
export const INSTANCE_DETAIL_TAB_KEYS = ['overview', 'deploy', 'versions', 'access', 'settings'] as const
|
||||
export const INSTANCE_DETAIL_TAB_KEYS = ['overview', 'deploy', 'versions', 'settings'] as const
|
||||
|
||||
export type InstanceDetailTabKey = typeof INSTANCE_DETAIL_TAB_KEYS[number]
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ import { useFormatTimeFromNow } from '@/hooks/use-format-time-from-now'
|
||||
import Link from '@/next/link'
|
||||
import { toAppMode } from '../utils'
|
||||
|
||||
const INSTANCE_CARD_MENU_TAB_KEYS = ['deploy', 'versions', 'access', 'settings'] satisfies InstanceDetailTabKey[]
|
||||
const INSTANCE_CARD_MENU_TAB_KEYS = ['deploy', 'versions', 'settings'] satisfies InstanceDetailTabKey[]
|
||||
|
||||
function getInstanceTabHref(appInstanceId: string, tabKey: InstanceDetailTabKey) {
|
||||
return `/deployments/${appInstanceId}/${tabKey}`
|
||||
|
||||
@ -269,13 +269,11 @@
|
||||
"status.notDeployed": "Not deployed",
|
||||
"status.ready": "Ready",
|
||||
"subtitle": "Deploy and manage your apps across environments.",
|
||||
"tabs.access.description": "API keys and run-time access for this instance.",
|
||||
"tabs.access.name": "Access",
|
||||
"tabs.deploy.description": "Environments this instance is deployed to and their current releases.",
|
||||
"tabs.deploy.name": "Deploy",
|
||||
"tabs.overview.description": "Summary of this app instance across all environments.",
|
||||
"tabs.overview.name": "Overview",
|
||||
"tabs.settings.description": "View source app metadata and backend-managed settings.",
|
||||
"tabs.settings.description": "Access, API keys, metadata, and backend-managed settings.",
|
||||
"tabs.settings.name": "Settings",
|
||||
"tabs.versions.description": "All releases for this app. Deploy any release to an environment.",
|
||||
"tabs.versions.name": "Versions",
|
||||
|
||||
@ -269,13 +269,11 @@
|
||||
"status.notDeployed": "未部署",
|
||||
"status.ready": "就绪",
|
||||
"subtitle": "在不同环境中部署和管理你的应用。",
|
||||
"tabs.access.description": "该实例的 API 密钥和运行时访问设置。",
|
||||
"tabs.access.name": "接入",
|
||||
"tabs.deploy.description": "该实例已部署的环境及其当前发布版本。",
|
||||
"tabs.deploy.name": "部署",
|
||||
"tabs.overview.description": "该应用实例在所有环境中的概览。",
|
||||
"tabs.overview.name": "概览",
|
||||
"tabs.settings.description": "查看源应用元数据和后端托管设置。",
|
||||
"tabs.settings.description": "管理接入、API Key、元数据和后端托管设置。",
|
||||
"tabs.settings.name": "设置",
|
||||
"tabs.versions.description": "此应用的所有发布版本,可将任一版本发布到环境。",
|
||||
"tabs.versions.name": "版本",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user