fix: improve app manager (#3841)
This commit is contained in:
parent
74051ff0a5
commit
06980fd87d
@ -7,7 +7,7 @@ import { usePluginUtils } from './utils';
|
||||
const useLink = () => {
|
||||
const record = useRecord();
|
||||
const app = useApp();
|
||||
if (record.options?.standaloneDeployment && record.cname) {
|
||||
if (record.cname) {
|
||||
return `//${record.cname}`;
|
||||
}
|
||||
return app.getRouteUrl(`/apps/${record.name}/admin/`);
|
||||
|
@ -24,7 +24,7 @@ const MultiAppManager = () => {
|
||||
const items = [
|
||||
...(data?.data || []).map((app) => {
|
||||
let link = instance.getRouteUrl(`/apps/${app.name}/admin/`);
|
||||
if (app.options?.standaloneDeployment && app.cname) {
|
||||
if (app.cname) {
|
||||
link = `//${app.cname}`;
|
||||
}
|
||||
return {
|
||||
|
@ -2,6 +2,7 @@ import { ISchema } from '@formily/react';
|
||||
import { uid } from '@formily/shared';
|
||||
import {
|
||||
SchemaComponentOptions,
|
||||
tval,
|
||||
useActionContext,
|
||||
useRecord,
|
||||
useRequest,
|
||||
@ -112,25 +113,30 @@ export const formSchema: ISchema = {
|
||||
'x-decorator': 'FormItem',
|
||||
'x-disabled': '{{ !createOnly }}',
|
||||
},
|
||||
pinned: {
|
||||
'x-component': 'CollectionField',
|
||||
'x-decorator': 'FormItem',
|
||||
},
|
||||
'options.standaloneDeployment': {
|
||||
'x-component': 'Checkbox',
|
||||
'x-decorator': 'FormItem',
|
||||
'x-content': i18nText('Standalone deployment'),
|
||||
},
|
||||
// 'options.standaloneDeployment': {
|
||||
// 'x-component': 'Checkbox',
|
||||
// 'x-decorator': 'FormItem',
|
||||
// 'x-content': i18nText('Standalone deployment'),
|
||||
// },
|
||||
'options.autoStart': {
|
||||
'x-component': 'Checkbox',
|
||||
title: tval('Start mode', { ns: '@nocobase/plugin-multi-app-manager' }),
|
||||
'x-component': 'Radio.Group',
|
||||
'x-decorator': 'FormItem',
|
||||
'x-content': i18nText('Auto start'),
|
||||
default: false,
|
||||
enum: [
|
||||
{ label: tval('Start on first visit', { ns: '@nocobase/plugin-multi-app-manager' }), value: false },
|
||||
{ label: tval('Start with main application', { ns: '@nocobase/plugin-multi-app-manager' }), value: true },
|
||||
],
|
||||
},
|
||||
cname: {
|
||||
title: i18nText('Custom domain'),
|
||||
'x-component': 'Input',
|
||||
'x-decorator': 'FormItem',
|
||||
},
|
||||
pinned: {
|
||||
'x-component': 'CollectionField',
|
||||
'x-decorator': 'FormItem',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -7,5 +7,8 @@
|
||||
"Custom domain": "自定义域名",
|
||||
"Manage applications": "管理应用",
|
||||
"Standalone deployment": "独立部署",
|
||||
"Auto start": "自动启动"
|
||||
"Auto start": "自动启动",
|
||||
"Start mode": "启动方式",
|
||||
"Start on first visit": "首次访问时启动",
|
||||
"Start with main application": "随主应用一同启动"
|
||||
}
|
||||
|
@ -166,11 +166,11 @@ export default {
|
||||
options: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
standaloneDeployment: {
|
||||
type: 'boolean',
|
||||
example: true,
|
||||
description: '是否为独立部署的子应用',
|
||||
},
|
||||
// standaloneDeployment: {
|
||||
// type: 'boolean',
|
||||
// example: true,
|
||||
// description: '是否为独立部署的子应用',
|
||||
// },
|
||||
autoStart: {
|
||||
type: 'boolean',
|
||||
example: true,
|
||||
|
Loading…
Reference in New Issue
Block a user